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
65113f55
Commit
65113f55
authored
Jan 23, 2010
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp sout: factor out some SDP code
parent
66b5e14a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+18
-18
No files found.
modules/stream_out/rtp.c
View file @
65113f55
...
...
@@ -784,12 +784,29 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url )
if
(
rtsp_url
!=
NULL
)
sdp_AddAttribute
(
&
psz_sdp
,
"control"
,
"%s"
,
rtsp_url
);
const
char
*
proto
=
"RTP/AVP"
;
/* protocol */
if
(
rtsp_url
==
NULL
)
{
switch
(
p_sys
->
proto
)
{
case
IPPROTO_UDP
:
break
;
case
IPPROTO_TCP
:
proto
=
"TCP/RTP/AVP"
;
break
;
case
IPPROTO_DCCP
:
proto
=
"DCCP/RTP/AVP"
;
break
;
case
IPPROTO_UDPLITE
:
return
psz_sdp
;
}
}
/* FIXME: locking?! */
for
(
i
=
0
;
i
<
p_sys
->
i_es
;
i
++
)
{
sout_stream_id_t
*
id
=
p_sys
->
es
[
i
];
const
char
*
mime_major
;
/* major MIME type */
const
char
*
proto
=
"RTP/AVP"
;
/* protocol */
switch
(
id
->
i_cat
)
{
...
...
@@ -806,23 +823,6 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url )
continue
;
}
if
(
rtsp_url
==
NULL
)
{
switch
(
p_sys
->
proto
)
{
case
IPPROTO_UDP
:
break
;
case
IPPROTO_TCP
:
proto
=
"TCP/RTP/AVP"
;
break
;
case
IPPROTO_DCCP
:
proto
=
"DCCP/RTP/AVP"
;
break
;
case
IPPROTO_UDPLITE
:
continue
;
}
}
sdp_AddMedia
(
&
psz_sdp
,
mime_major
,
proto
,
inclport
*
id
->
i_port
,
id
->
i_payload_type
,
false
,
id
->
i_bitrate
,
id
->
psz_enc
,
id
->
i_clock_rate
,
id
->
i_channels
,
...
...
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