aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Verkamp <daniel@drv.nu>2009-06-22 23:09:34 +0000
committerDiego Biurrun <diego@biurrun.de>2009-06-22 23:09:34 +0000
commit1a40491ef212869077278b46f74ee92a66809d20 (patch)
tree73badafecd3120080515ba6391fe8fe39b1435a6
parent2795e3573d9407aca8060bdebaeb2119d19587c8 (diff)
downloadffmpeg-1a40491ef212869077278b46f74ee92a66809d20.tar.gz
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
-rw-r--r--libavformat/aiff.c2
-rw-r--r--libavformat/asfdec.c4
-rw-r--r--libavformat/asfenc.c8
-rw-r--r--libavformat/au.c2
-rw-r--r--libavformat/avidec.c4
-rw-r--r--libavformat/avienc.c62
-rw-r--r--libavformat/avisynth.c4
-rw-r--r--libavformat/dxa.c2
-rw-r--r--libavformat/gxfenc.c2
-rw-r--r--libavformat/libnut.c12
-rw-r--r--libavformat/matroskadec.c8
-rw-r--r--libavformat/matroskaenc.c18
-rw-r--r--libavformat/mmf.c4
-rw-r--r--libavformat/mov.c18
-rw-r--r--libavformat/movenc.c18
-rw-r--r--libavformat/nsvdec.c4
-rw-r--r--libavformat/nutdec.c6
-rw-r--r--libavformat/nutenc.c2
-rw-r--r--libavformat/nuv.c4
-rw-r--r--libavformat/oggparseogm.c8
-rw-r--r--libavformat/oma.c2
-rw-r--r--libavformat/riff.c20
-rw-r--r--libavformat/riff.h20
-rw-r--r--libavformat/swfdec.c4
-rw-r--r--libavformat/swfenc.c2
-rw-r--r--libavformat/utils.c8
-rw-r--r--libavformat/vocdec.c4
-rw-r--r--libavformat/wav.c20
28 files changed, 136 insertions, 136 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index 8fb7925be6..41721e2fa2 100644
--- a/libavformat/aiff.c
+++ b/libavformat/aiff.c
@@ -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:
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 7f254d096b..a93ac09929 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -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;
}
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 39b48422a2..015abaf6ac 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -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
diff --git a/libavformat/au.c b/libavformat/au.c
index 0d2cc8a48f..cc243ea483 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -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 */
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 10f9417d2d..b3c4177d01 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -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;
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index c70b0abd73..5ae95e2b6a 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -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,
};
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index 88e841c793..7ca52d9892 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -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;
}
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 35b9fe26b6..5b6cd67b59 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -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);
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index 972031774f..501691e78d 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -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");
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index 86cf6a5ec7..f23e70dc08 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -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;
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index ca758409dd..9405b46c70 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -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;
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 051fb1b613..a03b11bc3e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -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},
};
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index ab2a9962ce..75afa0e31c 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -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);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 19e39339c8..da38b15f1e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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;
}
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 57f05e8fbe..5cd014d264 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -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)
- tag = codec_get_tag(codec_3gp_tags, track->enc->codec_id);
+ tag = ff_codec_get_tag(codec_3gp_tags, track->enc->codec_id);
else
tag = mov_get_codec_tag(s, track);
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 08691462b0..61a21ae178 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -458,7 +458,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
st->priv_data = nst;
st->codec->codec_type = CODEC_TYPE_VIDEO;
st->codec->codec_tag = vtag;
- st->codec->codec_id = codec_get_id(nsv_codec_video_tags, vtag);
+ st->codec->codec_id = ff_codec_get_id(nsv_codec_video_tags, vtag);
st->codec->width = vwidth;
st->codec->height = vheight;
st->codec->bits_per_coded_sample = 24; /* depth XXX */
@@ -489,7 +489,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap)
st->priv_data = nst;
st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_tag = atag;
- st->codec->codec_id = codec_get_id(nsv_codec_audio_tags, atag);
+ st->codec->codec_id = ff_codec_get_id(nsv_codec_audio_tags, atag);
st->need_parsing = AVSTREAM_PARSE_FULL; /* for PCM we will read a chunk later and put correct info */
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 2243d001d9..564faf2030 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -316,15 +316,15 @@ static int decode_stream_header(NUTContext *nut){
{
case 0:
st->codec->codec_type = CODEC_TYPE_VIDEO;
- st->codec->codec_id = codec_get_id(codec_bmp_tags, tmp);
+ st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp);
break;
case 1:
st->codec->codec_type = CODEC_TYPE_AUDIO;
- st->codec->codec_id = codec_get_id(codec_wav_tags, tmp);
+ st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp);
break;
case 2:
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
- st->codec->codec_id = codec_get_id(ff_nut_subtitle_tags, tmp);
+ st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp);
break;
case 3:
st->codec->codec_type = CODEC_TYPE_DATA;
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index f89882b69f..47d2dc5f3d 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -826,5 +826,5 @@ AVOutputFormat nut_muxer = {
write_packet,
write_trailer,
.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
- .codec_tag= (const AVCodecTag* const []){codec_bmp_tags, codec_wav_tags, ff_nut_subtitle_tags, 0},
+ .codec_tag= (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0},
};
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 2f055b5f0f..4abe54fd6e 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -86,7 +86,7 @@ static int get_codec_data(ByteIOContext *pb, AVStream *vst,
if (vst) {
vst->codec->codec_tag = get_le32(pb);
vst->codec->codec_id =
- codec_get_id(codec_bmp_tags, vst->codec->codec_tag);
+ ff_codec_get_id(ff_codec_bmp_tags, vst->codec->codec_tag);
if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
vst->codec->codec_id = CODEC_ID_NUV;
} else
@@ -98,7 +98,7 @@ static int get_codec_data(ByteIOContext *pb, AVStream *vst,
ast->codec->bits_per_coded_sample = get_le32(pb);
ast->codec->channels = get_le32(pb);
ast->codec->codec_id =
- wav_codec_get_id(ast->codec->codec_tag,
+ ff_wav_codec_get_id(ast->codec->codec_tag,
ast->codec->bits_per_coded_sample);
ast->need_parsing = AVSTREAM_PARSE_FULL;
} else
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index 6a0a4c119a..f13f8c5242 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -53,7 +53,7 @@ ogm_header(AVFormatContext *s, int idx)
st->codec->codec_type = CODEC_TYPE_VIDEO;
p += 8;
tag = bytestream_get_le32(&p);
- st->codec->codec_id = codec_get_id(codec_bmp_tags, tag);
+ st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag);
st->codec->codec_tag = tag;
} else if (*p == 't') {
st->codec->codec_type = CODEC_TYPE_SUBTITLE;
@@ -67,7 +67,7 @@ ogm_header(AVFormatContext *s, int idx)
bytestream_get_buffer(&p, acid, 4);
acid[4] = 0;
cid = strtol(acid, NULL, 16);
- st->codec->codec_id = codec_get_id(codec_wav_tags, cid);
+ st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, cid);
st->need_parsing = AVSTREAM_PARSE_FULL;
}
@@ -115,14 +115,14 @@ ogm_dshow_header(AVFormatContext *s, int idx)
if(t == 0x05589f80){
st->codec->codec_type = CODEC_TYPE_VIDEO;
- st->codec->codec_id = codec_get_id(codec_bmp_tags, AV_RL32(p + 68));
+ st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, AV_RL32(p + 68));
st->codec->time_base.den = 10000000;
st->codec->time_base.num = AV_RL64(p + 164);
st->codec->width = AV_RL32(p + 176);
st->codec->height = AV_RL32(p + 180);
} else if(t == 0x05589f81){
st->codec->codec_type = CODEC_TYPE_AUDIO;
- st->codec->codec_id = codec_get_id(codec_wav_tags, AV_RL16(p + 124));
+ st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, AV_RL16(p + 124));
st->codec->channels = AV_RL16(p + 126);
st->codec->sample_rate = AV_RL32(p + 128);
st->codec->bit_rate = AV_RL32(p + 132) * 8;
diff --git a/libavformat/oma.c b/libavformat/oma.c
index ecfb24222c..cc512cae76 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -109,7 +109,7 @@ static int oma_read_header(AVFormatContext *s,
st->start_time = 0;
st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_tag = buf[32];
- st->codec->codec_id = codec_get_id(codec_oma_tags, st->codec->codec_tag);
+ st->codec->codec_id = ff_codec_get_id(codec_oma_tags, st->codec->codec_tag);
switch (buf[32]) {
case OMA_CODECID_ATRAC3:
diff --git a/libavformat/riff.c b/libavformat/riff.c
index fbd40d4727..d03015d484 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -26,7 +26,7 @@
/* Note: when encoding, the first matching tag is used, so order is
important if multiple tags possible for a given codec. */
-const AVCodecTag codec_bmp_tags[] = {
+const AVCodecTag ff_codec_bmp_tags[] = {
{ CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
{ CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
{ CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
@@ -218,7 +218,7 @@ const AVCodecTag codec_bmp_tags[] = {
{ CODEC_ID_NONE, 0 }
};
-const AVCodecTag codec_wav_tags[] = {
+const AVCodecTag ff_codec_wav_tags[] = {
{ CODEC_ID_PCM_S16LE, 0x0001 },
{ CODEC_ID_PCM_U8, 0x0001 }, /* must come after s16le in this list */
{ CODEC_ID_PCM_S24LE, 0x0001 },
@@ -272,14 +272,14 @@ const AVCodecTag codec_wav_tags[] = {
};
#if CONFIG_MUXERS
-int64_t start_tag(ByteIOContext *pb, const char *tag)
+int64_t ff_start_tag(ByteIOContext *pb, const char *tag)
{
put_tag(pb, tag);
put_le32(pb, 0);
return url_ftell(pb);
}
-void end_tag(ByteIOContext *pb, int64_t start)
+void ff_end_tag(ByteIOContext *pb, int64_t start)
{
int64_t pos;
@@ -291,7 +291,7 @@ void end_tag(ByteIOContext *pb, int64_t start)
/* WAVEFORMATEX header */
/* returns the size or -1 on error */
-int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
+int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
{
int bps, blkalign, bytespersec;
int hdrsize = 18;
@@ -394,7 +394,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
}
/* BITMAPINFOHEADER header */
-void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf)
+void ff_put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf)
{
put_le32(pb, 40 + enc->extradata_size); /* size */
put_le32(pb, enc->width);
@@ -426,7 +426,7 @@ void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *ta
* WAVEFORMATEX adds 'WORD cbSize' and basically makes itself
* an openended structure.
*/
-void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
+void ff_get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
{
int id;
@@ -464,14 +464,14 @@ void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size)
if (size > 0)
url_fskip(pb, size);
}
- codec->codec_id = wav_codec_get_id(id, codec->bits_per_coded_sample);
+ codec->codec_id = ff_wav_codec_get_id(id, codec->bits_per_coded_sample);
}
-enum CodecID wav_codec_get_id(unsigned int tag, int bps)
+enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps)
{
enum CodecID id;
- id = codec_get_id(codec_wav_tags, tag);
+ id = ff_codec_get_id(ff_codec_wav_tags, tag);
if (id <= 0)
return id;
/* handle specific u8 codec */
diff --git a/libavformat/riff.h b/libavformat/riff.h
index d287929eb8..eac0d25470 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -31,24 +31,24 @@
#include "libavcodec/avcodec.h"
#include "avio.h"
-int64_t start_tag(ByteIOContext *pb, const char *tag);
-void end_tag(ByteIOContext *pb, int64_t start);
+int64_t ff_start_tag(ByteIOContext *pb, const char *tag);
+void ff_end_tag(ByteIOContext *pb, int64_t start);
typedef struct AVCodecTag {
int id;
unsigned int tag;
} AVCodecTag;
-void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
-int put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
-enum CodecID wav_codec_get_id(unsigned int tag, int bps);
-void get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size);
+void ff_put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
+int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
+enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps);
+void ff_get_wav_header(ByteIOContext *pb, AVCodecContext *codec, int size);
-extern const AVCodecTag codec_bmp_tags[];
-extern const AVCodecTag codec_wav_tags[];
+extern const AVCodecTag ff_codec_bmp_tags[];
+extern const AVCodecTag ff_codec_wav_tags[];
-unsigned int codec_get_tag(const AVCodecTag *tags, int id);
-enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
+unsigned int ff_codec_get_tag(const AVCodecTag *tags, int id);
+enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
#endif /* AVFORMAT_RIFF_H */
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 6f7092694c..3a60fab702 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -110,7 +110,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
if (!vst)
return -1;
vst->codec->codec_type = CODEC_TYPE_VIDEO;
- vst->codec->codec_id = codec_get_id(swf_codec_tags, get_byte(pb));
+ vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, get_byte(pb));
av_set_pts_info(vst, 16, 256, swf->frame_rate);
vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
len -= 8;
@@ -132,7 +132,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
return -1;
ast->codec->channels = 1 + (v&1);
ast->codec->codec_type = CODEC_TYPE_AUDIO;
- ast->codec->codec_id = codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
+ ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
ast->need_parsing = AVSTREAM_PARSE_FULL;
sample_rate_code= (v>>2) & 3;
if (!sample_rate_code)
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 8545ea768a..60b7171cc9 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -351,7 +351,7 @@ static int swf_write_video(AVFormatContext *s,
put_le16(pb, enc->width);
put_le16(pb, enc->height);
put_byte(pb, 0);
- put_byte(pb,codec_get_tag(swf_codec_tags,enc->codec_id));
+ put_byte(pb,ff_codec_get_tag(swf_codec_tags,enc->codec_id));
put_swf_end_tag(s);
/* place the video object for the first time */
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 99ac30cdd5..7422f599d6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1904,7 +1904,7 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt)
return ret;
}
-unsigned int codec_get_tag(const AVCodecTag *tags, int id)
+unsigned int ff_codec_get_tag(const AVCodecTag *tags, int id)
{
while (tags->id != CODEC_ID_NONE) {
if (tags->id == id)
@@ -1914,7 +1914,7 @@ unsigned int codec_get_tag(const AVCodecTag *tags, int id)
return 0;
}
-enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag)
+enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
{
int i;
for(i=0; tags[i].id != CODEC_ID_NONE;i++) {
@@ -1935,7 +1935,7 @@ unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id)
{
int i;
for(i=0; tags && tags[i]; i++){
- int tag= codec_get_tag(tags[i], id);
+ int tag= ff_codec_get_tag(tags[i], id);
if(tag) return tag;
}
return 0;
@@ -1945,7 +1945,7 @@ enum CodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
{
int i;
for(i=0; tags && tags[i]; i++){
- enum CodecID id= codec_get_id(tags[i], tag);
+ enum CodecID id= ff_codec_get_id(tags[i], tag);
if(id!=CODEC_ID_NONE) return id;
}
return CODEC_ID_NONE;
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 430f131bda..94fbd7b9bf 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -84,7 +84,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
if (sample_rate)
dec->sample_rate = sample_rate;
dec->channels = channels;
- dec->codec_id = codec_get_id(ff_voc_codec_tags, get_byte(pb));
+ dec->codec_id = ff_codec_get_id(ff_voc_codec_tags, get_byte(pb));
dec->bits_per_coded_sample = av_get_bits_per_sample(dec->codec_id);
voc->remaining_size -= 2;
max_size -= 2;
@@ -107,7 +107,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
dec->sample_rate = get_le32(pb);
dec->bits_per_coded_sample = get_byte(pb);
dec->channels = get_byte(pb);
- dec->codec_id = codec_get_id(ff_voc_codec_tags, get_le16(pb));
+ dec->codec_id = ff_codec_get_id(ff_voc_codec_tags, get_le16(pb));
url_fskip(pb, 4);
voc->remaining_size -= 12;
max_size -= 12;
diff --git a/libavformat/wav.c b/libavformat/wav.c
index d0f1815e3f..051cd843a8 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -42,20 +42,20 @@ static int wav_write_header(AVFormatContext *s)
put_tag(pb, "WAVE");
/* format header */
- fmt = start_tag(pb, "fmt ");
- if (put_wav_header(pb, s->streams[0]->codec) < 0) {
+ fmt = ff_start_tag(pb, "fmt ");
+ if (ff_put_wav_header(pb, s->streams[0]->codec) < 0) {
av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
av_free(wav);
return -1;
}
- end_tag(pb, fmt);
+ ff_end_tag(pb, fmt);
if(s->streams[0]->codec->codec_tag != 0x01 /* hence for all other than PCM */
&& !url_is_streamed(s->pb)) {
- fact = start_tag(pb, "fact");
+ fact = ff_start_tag(pb, "fact");
put_le32(pb, 0);
- end_tag(pb, fact);
+ ff_end_tag(pb, fact);
}
av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
@@ -63,7 +63,7 @@ static int wav_write_header(AVFormatContext *s)
wav->minpts = INT64_MAX;
/* data header */
- wav->data = start_tag(pb, "data");
+ wav->data = ff_start_tag(pb, "data");
put_flush_packet(pb);
@@ -91,7 +91,7 @@ static int wav_write_trailer(AVFormatContext *s)
int64_t file_size;
if (!url_is_streamed(s->pb)) {
- end_tag(pb, wav->data);
+ ff_end_tag(pb, wav->data);
/* update file size */
file_size = url_ftell(pb);
@@ -182,7 +182,7 @@ static int wav_read_header(AVFormatContext *s,
if (!st)
return AVERROR(ENOMEM);
- get_wav_header(pb, st->codec, size);
+ ff_get_wav_header(pb, st->codec, size);
st->need_parsing = AVSTREAM_PARSE_FULL;
av_set_pts_info(st, 64, 1, st->codec->sample_rate);
@@ -264,7 +264,7 @@ AVInputFormat wav_demuxer = {
NULL,
wav_read_seek,
.flags= AVFMT_GENERIC_INDEX,
- .codec_tag= (const AVCodecTag* const []){codec_wav_tags, 0},
+ .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0},
};
#endif
#if CONFIG_WAV_MUXER
@@ -279,6 +279,6 @@ AVOutputFormat wav_muxer = {
wav_write_header,
wav_write_packet,
wav_write_trailer,
- .codec_tag= (const AVCodecTag* const []){codec_wav_tags, 0},
+ .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0},
};
#endif