[vlc-commits] vout: remove vout_ReleasePicture()

Rémi Denis-Courmont git at videolan.org
Sat Nov 1 13:31:08 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov  1 14:17:01 2014 +0200| [58c8d782c5a3ec56e5f2e328a38d618c72d27740] | committer: Rémi Denis-Courmont

vout: remove vout_ReleasePicture()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58c8d782c5a3ec56e5f2e328a38d618c72d27740
---

 include/vlc_vout.h              |    2 --
 src/input/decoder.c             |   12 ++++++------
 src/libvlccore.sym              |    1 -
 src/video_output/video_output.c |   12 ++----------
 4 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/include/vlc_vout.h b/include/vlc_vout.h
index 108459e..15f321d 100644
--- a/include/vlc_vout.h
+++ b/include/vlc_vout.h
@@ -152,8 +152,6 @@ VLC_API void vout_ChangeAspectRatio( vout_thread_t *p_vout,
 VLC_API picture_t * vout_GetPicture( vout_thread_t * );
 VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
 
-VLC_API void vout_ReleasePicture( vout_thread_t *, picture_t * );
-
 /* */
 VLC_API void vout_PutSubpicture( vout_thread_t *, subpicture_t * );
 VLC_API int vout_RegisterSubpictureChannel( vout_thread_t * );
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 6b9891b..710b7d3 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1296,7 +1296,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
     {
         msg_Warn( p_dec, "non-dated video buffer received" );
         *pi_lost_sum += 1;
-        vout_ReleasePicture( p_vout, p_picture );
+        picture_Release( p_picture );
         return;
     }
 
@@ -1349,7 +1349,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
             msg_Warn( p_dec, "non-dated video buffer received" );
 
         *pi_lost_sum += 1;
-        vout_ReleasePicture( p_vout, p_picture );
+        picture_Release( p_picture );
     }
     int i_tmp_display;
     int i_tmp_lost;
@@ -1373,7 +1373,7 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
         if( DecoderIsExitRequested( p_dec ) )
         {
             /* It prevent freezing VLC in case of broken decoder */
-            vout_ReleasePicture( p_vout, p_pic );
+            picture_Release( p_pic );
             if( p_block )
                 block_Release( p_block );
             break;
@@ -1383,7 +1383,7 @@ static void DecoderDecodeVideo( decoder_t *p_dec, block_t *p_block )
 
         if( p_owner->i_preroll_end > VLC_TS_INVALID && p_pic->date < p_owner->i_preroll_end )
         {
-            vout_ReleasePicture( p_vout, p_pic );
+            picture_Release( p_pic );
             continue;
         }
 
@@ -2187,12 +2187,12 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
 
 static void vout_del_buffer( decoder_t *p_dec, picture_t *p_pic )
 {
-    vout_ReleasePicture( p_dec->p_owner->p_vout, p_pic );
+    picture_Release( p_pic );
 }
 
 static void vout_unlink_picture( decoder_t *p_dec, picture_t *p_pic )
 {
-    vout_ReleasePicture( p_dec->p_owner->p_vout, p_pic );
+    picture_Release( p_pic );
 }
 
 static subpicture_t *spu_new_buffer( decoder_t *p_dec,
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 299dade..102b3ad 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -614,7 +614,6 @@ vout_ChangeAspectRatio
 vout_Close
 vout_GetPicture
 vout_PutPicture
-vout_ReleasePicture
 vout_PutSubpicture
 vout_RegisterSubpictureChannel
 vout_FlushSubpictureChannel
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 887e7e0..66625b6 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -401,9 +401,9 @@ void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
  * It retreives a picture from the vout or NULL if no pictures are
  * available yet.
  *
- * You MUST call vout_PutPicture or vout_ReleasePicture on it.
+ * You MUST call vout_PutPicture or picture_Release on it.
  *
- * You may use picture_Hold() (paired with vout_ReleasePicture()) to keep a
+ * You may use picture_Hold() (paired with picture_Release()) to keep a
  * read-only reference.
  */
 picture_t *vout_GetPicture(vout_thread_t *vout)
@@ -433,14 +433,6 @@ void vout_PutPicture(vout_thread_t *vout, picture_t *picture)
     vout_control_Wake(&vout->p->control);
 }
 
-/**
- * It releases a picture retreived by vout_GetPicture.
- */
-void vout_ReleasePicture(vout_thread_t *vout, picture_t *picture)
-{
-    picture_Release(picture);
-}
-
 /* */
 int vout_GetSnapshot(vout_thread_t *vout,
                      block_t **image_dst, picture_t **picture_dst,



More information about the vlc-commits mailing list