[vlc-devel] [PATCH 07/18] sout rtp: implement SOUT_STREAM_IS_SYNCHRONOUS

RĂ©mi Denis-Courmont remi at remlab.net
Sat Oct 10 14:10:50 CEST 2020


---
 modules/stream_out/rtp.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 30fd5bba4a..68ff34b953 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -353,12 +353,29 @@ struct sout_stream_id_sys_t
     vlc_tick_t        i_caching;
 };
 
+static int Control(sout_stream_t *stream, int query, va_list args)
+{
+    (void) stream;
+
+    switch (query)
+    {
+        case SOUT_STREAM_IS_SYNCHRONOUS:
+            *va_arg(args, bool *) = true;
+            break;
+
+        default:
+            return VLC_EGENERIC;
+    }
+
+    return VLC_SUCCESS;
+}
+
 static const struct sout_stream_operations stream_ops = {
-    Add, Del, Send, NULL, NULL,
+    Add, Del, Send, Control, NULL,
 };
 
 static const struct sout_stream_operations mux_ops = {
-    MuxAdd, MuxDel, MuxSend, NULL, NULL,
+    MuxAdd, MuxDel, MuxSend, Control, NULL,
 };
 
 /*****************************************************************************
@@ -529,7 +546,6 @@ static int Open( vlc_object_t *p_this )
         p_sys->p_grab = NULL;
         p_stream->ops = &stream_ops;
     }
-    p_stream->pace_nocontrol = true;
 
     if( var_GetBool( p_stream, SOUT_CFG_PREFIX"sap" ) )
         SDPHandleUrl( p_stream, "sap://" );
-- 
2.28.0



More information about the vlc-devel mailing list