Commit 21dfee9d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

sout: constify format parameter to sout_stream_t.pf_add

parent 82a2bdec
...@@ -186,7 +186,7 @@ struct sout_stream_t ...@@ -186,7 +186,7 @@ struct sout_stream_t
sout_stream_t *p_next; sout_stream_t *p_next;
/* add, remove a stream */ /* 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 * ); void (*pf_del)( sout_stream_t *, sout_stream_id_sys_t * );
/* manage a packet */ /* manage a packet */
int (*pf_send)( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); 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 ...@@ -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, 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; 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 ); 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 ); 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 ); return s->pf_send( s, id, b );
} }
......
...@@ -54,7 +54,7 @@ vlc_module_end () ...@@ -54,7 +54,7 @@ vlc_module_end ()
/***************************************************************************** /*****************************************************************************
* Local prototypes * 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -111,7 +111,8 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_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) ); sout_stream_id_sys_t *p_es = malloc( sizeof(sout_stream_id_sys_t) );
......
...@@ -140,11 +140,11 @@ static const char *const ppsz_sout_options_in[] = { ...@@ -140,11 +140,11 @@ static const char *const ppsz_sout_options_in[] = {
NULL 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 void DelOut ( sout_stream_t *, sout_stream_id_sys_t * );
static int SendOut( sout_stream_t *, sout_stream_id_sys_t *, block_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 void DelIn ( sout_stream_t *, sout_stream_id_sys_t * );
static int SendIn( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -233,7 +233,7 @@ static void CloseOut( vlc_object_t * p_this )
free( p_sys ); 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; out_sout_stream_sys_t *p_sys = (out_sout_stream_sys_t *)p_stream->p_sys;
bridge_t *p_bridge; bridge_t *p_bridge;
...@@ -451,7 +451,7 @@ struct sout_stream_id_sys_t ...@@ -451,7 +451,7 @@ struct sout_stream_id_sys_t
int i_cat; /* es category. Used for placeholder option */ 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; in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys;
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -160,7 +160,7 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id = NULL; sout_stream_id_sys_t *id = NULL;
......
...@@ -175,7 +175,7 @@ vlc_module_end () ...@@ -175,7 +175,7 @@ vlc_module_end ()
/***************************************************************************** /*****************************************************************************
* Sout callbacks * 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; sout_stream_sys_t *p_sys = p_stream->p_sys;
return p_sys->p_out->pf_add(p_sys->p_out, p_fmt); return p_sys->p_out->pf_add(p_sys->p_out, p_fmt);
......
...@@ -69,7 +69,7 @@ static mtime_t get_dts(const block_t *block) ...@@ -69,7 +69,7 @@ static mtime_t get_dts(const block_t *block)
return block->i_dts; 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_sys_t *sys = stream->p_sys;
sout_stream_id_sys_t *id = malloc(sizeof (*id)); sout_stream_id_sys_t *id = malloc(sizeof (*id));
......
...@@ -72,7 +72,7 @@ static const char *ppsz_sout_options[] = { ...@@ -72,7 +72,7 @@ static const char *ppsz_sout_options[] = {
"id", "delay", NULL "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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -128,7 +128,7 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -104,7 +104,7 @@ static void Close( vlc_object_t *p_this )
free( p_sys ); 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_sys_t *p_sys = p_stream->p_sys;
es_format_t *p_fmt_copy = malloc( sizeof( *p_fmt_copy ) ); es_format_t *p_fmt_copy = malloc( sizeof( *p_fmt_copy ) );
......
...@@ -74,7 +74,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -74,7 +74,7 @@ static const char *const ppsz_sout_options[] = {
"audio", "video", "delay", NULL "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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -136,7 +136,7 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_sys_t *p_sys = p_stream->p_sys;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * ); 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -69,7 +69,7 @@ static int Open( vlc_object_t *p_this )
return VLC_SUCCESS; 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); VLC_UNUSED(p_stream); VLC_UNUSED(p_fmt);
return malloc( 1 ); return malloc( 1 );
......
...@@ -53,7 +53,7 @@ vlc_module_end () ...@@ -53,7 +53,7 @@ vlc_module_end ()
/***************************************************************************** /*****************************************************************************
* Exported prototypes * 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, static int Send( sout_stream_t *, sout_stream_id_sys_t *,
block_t* ); block_t* );
...@@ -76,7 +76,7 @@ struct sout_stream_id_sys_t ...@@ -76,7 +76,7 @@ struct sout_stream_id_sys_t
void **pp_ids; 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: * Open:
...@@ -183,7 +183,7 @@ static void Close( vlc_object_t * p_this ) ...@@ -183,7 +183,7 @@ static void Close( vlc_object_t * p_this )
/***************************************************************************** /*****************************************************************************
* Add: * 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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id; sout_stream_id_sys_t *id;
...@@ -328,7 +328,7 @@ static bool NumInRange( const char *psz_range, int i_num ) ...@@ -328,7 +328,7 @@ static bool NumInRange( const char *psz_range, int i_num )
return i_start <= i_num && i_num <= i_stop; 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_dup;
char *psz; char *psz;
......
...@@ -119,7 +119,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -119,7 +119,7 @@ static const char *const ppsz_sout_options[] = {
NULL 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ...@@ -269,7 +269,7 @@ static char * es_print_url( const char *psz_fmt, vlc_fourcc_t i_fourcc, int i_co
return( psz_dst ); 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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id; sout_stream_id_sys_t *id;
......
...@@ -51,7 +51,7 @@ vlc_module_end () ...@@ -51,7 +51,7 @@ vlc_module_end ()
/***************************************************************************** /*****************************************************************************
* Exported prototypes * 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -121,7 +121,7 @@ static void Close( vlc_object_t * p_this )
/***************************************************************************** /*****************************************************************************
* Add: * 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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id; sout_stream_id_sys_t *id;
......
...@@ -146,9 +146,13 @@ static void Close( vlc_object_t * p_this ) ...@@ -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 ) 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_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 ) if ( p_fmt->i_id == p_sys->i_id )
{ {
fmt = *p_fmt;
p_sys->psz_old_language = p_fmt->psz_language; p_sys->psz_old_language = p_fmt->psz_language;
msg_Dbg( p_stream, msg_Dbg( p_stream,
"changing language of ID %d (magazine %d page %x row %d)", "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 ) ...@@ -159,18 +163,16 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
else else
strcpy( p_fmt->psz_language, "unk" ); strcpy( p_fmt->psz_language, "unk" );
p_fmt->psz_language[3] = '\0'; 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 ) id = sout_StreamIdAdd( p_stream->p_next, p_fmt );
{
p_sys->p_telx = p_stream->p_next->pf_add( p_stream->p_next, p_fmt ); if( p_fmt->i_id == p_sys->i_id )
return p_sys->p_telx; 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 ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
......
...@@ -73,7 +73,7 @@ struct decoder_owner_sys_t ...@@ -73,7 +73,7 @@ struct decoder_owner_sys_t
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -269,7 +269,7 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_sys_t *p_sys = p_stream->p_sys;
bridge_t *p_bridge; bridge_t *p_bridge;
......
...@@ -81,7 +81,7 @@ static const char psz_delim_semicolon[] = ";"; ...@@ -81,7 +81,7 @@ static const char psz_delim_semicolon[] = ";";
static int Open( vlc_object_t * ); static int Open( vlc_object_t * );
static void Close( 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 void Del( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -1560,7 +1560,7 @@ static void Close( vlc_object_t *p_this )
/***************************************************************************** /*****************************************************************************
* Add: * 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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id = NULL; sout_stream_id_sys_t *id = NULL;
......
...@@ -75,7 +75,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id; sout_stream_id_sys_t *id;
......
...@@ -273,11 +273,11 @@ static const char *const ppsz_sout_options[] = { ...@@ -273,11 +273,11 @@ static const char *const ppsz_sout_options[] = {
"mp4a-latm", NULL "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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, static int Send( sout_stream_t *, sout_stream_id_sys_t *,
block_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 void MuxDel ( sout_stream_t *, sout_stream_id_sys_t * );
static int MuxSend( sout_stream_t *, sout_stream_id_sys_t *, static int MuxSend( sout_stream_t *, sout_stream_id_sys_t *,
block_t* ); block_t* );
...@@ -953,7 +953,8 @@ uint32_t rtp_compute_ts( unsigned i_clock_rate, int64_t i_pts ) ...@@ -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 */ /** 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 /* NOTE: As a special case, if we use a non-RTP
* mux (TS/PS), then p_fmt is NULL. */ * mux (TS/PS), then p_fmt is NULL. */
...@@ -1676,7 +1677,8 @@ size_t rtp_mtu (const sout_stream_id_sys_t *id) ...@@ -1676,7 +1677,8 @@ size_t rtp_mtu (const sout_stream_id_sys_t *id)
*****************************************************************************/ *****************************************************************************/
/** Add an ES to a non-RTP muxed stream */ /** 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_input_t *p_input;
sout_mux_t *p_mux = p_stream->p_sys->p_mux; sout_mux_t *p_mux = p_stream->p_sys->p_mux;
......
...@@ -95,8 +95,8 @@ static const char *ppsz_sout_options_lang[] = { ...@@ -95,8 +95,8 @@ static const char *ppsz_sout_options_lang[] = {
"id", "lang", NULL "id", "lang", NULL
}; };
static sout_stream_id_sys_t *AddId ( 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 *, 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -185,12 +185,12 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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; sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
es_format_t fmt; 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, msg_Dbg( p_stream, "turning ID %d to %d", p_sys->i_id,
p_sys->i_new_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 ...@@ -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 ); 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; sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
es_format_t fmt; es_format_t fmt;
......
...@@ -125,12 +125,14 @@ static const char *const ppsz_sout_options[] = { ...@@ -125,12 +125,14 @@ static const char *const ppsz_sout_options[] = {
"video-postrender-callback", "audio-postrender-callback", "video-data", "audio-data", "time-sync", NULL "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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 *AddVideo( sout_stream_t *p_stream,
static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream, es_format_t *p_fmt ); 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, static int SendVideo( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
block_t *p_buffer ); block_t *p_buffer );
...@@ -206,7 +208,8 @@ static void Close( vlc_object_t * p_this ) ...@@ -206,7 +208,8 @@ static void Close( vlc_object_t * p_this )
free( p_stream->p_sys ); 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; 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 ) ...@@ -217,7 +220,8 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return id; 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; char* psz_tmp;
sout_stream_id_sys_t *id; 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 ...@@ -266,7 +270,8 @@ static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream, es_format_t *p_f
return id; 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; char* psz_tmp;
sout_stream_id_sys_t* id; sout_stream_id_sys_t* id;
......
...@@ -128,7 +128,7 @@ struct sout_stream_sys_t ...@@ -128,7 +128,7 @@ struct sout_stream_sys_t
session_descriptor_t *p_session; 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 ); return (sout_stream_id_sys_t*)sout_MuxAddStream( p_stream->p_sys->p_mux, p_fmt );
} }
......
...@@ -67,7 +67,7 @@ static const char *ppsz_sout_options[] = { ...@@ -67,7 +67,7 @@ static const char *ppsz_sout_options[] = {
"output", "prefix", NULL "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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -148,7 +148,7 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
sout_stream_id_sys_t *id; sout_stream_id_sys_t *id;
......
...@@ -233,7 +233,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -233,7 +233,7 @@ static const char *const ppsz_sout_options[] = {
/***************************************************************************** /*****************************************************************************
* Exported prototypes * 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 void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_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 ) ...@@ -504,7 +504,8 @@ static void Close( vlc_object_t * p_this )
free( p_sys ); 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_sys_t *p_sys = p_stream->p_sys;
sout_stream_id_sys_t *id; sout_stream_id_sys_t *id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment