Commit 5fb806bc authored by Pierre Ynard's avatar Pierre Ynard

Revert "rtp sout: implement rtptime parameter"

This reverts commit ce7a4746.
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent f05d2fa4
...@@ -301,7 +301,6 @@ struct sout_stream_id_t ...@@ -301,7 +301,6 @@ struct sout_stream_id_t
sout_stream_t *p_stream; sout_stream_t *p_stream;
/* rtp field */ /* rtp field */
uint32_t i_timestamp;
uint16_t i_sequence; uint16_t i_sequence;
uint8_t i_payload_type; uint8_t i_payload_type;
uint8_t ssrc[4]; uint8_t ssrc[4];
...@@ -910,8 +909,6 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -910,8 +909,6 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
id->p_stream = p_stream; id->p_stream = p_stream;
id->i_timestamp = 0; /* It will be filled when the first packet is sent */
/* Look for free dymanic payload type */ /* Look for free dymanic payload type */
id->i_payload_type = 96; id->i_payload_type = 96;
while (p_sys->payload_bitmap & (1 << (id->i_payload_type - 96))) while (p_sys->payload_bitmap & (1 << (id->i_payload_type - 96)))
...@@ -1669,13 +1666,6 @@ uint16_t rtp_get_seq( const sout_stream_id_t *id ) ...@@ -1669,13 +1666,6 @@ uint16_t rtp_get_seq( const sout_stream_id_t *id )
return id->i_sequence; return id->i_sequence;
} }
uint32_t rtp_get_ts( const sout_stream_id_t *id )
{
/* ... and this will return the value for the last packet.
* Lame, but close enough. */
return id->i_timestamp;
}
/* FIXME: this is pretty bad - if we remove and then insert an ES /* FIXME: this is pretty bad - if we remove and then insert an ES
* the number will get unsynched from inside RTSP */ * the number will get unsynched from inside RTSP */
unsigned rtp_get_num( const sout_stream_id_t *id ) unsigned rtp_get_num( const sout_stream_id_t *id )
...@@ -1712,7 +1702,6 @@ void rtp_packetize_common( sout_stream_id_t *id, block_t *out, ...@@ -1712,7 +1702,6 @@ void rtp_packetize_common( sout_stream_id_t *id, block_t *out,
memcpy( out->p_buffer + 8, id->ssrc, 4 ); memcpy( out->p_buffer + 8, id->ssrc, 4 );
out->i_buffer = 12; out->i_buffer = 12;
id->i_timestamp = i_timestamp;
id->i_sequence++; id->i_sequence++;
} }
......
...@@ -39,7 +39,6 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url ); ...@@ -39,7 +39,6 @@ char *SDPGenerate( const sout_stream_t *p_stream, const char *rtsp_url );
int rtp_add_sink( sout_stream_id_t *id, int fd, bool rtcp_mux ); int rtp_add_sink( sout_stream_id_t *id, int fd, bool rtcp_mux );
void rtp_del_sink( sout_stream_id_t *id, int fd ); void rtp_del_sink( sout_stream_id_t *id, int fd );
uint16_t rtp_get_seq( const sout_stream_id_t *id ); uint16_t rtp_get_seq( const sout_stream_id_t *id );
uint32_t rtp_get_ts( const sout_stream_id_t *id );
unsigned rtp_get_num( const sout_stream_id_t *id ); unsigned rtp_get_num( const sout_stream_id_t *id );
/* RTP packetization */ /* RTP packetization */
......
...@@ -638,8 +638,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -638,8 +638,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
{ {
/* FIXME: we really need to limit the number of tracks... */ /* FIXME: we really need to limit the number of tracks... */
char info[ses->trackc * ( strlen( control ) char info[ses->trackc * ( strlen( control )
+ sizeof("url=/trackID=123;seq=65535;" + sizeof("url=/trackID=123;seq=65535, ") ) + 1];
"rtptime=4294967295, ") ) + 1];
size_t infolen = 0; size_t infolen = 0;
for( int i = 0; i < ses->trackc; i++ ) for( int i = 0; i < ses->trackc; i++ )
...@@ -652,15 +651,11 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -652,15 +651,11 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
tr->playing = true; tr->playing = true;
rtp_add_sink( tr->id, tr->fd, false ); rtp_add_sink( tr->id, tr->fd, false );
} }
/* This is racy, as the first packets may have
* already been sent before we fetch this info:
* these extra packets might confuse the client. */
infolen += sprintf( info + infolen, infolen += sprintf( info + infolen,
"url=%s/trackID=%u;seq=%u;rtptime=%u, ", "url=%s/trackID=%u;seq=%u, ",
control, control,
rtp_get_num( tr->id ), rtp_get_num( tr->id ),
rtp_get_seq( tr->id ), rtp_get_seq( tr->id ) );
rtp_get_ts( tr->id ) );
} }
} }
if( infolen > 0 ) if( infolen > 0 )
......
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