[vlc-devel] commit: Added vout_Flush . (Laurent Aimar )
git version control
git at videolan.org
Fri Oct 10 00:19:58 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Oct 10 00:18:44 2008 +0200| [aa7c7e375e3320cc46ffb1c53d9aedb81c728458] | committer: Laurent Aimar
Added vout_Flush .
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aa7c7e375e3320cc46ffb1c53d9aedb81c728458
---
src/video_output/video_output.c | 17 +++++++++++++++++
src/video_output/vout_internal.h | 6 ++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index cd42cf2..c282ee0 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -610,7 +610,24 @@ void vout_GetResetStatistic( vout_thread_t *p_vout, int *pi_displayed, int *pi_l
vlc_object_unlock( p_vout );
}
+void vout_Flush( vout_thread_t *p_vout, mtime_t i_date )
+{
+ vlc_mutex_lock( &p_vout->picture_lock );
+ for( int i = 0; i < p_vout->render.i_pictures; i++ )
+ {
+ picture_t *p_pic = p_vout->render.pp_picture[i];
+ if( p_pic->i_status == READY_PICTURE ||
+ p_pic->i_status == DISPLAYED_PICTURE )
+ {
+ /* We cannot change picture status if it is in READY_PICTURE state,
+ * Just make sure they won't be displayed */
+ if( p_pic->date > i_date )
+ p_pic->date = i_date;
+ }
+ }
+ vlc_mutex_unlock( &p_vout->picture_lock );
+}
/*****************************************************************************
* InitThread: initialize video output thread
*****************************************************************************
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 7f5972d..212e20f 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -105,5 +105,11 @@ void spu_OffsetSubtitleDate( spu_t *p_spu, mtime_t i_duration );
*/
void vout_GetResetStatistic( vout_thread_t *p_vout, int *pi_displayed, int *pi_lost );
+/**
+ * This function will ensure that all ready/displayed pciture have at most
+ * the provided dat
+ */
+void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
+
#endif
More information about the vlc-devel
mailing list