[vlc-commits] commit: Used Used vout_control_Push for vout_FlushSubpictureChannel . ( Laurent Aimar )

git at videolan.org git at videolan.org
Tue May 25 22:01:21 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue May 25 21:21:44 2010 +0200| [68e3372bf836fef4b8a06cfdd2cae4cf9aa621b3] | committer: Laurent Aimar 

Used Used vout_control_Push for vout_FlushSubpictureChannel .

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

 src/video_output/control.h      |    1 +
 src/video_output/video_output.c |   12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/video_output/control.h b/src/video_output/control.h
index 6e1f7d7..4654736 100644
--- a/src/video_output/control.h
+++ b/src/video_output/control.h
@@ -40,6 +40,7 @@ enum {
     VOUT_CONTROL_STOP,
 #endif
     VOUT_CONTROL_SUBPICTURE,            /* subpicture */
+    VOUT_CONTROL_FLUSH_SUBPICTURE,      /* integer */
     VOUT_CONTROL_OSD_TITLE,             /* string */
     VOUT_CONTROL_CHANGE_FILTERS,        /* string */
     VOUT_CONTROL_CHANGE_SUB_FILTERS,    /* string */
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 248829e..7c1c8bd 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -361,7 +361,8 @@ int vout_RegisterSubpictureChannel( vout_thread_t *vout )
 }
 void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
 {
-    spu_ClearChannel(vout->p->p_spu, channel);
+    vout_control_PushInteger(&vout->p->control, VOUT_CONTROL_FLUSH_SUBPICTURE,
+                             channel);
 }
 
 /* vout_Control* are usable by anyone at anytime */
@@ -758,6 +759,12 @@ static void ThreadDisplaySubpicture(vout_thread_t *vout,
 {
     spu_DisplaySubpicture(vout->p->p_spu, subpicture);
 }
+
+static void ThreadFlushSubpicture(vout_thread_t *vout, int channel)
+{
+    spu_ClearChannel(vout->p->p_spu, channel);
+}
+
 static void ThreadDisplayOsdTitle(vout_thread_t *vout, const char *string)
 {
     if (!vout->p->title.show)
@@ -1113,6 +1120,9 @@ static void *Thread(void *object)
                 ThreadDisplaySubpicture(vout, cmd.u.subpicture);
                 cmd.u.subpicture = NULL;
                 break;
+            case VOUT_CONTROL_FLUSH_SUBPICTURE:
+                ThreadFlushSubpicture(vout, cmd.u.integer);
+                break;
             case VOUT_CONTROL_OSD_TITLE:
                 ThreadDisplayOsdTitle(vout, cmd.u.string);
                 break;



More information about the vlc-commits mailing list