Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
87423359
Commit
87423359
authored
Dec 14, 2010
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp sout: refactor muxed case handling
This will allow to clean up multicast parameters
parent
3f9e7e3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
38 deletions
+15
-38
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+15
-38
No files found.
modules/stream_out/rtp.c
View file @
87423359
...
...
@@ -543,8 +543,6 @@ static int Open( vlc_object_t *p_this )
psz
=
var_GetNonEmptyString
(
p_stream
,
SOUT_CFG_PREFIX
"mux"
);
if
(
psz
!=
NULL
)
{
sout_stream_id_t
*
id
;
/* Check muxer type */
if
(
strncasecmp
(
psz
,
"ps"
,
2
)
&&
strncasecmp
(
psz
,
"mpeg1"
,
5
)
...
...
@@ -578,20 +576,6 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
id
=
Add
(
p_stream
,
NULL
);
if
(
id
==
NULL
)
{
sout_MuxDelete
(
p_sys
->
p_mux
);
sout_AccessOutDelete
(
p_sys
->
p_grab
);
vlc_mutex_destroy
(
&
p_sys
->
lock_sdp
);
vlc_mutex_destroy
(
&
p_sys
->
lock_ts
);
vlc_mutex_destroy
(
&
p_sys
->
lock_es
);
free
(
p_sys
->
psz_vod_session
);
free
(
p_sys
->
psz_destination
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
p_sys
->
packet
=
NULL
;
p_stream
->
pf_add
=
MuxAdd
;
...
...
@@ -638,6 +622,16 @@ static int Open( vlc_object_t *p_this )
/* update p_sout->i_out_pace_nocontrol */
p_stream
->
p_sout
->
i_out_pace_nocontrol
++
;
if
(
p_sys
->
p_mux
!=
NULL
)
{
sout_stream_id_t
*
id
=
Add
(
p_stream
,
NULL
);
if
(
id
==
NULL
)
{
Close
(
p_this
);
return
VLC_EGENERIC
;
}
}
return
VLC_SUCCESS
;
}
...
...
@@ -654,21 +648,17 @@ static void Close( vlc_object_t * p_this )
if
(
p_sys
->
p_mux
)
{
assert
(
p_sys
->
i_es
=
=
1
);
assert
(
p_sys
->
i_es
<
=
1
);
sout_MuxDelete
(
p_sys
->
p_mux
);
Del
(
p_stream
,
p_sys
->
es
[
0
]
);
if
(
p_sys
->
i_es
>
0
)
Del
(
p_stream
,
p_sys
->
es
[
0
]
);
sout_AccessOutDelete
(
p_sys
->
p_grab
);
if
(
p_sys
->
packet
)
{
block_Release
(
p_sys
->
packet
);
}
if
(
p_sys
->
b_export_sap
)
{
p_sys
->
p_mux
=
NULL
;
SapSetup
(
p_stream
);
}
}
if
(
p_sys
->
rtsp
!=
NULL
)
...
...
@@ -728,22 +718,9 @@ static void SDPHandleUrl( sout_stream_t *p_stream, const char *psz_url )
goto
out
;
}
/* FIXME test if destination is multicast or no destination at all */
p_sys
->
rtsp
=
RtspSetup
(
VLC_OBJECT
(
p_stream
),
NULL
,
&
url
);
if
(
p_sys
->
rtsp
==
NULL
)
msg_Err
(
p_stream
,
"cannot export SDP as RTSP"
);
else
if
(
p_sys
->
p_mux
!=
NULL
)
{
sout_stream_id_t
*
id
=
p_sys
->
es
[
0
];
rtsp_stream_id_t
*
rtsp_id
=
RtspAddId
(
p_sys
->
rtsp
,
id
,
GetDWBE
(
id
->
ssrc
),
id
->
rtp_fmt
.
clock_rate
,
p_sys
->
psz_destination
,
p_sys
->
i_ttl
,
id
->
i_port
,
id
->
i_port
+
1
);
vlc_mutex_lock
(
&
p_sys
->
lock_es
);
id
->
rtsp_id
=
rtsp_id
;
vlc_mutex_unlock
(
&
p_sys
->
lock_es
);
}
}
else
if
(
(
url
.
psz_protocol
&&
!
strcasecmp
(
url
.
psz_protocol
,
"sap"
)
)
||
(
url
.
psz_host
&&
!
strcasecmp
(
url
.
psz_host
,
"sap"
)
)
)
...
...
@@ -1246,7 +1223,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
vlc_mutex_destroy
(
&
id
->
lock_sink
);
/* Update SDP (sap/file) */
if
(
p_sys
->
b_export_sap
&&
!
p_sys
->
p_mux
)
SapSetup
(
p_stream
);
if
(
p_sys
->
b_export_sap
)
SapSetup
(
p_stream
);
if
(
p_sys
->
psz_sdp_file
!=
NULL
)
FileSetup
(
p_stream
);
free
(
id
);
...
...
@@ -1297,7 +1274,7 @@ static int SapSetup( sout_stream_t *p_stream )
p_sys
->
p_session
=
NULL
;
}
if
(
(
p_sys
->
i_es
>
0
||
p_sys
->
p_mux
)
&&
p_sys
->
psz_sdp
&&
*
p_sys
->
psz_sdp
)
if
(
p_sys
->
i_es
>
0
&&
p_sys
->
psz_sdp
&&
*
p_sys
->
psz_sdp
)
{
announce_method_t
*
p_method
=
sout_SAPMethod
();
p_sys
->
p_session
=
sout_AnnounceRegisterSDP
(
p_sout
,
...
...
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