#define PREROLL_TIME 3100
-static void put_guid(ByteIOContext *s, const GUID *g)
+static void put_guid(ByteIOContext *s, const ff_asf_guid *g)
{
assert(sizeof(*g) == 16);
put_buffer(s, *g, sizeof(*g));
}while(c);
}
-static int64_t put_header(ByteIOContext *pb, const GUID *g)
+static int64_t put_header(ByteIOContext *pb, const ff_asf_guid *g)
{
int64_t pos;
put_le64(pb, asf->duration); /* duration (in 100ns units) */
put_le64(pb, PREROLL_TIME); /* start time stamp */
put_le32(pb, (asf->is_streamed || url_is_streamed(pb)) ? 3 : 2); /* ??? */
- put_le32(pb, asf->packet_size); /* packet size */
- put_le32(pb, asf->packet_size); /* packet size */
+ put_le32(pb, s->packet_size); /* packet size */
+ put_le32(pb, s->packet_size); /* packet size */
put_le32(pb, bit_rate); /* Nominal data rate in bps */
end_header(pb, hpos);
if (enc->codec_type == CODEC_TYPE_AUDIO) {
/* WAVEFORMATEX header */
- int wavsize = put_wav_header(pb, enc);
+ int wavsize = ff_put_wav_header(pb, enc);
if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) {
wavsize += 2;
put_le16(pb, 0);
put_le16(pb, 40 + enc->extradata_size); /* size */
/* BITMAPINFOHEADER header */
- put_bmp_header(pb, enc, codec_bmp_tags, 1);
+ ff_put_bmp_header(pb, enc, ff_codec_bmp_tags, 1);
}
end_header(pb, hpos);
}
{
ASFContext *asf = s->priv_data;
- asf->packet_size = PACKET_SIZE;
+ s->packet_size = PACKET_SIZE;
asf->nb_packets = 0;
asf->last_indexed_pts = 0;
asf->packet_nb_payloads = 0;
asf->packet_timestamp_start = -1;
asf->packet_timestamp_end = -1;
- init_put_byte(&asf->pb, asf->packet_buf, asf->packet_size, 1,
+ init_put_byte(&asf->pb, asf->packet_buf, s->packet_size, 1,
NULL, NULL, NULL, NULL);
return 0;
assert(asf->packet_timestamp_end >= asf->packet_timestamp_start);
if (asf->is_streamed) {
- put_chunk(s, 0x4424, asf->packet_size, 0);
+ put_chunk(s, 0x4424, s->packet_size, 0);
}
packet_hdr_size = put_payload_parsing_info(
assert(packet_hdr_size <= asf->packet_size_left);
memset(asf->packet_buf + packet_filled_size, 0, asf->packet_size_left);
- put_buffer(s->pb, asf->packet_buf, asf->packet_size - packet_hdr_size);
+ put_buffer(s->pb, asf->packet_buf, s->packet_size - packet_hdr_size);
put_flush_packet(s->pb);
asf->nb_packets++;
asf->packet_nb_payloads = 0;
asf->packet_timestamp_start = -1;
asf->packet_timestamp_end = -1;
- init_put_byte(&asf->pb, asf->packet_buf, asf->packet_size, 1,
+ init_put_byte(&asf->pb, asf->packet_buf, s->packet_size, 1,
NULL, NULL, NULL, NULL);
}
asf_write_packet,
asf_write_trailer,
.flags = AVFMT_GLOBALHEADER,
- .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
+ .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0},
+ .metadata_conv = ff_asf_metadata_conv,
};
#endif
asf_write_packet,
asf_write_trailer,
.flags = AVFMT_GLOBALHEADER,
- .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
+ .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, ff_codec_bmp_tags, ff_codec_wav_tags, 0},
+ .metadata_conv = ff_asf_metadata_conv,
};
#endif //CONFIG_ASF_STREAM_MUXER