<html><head></head><body>Fine with me.<br><br><div class="gmail_quote">Le 16 mai 2018 11:28:20 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">This status was never used. Decoder modules don't need to know if vouts/aouts<br>will drop the frame they just queued.<br>---<br> include/vlc_codec.h | 35 +++++++++++++----------------------<br> src/input/decoder.c | 34 +++++++++++++---------------------<br> 2 files changed, 26 insertions(+), 43 deletions(-)<br><br>diff --git a/include/vlc_codec.h b/include/vlc_codec.h<br>index 41aa99cb0b..67ac0057e1 100644<br>--- a/include/vlc_codec.h<br>+++ b/include/vlc_codec.h<br>@@ -174,13 +174,13 @@ struct decoder_t<br> int (*pf_get_display_rate)( decoder_t * );<br> <br> /* XXX use decoder_QueueVideo or decoder_QueueVideoWithCc */<br>- int (*pf_queue_video)( decoder_t *, picture_t * );<br>+ void (*pf_queue_video)( decoder_t *, picture_t * );<br> /* XXX use decoder_QueueAudio */<br>- int (*pf_queue_audio)( decoder_t *, block_t * );<br>+ void (*pf_queue_audio)( decoder_t *, block_t * );<br> /* XXX use decoder_QueueCC */<br>- int (*pf_queue_cc)( decoder_t *, block_t *, const decoder_cc_desc_t * );<br>+ void (*pf_queue_cc)( decoder_t *, block_t *, const decoder_cc_desc_t * );<br> /* XXX use decoder_QueueSub */<br>- int (*pf_queue_sub)( decoder_t *, subpicture_t *);<br>+ void (*pf_queue_sub)( decoder_t *, subpicture_t *);<br> void *p_queue_ctx;<br> <br> /* Private structure for the owner of the decoder */<br>@@ -306,14 +306,12 @@ VLC_API void decoder_AbortPictures( decoder_t *dec, bool b_abort );<br> * The caller doesn't own the picture anymore after this call (even in case of<br> * error).<br> * FIXME: input_DecoderFrameNext won't work if a module use this function.<br>- *<br>- * \return 0 if the picture is queued, -1 on error<br> */<br>-static inline int decoder_QueueVideo( decoder_t *dec, picture_t *p_pic )<br>+static inline void decoder_QueueVideo( decoder_t *dec, picture_t *p_pic )<br> {<br> assert( p_pic->p_next == NULL );<br> assert( dec->pf_queue_video != NULL );<br>- return dec->pf_queue_video( dec, p_pic );<br>+ dec->pf_queue_video( dec, p_pic );<br> }<br> <br> /**<br>@@ -322,17 +320,14 @@ static inline int decoder_QueueVideo( decoder_t *dec, picture_t *p_pic )<br> * \param dec the decoder object<br> * \param p_cc the closed-caption to queue<br> * \param p_desc decoder_cc_desc_t description structure<br>- * \return 0 if queued, -1 on error<br> */<br>-static inline int decoder_QueueCc( decoder_t *dec, block_t *p_cc,<br>+static inline void decoder_QueueCc( decoder_t *dec, block_t *p_cc,<br> const decoder_cc_desc_t *p_desc )<br> {<br> if( dec->pf_queue_cc == NULL )<br>- {<br> block_Release( p_cc );<br>- return -1;<br>- }<br>- return dec->pf_queue_cc( dec, p_cc, p_desc );<br>+ else<br>+ dec->pf_queue_cc( dec, p_cc, p_desc );<br> }<br> <br> /**<br>@@ -341,14 +336,12 @@ static inline int decoder_QueueCc( decoder_t *dec, block_t *p_cc,<br> * \note<br> * The caller doesn't own the audio block anymore after this call (even in case<br> * of error).<br>- *<br>- * \return 0 if the block is queued, -1 on error<br> */<br>-static inline int decoder_QueueAudio( decoder_t *dec, block_t *p_aout_buf )<br>+static inline void decoder_QueueAudio( decoder_t *dec, block_t *p_aout_buf )<br> {<br> assert( p_aout_buf->p_next == NULL );<br> assert( dec->pf_queue_audio != NULL );<br>- return dec->pf_queue_audio( dec, p_aout_buf );<br>+ dec->pf_queue_audio( dec, p_aout_buf );<br> }<br> <br> /**<br>@@ -357,14 +350,12 @@ static inline int decoder_QueueAudio( decoder_t *dec, block_t *p_aout_buf )<br> * \note<br> * The caller doesn't own the subtitle anymore after this call (even in case of<br> * error).<br>- *<br>- * \return 0 if the subtitle is queued, -1 on error<br> */<br>-static inline int decoder_QueueSub( decoder_t *dec, subpicture_t *p_spu )<br>+static inline void decoder_QueueSub( decoder_t *dec, subpicture_t *p_spu )<br> {<br> assert( p_spu->p_next == NULL );<br> assert( dec->pf_queue_sub != NULL );<br>- return dec->pf_queue_sub( dec, p_spu );<br>+ dec->pf_queue_sub( dec, p_spu );<br> }<br> <br> /**<br>diff --git a/src/input/decoder.c b/src/input/decoder.c<br>index c4225ac94a..32a98b5132 100644<br>--- a/src/input/decoder.c<br>+++ b/src/input/decoder.c<br>@@ -970,7 +970,7 @@ static void PacketizerGetCc( decoder_t *p_dec, decoder_t *p_dec_cc )<br> DecoderPlayCc( p_dec, p_cc, &desc );<br> }<br> <br>-static int DecoderQueueCc( decoder_t *p_videodec, block_t *p_cc,<br>+static void DecoderQueueCc( decoder_t *p_videodec, block_t *p_cc,<br> const decoder_cc_desc_t *p_desc )<br> {<br> decoder_owner_sys_t *p_owner = p_videodec->p_owner;<br>@@ -983,10 +983,9 @@ static int DecoderQueueCc( decoder_t *p_videodec, block_t *p_cc,<br> else<br> block_Release( p_cc );<br> }<br>- return 0;<br> }<br> <br>-static int DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br>+static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br> unsigned *restrict pi_lost_sum )<br> {<br> decoder_owner_sys_t *p_owner = p_dec->p_owner;<br>@@ -998,7 +997,7 @@ static int DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br> {<br> vlc_mutex_unlock( &p_owner->lock );<br> picture_Release( p_picture );<br>- return -1;<br>+ return;<br> }<br> <br> prerolled = p_owner->i_preroll_end > (mtime_t)INT64_MIN;<br>@@ -1077,11 +1076,10 @@ static int DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br> goto discard;<br> }<br> <br>- return 0;<br>+ return;<br> discard:<br> *pi_lost_sum += 1;<br> picture_Release( p_picture );<br>- return 0;<br> }<br> <br> static void DecoderUpdateStatVideo( decoder_owner_sys_t *p_owner,<br>@@ -1115,19 +1113,18 @@ static void DecoderUpdateStatVideo( decoder_owner_sys_t *p_owner,<br> }<br> }<br> <br>-static int DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )<br>+static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )<br> {<br> assert( p_pic );<br> unsigned i_lost = 0;<br> decoder_owner_sys_t *p_owner = p_dec->p_owner;<br> <br>- int ret = DecoderPlayVideo( p_dec, p_pic, &i_lost );<br>+ DecoderPlayVideo( p_dec, p_pic, &i_lost );<br> <br> p_owner->pf_update_stat( p_owner, 1, i_lost );<br>- return ret;<br> }<br> <br>-static int DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,<br>+static void DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,<br> unsigned *restrict pi_lost_sum )<br> {<br> decoder_owner_sys_t *p_owner = p_dec->p_owner;<br>@@ -1140,7 +1137,7 @@ static int DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,<br> {<br> vlc_mutex_unlock( &p_owner->lock );<br> block_Release( p_audio );<br>- return -1;<br>+ return;<br> }<br> <br> prerolled = p_owner->i_preroll_end > (mtime_t)INT64_MIN;<br>@@ -1161,7 +1158,7 @@ static int DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,<br> msg_Warn( p_dec, "non-dated audio buffer received" );<br> *pi_lost_sum += 1;<br> block_Release( p_audio );<br>- return 0;<br>+ return;<br> }<br> <br> /* */<br>@@ -1207,7 +1204,7 @@ static int DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,<br> *pi_lost_sum += 1;<br> block_Release( p_audio );<br> }<br>- return 0;<br>+ return;<br> }<br> <br> static void DecoderUpdateStatAudio( decoder_owner_sys_t *p_owner,<br>@@ -1241,16 +1238,14 @@ static void DecoderUpdateStatAudio( decoder_owner_sys_t *p_owner,<br> }<br> }<br> <br>-static int DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )<br>+static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )<br> {<br> unsigned lost = 0;<br> decoder_owner_sys_t *p_owner = p_dec->p_owner;<br> <br>- int ret = DecoderPlayAudio( p_dec, p_aout_buf, &lost );<br>+ DecoderPlayAudio( p_dec, p_aout_buf, &lost );<br> <br> p_owner->pf_update_stat( p_owner, 1, lost );<br>-<br>- return ret;<br> }<br> <br> static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic )<br>@@ -1296,12 +1291,11 @@ static void DecoderUpdateStatSpu( decoder_owner_sys_t *p_owner,<br> (void) p_owner; (void) decoded; (void) lost;<br> }<br> <br>-static int DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )<br>+static void DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )<br> {<br> assert( p_spu );<br> decoder_owner_sys_t *p_owner = p_dec->p_owner;<br> <br>- int i_ret = -1;<br> vout_thread_t *p_vout = input_resource_HoldVout( p_owner->p_resource );<br> if( p_vout && p_owner->p_spu_vout == p_vout )<br> {<br>@@ -1318,7 +1312,6 @@ static int DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )<br> {<br> vlc_mutex_unlock( &p_owner->lock );<br> DecoderPlaySpu( p_dec, p_spu );<br>- i_ret = 0;<br> }<br> }<br> else<br>@@ -1327,7 +1320,6 @@ static int DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )<br> }<br> if( p_vout )<br> vlc_object_release( p_vout );<br>- return i_ret;<br> }<br> <br> static void DecoderProcess( decoder_t *p_dec, block_t *p_block );</pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>