Commit 1a40491e authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Diego Biurrun
Browse files

Add ff_ prefixes to exported symbols in libavformat/riff.h.

patch by Daniel Verkamp, aniel drv nu

Originally committed as revision 19254 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2795e357
......@@ -119,7 +119,7 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
/* Got an AIFF-C? */
if (version == AIFF_C_VERSION1) {
codec->codec_tag = get_le32(pb);
codec->codec_id = codec_get_id(codec_aiff_tags, codec->codec_tag);
codec->codec_id = ff_codec_get_id(codec_aiff_tags, codec->codec_tag);
switch (codec->codec_id) {
case CODEC_ID_PCM_S16BE:
......
......@@ -289,7 +289,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->codec_type = type;
if (type == CODEC_TYPE_AUDIO) {
get_wav_header(pb, st->codec, type_specific_size);
ff_get_wav_header(pb, st->codec, type_specific_size);
if (is_dvr_ms_audio) {
// codec_id and codec_tag are unreliable in dvr_ms
// files. Set them later by probing stream.
......@@ -375,7 +375,7 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
st->codec->codec_tag = tag1;
st->codec->codec_id = codec_get_id(codec_bmp_tags, tag1);
st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
if(tag1 == MKTAG('D', 'V', 'R', ' '))
st->need_parsing = AVSTREAM_PARSE_FULL;
}
......
......@@ -405,7 +405,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
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);
......@@ -437,7 +437,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
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);
}
......@@ -854,7 +854,7 @@ AVOutputFormat asf_muxer = {
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
......@@ -876,7 +876,7 @@ AVOutputFormat asf_stream_muxer = {
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
......@@ -137,7 +137,7 @@ static int au_read_header(AVFormatContext *s,
rate = get_be32(pb);
channels = get_be32(pb);
codec = codec_get_id(codec_au_tags, id);
codec = ff_codec_get_id(codec_au_tags, id);
if (size >= 24) {
/* skip unused data */
......
......@@ -504,7 +504,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
#endif
st->codec->codec_type = CODEC_TYPE_VIDEO;
st->codec->codec_tag = tag1;
st->codec->codec_id = codec_get_id(codec_bmp_tags, tag1);
st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts.
if(st->codec->codec_tag==0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){
......@@ -518,7 +518,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
// url_fskip(pb, size - 5 * 4);
break;
case CODEC_TYPE_AUDIO:
get_wav_header(pb, st->codec, size);
ff_get_wav_header(pb, st->codec, size);
if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){
av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align);
ast->sample_size= st->codec->block_align;
......
......@@ -67,9 +67,9 @@ static int64_t avi_start_new_riff(AVIContext *avi, ByteIOContext *pb,
for (i=0; i<MAX_STREAMS; i++)
avi->indexes[i].entry = 0;
avi->riff_start = start_tag(pb, "RIFF");
avi->riff_start = ff_start_tag(pb, "RIFF");
put_tag(pb, riff_tag);
loff = start_tag(pb, "LIST");
loff = ff_start_tag(pb, "LIST");
put_tag(pb, list_tag);
return loff;
}
......@@ -204,13 +204,13 @@ static int avi_write_header(AVFormatContext *s)
/* stream list */
for(i=0;i<n;i++) {
list2 = start_tag(pb, "LIST");
list2 = ff_start_tag(pb, "LIST");
put_tag(pb, "strl");
stream = s->streams[i]->codec;
/* stream generic header */
strh = start_tag(pb, "strh");
strh = ff_start_tag(pb, "strh");
switch(stream->codec_type) {
case CODEC_TYPE_SUBTITLE:
// XSUB subtitles behave like video tracks, other subtitles
......@@ -256,27 +256,27 @@ static int avi_write_header(AVFormatContext *s)
put_le32(pb, 0);
put_le16(pb, stream->width);
put_le16(pb, stream->height);
end_tag(pb, strh);
ff_end_tag(pb, strh);
if(stream->codec_type != CODEC_TYPE_DATA){
strf = start_tag(pb, "strf");
strf = ff_start_tag(pb, "strf");
switch(stream->codec_type) {
case CODEC_TYPE_SUBTITLE:
// XSUB subtitles behave like video tracks, other subtitles
// are not (yet) supported.
if (stream->codec_id != CODEC_ID_XSUB) break;
case CODEC_TYPE_VIDEO:
put_bmp_header(pb, stream, codec_bmp_tags, 0);
ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);
break;
case CODEC_TYPE_AUDIO:
if (put_wav_header(pb, stream) < 0) {
if (ff_put_wav_header(pb, stream) < 0) {
return -1;
}
break;
default:
return -1;
}
end_tag(pb, strf);
ff_end_tag(pb, strf);
}
if (!url_is_streamed(pb)) {
......@@ -289,7 +289,7 @@ static int avi_write_header(AVFormatContext *s)
* for compatibility reasons.
*/
avi->indexes[i].entry = avi->indexes[i].ents_allocated = 0;
avi->indexes[i].indx_start = start_tag(pb, "JUNK");
avi->indexes[i].indx_start = ff_start_tag(pb, "JUNK");
put_le16(pb, 4); /* wLongsPerEntry */
put_byte(pb, 0); /* bIndexSubType (0 == frame index) */
put_byte(pb, 0); /* bIndexType (0 == AVI_INDEX_OF_INDEXES) */
......@@ -300,13 +300,13 @@ static int avi_write_header(AVFormatContext *s)
put_le32(pb, 0); Must be 0. */
for (j=0; j < AVI_MASTER_INDEX_SIZE * 2; j++)
put_le64(pb, 0);
end_tag(pb, avi->indexes[i].indx_start);
ff_end_tag(pb, avi->indexes[i].indx_start);
}
if( stream->codec_type == CODEC_TYPE_VIDEO
&& s->streams[i]->sample_aspect_ratio.num>0
&& s->streams[i]->sample_aspect_ratio.den>0){
int vprp= start_tag(pb, "vprp");
int vprp= ff_start_tag(pb, "vprp");
AVRational dar = av_mul_q(s->streams[i]->sample_aspect_ratio,
(AVRational){stream->width, stream->height});
int num, den;
......@@ -332,26 +332,26 @@ static int avi_write_header(AVFormatContext *s)
put_le32(pb, 0);
put_le32(pb, 0);
end_tag(pb, vprp);
ff_end_tag(pb, vprp);
}
end_tag(pb, list2);
ff_end_tag(pb, list2);
}
if (!url_is_streamed(pb)) {
/* AVI could become an OpenDML one, if it grows beyond 2Gb range */
avi->odml_list = start_tag(pb, "JUNK");
avi->odml_list = ff_start_tag(pb, "JUNK");
put_tag(pb, "odml");
put_tag(pb, "dmlh");
put_le32(pb, 248);
for (i = 0; i < 248; i+= 4)
put_le32(pb, 0);
end_tag(pb, avi->odml_list);
ff_end_tag(pb, avi->odml_list);
}
end_tag(pb, list1);
ff_end_tag(pb, list1);
list2 = start_tag(pb, "LIST");
list2 = ff_start_tag(pb, "LIST");
put_tag(pb, "INFO");
avi_write_info_tag2(s, "INAM", "Title", NULL);
avi_write_info_tag2(s, "IART", "Artist", "Author");
......@@ -362,15 +362,15 @@ static int avi_write_header(AVFormatContext *s)
avi_write_info_tag2(s, "IPRT", "Track", NULL);
if(!(s->streams[0]->codec->flags & CODEC_FLAG_BITEXACT))
avi_write_info_tag(pb, "ISFT", LIBAVFORMAT_IDENT);
end_tag(pb, list2);
ff_end_tag(pb, list2);
/* some padding for easier tag editing */
list2 = start_tag(pb, "JUNK");
list2 = ff_start_tag(pb, "JUNK");
for (i = 0; i < 1016; i += 4)
put_le32(pb, 0);
end_tag(pb, list2);
ff_end_tag(pb, list2);
avi->movi_list = start_tag(pb, "LIST");
avi->movi_list = ff_start_tag(pb, "LIST");
put_tag(pb, "movi");
put_flush_packet(pb);
......@@ -448,7 +448,7 @@ static int avi_write_idx1(AVFormatContext *s)
int entry[MAX_STREAMS];
int empty, stream_id = -1;
idx_chunk = start_tag(pb, "idx1");
idx_chunk = ff_start_tag(pb, "idx1");
memset(&entry[0], 0, sizeof(entry));
do {
empty = 1;
......@@ -473,7 +473,7 @@ static int avi_write_idx1(AVFormatContext *s)
entry[stream_id]++;
}
} while (!empty);
end_tag(pb, idx_chunk);
ff_end_tag(pb, idx_chunk);
avi_write_counters(s, avi->riff_id);
}
......@@ -508,12 +508,12 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
(url_ftell(pb) - avi->riff_start > AVI_MAX_RIFF_SIZE)) {
avi_write_ix(s);
end_tag(pb, avi->movi_list);
ff_end_tag(pb, avi->movi_list);
if (avi->riff_id == 1)
avi_write_idx1(s);
end_tag(pb, avi->riff_start);
ff_end_tag(pb, avi->riff_start);
avi->movi_list = avi_start_new_riff(avi, pb, "AVIX", "movi");
}
......@@ -564,13 +564,13 @@ static int avi_write_trailer(AVFormatContext *s)
if (!url_is_streamed(pb)){
if (avi->riff_id == 1) {
end_tag(pb, avi->movi_list);
ff_end_tag(pb, avi->movi_list);
res = avi_write_idx1(s);
end_tag(pb, avi->riff_start);
ff_end_tag(pb, avi->riff_start);
} else {
avi_write_ix(s);
end_tag(pb, avi->movi_list);
end_tag(pb, avi->riff_start);
ff_end_tag(pb, avi->movi_list);
ff_end_tag(pb, avi->riff_start);
file_size = url_ftell(pb);
url_fseek(pb, avi->odml_list - 8, SEEK_SET);
......@@ -617,6 +617,6 @@ AVOutputFormat avi_muxer = {
avi_write_header,
avi_write_packet,
avi_write_trailer,
.codec_tag= (const AVCodecTag* const []){codec_bmp_tags, codec_wav_tags, 0},
.codec_tag= (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0},
.flags= AVFMT_VARIABLE_FPS,
};
......@@ -97,7 +97,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
stream->chunck_size = stream->chunck_samples * wvfmt.nChannels * wvfmt.wBitsPerSample / 8;
st->codec->codec_tag = wvfmt.wFormatTag;
st->codec->codec_id = wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_coded_sample);
st->codec->codec_id = ff_wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_coded_sample);
}
else if (stream->info.fccType == streamtypeVIDEO)
{
......@@ -121,7 +121,7 @@ static int avisynth_read_header(AVFormatContext *s, AVFormatParameters *ap)
st->codec->bits_per_coded_sample = imgfmt.bmiHeader.biBitCount;
st->codec->bit_rate = (uint64_t)stream->info.dwSampleSize * (uint64_t)stream->info.dwRate * 8 / (uint64_t)stream->info.dwScale;
st->codec->codec_tag = imgfmt.bmiHeader.biCompression;
st->codec->codec_id = codec_get_id(codec_bmp_tags, imgfmt.bmiHeader.biCompression);
st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, imgfmt.bmiHeader.biCompression);
st->duration = stream->info.dwLength;
}
......
......@@ -96,7 +96,7 @@ static int dxa_read_header(AVFormatContext *s, AVFormatParameters *ap)
ast = av_new_stream(s, 0);
if (!ast)
return -1;
get_wav_header(pb, ast->codec, fsize);
ff_get_wav_header(pb, ast->codec, fsize);
// find 'data' chunk
while(url_ftell(pb) < c->vidpos && !url_feof(pb)){
tag = get_le32(pb);
......
......@@ -643,7 +643,7 @@ static int gxf_write_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->priv_data = sc;
sc->media_type = codec_get_tag(gxf_media_types, st->codec->codec_id);
sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);
if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
if (st->codec->codec_id != CODEC_ID_PCM_S16LE) {
av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");
......
......@@ -80,11 +80,11 @@ static int nut_write_header(AVFormatContext * avf) {
s[i].type = codec->codec_type == CODEC_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS;
if (codec->codec_tag) fourcc = codec->codec_tag;
else fourcc = codec_get_tag(nut_tags, codec->codec_id);
else fourcc = ff_codec_get_tag(nut_tags, codec->codec_id);
if (!fourcc) {
if (codec->codec_type == CODEC_TYPE_VIDEO) fourcc = codec_get_tag(codec_bmp_tags, codec->codec_id);
if (codec->codec_type == CODEC_TYPE_AUDIO) fourcc = codec_get_tag(codec_wav_tags, codec->codec_id);
if (codec->codec_type == CODEC_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
if (codec->codec_type == CODEC_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
}
s[i].fourcc_len = 4;
......@@ -230,19 +230,19 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
st->start_time = 0;
st->duration = s[i].max_pts;
st->codec->codec_id = codec_get_id(nut_tags, st->codec->codec_tag);
st->codec->codec_id = ff_codec_get_id(nut_tags, st->codec->codec_tag);
switch(s[i].type) {
case NUT_AUDIO_CLASS:
st->codec->codec_type = CODEC_TYPE_AUDIO;
if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = codec_get_id(codec_wav_tags, st->codec->codec_tag);
if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag);
st->codec->channels = s[i].channel_count;
st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom;
break;
case NUT_VIDEO_CLASS:
st->codec->codec_type = CODEC_TYPE_VIDEO;
if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = codec_get_id(codec_bmp_tags, st->codec->codec_tag);
if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
st->codec->width = s[i].width;
st->codec->height = s[i].height;
......
......@@ -30,7 +30,7 @@
#include <stdio.h>
#include "avformat.h"
/* For codec_get_id(). */
/* For ff_codec_get_id(). */
#include "riff.h"
#include "isom.h"
#include "matroska.h"
......@@ -1243,13 +1243,13 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
&& track->codec_priv.size >= 40
&& track->codec_priv.data != NULL) {
track->video.fourcc = AV_RL32(track->codec_priv.data + 16);
codec_id = codec_get_id(codec_bmp_tags, track->video.fourcc);
codec_id = ff_codec_get_id(ff_codec_bmp_tags, track->video.fourcc);
} else if (!strcmp(track->codec_id, "A_MS/ACM")
&& track->codec_priv.size >= 18
&& track->codec_priv.data != NULL) {
init_put_byte(&b, track->codec_priv.data, track->codec_priv.size,
URL_RDONLY, NULL, NULL, NULL, NULL);
get_wav_header(&b, st->codec, track->codec_priv.size);
ff_get_wav_header(&b, st->codec, track->codec_priv.size);
codec_id = st->codec->codec_id;
extradata_offset = 18;
track->codec_priv.size -= extradata_offset;
......@@ -1257,7 +1257,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
&& (track->codec_priv.size >= 86)
&& (track->codec_priv.data != NULL)) {
track->video.fourcc = AV_RL32(track->codec_priv.data);
codec_id=codec_get_id(codec_movvideo_tags, track->video.fourcc);
codec_id=ff_codec_get_id(codec_movvideo_tags, track->video.fourcc);
} else if (codec_id == CODEC_ID_PCM_S16BE) {
switch (track->audio.bitdepth) {
case 8: codec_id = CODEC_ID_PCM_U8; break;
......
......@@ -470,29 +470,29 @@ static int mkv_write_codecprivate(AVFormatContext *s, ByteIOContext *pb, AVCodec
} else if (codec->codec_type == CODEC_TYPE_VIDEO) {
if (qt_id) {
if (!codec->codec_tag)
codec->codec_tag = codec_get_tag(codec_movvideo_tags, codec->codec_id);
codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id);
if (codec->extradata_size)
put_buffer(dyn_cp, codec->extradata, codec->extradata_size);
} else {
if (!codec->codec_tag)
codec->codec_tag = codec_get_tag(codec_bmp_tags, codec->codec_id);
codec->codec_tag = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
if (!codec->codec_tag) {
av_log(s, AV_LOG_ERROR, "No bmp codec ID found.");
ret = -1;
}
put_bmp_header(dyn_cp, codec, codec_bmp_tags, 0);
ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0);
}
} else if (codec->codec_type == CODEC_TYPE_AUDIO) {
if (!codec->codec_tag)
codec->codec_tag = codec_get_tag(codec_wav_tags, codec->codec_id);
codec->codec_tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
if (!codec->codec_tag) {
av_log(s, AV_LOG_ERROR, "No wav codec ID found.");
ret = -1;
}
put_wav_header(dyn_cp, codec);
ff_put_wav_header(dyn_cp, codec);
}
codecpriv_size = url_close_dyn_buf(dyn_cp, &codecpriv);
......@@ -558,8 +558,8 @@ static int mkv_write_tracks(AVFormatContext *s)
put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO);
if (!native_id &&
codec_get_tag(codec_movvideo_tags, codec->codec_id) &&
(!codec_get_tag(codec_bmp_tags, codec->codec_id)
ff_codec_get_tag(codec_movvideo_tags, codec->codec_id) &&
(!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id)
|| codec->codec_id == CODEC_ID_SVQ1
|| codec->codec_id == CODEC_ID_SVQ3
|| codec->codec_id == CODEC_ID_CINEPAK))
......@@ -889,7 +889,7 @@ AVOutputFormat matroska_muxer = {
mkv_write_packet,
mkv_write_trailer,
.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
.codec_tag = (const AVCodecTag* const []){codec_bmp_tags, codec_wav_tags, 0},
.codec_tag = (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0},
.subtitle_codec = CODEC_ID_TEXT,
};
......@@ -905,5 +905,5 @@ AVOutputFormat matroska_audio_muxer = {
mkv_write_packet,
mkv_write_trailer,
.flags = AVFMT_GLOBALHEADER,
.codec_tag = (const AVCodecTag* const []){codec_wav_tags, 0},
.codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0},
};
......@@ -72,7 +72,7 @@ static int mmf_write_header(AVFormatContext *s)
put_tag(pb, "MMMD");
put_be32(pb, 0);
pos = start_tag(pb, "CNTI");
pos = ff_start_tag(pb, "CNTI");
put_byte(pb, 0); /* class */
put_byte(pb, 0); /* type */
put_byte(pb, 0); /* code type */
......@@ -97,7 +97,7 @@ static int mmf_write_header(AVFormatContext *s)
/* Will be filled on close */
put_buffer(pb, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 16);
mmf->awapos = start_tag(pb, "Awa\x01");
mmf->awapos = ff_start_tag(pb, "Awa\x01");
av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
......
......@@ -409,7 +409,7 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
get_be32(pb); /* max bitrate */
get_be32(pb); /* avg bitrate */
st->codec->codec_id= codec_get_id(ff_mp4_obj_type, object_type_id);
st->codec->codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
dprintf(c->fc, "esds object type id %d\n", object_type_id);
len = mp4_read_descr(c, pb, &tag);
if (tag == MP4DecSpecificDescrTag) {
......@@ -436,8 +436,8 @@ static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
"sample rate %d ext sample rate %d\n", st->codec->channels,
cfg.object_type, cfg.ext_object_type,
cfg.sample_rate, cfg.ext_sample_rate);
if (!(st->codec->codec_id = codec_get_id(mp4_audio_types,
cfg.object_type)))
if (!(st->codec->codec_id = ff_codec_get_id(mp4_audio_types,
cfg.object_type)))
st->codec->codec_id = CODEC_ID_AAC;
}
}
......@@ -777,7 +777,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
if (st->codec->codec_tag &&
st->codec->codec_tag != format &&
(c->fc->video_codec_id ? codec_get_id(codec_movvideo_tags, format) != c->fc->video_codec_id
(c->fc->video_codec_id ? ff_codec_get_id(codec_movvideo_tags, format) != c->fc->video_codec_id
: st->codec->codec_tag != MKTAG('j','p','e','g'))
){
/* Multiple fourcc, we skip JPEG. This is not correct, we should
......@@ -791,21 +791,21 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
sc->dref_id= dref_id;
st->codec->codec_tag = format;
id = codec_get_id(codec_movaudio_tags, format);
id = ff_codec_get_id(codec_movaudio_tags, format);
if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8)))
id = codec_get_id(codec_wav_tags, bswap_32(format)&0xFFFF);
id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF);
if (st->codec->codec_type != CODEC_TYPE_VIDEO && id > 0) {
st->codec->codec_type = CODEC_TYPE_AUDIO;
} else if (st->codec->codec_type != CODEC_TYPE_AUDIO && /* do not overwrite codec type */
format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */
id = codec_get_id(codec_movvideo_tags, format);
id = ff_codec_get_id(codec_movvideo_tags, format);
if (id <= 0)
id = codec_get_id(codec_bmp_tags, format);
id = ff_codec_get_id(ff_codec_bmp_tags, format);
if (id > 0)
st->codec->codec_type = CODEC_TYPE_VIDEO;
else if(st->codec->codec_type == CODEC_TYPE_DATA){
id = codec_get_id(ff_codec_movsubtitle_tags, format);
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
if(id > 0)
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
}
......
......@@ -330,7 +330,7 @@ static int mov_write_esds_tag(ByteIOContext *pb, MOVTrack *track) // Basic
track->enc->sample_rate > 24000)
put_byte(pb, 0x6B); // 11172-3
else
put_byte(pb, codec_get_tag(ff_mp4_obj_type, track->enc->codec_id));
put_byte(pb, ff_codec_get_tag(ff_mp4_obj_type, track->enc->codec_id));
// the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio)
// plus 1 bit to indicate upstream and 1 bit set to 1 (reserved)
......@@ -555,7 +555,7 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track)
{
int tag = track->enc->codec_tag;
if (!codec_get_tag(ff_mp4_obj_type, track->enc->codec_id))
if (!ff_codec_get_tag(ff_mp4_obj_type, track->enc->codec_id))
return 0;
if (track->enc->codec_id == CODEC_ID_H264) tag = MKTAG('a','v','c','1');
......@@ -587,7 +587,7 @@ static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track)
if (!(track->enc->codec_type == CODEC_TYPE_SUBTITLE &&
(tag == MKTAG('t','x','3','g') ||
tag == MKTAG('t','e','x','t'))))
tag = codec_get_tag(codec_ipod_tags, track->enc->codec_id);
tag = ff_codec_get_tag(codec_ipod_tags, track->enc->codec_id);
if (!match_ext(s->filename, "m4a") && !match_ext(s->filename, "m4v"))
av_log(s, AV_LOG_WARNING, "Warning, extension is not .m4a nor .m4v "
......@@ -657,17 +657,17 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track)
else if (track->enc->codec_id == CODEC_ID_RAWVIDEO)
tag = mov_get_rawvideo_codec_tag(s, track);
else if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
tag = codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
if (!tag) { // if no mac fcc found, try with Microsoft tags
tag = codec_get_tag(codec_bmp_tags, track->enc->codec_id);
tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id);
if (tag)
av_log(s, AV_LOG_INFO, "Warning, using MS style video codec tag, "
"the file may be unplayable!\n");
}
} else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
tag = codec_get_tag(codec_movaudio_tags, track->enc->codec_id);
tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id);
if (!tag) { // if no mac fcc found, try with Microsoft tags
int ms_tag = codec_get_tag(codec_wav_tags, track->enc->codec_id);
int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id);
if (ms_tag) {
tag = MKTAG('m', 's', ((ms_tag >> 8) & 0xff), (ms_tag & 0xff));
av_log(s, AV_LOG_INFO, "Warning, using MS style audio codec tag, "
......@@ -675,7 +675,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track)
}
}
} else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE)
tag = codec_get_tag(ff_codec_movsubtitle_tags, track->enc->codec_id);
tag = ff_codec_get_tag(ff_codec_movsubtitle_tags, track->enc->codec_id);
}
return tag;
......@@ -701,7 +701,7 @@ static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
else if (track->mode == MODE_IPOD)
tag = ipod_get_codec_tag(s, track);
else if (track->mode & MODE_3GP)