Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
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
Show 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 )
...
@@ -833,11 +833,12 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url )
if
(
rtsp_url
!=
NULL
)
if
(
rtsp_url
!=
NULL
)
{
{
assert
(
strlen
(
rtsp_url
)
>
0
);
char
*
track_url
=
RtspAppendTrackPath
(
id
->
rtsp_id
,
rtsp_url
);
bool
addslash
=
(
rtsp_url
[
strlen
(
rtsp_url
)
-
1
]
!=
'/'
);
if
(
track_url
!=
NULL
)
sdp_AddAttribute
(
&
psz_sdp
,
"control"
,
{
addslash
?
"%s/trackID=%u"
:
"%strackID=%u"
,
sdp_AddAttribute
(
&
psz_sdp
,
"control"
,
"%s"
,
track_url
);
rtsp_url
,
i
);
free
(
track_url
);
}
}
}
else
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,
...
@@ -34,6 +34,8 @@ rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
unsigned
loport
,
unsigned
hiport
);
unsigned
loport
,
unsigned
hiport
);
void
RtspDelId
(
rtsp_stream_t
*
rtsp
,
rtsp_stream_id_t
*
);
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
);
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
);
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
...
@@ -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
,
rtsp_stream_id_t
*
RtspAddId
(
rtsp_stream_t
*
rtsp
,
sout_stream_id_t
*
sid
,
uint32_t
ssrc
,
uint32_t
ssrc
,
/* Multicast stuff - TODO: cleanup */
/* 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