[vlc-devel] [PATCH 4/4] chromecast: forward sout Flush and Control calls

Steve Lhomme robux4 at videolabs.io
Fri Dec 18 12:51:41 CET 2015


---
 modules/stream_out/chromecast/cast.cpp | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index 31f0b6a..b36204e 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -180,6 +180,19 @@ static int Send(sout_stream_t *p_stream, sout_stream_id_sys_t *id,
     return sout_StreamIdSend(p_sys->p_out, id, p_buffer);
 }
 
+static int Flush( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
+{
+    sout_stream_sys_t *p_sys = p_stream->p_sys;
+
+    return sout_StreamFlush( p_sys->p_out, id );
+}
+
+static int Control(sout_stream_t *p_stream, int i_query, va_list args)
+{
+    sout_stream_sys_t *p_sys = p_stream->p_sys;
+
+    return p_sys->p_wrapped->pf_control( p_sys->p_out, i_query, args );
+}
 
 /*****************************************************************************
  * Open: connect to the Chromecast and initialize the sout
@@ -286,9 +299,11 @@ static int Open(vlc_object_t *p_this)
     msleep(2 * CLOCK_FREQ);
 
     // Set the sout callbacks.
-    p_stream->pf_add    = Add;
-    p_stream->pf_del    = Del;
-    p_stream->pf_send   = Send;
+    p_stream->pf_add     = Add;
+    p_stream->pf_del     = Del;
+    p_stream->pf_send    = Send;
+    p_stream->pf_flush   = Flush;
+    p_stream->pf_control = Control;
 
     return VLC_SUCCESS;
 }
-- 
2.6.3



More information about the vlc-devel mailing list