]> git.sesse.net Git - vlc/commitdiff
sout: constify format parameter to sout_stream_t.pf_add
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 21 Feb 2015 10:18:43 +0000 (12:18 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 21 Feb 2015 10:19:14 +0000 (12:19 +0200)
23 files changed:
include/vlc_sout.h
modules/stream_out/autodel.c
modules/stream_out/bridge.c
modules/stream_out/chromaprint.c
modules/stream_out/chromecast/cast.cpp
modules/stream_out/cycle.c
modules/stream_out/delay.c
modules/stream_out/description.c
modules/stream_out/display.c
modules/stream_out/dummy.c
modules/stream_out/duplicate.c
modules/stream_out/es.c
modules/stream_out/gather.c
modules/stream_out/langfromtelx.c
modules/stream_out/mosaic_bridge.c
modules/stream_out/raop.c
modules/stream_out/record.c
modules/stream_out/rtp.c
modules/stream_out/setid.c
modules/stream_out/smem.c
modules/stream_out/standard.c
modules/stream_out/stats.c
modules/stream_out/transcode/transcode.c

index 467c4271e418b1d6f9db20efa396ec5040dd67a1..efc1e2ffbfbbf91807e8cf938fe33b9da0a41927 100644 (file)
@@ -186,7 +186,7 @@ struct sout_stream_t
     sout_stream_t     *p_next;
 
     /* add, remove a stream */
-    sout_stream_id_sys_t *(*pf_add)( sout_stream_t *, es_format_t * );
+    sout_stream_id_sys_t *(*pf_add)( sout_stream_t *, const es_format_t * );
     void              (*pf_del)( sout_stream_t *, sout_stream_id_sys_t * );
     /* manage a packet */
     int               (*pf_send)( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
@@ -199,15 +199,20 @@ VLC_API void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_las
 VLC_API sout_stream_t *sout_StreamChainNew(sout_instance_t *p_sout,
         char *psz_chain, sout_stream_t *p_next, sout_stream_t **p_last) VLC_USED;
 
-static inline sout_stream_id_sys_t *sout_StreamIdAdd( sout_stream_t *s, es_format_t *fmt )
+static inline sout_stream_id_sys_t *sout_StreamIdAdd( sout_stream_t *s,
+                                                      const es_format_t *fmt )
 {
     return s->pf_add( s, fmt );
 }
-static inline void sout_StreamIdDel( sout_stream_t *s, sout_stream_id_sys_t *id )
+
+static inline void sout_StreamIdDel( sout_stream_t *s,
+                                     sout_stream_id_sys_t *id )
 {
     s->pf_del( s, id );
 }
-static inline int sout_StreamIdSend( sout_stream_t *s, sout_stream_id_sys_t *id, block_t *b )
+
+static inline int sout_StreamIdSend( sout_stream_t *s,
+                                     sout_stream_id_sys_t *id, block_t *b )
 {
     return s->pf_send( s, id, b );
 }
index b7c03cd0e787f06615eb7cef5dddaffb935c4d75..91f95e3bb819a52fac610b2fe0dc3e303753dccd 100644 (file)
@@ -54,7 +54,7 @@ vlc_module_end ()
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static sout_stream_id_sys_t *Add   ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del   ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send  ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
@@ -111,7 +111,8 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream,
+                                   const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
     sout_stream_id_sys_t *p_es = malloc( sizeof(sout_stream_id_sys_t) );
index 3999bae94a60c13262e0e2f12cc241554b2bf4dc..6ee5448893aaa9bcdf7c7a282cd089136ddae498 100644 (file)
@@ -140,11 +140,11 @@ static const char *const ppsz_sout_options_in[] = {
     NULL
 };
 
-static sout_stream_id_sys_t *AddOut ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *AddOut( sout_stream_t *, const es_format_t * );
 static void              DelOut ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               SendOut( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
-static sout_stream_id_sys_t *AddIn ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *AddIn( sout_stream_t *, const es_format_t * );
 static void              DelIn ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               SendIn( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
@@ -233,7 +233,7 @@ static void CloseOut( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * AddOut( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * AddOut( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     out_sout_stream_sys_t *p_sys = (out_sout_stream_sys_t *)p_stream->p_sys;
     bridge_t *p_bridge;
@@ -451,7 +451,7 @@ struct sout_stream_id_sys_t
     int i_cat; /* es category. Used for placeholder option */
 };
 
-static sout_stream_id_sys_t * AddIn( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * AddIn( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys;
 
index fc9e2fea5af7b43561affa88d766e92e742a6f98..3a093a36ab20d8a842d9a00494459e854f54c55c 100644 (file)
@@ -47,7 +47,7 @@
 static int      Open    ( vlc_object_t * );
 static void     Close   ( vlc_object_t * );
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -160,7 +160,7 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t *id = NULL;
index 94e7fab8049249c9769770318baa74a15d230906..f56815081953034bb21173a27d3547a6a205c969 100644 (file)
@@ -175,7 +175,7 @@ vlc_module_end ()
 /*****************************************************************************
  * Sout callbacks
  *****************************************************************************/
-static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, es_format_t *p_fmt)
+static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, const es_format_t *p_fmt)
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     return p_sys->p_out->pf_add(p_sys->p_out, p_fmt);
index 50bc885741105253407e32acc397fb593e451450..9678bc55910c9b42b3a3aa4b527ce1858772f747 100644 (file)
@@ -69,7 +69,7 @@ static mtime_t get_dts(const block_t *block)
     return block->i_dts;
 }
 
-static sout_stream_id_sys_t *Add(sout_stream_t *stream, es_format_t *fmt)
+static sout_stream_id_sys_t *Add(sout_stream_t *stream, const es_format_t *fmt)
 {
     sout_stream_sys_t *sys = stream->p_sys;
     sout_stream_id_sys_t *id = malloc(sizeof (*id));
index 5f1c4f1f8392d1862ea0e8f96879e83cd265772e..340694a2c03c54008cf8b4548383fc2cd37b6bf2 100644 (file)
@@ -72,7 +72,7 @@ static const char *ppsz_sout_options[] = {
     "id", "delay", NULL
 };
 
-static sout_stream_id_sys_t *Add   ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del   ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send  ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
@@ -128,7 +128,7 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
 
index 847bc648bc75e325a07af505ee07aa94bd385d5f..bf77ba3a335f99626f9bebf55737b8b8b611920c 100644 (file)
@@ -43,7 +43,7 @@
 static int      Open    ( vlc_object_t * );
 static void     Close   ( vlc_object_t * );
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add ( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -104,7 +104,7 @@ static void Close( vlc_object_t *p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     es_format_t *p_fmt_copy = malloc( sizeof( *p_fmt_copy ) );
index c332a232516ac09af86f8c5414ff54a63e49beed..246fd3ba8b41c94bebb9813d9f9b8865ad9ee5f5 100644 (file)
@@ -74,7 +74,7 @@ static const char *const ppsz_sout_options[] = {
     "audio", "video", "delay", NULL
 };
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -136,7 +136,7 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
 
index 77b19d24a484393e0977feccad009c28f156d1e2..a4e105b978c922a59af14439366e653774e4e836 100644 (file)
@@ -39,7 +39,7 @@
  *****************************************************************************/
 static int      Open    ( vlc_object_t * );
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -69,7 +69,7 @@ static int Open( vlc_object_t *p_this )
     return VLC_SUCCESS;
 }
 
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     VLC_UNUSED(p_stream); VLC_UNUSED(p_fmt);
     return malloc( 1 );
index 9957fbface1ded045611e51147af58c5d99e7f8a..a59d679c5bf46c86e64baa1717e0fd9106b6117a 100644 (file)
@@ -53,7 +53,7 @@ vlc_module_end ()
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *,
                                block_t* );
@@ -76,7 +76,7 @@ struct sout_stream_id_sys_t
     void                **pp_ids;
 };
 
-static bool ESSelected( es_format_t *fmt, char *psz_select );
+static bool ESSelected( const es_format_t *fmt, char *psz_select );
 
 /*****************************************************************************
  * Open:
@@ -183,7 +183,7 @@ static void Close( vlc_object_t * p_this )
 /*****************************************************************************
  * Add:
  *****************************************************************************/
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t  *id;
@@ -328,7 +328,7 @@ static bool NumInRange( const char *psz_range, int i_num )
     return i_start <= i_num && i_num <= i_stop;
 }
 
-static bool ESSelected( es_format_t *fmt, char *psz_select )
+static bool ESSelected( const es_format_t *fmt, char *psz_select )
 {
     char  *psz_dup;
     char  *psz;
index 14a0165d7ea11122c400a529dea2d4e77363e27a..0eb79902bd5d0861886af87d7cb97acbb6b72d0d 100644 (file)
@@ -119,7 +119,7 @@ static const char *const ppsz_sout_options[] = {
     NULL
 };
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -269,7 +269,7 @@ static char * es_print_url( const char *psz_fmt, vlc_fourcc_t i_fourcc, int i_co
     return( psz_dst );
 }
 
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t  *id;
index 6d9dcb60802931e198bb1c6ce9de6468ee064897..2adfbab332933fc93c72bef2a5f8ed0496079e77 100644 (file)
@@ -51,7 +51,7 @@ vlc_module_end ()
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add ( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -121,7 +121,7 @@ static void Close( vlc_object_t * p_this )
 /*****************************************************************************
  * Add:
  *****************************************************************************/
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t  *id;
index a24c16fd91446284991dc8c5472f104a4cd44745..15b21ecfb096600e0acff04f3ba6b2031a6cc950 100644 (file)
@@ -146,9 +146,13 @@ static void Close( vlc_object_t * p_this )
 static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
+    sout_stream_id_sys_t *id;
+    es_format_t fmt;
 
     if ( p_fmt->i_id == p_sys->i_id )
     {
+        fmt = *p_fmt;
+
         p_sys->psz_old_language = p_fmt->psz_language;
         msg_Dbg( p_stream,
                  "changing language of ID %d (magazine %d page %x row %d)",
@@ -159,18 +163,16 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
         else
             strcpy( p_fmt->psz_language, "unk" );
         p_fmt->psz_language[3] = '\0';
-
-        p_sys->p_id = p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
-        return p_sys->p_id;
     }
 
-    if ( p_fmt->i_codec == VLC_CODEC_TELETEXT )
-    {
-        p_sys->p_telx = p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
-        return p_sys->p_telx;
-    }
+    id = sout_StreamIdAdd( p_stream->p_next, p_fmt );
+
+    if( p_fmt->i_id == p_sys->i_id )
+        p_sys->p_id = id;
+    if( p_fmt->i_codec == VLC_CODEC_TELETEXT )
+        p_sys->p_telx = id;
 
-    return p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
+    return id;
 }
 
 static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
index 034c6b5408d168ab29eb7ecc32b4cdb5187a719e..825de384b10e575ad09769f1d4853435faf3e074 100644 (file)
@@ -73,7 +73,7 @@ struct decoder_owner_sys_t
  *****************************************************************************/
 static int  Open    ( vlc_object_t * );
 static void Close   ( vlc_object_t * );
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
@@ -269,7 +269,7 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     bridge_t *p_bridge;
index 2260773b759e8ffc7c22917b194610be31651436..dca5fe3669816b676460b569b34217805ba0e6d4 100644 (file)
@@ -81,7 +81,7 @@ static const char psz_delim_semicolon[] = ";";
 static int Open( vlc_object_t * );
 static void Close( vlc_object_t * );
 
-static sout_stream_id_sys_t *Add( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void Del( sout_stream_t *, sout_stream_id_sys_t * );
 static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -1560,7 +1560,7 @@ static void Close( vlc_object_t *p_this )
 /*****************************************************************************
  * Add:
  *****************************************************************************/
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t *id = NULL;
index 27147328ada3ea7186907f913b3fdcd610a5cec3..289092e9aa21e3ac8b27e3f79802cddb33ff052b 100644 (file)
@@ -75,7 +75,7 @@ static const char *const ppsz_sout_options[] = {
 };
 
 /* */
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -180,7 +180,7 @@ static void Close( vlc_object_t * p_this )
 /*****************************************************************************
  *
  *****************************************************************************/
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t *id;
index 0d0e5e61fc0b64705cd3d2295c5de3a5dbfae161..1c0b1c27fac3f41b0fc35c22d568922b150344b7 100644 (file)
@@ -273,11 +273,11 @@ static const char *const ppsz_sout_options[] = {
     "mp4a-latm", NULL
 };
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *,
                                block_t* );
-static sout_stream_id_sys_t *MuxAdd ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *MuxAdd( sout_stream_t *, const es_format_t * );
 static void              MuxDel ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               MuxSend( sout_stream_t *, sout_stream_id_sys_t *,
                                   block_t* );
@@ -953,7 +953,8 @@ uint32_t rtp_compute_ts( unsigned i_clock_rate, int64_t i_pts )
 }
 
 /** Add an ES as a new RTP stream */
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream,
+                                  const es_format_t *p_fmt )
 {
     /* NOTE: As a special case, if we use a non-RTP
      * mux (TS/PS), then p_fmt is NULL. */
@@ -1676,7 +1677,8 @@ size_t rtp_mtu (const sout_stream_id_sys_t *id)
  *****************************************************************************/
 
 /** Add an ES to a non-RTP muxed stream */
-static sout_stream_id_sys_t *MuxAdd( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *MuxAdd( sout_stream_t *p_stream,
+                                     const es_format_t *p_fmt )
 {
     sout_input_t      *p_input;
     sout_mux_t *p_mux = p_stream->p_sys->p_mux;
index e42640e605dbe1ac72fb9928d7c0bbe25e0b7a9a..e06d29879f70a3adb96b0819d510e19066ad03c7 100644 (file)
@@ -95,8 +95,8 @@ static const char *ppsz_sout_options_lang[] = {
     "id", "lang", NULL
 };
 
-static sout_stream_id_sys_t *AddId   ( sout_stream_t *, es_format_t * );
-static sout_stream_id_sys_t *AddLang ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *AddId  ( sout_stream_t *, const es_format_t * );
+static sout_stream_id_sys_t *AddLang( sout_stream_t *, const es_format_t * );
 static void              Del     ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send    ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
@@ -185,12 +185,12 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * AddId( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * AddId( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
     es_format_t fmt;
 
-    if ( p_fmt->i_id == p_sys->i_id )
+    if( p_fmt->i_id == p_sys->i_id )
     {
         msg_Dbg( p_stream, "turning ID %d to %d", p_sys->i_id,
                  p_sys->i_new_id );
@@ -203,7 +203,7 @@ static sout_stream_id_sys_t * AddId( sout_stream_t *p_stream, es_format_t *p_fmt
     return sout_StreamIdAdd( p_stream->p_next, p_fmt );
 }
 
-static sout_stream_id_sys_t * AddLang( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * AddLang( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
     es_format_t fmt;
index 7bf9755419a46ce6fb4a0e54ceb8342e367bda35..a5fb1ee9d50382d1d795e6a55aef3d95dc8af7e6 100644 (file)
@@ -125,12 +125,14 @@ static const char *const ppsz_sout_options[] = {
     "video-postrender-callback", "audio-postrender-callback", "video-data", "audio-data", "time-sync", NULL
 };
 
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
-static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream, es_format_t *p_fmt );
-static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream, es_format_t *p_fmt );
+static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream,
+                                       const es_format_t *p_fmt );
+static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream,
+                                       const es_format_t *p_fmt );
 
 static int SendVideo( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
                       block_t *p_buffer );
@@ -206,7 +208,8 @@ static void Close( vlc_object_t * p_this )
     free( p_stream->p_sys );
 }
 
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream,
+                                  const es_format_t *p_fmt )
 {
     sout_stream_id_sys_t *id = NULL;
 
@@ -217,7 +220,8 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     return id;
 }
 
-static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream,
+                                       const es_format_t *p_fmt )
 {
     char* psz_tmp;
     sout_stream_id_sys_t    *id;
@@ -266,7 +270,8 @@ static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream, es_format_t *p_f
     return id;
 }
 
-static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream,
+                                       const es_format_t *p_fmt )
 {
     char* psz_tmp;
     sout_stream_id_sys_t* id;
index 5b8ce1023bb466d884dd0abf517fdecf028a925c..c86adf910d4eb4ae825fa69c13808e4d6779180a 100644 (file)
@@ -128,7 +128,7 @@ struct sout_stream_sys_t
     session_descriptor_t *p_session;
 };
 
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     return (sout_stream_id_sys_t*)sout_MuxAddStream( p_stream->p_sys->p_mux, p_fmt );
 }
index 996f1eca1aa55beae80f87f5d273baa26f024dab..8d2ac273867a07fa8abbba5382171ce1518202b0 100644 (file)
@@ -67,7 +67,7 @@ static const char *ppsz_sout_options[] = {
     "output", "prefix", NULL
 };
 
-static sout_stream_id_sys_t *Add   ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void               Del   ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send  ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
 
@@ -148,7 +148,7 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
     sout_stream_id_sys_t *id;
index 95f7635a81641345367a3823a4c29cf06515df02..c75bdf5ecb12b0becb435b85974e306ec5a239ff 100644 (file)
@@ -233,7 +233,7 @@ static const char *const ppsz_sout_options[] = {
 /*****************************************************************************
  * Exported prototypes
  *****************************************************************************/
-static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
+static sout_stream_id_sys_t *Add( sout_stream_t *, const es_format_t * );
 static void              Del ( sout_stream_t *, sout_stream_id_sys_t * );
 static int               Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
 
@@ -504,7 +504,8 @@ static void Close( vlc_object_t * p_this )
     free( p_sys );
 }
 
-static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
+static sout_stream_id_sys_t *Add( sout_stream_t *p_stream,
+                                  const es_format_t *p_fmt )
 {
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     sout_stream_id_sys_t *id;