[vlc-devel] [PATCH 5/8] sout: display: handle SOUT_STREAM_ID_SPU_HIGHLIGHT

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


---
 modules/stream_out/display.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/modules/stream_out/display.c b/modules/stream_out/display.c
index 372c249b9d..59e8d5f0a1 100644
--- a/modules/stream_out/display.c
+++ b/modules/stream_out/display.c
@@ -77,6 +77,7 @@ static const char *const ppsz_sout_options[] = {
 static void *Add( sout_stream_t *, const es_format_t * );
 static void  Del( sout_stream_t *, void * );
 static int   Send( sout_stream_t *, void *, block_t * );
+static int   Control( sout_stream_t *, int, va_list );
 
 typedef struct
 {
@@ -116,6 +117,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;
     p_stream->pace_nocontrol = true;
 
@@ -192,3 +194,15 @@ static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
 
     return VLC_SUCCESS;
 }
+
+static int Control( sout_stream_t *p_stream, int i_query, va_list args )
+{
+    sout_stream_sys_t *p_sys = p_stream->p_sys;
+    if( i_query == SOUT_STREAM_ID_SPU_HIGHLIGHT )
+    {
+        decoder_t *p_dec = va_arg(args, void *);
+        void *spu_hl = va_arg(args, void *);
+        return input_DecoderSetSpuHighlight( p_dec, spu_hl );
+    }
+    return VLC_EGENERIC;
+}
-- 
2.14.4



More information about the vlc-devel mailing list