[vlc-commits] sout: duplicate: forward highlight

Francois Cartegnie git at videolan.org
Mon Sep 3 23:26:22 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug 28 19:23:34 2018 +0200| [5fe607e7514dfc31d7264db24185a194795e8e2e] | committer: Francois Cartegnie

sout: duplicate: forward highlight

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

 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
@@ -78,6 +78,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:
  *****************************************************************************/
 static int Open( vlc_object_t *p_this )
@@ -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;
 



More information about the vlc-commits mailing list