[vlc-devel] [PATCH 7/8] sout: duplicate: forward highlight

Francois Cartegnie fcvlcdev at free.fr
Wed Aug 29 18:27:56 CEST 2018


---
 modules/stream_out/duplicate.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/modules/stream_out/duplicate.c b/modules/stream_out/duplicate.c
index 1463830142..0b8059ce8d 100644
--- a/modules/stream_out/duplicate.c
+++ b/modules/stream_out/duplicate.c
@@ -77,6 +77,33 @@ typedef struct
 
 static bool ESSelected( const es_format_t *fmt, char *psz_select );
 
+/*****************************************************************************
+ * Control
+ *****************************************************************************/
+static int Control( sout_stream_t *p_stream, int i_query, va_list args )
+{
+    sout_stream_sys_t *p_sys = p_stream->p_sys;
+
+    /* Fanout controls */
+    switch( i_query )
+    {
+        case SOUT_STREAM_ID_SPU_HIGHLIGHT:
+        {
+            sout_stream_id_sys_t *id = va_arg(args, void *);
+            void *spu_hl = va_arg(args, void *);
+            for( int i = 0; i < id->i_nb_ids; i++ )
+            {
+                if( id->pp_ids[i] )
+                    sout_StreamControl( p_sys->pp_streams[i], i_query,
+                                        id->pp_ids[i], spu_hl );
+            }
+            return VLC_SUCCESS;
+        }
+    }
+
+    return VLC_EGENERIC;
+}
+
 /*****************************************************************************
  * Open:
  *****************************************************************************/
@@ -150,6 +177,7 @@ static int Open( vlc_object_t *p_this )
     p_stream->pf_add    = Add;
     p_stream->pf_del    = Del;
     p_stream->pf_send   = Send;
+    p_stream->pf_control = Control;
 
     p_stream->p_sys     = p_sys;
 
-- 
2.14.4



More information about the vlc-devel mailing list