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
a1631eb0
Commit
a1631eb0
authored
Sep 19, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTCP: support for RTP/RTCP multiplexed on the same port
parent
500516e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
10 deletions
+34
-10
modules/stream_out/rtcp.c
modules/stream_out/rtcp.c
+31
-8
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+1
-1
modules/stream_out/rtp.h
modules/stream_out/rtp.h
+2
-1
No files found.
modules/stream_out/rtcp.c
View file @
a1631eb0
...
...
@@ -59,22 +59,45 @@ struct rtcp_sender_t
};
rtcp_sender_t
*
OpenRTCP
(
vlc_object_t
*
obj
,
int
rtp_fd
,
int
proto
)
rtcp_sender_t
*
OpenRTCP
(
vlc_object_t
*
obj
,
int
rtp_fd
,
int
proto
,
vlc_bool_t
mux
)
{
rtcp_sender_t
*
rtcp
;
uint8_t
*
ptr
;
char
src
[
NI_MAXNUMERICHOST
],
dst
[
NI_MAXNUMERICHOST
];
int
sport
,
dport
;
int
fd
;
char
src
[
NI_MAXNUMERICHOST
];
int
sport
;
if
(
net_GetSockAddress
(
rtp_fd
,
src
,
&
sport
)
||
net_GetPeerAddress
(
rtp_fd
,
dst
,
&
dport
))
if
(
net_GetSockAddress
(
rtp_fd
,
src
,
&
sport
))
return
NULL
;
if
(
mux
)
{
/* RTP/RTCP mux: duplicate the socket */
#ifndef WIN32
fd
=
dup
(
rtp_fd
);
#else
WSAPROTOCOL_INFO
info
;
WSADuplicateSocket
(
rtp_fd
,
GetProcessId
(),
&
info
);
fd
=
WSASocket
(
info
.
iAddressFamily
,
info
.
iSockets
,
info
.
iProtocol
,
&
info
,
0
,
0
);
#endif
}
else
{
/* RTCP on a separate port */
char
dst
[
NI_MAXNUMERICHOST
];
int
dport
;
if
(
net_GetPeerAddress
(
rtp_fd
,
dst
,
&
dport
))
return
NULL
;
sport
++
;
dport
++
;
fd
=
net_OpenDgram
(
obj
,
src
,
sport
,
dst
,
dport
,
AF_UNSPEC
,
proto
);
}
if
(
fd
==
-
1
)
return
NULL
;
...
...
modules/stream_out/rtp.c
View file @
a1631eb0
...
...
@@ -1421,7 +1421,7 @@ static inline void rtp_packetize_send( sout_stream_id_t *id, block_t *out )
int
rtp_add_sink
(
sout_stream_id_t
*
id
,
int
fd
)
{
rtp_sink_t
sink
=
{
fd
,
NULL
};
sink
.
rtcp
=
OpenRTCP
(
VLC_OBJECT
(
id
->
p_stream
),
fd
,
IPPROTO_UDP
);
sink
.
rtcp
=
OpenRTCP
(
VLC_OBJECT
(
id
->
p_stream
),
fd
,
IPPROTO_UDP
,
0
);
if
(
sink
.
rtcp
==
NULL
)
msg_Err
(
id
,
"RTCP failed!"
);
...
...
modules/stream_out/rtp.h
View file @
a1631eb0
...
...
@@ -41,6 +41,7 @@ void rtp_del_sink( sout_stream_id_t *id, int fd );
/* RTCP */
typedef
struct
rtcp_sender_t
rtcp_sender_t
;
rtcp_sender_t
*
OpenRTCP
(
vlc_object_t
*
obj
,
int
rtp_fd
,
int
proto
);
rtcp_sender_t
*
OpenRTCP
(
vlc_object_t
*
obj
,
int
rtp_fd
,
int
proto
,
vlc_bool_t
mux
);
void
CloseRTCP
(
rtcp_sender_t
*
rtcp
);
void
SendRTCP
(
rtcp_sender_t
*
restrict
rtcp
,
const
block_t
*
rtp
);
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