[vlc-commits] sout: access_out and SDP do not need a sout instance
Rémi Denis-Courmont
git at videolan.org
Sat Oct 6 21:26:28 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 6 22:23:18 2012 +0300| [0a66b41ba528a72b4a8b53a1e4b3c245db324850] | committer: Rémi Denis-Courmont
sout: access_out and SDP do not need a sout instance
Any object can do. So do not bother with p_sout.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a66b41ba528a72b4a8b53a1e4b3c245db324850
---
modules/stream_out/es.c | 7 +++----
modules/stream_out/rtp.c | 8 +++-----
modules/stream_out/standard.c | 13 ++++++-------
3 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/modules/stream_out/es.c b/modules/stream_out/es.c
index 4f12c04..c2647b5 100644
--- a/modules/stream_out/es.c
+++ b/modules/stream_out/es.c
@@ -272,7 +272,6 @@ static char * es_print_url( const char *psz_fmt, vlc_fourcc_t i_fourcc, int i_co
static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
- sout_instance_t *p_sout = p_stream->p_sout;
sout_stream_id_t *id;
const char *psz_access;
@@ -354,7 +353,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
psz_access, psz_mux, psz_dst );
/* *** find and open appropriate access module *** */
- p_access = sout_AccessOutNew( p_sout, psz_access, psz_dst );
+ p_access = sout_AccessOutNew( p_stream, psz_access, psz_dst );
if( p_access == NULL )
{
msg_Err( p_stream, "no suitable sout access module for `%s/%s://%s'",
@@ -369,7 +368,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
}
/* *** find and open appropriate mux module *** */
- p_mux = sout_MuxNew( p_sout, psz_mux, p_access );
+ p_mux = sout_MuxNew( p_stream->p_sout, psz_mux, p_access );
if( p_mux == NULL )
{
msg_Err( p_stream, "no suitable sout mux module for `%s/%s://%s'",
@@ -404,7 +403,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
}
if( !sout_AccessOutCanControlPace( p_access ) )
- p_sout->i_out_pace_nocontrol++;
+ p_stream->p_sout->i_out_pace_nocontrol++;
return id;
}
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 501b9a6..2104ae8 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -397,7 +397,6 @@ struct sout_stream_id_t
static int Open( vlc_object_t *p_this )
{
sout_stream_t *p_stream = (sout_stream_t*)p_this;
- sout_instance_t *p_sout = p_stream->p_sout;
sout_stream_sys_t *p_sys = NULL;
config_chain_t *p_cfg = NULL;
char *psz;
@@ -571,7 +570,7 @@ static int Open( vlc_object_t *p_this )
}
p_sys->p_grab = GrabberCreate( p_stream );
- p_sys->p_mux = sout_MuxNew( p_sout, psz, p_sys->p_grab );
+ p_sys->p_mux = sout_MuxNew( p_stream->p_sout, psz, p_sys->p_grab );
free( psz );
if( p_sys->p_mux == NULL )
@@ -1306,17 +1305,16 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
static int SapSetup( sout_stream_t *p_stream )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
- sout_instance_t *p_sout = p_stream->p_sout;
/* Remove the previous session */
if( p_sys->p_session != NULL)
{
- sout_AnnounceUnRegister( p_sout, p_sys->p_session);
+ sout_AnnounceUnRegister( p_stream, p_sys->p_session);
p_sys->p_session = NULL;
}
if( p_sys->i_es > 0 && p_sys->psz_sdp && *p_sys->psz_sdp )
- p_sys->p_session = sout_AnnounceRegisterSDP( p_sout,
+ p_sys->p_session = sout_AnnounceRegisterSDP( p_stream,
p_sys->psz_sdp,
p_sys->psz_destination );
diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c
index 8b6b929..30d809a 100644
--- a/modules/stream_out/standard.c
+++ b/modules/stream_out/standard.c
@@ -197,7 +197,7 @@ static void create_SDP(sout_stream_t *p_stream, sout_access_out_t *p_access)
{
msg_Dbg (p_stream, "Generated SDP:\n%s", psz_sdp);
p_sys->p_session =
- sout_AnnounceRegisterSDP (p_stream->p_sout, psz_sdp, dhost);
+ sout_AnnounceRegisterSDP (p_stream, psz_sdp, dhost);
free( psz_sdp );
}
}
@@ -321,7 +321,6 @@ static void checkAccessMux( sout_stream_t *p_stream, char *psz_access,
static int Open( vlc_object_t *p_this )
{
sout_stream_t *p_stream = (sout_stream_t*)p_this;
- sout_instance_t *p_sout = p_stream->p_sout;
sout_stream_sys_t *p_sys;
char *psz_mux, *psz_access, *psz_url;
sout_access_out_t *p_access;
@@ -375,7 +374,7 @@ static int Open( vlc_object_t *p_this )
checkAccessMux( p_stream, psz_access, psz_mux );
- p_access = sout_AccessOutNew( p_sout, psz_access, psz_url );
+ p_access = sout_AccessOutNew( p_stream, psz_access, psz_url );
if( p_access == NULL )
{
msg_Err( p_stream, "no suitable sout access module for `%s/%s://%s'",
@@ -383,7 +382,7 @@ static int Open( vlc_object_t *p_this )
goto end;
}
- p_sys->p_mux = sout_MuxNew( p_sout, psz_mux, p_access );
+ p_sys->p_mux = sout_MuxNew( p_stream->p_sout, psz_mux, p_access );
if( !p_sys->p_mux )
{
const char *psz_mux_guess = getMuxFromAlias( psz_mux );
@@ -391,7 +390,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_sout, psz_mux_guess, p_access );
+ p_sys->p_mux = sout_MuxNew( p_stream->p_sout, psz_mux_guess, p_access );
}
if( !p_sys->p_mux )
@@ -408,7 +407,7 @@ static int Open( vlc_object_t *p_this )
create_SDP( p_stream, p_access );
if( !sout_AccessOutCanControlPace( p_access ) )
- p_sout->i_out_pace_nocontrol++;
+ p_stream->p_sout->i_out_pace_nocontrol++;
p_stream->pf_add = Add;
p_stream->pf_del = Del;
@@ -438,7 +437,7 @@ static void Close( vlc_object_t * p_this )
sout_access_out_t *p_access = p_sys->p_mux->p_access;
if( p_sys->p_session != NULL )
- sout_AnnounceUnRegister( p_stream->p_sout, p_sys->p_session );
+ sout_AnnounceUnRegister( p_stream, p_sys->p_session );
sout_MuxDelete( p_sys->p_mux );
if( !sout_AccessOutCanControlPace( p_access ) )
More information about the vlc-commits
mailing list