Commit 64ff46a1 authored by Christophe Massiot's avatar Christophe Massiot

* ALL: Take into account biTStream's API change (rename rtp_cc in seqnum).

parent 5d795dc7
...@@ -111,7 +111,7 @@ typedef struct output_t ...@@ -111,7 +111,7 @@ typedef struct output_t
/* output */ /* output */
int i_handle; int i_handle;
packet_t *p_packets, *p_last_packet; packet_t *p_packets, *p_last_packet;
uint16_t i_cc; uint16_t i_seqnum;
mtime_t i_ref_timestamp; mtime_t i_ref_timestamp;
mtime_t i_ref_wallclock; mtime_t i_ref_wallclock;
......
...@@ -118,7 +118,7 @@ int output_Init( output_t *p_output, const output_config_t *p_config ) ...@@ -118,7 +118,7 @@ int output_Init( output_t *p_output, const output_config_t *p_config )
/* Init run-time values */ /* Init run-time values */
p_output->p_packets = p_output->p_last_packet = NULL; p_output->p_packets = p_output->p_last_packet = NULL;
p_output->i_cc = rand() & 0xffff; p_output->i_seqnum = rand() & 0xffff;
p_output->i_pat_cc = rand() & 0xf; p_output->i_pat_cc = rand() & 0xf;
p_output->i_pmt_cc = rand() & 0xf; p_output->i_pmt_cc = rand() & 0xf;
p_output->i_nit_cc = rand() & 0xf; p_output->i_nit_cc = rand() & 0xf;
...@@ -260,7 +260,7 @@ static void output_Flush( output_t *p_output ) ...@@ -260,7 +260,7 @@ static void output_Flush( output_t *p_output )
rtp_set_hdr( p_rtp_hdr ); rtp_set_hdr( p_rtp_hdr );
rtp_set_type( p_rtp_hdr, RTP_TYPE_TS ); rtp_set_type( p_rtp_hdr, RTP_TYPE_TS );
rtp_set_cc( p_rtp_hdr, p_output->i_cc++ ); rtp_set_seqnum( p_rtp_hdr, p_output->i_seqnum++ );
rtp_set_timestamp( p_rtp_hdr, rtp_set_timestamp( p_rtp_hdr,
p_output->i_ref_timestamp p_output->i_ref_timestamp
+ (p_packet->i_dts - p_output->i_ref_wallclock) + (p_packet->i_dts - p_output->i_ref_wallclock)
......
...@@ -52,7 +52,7 @@ static int i_handle; ...@@ -52,7 +52,7 @@ static int i_handle;
static bool b_udp = false; static bool b_udp = false;
static int i_block_cnt; static int i_block_cnt;
static uint8_t pi_ssrc[4] = { 0, 0, 0, 0 }; static uint8_t pi_ssrc[4] = { 0, 0, 0, 0 };
static uint16_t i_cc = 0; static uint16_t i_seqnum = 0;
static mtime_t i_last_packet = 0; static mtime_t i_last_packet = 0;
/***************************************************************************** /*****************************************************************************
...@@ -316,7 +316,7 @@ block_t *udp_Read( mtime_t i_poll_timeout ) ...@@ -316,7 +316,7 @@ block_t *udp_Read( mtime_t i_poll_timeout )
rtp_get_ssrc(p_rtp_hdr, pi_new_ssrc); rtp_get_ssrc(p_rtp_hdr, pi_new_ssrc);
if ( !memcmp( pi_ssrc, pi_new_ssrc, 4 * sizeof(uint8_t) ) ) if ( !memcmp( pi_ssrc, pi_new_ssrc, 4 * sizeof(uint8_t) ) )
{ {
if ( rtp_get_cc(p_rtp_hdr) != i_cc ) if ( rtp_get_seqnum(p_rtp_hdr) != i_seqnum )
msg_Warn( NULL, "RTP discontinuity" ); msg_Warn( NULL, "RTP discontinuity" );
} }
else else
...@@ -334,7 +334,7 @@ block_t *udp_Read( mtime_t i_poll_timeout ) ...@@ -334,7 +334,7 @@ block_t *udp_Read( mtime_t i_poll_timeout )
printf("new RTP source: %s\n", inet_ntoa( addr ) ); printf("new RTP source: %s\n", inet_ntoa( addr ) );
} }
} }
i_cc = rtp_get_cc(p_rtp_hdr) + 1; i_seqnum = rtp_get_seqnum(p_rtp_hdr) + 1;
i_len -= RTP_HEADER_SIZE; i_len -= RTP_HEADER_SIZE;
} }
......
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