/*
* FFM (ffserver live feed) muxer
- * Copyright (c) 2001 Fabrice Bellard.
+ * Copyright (c) 2001 Fabrice Bellard
*
* This file is part of FFmpeg.
*
/* header */
put_le32(pb, MKTAG('F', 'F', 'M', '1'));
put_be32(pb, ffm->packet_size);
- /* XXX: store write position in other file ? */
- put_be64(pb, ffm->packet_size); /* current write position */
+ put_be64(pb, 0); /* current write position */
put_be32(pb, s->nb_streams);
bit_rate = 0;
put_be32(pb, codec->debug);
/* specific info */
switch(codec->codec_type) {
- case CODEC_TYPE_VIDEO:
+ case AVMEDIA_TYPE_VIDEO:
put_be32(pb, codec->time_base.num);
put_be32(pb, codec->time_base.den);
put_be16(pb, codec->width);
put_be16(pb, (int) (codec->qcompress * 10000.0));
put_be16(pb, (int) (codec->qblur * 10000.0));
put_be32(pb, codec->bit_rate_tolerance);
- put_strz(pb, codec->rc_eq ? codec->rc_eq : "tex^qComp");
+ avio_put_str(pb, codec->rc_eq ? codec->rc_eq : "tex^qComp");
put_be32(pb, codec->rc_max_rate);
put_be32(pb, codec->rc_min_rate);
put_be32(pb, codec->rc_buffer_size);
put_be64(pb, av_dbl2int(codec->rc_buffer_aggressivity));
put_be32(pb, codec->codec_tag);
put_byte(pb, codec->thread_count);
+ put_be32(pb, codec->coder_type);
+ put_be32(pb, codec->me_cmp);
+ put_be32(pb, codec->partitions);
+ put_be32(pb, codec->me_subpel_quality);
+ put_be32(pb, codec->me_range);
+ put_be32(pb, codec->keyint_min);
+ put_be32(pb, codec->scenechange_threshold);
+ put_be32(pb, codec->b_frame_strategy);
+ put_be64(pb, av_dbl2int(codec->qcompress));
+ put_be64(pb, av_dbl2int(codec->qblur));
+ put_be32(pb, codec->max_qdiff);
+ put_be32(pb, codec->refs);
+ put_be32(pb, codec->directpred);
break;
- case CODEC_TYPE_AUDIO:
+ case AVMEDIA_TYPE_AUDIO:
put_be32(pb, codec->sample_rate);
put_le16(pb, codec->channels);
put_le16(pb, codec->frame_size);
+ put_le16(pb, codec->sample_fmt);
break;
default:
return -1;
/* packet size & key_frame */
header[0] = pkt->stream_index;
header[1] = 0;
- if (pkt->flags & PKT_FLAG_KEY)
+ if (pkt->flags & AV_PKT_FLAG_KEY)
header[1] |= FLAG_KEY_FRAME;
AV_WB24(header+2, pkt->size);
AV_WB24(header+5, pkt->duration);
put_flush_packet(pb);
- if (!url_is_streamed(pb)) {
- int64_t size;
- /* update the write offset */
- size = url_ftell(pb);
- url_fseek(pb, 8, SEEK_SET);
- put_be64(pb, size);
- put_flush_packet(pb);
- }
-
return 0;
}