[vlc-devel] [PATCH 1/3] codec: remove unused decoder_AbortPictures()

Steve Lhomme robux4 at ycbcr.xyz
Mon Jul 27 15:36:31 CEST 2020


Unused since 6fc5e2bc5f33c6c2ffef13fe6f8408e1c5877070
---
 include/vlc_codec.h         | 11 -----------
 src/input/decoder.c         | 11 -----------
 src/input/decoder_helpers.c |  7 -------
 src/libvlccore.sym          |  1 -
 4 files changed, 30 deletions(-)

diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index ae647eab2e1..81c2cb5d142 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -54,8 +54,6 @@ struct decoder_owner_callbacks
 
             /* cf. decoder_NewPicture, can be called from any decoder thread */
             picture_t*  (*buffer_new)( decoder_t * );
-            /* cf. decoder_AbortPictures */
-            void        (*abort_pictures)( decoder_t *, bool b_abort );
             /* cf.decoder_QueueVideo */
             void        (*queue)( decoder_t *, picture_t * );
             /* cf.decoder_QueueCC */
@@ -359,15 +357,6 @@ VLC_API int decoder_UpdateVideoFormat( decoder_t *dec );
  */
 VLC_API picture_t *decoder_NewPicture( decoder_t *dec );
 
-/**
- * Abort any calls of decoder_NewPicture
- *
- * If b_abort is true, all pending and futures calls of decoder_NewPicture
- * will be aborted. This function can be used by asynchronous video decoders
- * to unblock a thread that is waiting for a picture.
- */
-VLC_API void decoder_AbortPictures( decoder_t *dec, bool b_abort );
-
 /**
  * Initialize a decoder structure before creating the decoder.
  *
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 141120d6395..99c5f12e12f 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -787,16 +787,6 @@ static void RequestReload( vlc_input_decoder_t *p_owner )
     atomic_compare_exchange_strong( &p_owner->reload, &expected, RELOAD_DECODER );
 }
 
-static void DecoderThread_AbortPictures( decoder_t *p_dec, bool b_abort )
-{
-    vlc_input_decoder_t *p_owner = dec_get_owner( p_dec );
-
-    vlc_mutex_lock( &p_owner->lock ); // called in DecoderThread
-    if (p_owner->out_pool)
-        picture_pool_Cancel( p_owner->out_pool, b_abort );
-    vlc_mutex_unlock( &p_owner->lock );
-}
-
 static void DecoderWaitUnblock( vlc_input_decoder_t *p_owner )
 {
     vlc_mutex_assert( &p_owner->lock );
@@ -1723,7 +1713,6 @@ static const struct decoder_owner_callbacks dec_video_cbs =
         .get_device = ModuleThread_GetDecoderDevice,
         .format_update = ModuleThread_UpdateVideoFormat,
         .buffer_new = ModuleThread_NewVideoBuffer,
-        .abort_pictures = DecoderThread_AbortPictures,
         .queue = ModuleThread_QueueVideo,
         .queue_cc = ModuleThread_QueueCc,
         .get_display_date = ModuleThread_GetDisplayDate,
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index e59cdcb3a10..c98e62bf214 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -159,13 +159,6 @@ picture_t *decoder_NewPicture( decoder_t *dec )
     return dec->cbs->video.buffer_new( dec );
 }
 
-void decoder_AbortPictures(decoder_t *dec, bool abort)
-{
-    vlc_assert(dec->fmt_in.i_cat == VIDEO_ES && dec->cbs);
-    if (dec->cbs->video.abort_pictures)
-        dec->cbs->video.abort_pictures(dec, abort);
-}
-
 struct vlc_decoder_device_priv
 {
     struct vlc_decoder_device device;
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index d7d93aa549f..6b6598f2cf3 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -75,7 +75,6 @@ decoder_NewPicture
 decoder_Init
 decoder_Clean
 decoder_Destroy
-decoder_AbortPictures
 decoder_NewAudioBuffer
 decoder_UpdateVideoFormat
 decoder_UpdateVideoOutput
-- 
2.26.2



More information about the vlc-devel mailing list