[vlc-commits] rtp: use chained demux

Rémi Denis-Courmont git at videolan.org
Thu Jun 30 20:28:25 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 30 21:24:09 2016 +0300| [316ec21173605b4fd1f80e69cc094213eb33c2cf] | committer: Rémi Denis-Courmont

rtp: use chained demux

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

 modules/access/rtp/rtp.c |   11 ++++++-----
 modules/access/rtp/rtp.h |    4 +++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index 6772d67..be8e82a 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -136,7 +136,7 @@ vlc_module_end ()
  * - send RTCP-RR and RTCP-BYE
  * - dynamic payload types (need SDP parser)
  * - multiple medias (need SDP parser, and RTCP-SR parser for lip-sync)
- * - support for stream_filter in case of stream_Demux (MPEG-TS)
+ * - support for stream_filter in case of chained demux (MPEG-TS)
  */
 
 #ifndef IPPROTO_DCCP
@@ -396,7 +396,7 @@ static int Control (demux_t *demux, int query, va_list args)
     }
 
     if (sys->chained_demux != NULL)
-        return stream_DemuxControlVa (sys->chained_demux, query, args);
+        return vlc_demux_chained_ControlVa (sys->chained_demux, query, args);
 
     switch (query)
     {
@@ -456,7 +456,8 @@ static void *stream_init (demux_t *demux, const char *name)
 
     if (p_sys->chained_demux != NULL)
         return NULL;
-    p_sys->chained_demux = stream_DemuxNew (demux, name, demux->out);
+    p_sys->chained_demux = vlc_demux_chained_New(VLC_OBJECT(demux), name,
+                                                 demux->out);
     return p_sys->chained_demux;
 }
 
@@ -466,7 +467,7 @@ static void stream_destroy (demux_t *demux, void *data)
 
     if (data)
     {
-        stream_Delete ((stream_t *)data);
+        vlc_demux_chained_Delete(data);
         p_sys->chained_demux = NULL;
     }
 }
@@ -475,7 +476,7 @@ static void stream_destroy (demux_t *demux, void *data)
 static void stream_decode (demux_t *demux, void *data, block_t *block)
 {
     if (data)
-        stream_DemuxSend ((stream_t *)data, block);
+        vlc_demux_chained_Send(data, block);
     else
         block_Release (block);
     (void)demux;
diff --git a/modules/access/rtp/rtp.h b/modules/access/rtp/rtp.h
index a608bbb..dd6d802 100644
--- a/modules/access/rtp/rtp.h
+++ b/modules/access/rtp/rtp.h
@@ -23,6 +23,8 @@
 typedef struct rtp_pt_t rtp_pt_t;
 typedef struct rtp_session_t rtp_session_t;
 
+struct vlc_demux_chained_t;
+
 /** @section RTP payload format */
 struct rtp_pt_t
 {
@@ -62,7 +64,7 @@ void *rtp_stream_thread (void *data);
 struct demux_sys_t
 {
     rtp_session_t *session;
-    stream_t *chained_demux;
+    struct vlc_demux_chained_t *chained_demux;
 #ifdef HAVE_SRTP
     struct srtp_session_t *srtp;
 #endif



More information about the vlc-commits mailing list