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
e30cb4fb
Commit
e30cb4fb
authored
Jan 22, 2010
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp sout: fix RTSP track numbering in SDP
Add a helper to get the right values from the RTSP code
parent
94558b79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+6
-5
modules/stream_out/rtp.h
modules/stream_out/rtp.h
+2
-0
modules/stream_out/rtsp.c
modules/stream_out/rtsp.c
+13
-0
No files found.
modules/stream_out/rtp.c
View file @
e30cb4fb
...
...
@@ -833,11 +833,12 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url )
if
(
rtsp_url
!=
NULL
)
{
assert
(
strlen
(
rtsp_url
)
>
0
);
bool
addslash
=
(
rtsp_url
[
strlen
(
rtsp_url
)
-
1
]
!=
'/'
);
sdp_AddAttribute
(
&
psz_sdp
,
"control"
,
addslash
?
"%s/trackID=%u"
:
"%strackID=%u"
,
rtsp_url
,
i
);
char
*
track_url
=
RtspAppendTrackPath
(
id
->
rtsp_id
,
rtsp_url
);
if
(
track_url
!=
NULL
)
{
sdp_AddAttribute
(
&
psz_sdp
,
"control"
,
"%s"
,
track_url
);
free
(
track_url
);
}
}
else
{
...
...
modules/stream_out/rtp.h
View file @
e30cb4fb
...
...
@@ -34,6 +34,8 @@ rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
unsigned
loport
,
unsigned
hiport
);
void
RtspDelId
(
rtsp_stream_t
*
rtsp
,
rtsp_stream_id_t
*
);
char
*
RtspAppendTrackPath
(
rtsp_stream_id_t
*
id
,
const
char
*
base
);
char
*
SDPGenerate
(
const
sout_stream_t
*
p_stream
,
const
char
*
rtsp_url
);
uint32_t
rtp_compute_ts
(
const
sout_stream_id_t
*
id
,
int64_t
i_pts
);
...
...
modules/stream_out/rtsp.c
View file @
e30cb4fb
...
...
@@ -179,6 +179,19 @@ struct rtsp_strack_t
};
char
*
RtspAppendTrackPath
(
rtsp_stream_id_t
*
id
,
const
char
*
base
)
{
assert
(
(
strlen
(
base
)
>
0
&&
base
[
strlen
(
base
)
-
1
]
==
'/'
)
^
(
id
->
stream
->
track_sep
[
0
]
==
'/'
)
);
char
*
url
;
if
(
asprintf
(
&
url
,
"%s%strackID=%u"
,
base
,
id
->
stream
->
track_sep
,
id
->
track_id
)
==
-
1
)
url
=
NULL
;
return
url
;
}
rtsp_stream_id_t
*
RtspAddId
(
rtsp_stream_t
*
rtsp
,
sout_stream_id_t
*
sid
,
uint32_t
ssrc
,
/* Multicast stuff - TODO: cleanup */
...
...
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