[vlc-commits] sout: sout_input: add SOUT_INPUT_SET_SPU_HIGHLIGHT

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


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug 29 18:06:21 2018 +0200| [d987a4606dbd547dbb840abf52b0a6beb950a337] | committer: Francois Cartegnie

sout: sout_input: add SOUT_INPUT_SET_SPU_HIGHLIGHT

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

 src/stream_output/stream_output.c | 10 ++++++++++
 src/stream_output/stream_output.h |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 70a2b1ff6c..07508e1a0d 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -217,6 +217,16 @@ bool sout_InputIsEmpty( sout_packetizer_input_t *p_input )
 
 static int sout_InputControlVa( sout_packetizer_input_t *p_input, int i_query, va_list args )
 {
+    sout_instance_t *p_sout = p_input->p_sout;
+    if( i_query == SOUT_INPUT_SET_SPU_HIGHLIGHT )
+    {
+        vlc_mutex_lock( &p_sout->lock );
+        int i_ret = sout_StreamControl( p_sout->p_stream,
+                                        SOUT_STREAM_ID_SPU_HIGHLIGHT,
+                                        p_input->id, va_arg(args, void *) );
+        vlc_mutex_unlock( &p_sout->lock );
+        return i_ret;
+    }
     return VLC_EGENERIC;
 }
 
diff --git a/src/stream_output/stream_output.h b/src/stream_output/stream_output.h
index 43a2e7dd54..fabb15dd75 100644
--- a/src/stream_output/stream_output.h
+++ b/src/stream_output/stream_output.h
@@ -52,7 +52,7 @@ bool sout_InputIsEmpty(sout_packetizer_input_t *);
 
 enum sout_input_query_e
 {
-    SOUT_INPUT_NONE,
+    SOUT_INPUT_SET_SPU_HIGHLIGHT, /* arg1=const vlc_spu_highlight_t *, can fail */
 };
 int  sout_InputControl( sout_packetizer_input_t *, int i_query, ... );
 void sout_InputFlush( sout_packetizer_input_t * );



More information about the vlc-commits mailing list