Commit 59a40313 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Specify SSRC in SETUP response

parent 1acb8064
...@@ -601,7 +601,7 @@ static void SDPHandleUrl( sout_stream_t *p_stream, char *psz_url ) ...@@ -601,7 +601,7 @@ static void SDPHandleUrl( sout_stream_t *p_stream, char *psz_url )
if( p_sys->p_mux != NULL ) if( p_sys->p_mux != NULL )
{ {
sout_stream_id_t *id = p_sys->es[0]; sout_stream_id_t *id = p_sys->es[0];
id->rtsp_id = RtspAddId( p_sys->rtsp, id, 0, id->rtsp_id = RtspAddId( p_sys->rtsp, id, 0, GetDWBE( id->ssrc ),
p_sys->psz_destination, p_sys->i_ttl, p_sys->psz_destination, p_sys->i_ttl,
id->i_port, id->i_port + 1 ); id->i_port, id->i_port + 1 );
} }
...@@ -1143,6 +1143,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -1143,6 +1143,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
if( p_sys->rtsp != NULL ) if( p_sys->rtsp != NULL )
id->rtsp_id = RtspAddId( p_sys->rtsp, id, p_sys->i_es, id->rtsp_id = RtspAddId( p_sys->rtsp, id, p_sys->i_es,
GetDWBE( id->ssrc ),
p_sys->psz_destination, p_sys->psz_destination,
p_sys->i_ttl, id->i_port, id->i_port + 1 ); p_sys->i_ttl, id->i_port, id->i_port + 1 );
......
...@@ -29,7 +29,7 @@ rtsp_stream_t *RtspSetup( sout_stream_t *p_stream, const vlc_url_t *url ); ...@@ -29,7 +29,7 @@ rtsp_stream_t *RtspSetup( sout_stream_t *p_stream, const vlc_url_t *url );
void RtspUnsetup( rtsp_stream_t *rtsp ); void RtspUnsetup( rtsp_stream_t *rtsp );
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,
unsigned i, unsigned i, uint32_t ssrc,
const char *dst, int ttl, const char *dst, int ttl,
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 * );
......
...@@ -144,7 +144,8 @@ struct rtsp_stream_id_t ...@@ -144,7 +144,8 @@ struct rtsp_stream_id_t
httpd_url_t *url; httpd_url_t *url;
const char *dst; const char *dst;
int ttl; int ttl;
unsigned loport, hiport; uint32_t ssrc;
uint16_t loport, hiport;
}; };
...@@ -172,7 +173,7 @@ struct rtsp_strack_t ...@@ -172,7 +173,7 @@ struct rtsp_strack_t
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,
unsigned num, unsigned num, uint32_t ssrc,
/* Multicast stuff - TODO: cleanup */ /* Multicast stuff - TODO: cleanup */
const char *dst, int ttl, const char *dst, int ttl,
unsigned loport, unsigned hiport ) unsigned loport, unsigned hiport )
...@@ -186,6 +187,7 @@ rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid, ...@@ -186,6 +187,7 @@ rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
id->stream = rtsp; id->stream = rtsp;
id->sout_id = sid; id->sout_id = sid;
id->ssrc = ssrc;
/* TODO: can we assume that this need not be strdup'd? */ /* TODO: can we assume that this need not be strdup'd? */
id->dst = dst; id->dst = dst;
if( id->dst != NULL ) if( id->dst != NULL )
...@@ -569,17 +571,18 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -569,17 +571,18 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
httpd_MsgAdd( answer, "Transport", httpd_MsgAdd( answer, "Transport",
"RTP/AVP/UDP;unicast;source=%s;" "RTP/AVP/UDP;unicast;source=%s;"
"client_port=%u-%u;server_port=%u-%u;" "client_port=%u-%u;server_port=%u-%u;"
"mode=play", "ssrc=%08X;mode=play",
src, loport, loport + 1, sport, src, loport, loport + 1, sport,
sport + 1 ); sport + 1, id->ssrc );
} }
else else
{ {
httpd_MsgAdd( answer, "Transport", httpd_MsgAdd( answer, "Transport",
"RTP/AVP/UDP;unicast;" "RTP/AVP/UDP;unicast;"
"client_port=%u-%u;server_port=%u-%u;" "client_port=%u-%u;server_port=%u-%u;"
"mode=play", "ssrc=%08X;mode=play",
loport, loport + 1, sport, sport + 1 ); loport, loport + 1, sport, sport + 1,
id->ssrc );
} }
answer->i_status = 200; answer->i_status = 200;
......
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