Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
0a66b41b
Commit
0a66b41b
authored
Oct 06, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sout: access_out and SDP do not need a sout instance
Any object can do. So do not bother with p_sout.
parent
f33e3e4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
16 deletions
+12
-16
modules/stream_out/es.c
modules/stream_out/es.c
+3
-4
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+3
-5
modules/stream_out/standard.c
modules/stream_out/standard.c
+6
-7
No files found.
modules/stream_out/es.c
View file @
0a66b41b
...
@@ -272,7 +272,6 @@ static char * es_print_url( const char *psz_fmt, vlc_fourcc_t i_fourcc, int i_co
...
@@ -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
)
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_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
sout_instance_t
*
p_sout
=
p_stream
->
p_sout
;
sout_stream_id_t
*
id
;
sout_stream_id_t
*
id
;
const
char
*
psz_access
;
const
char
*
psz_access
;
...
@@ -354,7 +353,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
...
@@ -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
);
psz_access
,
psz_mux
,
psz_dst
);
/* *** find and open appropriate access module *** */
/* *** find and open appropriate access module *** */
p_access
=
sout_AccessOutNew
(
p_s
out
,
psz_access
,
psz_dst
);
p_access
=
sout_AccessOutNew
(
p_s
tream
,
psz_access
,
psz_dst
);
if
(
p_access
==
NULL
)
if
(
p_access
==
NULL
)
{
{
msg_Err
(
p_stream
,
"no suitable sout access module for `%s/%s://%s'"
,
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 )
...
@@ -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 *** */
/* *** find and open appropriate mux module *** */
p_mux
=
sout_MuxNew
(
p_sout
,
psz_mux
,
p_access
);
p_mux
=
sout_MuxNew
(
p_s
tream
->
p_s
out
,
psz_mux
,
p_access
);
if
(
p_mux
==
NULL
)
if
(
p_mux
==
NULL
)
{
{
msg_Err
(
p_stream
,
"no suitable sout mux module for `%s/%s://%s'"
,
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 )
...
@@ -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
)
)
if
(
!
sout_AccessOutCanControlPace
(
p_access
)
)
p_sout
->
i_out_pace_nocontrol
++
;
p_s
tream
->
p_s
out
->
i_out_pace_nocontrol
++
;
return
id
;
return
id
;
}
}
...
...
modules/stream_out/rtp.c
View file @
0a66b41b
...
@@ -397,7 +397,6 @@ struct sout_stream_id_t
...
@@ -397,7 +397,6 @@ struct sout_stream_id_t
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
sout_stream_t
*
p_stream
=
(
sout_stream_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
;
sout_stream_sys_t
*
p_sys
=
NULL
;
config_chain_t
*
p_cfg
=
NULL
;
config_chain_t
*
p_cfg
=
NULL
;
char
*
psz
;
char
*
psz
;
...
@@ -571,7 +570,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -571,7 +570,7 @@ static int Open( vlc_object_t *p_this )
}
}
p_sys
->
p_grab
=
GrabberCreate
(
p_stream
);
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_s
tream
->
p_s
out
,
psz
,
p_sys
->
p_grab
);
free
(
psz
);
free
(
psz
);
if
(
p_sys
->
p_mux
==
NULL
)
if
(
p_sys
->
p_mux
==
NULL
)
...
@@ -1306,17 +1305,16 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
...
@@ -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
)
static
int
SapSetup
(
sout_stream_t
*
p_stream
)
{
{
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
sout_instance_t
*
p_sout
=
p_stream
->
p_sout
;
/* Remove the previous session */
/* Remove the previous session */
if
(
p_sys
->
p_session
!=
NULL
)
if
(
p_sys
->
p_session
!=
NULL
)
{
{
sout_AnnounceUnRegister
(
p_s
out
,
p_sys
->
p_session
);
sout_AnnounceUnRegister
(
p_s
tream
,
p_sys
->
p_session
);
p_sys
->
p_session
=
NULL
;
p_sys
->
p_session
=
NULL
;
}
}
if
(
p_sys
->
i_es
>
0
&&
p_sys
->
psz_sdp
&&
*
p_sys
->
psz_sdp
)
if
(
p_sys
->
i_es
>
0
&&
p_sys
->
psz_sdp
&&
*
p_sys
->
psz_sdp
)
p_sys
->
p_session
=
sout_AnnounceRegisterSDP
(
p_s
out
,
p_sys
->
p_session
=
sout_AnnounceRegisterSDP
(
p_s
tream
,
p_sys
->
psz_sdp
,
p_sys
->
psz_sdp
,
p_sys
->
psz_destination
);
p_sys
->
psz_destination
);
...
...
modules/stream_out/standard.c
View file @
0a66b41b
...
@@ -197,7 +197,7 @@ static void create_SDP(sout_stream_t *p_stream, sout_access_out_t *p_access)
...
@@ -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
);
msg_Dbg
(
p_stream
,
"Generated SDP:
\n
%s"
,
psz_sdp
);
p_sys
->
p_session
=
p_sys
->
p_session
=
sout_AnnounceRegisterSDP
(
p_stream
->
p_sout
,
psz_sdp
,
dhost
);
sout_AnnounceRegisterSDP
(
p_stream
,
psz_sdp
,
dhost
);
free
(
psz_sdp
);
free
(
psz_sdp
);
}
}
}
}
...
@@ -321,7 +321,6 @@ static void checkAccessMux( sout_stream_t *p_stream, char *psz_access,
...
@@ -321,7 +321,6 @@ static void checkAccessMux( sout_stream_t *p_stream, char *psz_access,
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
sout_stream_t
*
p_stream
=
(
sout_stream_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
;
sout_stream_sys_t
*
p_sys
;
char
*
psz_mux
,
*
psz_access
,
*
psz_url
;
char
*
psz_mux
,
*
psz_access
,
*
psz_url
;
sout_access_out_t
*
p_access
;
sout_access_out_t
*
p_access
;
...
@@ -375,7 +374,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -375,7 +374,7 @@ static int Open( vlc_object_t *p_this )
checkAccessMux
(
p_stream
,
psz_access
,
psz_mux
);
checkAccessMux
(
p_stream
,
psz_access
,
psz_mux
);
p_access
=
sout_AccessOutNew
(
p_s
out
,
psz_access
,
psz_url
);
p_access
=
sout_AccessOutNew
(
p_s
tream
,
psz_access
,
psz_url
);
if
(
p_access
==
NULL
)
if
(
p_access
==
NULL
)
{
{
msg_Err
(
p_stream
,
"no suitable sout access module for `%s/%s://%s'"
,
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 )
...
@@ -383,7 +382,7 @@ static int Open( vlc_object_t *p_this )
goto
end
;
goto
end
;
}
}
p_sys
->
p_mux
=
sout_MuxNew
(
p_sout
,
psz_mux
,
p_access
);
p_sys
->
p_mux
=
sout_MuxNew
(
p_s
tream
->
p_s
out
,
psz_mux
,
p_access
);
if
(
!
p_sys
->
p_mux
)
if
(
!
p_sys
->
p_mux
)
{
{
const
char
*
psz_mux_guess
=
getMuxFromAlias
(
psz_mux
);
const
char
*
psz_mux_guess
=
getMuxFromAlias
(
psz_mux
);
...
@@ -391,7 +390,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -391,7 +390,7 @@ static int Open( vlc_object_t *p_this )
{
{
msg_Dbg
(
p_stream
,
"Couldn't open mux `%s', trying `%s' instead"
,
msg_Dbg
(
p_stream
,
"Couldn't open mux `%s', trying `%s' instead"
,
psz_mux
,
psz_mux_guess
);
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_s
tream
->
p_s
out
,
psz_mux_guess
,
p_access
);
}
}
if
(
!
p_sys
->
p_mux
)
if
(
!
p_sys
->
p_mux
)
...
@@ -408,7 +407,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -408,7 +407,7 @@ static int Open( vlc_object_t *p_this )
create_SDP
(
p_stream
,
p_access
);
create_SDP
(
p_stream
,
p_access
);
if
(
!
sout_AccessOutCanControlPace
(
p_access
)
)
if
(
!
sout_AccessOutCanControlPace
(
p_access
)
)
p_sout
->
i_out_pace_nocontrol
++
;
p_s
tream
->
p_s
out
->
i_out_pace_nocontrol
++
;
p_stream
->
pf_add
=
Add
;
p_stream
->
pf_add
=
Add
;
p_stream
->
pf_del
=
Del
;
p_stream
->
pf_del
=
Del
;
...
@@ -438,7 +437,7 @@ static void Close( vlc_object_t * p_this )
...
@@ -438,7 +437,7 @@ static void Close( vlc_object_t * p_this )
sout_access_out_t
*
p_access
=
p_sys
->
p_mux
->
p_access
;
sout_access_out_t
*
p_access
=
p_sys
->
p_mux
->
p_access
;
if
(
p_sys
->
p_session
!=
NULL
)
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
);
sout_MuxDelete
(
p_sys
->
p_mux
);
if
(
!
sout_AccessOutCanControlPace
(
p_access
)
)
if
(
!
sout_AccessOutCanControlPace
(
p_access
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment