NULL
};
-static sout_stream_id_t *AddOut ( sout_stream_t *, es_format_t * );
-static int DelOut ( sout_stream_t *, sout_stream_id_t * );
-static int SendOut( sout_stream_t *, sout_stream_id_t *, block_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_t *AddIn ( sout_stream_t *, es_format_t * );
-static int DelIn ( sout_stream_t *, sout_stream_id_t * );
-static int SendIn( sout_stream_t *, sout_stream_id_t *, block_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 * );
typedef struct bridged_es_t
{
bool b_empty;
/* bridge in part */
- sout_stream_id_t *id;
+ sout_stream_id_sys_t *id;
mtime_t i_last;
bool b_changed;
} bridged_es_t;
free( p_sys );
}
-static sout_stream_id_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;
vlc_mutex_unlock( &lock );
- return (sout_stream_id_t *)p_sys;
+ return (sout_stream_id_sys_t *)p_sys;
}
-static int DelOut( sout_stream_t *p_stream, sout_stream_id_t *id )
+static void DelOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{
VLC_UNUSED(id);
out_sout_stream_sys_t *p_sys = (out_sout_stream_sys_t *)p_stream->p_sys;
bridged_es_t *p_es;
if ( !p_sys->b_inited )
- {
- return VLC_SUCCESS;
- }
+ return;
vlc_mutex_lock( &lock );
vlc_mutex_unlock( &lock );
p_sys->b_inited = false;
-
- return VLC_SUCCESS;
}
-static int SendOut( sout_stream_t *p_stream, sout_stream_id_t *id,
+static int SendOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
block_t *p_buffer )
{
out_sout_stream_sys_t *p_sys = (out_sout_stream_sys_t *)p_stream->p_sys;
bool b_switch_on_iframe;
int i_state;
mtime_t i_placeholder_delay;
- sout_stream_id_t *id_video;
+ sout_stream_id_sys_t *id_video;
mtime_t i_last_video;
- sout_stream_id_t *id_audio;
+ sout_stream_id_sys_t *id_audio;
mtime_t i_last_audio;
} in_sout_stream_sys_t;
free( p_sys );
}
-struct sout_stream_id_t
+struct sout_stream_id_sys_t
{
- sout_stream_id_t *id;
+ sout_stream_id_sys_t *id;
int i_cat; /* es category. Used for placeholder option */
};
-static sout_stream_id_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;
- sout_stream_id_t *id = malloc( sizeof( sout_stream_id_t ) );
+ sout_stream_id_sys_t *id = malloc( sizeof( sout_stream_id_sys_t ) );
if( !id ) return NULL;
id->id = p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
return id;
}
-static int DelIn( sout_stream_t *p_stream, sout_stream_id_t *id )
+static void DelIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{
in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys;
if( id == p_sys->id_video ) p_sys->id_video = NULL;
if( id == p_sys->id_audio ) p_sys->id_audio = NULL;
- int ret = p_stream->p_next->pf_del( p_stream->p_next, id->id );
-
+ p_stream->p_next->pf_del( p_stream->p_next, id->id );
free( id );
- return ret;
}
-static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id,
+static int SendIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
block_t *p_buffer )
{
in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys;
p_block->i_dts += p_sys->i_delay;
p_block = p_block->p_next;
}
- sout_stream_id_t *newid = NULL;
+ sout_stream_id_sys_t *newid = NULL;
if( p_sys->b_placeholder )
{
switch( p_bridge->pp_es[i]->fmt.i_cat )