Commit 648f3f64 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Enable RTCP SR from the RTP sout

parent ce0c33fa
...@@ -433,7 +433,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -433,7 +433,7 @@ static int Open( vlc_object_t *p_this )
{ {
sout_access_out_t *p_grab; sout_access_out_t *p_grab;
const char *psz_rtpmap; const char *psz_rtpmap;
char url[NI_MAXHOST + 8], access[17], psz_ttl[5], ipv; char url[NI_MAXHOST + 8], access[22], psz_ttl[5], ipv;
if( b_rtsp ) if( b_rtsp )
{ {
...@@ -468,11 +468,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -468,11 +468,11 @@ static int Open( vlc_object_t *p_this )
/* create the access out */ /* create the access out */
if( p_sys->i_ttl > 0 ) if( p_sys->i_ttl > 0 )
{ {
sprintf( access, "udp{raw,ttl=%d}", p_sys->i_ttl ); sprintf( access, "udp{raw,rtcp,ttl=%d}", p_sys->i_ttl );
} }
else else
{ {
sprintf( access, "udp{raw}" ); sprintf( access, "udp{raw,rtcp}" );
} }
/* IPv6 needs brackets if not already present */ /* IPv6 needs brackets if not already present */
...@@ -974,18 +974,18 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -974,18 +974,18 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
if( p_sys->psz_destination ) if( p_sys->psz_destination )
{ {
char access[17]; char access[22];
char url[NI_MAXHOST + 8]; char url[NI_MAXHOST + 8];
/* first try to create the access out */ /* first try to create the access out */
if( p_sys->i_ttl ) if( p_sys->i_ttl )
{ {
snprintf( access, sizeof( access ), "udp{raw,ttl=%d}", snprintf( access, sizeof( access ), "udp{raw,rtcp,ttl=%d}",
p_sys->i_ttl ); p_sys->i_ttl );
access[sizeof( access ) - 1] = '\0'; access[sizeof( access ) - 1] = '\0';
} }
else else
strcpy( access, "udp{raw}" ); strcpy( access, "udp{raw,rtcp}" );
snprintf( url, sizeof( url ), (( p_sys->psz_destination[0] != '[' ) && snprintf( url, sizeof( url ), (( p_sys->psz_destination[0] != '[' ) &&
strchr( p_sys->psz_destination, ':' )) ? "[%s]:%d" : "%s:%d", strchr( p_sys->psz_destination, ':' )) ? "[%s]:%d" : "%s:%d",
...@@ -1811,7 +1811,7 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args, ...@@ -1811,7 +1811,7 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
else if( strstr( psz_transport, "unicast" ) && strstr( psz_transport, "client_port=" ) ) else if( strstr( psz_transport, "unicast" ) && strstr( psz_transport, "client_port=" ) )
{ {
int i_port = atoi( strstr( psz_transport, "client_port=" ) + strlen("client_port=") ); int i_port = atoi( strstr( psz_transport, "client_port=" ) + strlen("client_port=") );
char ip[NI_MAXNUMERICHOST], psz_access[17], psz_url[NI_MAXNUMERICHOST + 8]; char ip[NI_MAXNUMERICHOST], psz_access[22], psz_url[NI_MAXNUMERICHOST + 8];
sout_access_out_t *p_access; sout_access_out_t *p_access;
...@@ -1850,9 +1850,9 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args, ...@@ -1850,9 +1850,9 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
/* first try to create the access out */ /* first try to create the access out */
if( p_sys->i_ttl ) if( p_sys->i_ttl )
snprintf( psz_access, sizeof( psz_access ), snprintf( psz_access, sizeof( psz_access ),
"udp{raw,ttl=%d}", p_sys->i_ttl ); "udp{raw,rtcp,ttl=%d}", p_sys->i_ttl );
else else
strlcpy( psz_access, "udp{raw}", sizeof( psz_access ) ); strcpy( psz_access, "udp{raw,rtcp}" );
snprintf( psz_url, sizeof( psz_url ), snprintf( psz_url, sizeof( psz_url ),
( strchr( ip, ':' ) != NULL ) ? "[%s]:%d" : "%s:%d", ( strchr( ip, ':' ) != NULL ) ? "[%s]:%d" : "%s:%d",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment