Changeset 4f620050a14477a01374b2a54f537fee935f5c82
- Timestamp:
- 05/03/07 22:34:30
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1173130470 +0000
- git-parent:
[4380e365008bdb1733b9ea36920b53dd13bfe7ec]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1173130470 +0000
- Message:
--sout-udp-rtcp option to force RTCP usage.
(Currently RTCP only Sender Reports are implemented.)
RTCP is auto-enabled for RTP/TS but this could be used by the RTP stream
output plugin to enable RTCP too (in that case, RTP encapsulation is done
in the stream output plugin, so the access output cannot know if it should
do RTCP or not).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r80de300 |
r4f62005 |
|
| 103 | 103 | "without trying to make the biggest possible packets " \ |
|---|
| 104 | 104 | "in order to improve streaming)." ) |
|---|
| | 105 | #define RTCP_TEXT N_("Force RTCP Sender Reports") |
|---|
| | 106 | #define RTCP_LONGTEXT N_("Sends RTCP Sender Report packets even if " \ |
|---|
| | 107 | "RTP encapsulation is not done") |
|---|
| 105 | 108 | #define AUTO_MCAST_TEXT N_("Automatic multicast streaming") |
|---|
| 106 | 109 | #define AUTO_MCAST_LONGTEXT N_("Allocates an outbound multicast address " \ |
|---|
| … | … | |
| 120 | 123 | VLC_TRUE ); |
|---|
| 121 | 124 | add_suppressed_integer( SOUT_CFG_PREFIX "late" ); |
|---|
| 122 | | add_bool( SOUT_CFG_PREFIX "raw", 0, NULL, RAW_TEXT, RAW_LONGTEXT, |
|---|
| | 125 | add_bool( SOUT_CFG_PREFIX "raw", VLC_FALSE, NULL, RAW_TEXT, RAW_LONGTEXT, |
|---|
| 123 | 126 | VLC_TRUE ); |
|---|
| 124 | | add_bool( SOUT_CFG_PREFIX "auto-mcast", 0, NULL, AUTO_MCAST_TEXT, |
|---|
| | 127 | add_bool( SOUT_CFG_PREFIX "rtcp", VLC_FALSE, NULL, RTCP_TEXT, RTCP_LONGTEXT, |
|---|
| | 128 | VLC_TRUE ); |
|---|
| | 129 | add_bool( SOUT_CFG_PREFIX "auto-mcast", VLC_FALSE, NULL, AUTO_MCAST_TEXT, |
|---|
| 125 | 130 | AUTO_MCAST_LONGTEXT, VLC_TRUE ); |
|---|
| 126 | | add_bool( SOUT_CFG_PREFIX "udplite", 0, NULL, UDPLITE_TEXT, UDPLITE_LONGTEXT, VLC_TRUE ); |
|---|
| | 131 | add_bool( SOUT_CFG_PREFIX "udplite", VLC_FALSE, NULL, UDPLITE_TEXT, UDPLITE_LONGTEXT, VLC_TRUE ); |
|---|
| 127 | 132 | add_integer( SOUT_CFG_PREFIX "cscov", 12, NULL, CSCOV_TEXT, CSCOV_LONGTEXT, VLC_TRUE ); |
|---|
| 128 | 133 | |
|---|
| … | … | |
| 142 | 147 | "group", |
|---|
| 143 | 148 | "raw", |
|---|
| | 149 | "rtcp", |
|---|
| 144 | 150 | "lite", |
|---|
| 145 | 151 | "cscov", |
|---|
| … | … | |
| 191 | 197 | int i_mtu; |
|---|
| 192 | 198 | |
|---|
| 193 | | vlc_bool_t b_rtpts; // 1 if add rtp/ts header |
|---|
| | 199 | vlc_bool_t b_rtpts; // true for RTP/MP2 encapsulation |
|---|
| 194 | 200 | vlc_bool_t b_mtu_warning; |
|---|
| 195 | 201 | uint16_t i_sequence_number; |
|---|
| … | … | |
| 224 | 230 | |
|---|
| 225 | 231 | vlc_value_t val; |
|---|
| | 232 | vlc_bool_t b_rtcp = VLC_FALSE; |
|---|
| 226 | 233 | |
|---|
| 227 | 234 | config_ChainParse( p_access, SOUT_CFG_PREFIX, |
|---|
| … | … | |
| 248 | 255 | { |
|---|
| 249 | 256 | if (strcmp (p_access->psz_access, "rtp") == 0) |
|---|
| 250 | | p_sys->b_rtpts = VLC_TRUE; |
|---|
| | 257 | p_sys->b_rtpts = b_rtcp = VLC_TRUE; |
|---|
| | 258 | else |
|---|
| | 259 | /* This option is really only meant for the RTP streaming output |
|---|
| | 260 | * plugin. Doing RTCP for raw UDP will yield weird results. */ |
|---|
| | 261 | b_rtcp = var_GetBool (p_access, SOUT_CFG_PREFIX"rtcp"); |
|---|
| 251 | 262 | } |
|---|
| 252 | 263 | |
|---|
| … | … | |
| 367 | 378 | p_sys->i_ssrc = rand()&0xffffffff; |
|---|
| 368 | 379 | |
|---|
| 369 | | if (p_sys->b_rtpts && OpenRTCP (p_access, proto)) |
|---|
| | 380 | if (b_rtcp && OpenRTCP (p_access, proto)) |
|---|
| 370 | 381 | { |
|---|
| 371 | 382 | msg_Err (p_access, "cannot initialize RTCP sender"); |
|---|
| … | … | |
| 820 | 831 | static void CloseRTCP (sout_access_thread_t *obj) |
|---|
| 821 | 832 | { |
|---|
| | 833 | if (obj->rtcp_handle == -1) |
|---|
| | 834 | return; |
|---|
| | 835 | |
|---|
| 822 | 836 | uint8_t *ptr = obj->rtcp_data; |
|---|
| 823 | 837 | /* Bye */ |
|---|
| … | … | |
| 830 | 844 | * we can afford not to check bandwidth constraints here. */ |
|---|
| 831 | 845 | send (obj->rtcp_handle, obj->rtcp_data, 8, 0); |
|---|
| 832 | | |
|---|
| 833 | | if (obj->rtcp_handle != -1) |
|---|
| 834 | | net_Close (obj->rtcp_handle); |
|---|
| | 846 | net_Close (obj->rtcp_handle); |
|---|
| 835 | 847 | } |
|---|
| 836 | 848 | |
|---|