Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavc: add CODEC_CAP_DR1 to all video decoders missing them
  rtpdec: Cosmetic cleanup

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/6/merge
Michael Niedermayer 12 years ago
commit 67420b3de5
  1. 1
      libavcodec/bink.c
  2. 1
      libavcodec/dpx.c
  3. 1
      libavcodec/indeo3.c
  4. 1
      libavcodec/indeo4.c
  5. 1
      libavcodec/indeo5.c
  6. 1
      libavcodec/kgv1dec.c
  7. 1
      libavcodec/sgidec.c
  8. 1
      libavcodec/vb.c
  9. 1
      libavcodec/yop.c
  10. 26
      libavformat/rtpdec.c

@ -1328,4 +1328,5 @@ AVCodec ff_bink_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Bink video"), .long_name = NULL_IF_CONFIG_SMALL("Bink video"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -293,4 +293,5 @@ AVCodec ff_dpx_decoder = {
.decode = decode_frame, .decode = decode_frame,
.capabilities = CODEC_CAP_DR1, .capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("DPX image"), .long_name = NULL_IF_CONFIG_SMALL("DPX image"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -1143,4 +1143,5 @@ AVCodec ff_indeo3_decoder = {
.decode = decode_frame, .decode = decode_frame,
.capabilities = CODEC_CAP_DR1, .capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -646,4 +646,5 @@ AVCodec ff_indeo4_decoder = {
.close = ff_ivi_decode_close, .close = ff_ivi_decode_close,
.decode = ff_ivi_decode_frame, .decode = ff_ivi_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"), .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -674,4 +674,5 @@ AVCodec ff_indeo5_decoder = {
.close = ff_ivi_decode_close, .close = ff_ivi_decode_close,
.decode = ff_ivi_decode_frame, .decode = ff_ivi_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"), .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -191,4 +191,5 @@ AVCodec ff_kgv1_decoder = {
.decode = decode_frame, .decode = decode_frame,
.flush = decode_flush, .flush = decode_flush,
.long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"), .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -269,4 +269,5 @@ AVCodec ff_sgi_decoder = {
.decode = decode_frame, .decode = decode_frame,
.capabilities = CODEC_CAP_DR1, .capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("SGI image"), .long_name = NULL_IF_CONFIG_SMALL("SGI image"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -280,4 +280,5 @@ AVCodec ff_vb_decoder = {
.close = decode_end, .close = decode_end,
.decode = decode_frame, .decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"), .long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -272,4 +272,5 @@ AVCodec ff_yop_decoder = {
.close = yop_decode_close, .close = yop_decode_close,
.decode = yop_decode_frame, .decode = yop_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"), .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"),
.capabilities = CODEC_CAP_DR1,
}; };

@ -166,17 +166,14 @@ static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf, int l
#define RTP_SEQ_MOD (1<<16) #define RTP_SEQ_MOD (1<<16)
/** static void rtp_init_statistics(RTPStatistics *s, uint16_t base_sequence)
* called on parse open packet
*/
static void rtp_init_statistics(RTPStatistics *s, uint16_t base_sequence) // called on parse open packet.
{ {
memset(s, 0, sizeof(RTPStatistics)); memset(s, 0, sizeof(RTPStatistics));
s->max_seq = base_sequence; s->max_seq = base_sequence;
s->probation = 1; s->probation = 1;
} }
/** /*
* called whenever there is a large jump in sequence numbers, or when they get out of probation... * called whenever there is a large jump in sequence numbers, or when they get out of probation...
*/ */
static void rtp_init_sequence(RTPStatistics *s, uint16_t seq) static void rtp_init_sequence(RTPStatistics *s, uint16_t seq)
@ -192,7 +189,7 @@ static void rtp_init_sequence(RTPStatistics *s, uint16_t seq)
s->transit = 0; s->transit = 0;
} }
/** /*
* returns 1 if we should handle this packet. * returns 1 if we should handle this packet.
*/ */
static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq) static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq)
@ -203,8 +200,7 @@ static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq)
const int MIN_SEQUENTIAL = 2; const int MIN_SEQUENTIAL = 2;
/* source not valid until MIN_SEQUENTIAL packets with sequence seq. numbers have been received */ /* source not valid until MIN_SEQUENTIAL packets with sequence seq. numbers have been received */
if(s->probation) if (s->probation) {
{
if (seq == s->max_seq + 1) { if (seq == s->max_seq + 1) {
s->probation--; s->probation--;
s->max_seq = seq; s->max_seq = seq;
@ -220,7 +216,7 @@ static int rtp_valid_packet_in_sequence(RTPStatistics *s, uint16_t seq)
} else if (udelta < MAX_DROPOUT) { } else if (udelta < MAX_DROPOUT) {
// in order, with permissible gap // in order, with permissible gap
if (seq < s->max_seq) { if (seq < s->max_seq) {
//sequence number wrapped; count antother 64k cycles // sequence number wrapped; count another 64k cycles
s->cycles += RTP_SEQ_MOD; s->cycles += RTP_SEQ_MOD;
} }
s->max_seq = seq; s->max_seq = seq;
@ -290,8 +286,10 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
received_interval = stats->received - stats->received_prior; received_interval = stats->received - stats->received_prior;
stats->received_prior = stats->received; stats->received_prior = stats->received;
lost_interval = expected_interval - received_interval; lost_interval = expected_interval - received_interval;
if (expected_interval==0 || lost_interval<=0) fraction= 0; if (expected_interval == 0 || lost_interval <= 0)
else fraction = (lost_interval<<8)/expected_interval; fraction = 0;
else
fraction = (lost_interval << 8) / expected_interval;
fraction = (fraction << 24) | lost; fraction = (fraction << 24) | lost;
@ -299,8 +297,7 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
avio_wb32(pb, extended_max); /* max sequence received */ avio_wb32(pb, extended_max); /* max sequence received */
avio_wb32(pb, stats->jitter >> 4); /* jitter */ avio_wb32(pb, stats->jitter >> 4); /* jitter */
if(s->last_rtcp_ntp_time==AV_NOPTS_VALUE) if (s->last_rtcp_ntp_time == AV_NOPTS_VALUE) {
{
avio_wb32(pb, 0); /* last SR timestamp */ avio_wb32(pb, 0); /* last SR timestamp */
avio_wb32(pb, 0); /* delay since last SR */ avio_wb32(pb, 0); /* delay since last SR */
} else { } else {
@ -431,8 +428,7 @@ RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext
return s; return s;
} }
void void ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
ff_rtp_parse_set_dynamic_protocol(RTPDemuxContext *s, PayloadContext *ctx,
RTPDynamicProtocolHandler *handler) RTPDynamicProtocolHandler *handler)
{ {
s->dynamic_protocol_context = ctx; s->dynamic_protocol_context = ctx;

Loading…
Cancel
Save