[vlc-commits] mux: remove sout parameter from sout_MuxNew()

Rémi Denis-Courmont git at videolan.org
Tue Mar 3 18:41:37 CET 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 29 19:06:14 2020 +0200| [493955b9dcdc2445cda03b55fdb273381ec79692] | committer: Rémi Denis-Courmont

mux: remove sout parameter from sout_MuxNew()

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

 include/vlc_sout.h                | 2 +-
 modules/stream_out/es.c           | 2 +-
 modules/stream_out/rtp.c          | 2 +-
 modules/stream_out/standard.c     | 4 ++--
 src/missing.c                     | 5 ++---
 src/stream_output/stream_output.c | 7 +++----
 6 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index 48ef95006b..4534d9f5d5 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -161,7 +161,7 @@ struct sout_input_t
 };
 
 
-VLC_API sout_mux_t * sout_MuxNew( sout_instance_t*, const char *, sout_access_out_t * ) VLC_USED;
+VLC_API sout_mux_t * sout_MuxNew( sout_access_out_t *, const char * ) VLC_USED;
 VLC_API sout_input_t *sout_MuxAddStream( sout_mux_t *, const es_format_t * ) VLC_USED;
 VLC_API void sout_MuxDeleteStream( sout_mux_t *, sout_input_t * );
 VLC_API void sout_MuxDelete( sout_mux_t * );
diff --git a/modules/stream_out/es.c b/modules/stream_out/es.c
index b37737bf1a..03d1f671e1 100644
--- a/modules/stream_out/es.c
+++ b/modules/stream_out/es.c
@@ -354,7 +354,7 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
     bool pace_control = sout_AccessOutCanControlPace( p_access );
 
     /* *** find and open appropriate mux module *** */
-    p_mux = sout_MuxNew( p_stream->p_sout, psz_mux, p_access );
+    p_mux = sout_MuxNew( p_access, psz_mux );
     if( p_mux == NULL )
     {
         msg_Err( p_stream, "no suitable sout mux module for `%s/%s://%s'",
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 5e1461e487..c471b46266 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -510,7 +510,7 @@ static int Open( vlc_object_t *p_this )
         }
 
         p_sys->p_grab = GrabberCreate( p_stream );
-        p_sys->p_mux = sout_MuxNew( p_stream->p_sout, psz, p_sys->p_grab );
+        p_sys->p_mux = sout_MuxNew( p_sys->p_grab, psz );
         free( psz );
 
         if( p_sys->p_mux == NULL )
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 3a36e7b394..5c3717ea8a 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -384,7 +384,7 @@ static int Open( vlc_object_t *p_this )
         goto end;
     }
 
-    p_sys->p_mux = sout_MuxNew( p_stream->p_sout, psz_mux, p_access );
+    p_sys->p_mux = sout_MuxNew( p_access, psz_mux );
     if( !p_sys->p_mux )
     {
         const char *psz_mux_guess = getMuxFromAlias( psz_mux );
@@ -392,7 +392,7 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Dbg( p_stream, "Couldn't open mux `%s', trying `%s' instead",
                 psz_mux, psz_mux_guess );
-            p_sys->p_mux = sout_MuxNew( p_stream->p_sout, psz_mux_guess, p_access );
+            p_sys->p_mux = sout_MuxNew( p_access, psz_mux_guess );
         }
 
         if( !p_sys->p_mux )
diff --git a/src/missing.c b/src/missing.c
index 72c60c9315..982df95d36 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -149,10 +149,9 @@ noreturn int sout_MuxGetStream(sout_mux_t *mux, unsigned n, vlc_tick_t *date)
     vlc_assert_unreachable ();
 }
 
-noreturn sout_mux_t *sout_MuxNew(sout_instance_t *instance, const char *mux,
-                                 sout_access_out_t *out)
+noreturn sout_mux_t *sout_MuxNew(sout_access_out_t *out, const char *mux)
 {
-    VLC_UNUSED (instance); VLC_UNUSED (mux); VLC_UNUSED (out);
+    VLC_UNUSED(out); VLC_UNUSED(mux);
     vlc_assert_unreachable ();
 }
 
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 2da38b9cde..dd83aef1c4 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -388,13 +388,12 @@ int sout_AccessOutControl (sout_access_out_t *access, int query, ...)
 /*****************************************************************************
  * sout_MuxNew: create a new mux
  *****************************************************************************/
-sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
-                          sout_access_out_t *p_access )
+sout_mux_t *sout_MuxNew( sout_access_out_t *p_access, const char *psz_mux )
 {
     sout_mux_t *p_mux;
     char       *psz_next;
 
-    p_mux = vlc_custom_create( p_sout, sizeof( *p_mux ), "mux" );
+    p_mux = vlc_custom_create( p_access, sizeof( *p_mux ), "mux" );
     if( p_mux == NULL )
         return NULL;
 
@@ -440,7 +439,7 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
 
         if( b_answer )
         {
-            msg_Dbg( p_sout, "muxer support adding stream at any time" );
+            msg_Dbg( p_access, "muxer support adding stream at any time" );
             p_mux->b_add_stream_any_time = true;
             p_mux->b_waiting_stream = true;
         }



More information about the vlc-commits mailing list