Commit 167f3b8d authored by Martin Storsjö's avatar Martin Storsjö

libavformat: Add an ff_ prefix to some lavf internal symbols

Prefix the functions/tables brktimegm, pcm_read_seek,
dv_offset_reset, voc_get_packet, codec_movaudio_tags,
codec_movvideo_tags.

After this, lavf has no global symbols without the proper prefix.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent a082ac41
......@@ -99,7 +99,7 @@ AVInputFormat ff_aea_demuxer = {
.read_probe = aea_read_probe,
.read_header = aea_read_header,
.read_packet = aea_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "aea",
};
......@@ -318,6 +318,6 @@ AVInputFormat ff_aiff_demuxer = {
.read_probe = aiff_probe,
.read_header = aiff_read_header,
.read_packet = aiff_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
.codec_tag= (const AVCodecTag* const []){ff_codec_aiff_tags, 0},
};
......@@ -190,7 +190,7 @@ AVInputFormat ff_au_demuxer = {
.read_probe = au_probe,
.read_header = au_read_header,
.read_packet = au_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
.codec_tag= (const AVCodecTag* const []){codec_au_tags, 0},
};
#endif
......
......@@ -1306,7 +1306,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
/* Feed the DV video stream version of the timestamp to the */
/* DV demux so it can synthesize correct timestamps. */
dv_offset_reset(avi->dv_demux, timestamp);
ff_dv_offset_reset(avi->dv_demux, timestamp);
avio_seek(s->pb, pos, SEEK_SET);
avi->stream_index= -1;
......
......@@ -124,7 +124,7 @@ static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt)
int ret, size;
size = avio_tell(s->pb);
ret = voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size);
ret = ff_voc_get_packet(s, pkt, avs->st_audio, avs->remaining_audio_size);
size = avio_tell(s->pb) - size;
avs->remaining_audio_size -= size;
......
......@@ -123,7 +123,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
}
avio_skip(pb, 26); /* VOC header */
ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);
ret = ff_voc_get_packet(s, pkt, c93->audio, datasize - 26);
if (ret > 0) {
pkt->stream_index = 1;
pkt->flags |= AV_PKT_FLAG_KEY;
......
......@@ -47,7 +47,7 @@ void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem)
/* This is our own gmtime_r. It differs from its POSIX counterpart in a
couple of places, though. */
struct tm *brktimegm(time_t secs, struct tm *tm)
struct tm *ff_brktimegm(time_t secs, struct tm *tm)
{
int days, y, ny, m;
int md[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
......
......@@ -402,7 +402,7 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c,
return offset + s->data_offset;
}
void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset)
void ff_dv_offset_reset(DVDemuxContext *c, int64_t frame_offset)
{
c->frames= frame_offset;
if (c->ach)
......@@ -494,7 +494,7 @@ static int dv_read_seek(AVFormatContext *s, int stream_index,
if (avio_seek(s->pb, offset, SEEK_SET) < 0)
return -1;
dv_offset_reset(c, offset / c->sys->frame_size);
ff_dv_offset_reset(c, offset / c->sys->frame_size);
return 0;
}
......
......@@ -34,7 +34,7 @@ typedef struct DVDemuxContext DVDemuxContext;
DVDemuxContext* avpriv_dv_init_demux(AVFormatContext* s);
int avpriv_dv_get_packet(DVDemuxContext*, AVPacket *);
int avpriv_dv_produce_packet(DVDemuxContext*, AVPacket*, uint8_t*, int);
void dv_offset_reset(DVDemuxContext *c, int64_t frame_offset);
void ff_dv_offset_reset(DVDemuxContext *c, int64_t frame_offset);
typedef struct DVMuxContext DVMuxContext;
......
......@@ -82,7 +82,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
case dv_timecode:
ct = (time_t)av_rescale_rnd(c->frames, c->sys->time_base.num,
c->sys->time_base.den, AV_ROUND_DOWN);
brktimegm(ct, &tc);
ff_brktimegm(ct, &tc);
/*
* LTC drop-frame frame counter drops two frames (0 and 1) every
* minute, unless it is exactly divisible by 10
......@@ -143,7 +143,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
case dv_video_recdate: /* VAUX recording date */
ct = c->start_time + av_rescale_rnd(c->frames, c->sys->time_base.num,
c->sys->time_base.den, AV_ROUND_DOWN);
brktimegm(ct, &tc);
ff_brktimegm(ct, &tc);
buf[1] = 0xff; /* ds, tm, tens of time zone, units of time zone */
/* 0xff is very likely to be "unknown" */
buf[2] = (3 << 6) | /* reserved -- always 1 */
......@@ -159,7 +159,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
case dv_video_rectime: /* VAUX recording time */
ct = c->start_time + av_rescale_rnd(c->frames, c->sys->time_base.num,
c->sys->time_base.den, AV_ROUND_DOWN);
brktimegm(ct, &tc);
ff_brktimegm(ct, &tc);
buf[1] = (3 << 6) | /* reserved -- always 1 */
0x3f; /* tens of frame, units of frame: 0x3f - "unknown" ? */
buf[2] = (1 << 7) | /* reserved -- always 1 */
......
......@@ -54,7 +54,7 @@ do {\
} while(0)
#endif
struct tm *brktimegm(time_t secs, struct tm *tm);
struct tm *ff_brktimegm(time_t secs, struct tm *tm);
char *ff_data_to_hex(char *buf, const uint8_t *src, int size, int lowercase);
......
......@@ -66,7 +66,7 @@ const AVCodecTag ff_mp4_obj_type[] = {
{ CODEC_ID_NONE , 0 },
};
const AVCodecTag codec_movvideo_tags[] = {
const AVCodecTag ff_codec_movvideo_tags[] = {
/* { CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
{ CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */
......@@ -223,7 +223,7 @@ const AVCodecTag codec_movvideo_tags[] = {
{ CODEC_ID_NONE, 0 },
};
const AVCodecTag codec_movaudio_tags[] = {
const AVCodecTag ff_codec_movaudio_tags[] = {
{ CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') },
{ CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */
{ CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */
......
......@@ -30,8 +30,8 @@
/* isom.c */
extern const AVCodecTag ff_mp4_obj_type[];
extern const AVCodecTag codec_movvideo_tags[];
extern const AVCodecTag codec_movaudio_tags[];
extern const AVCodecTag ff_codec_movvideo_tags[];
extern const AVCodecTag ff_codec_movaudio_tags[];
extern const AVCodecTag ff_codec_movsubtitle_tags[];
int ff_mov_iso639_to_lang(const char lang[4], int mp4);
......
......@@ -1422,7 +1422,7 @@ static int matroska_read_header(AVFormatContext *s)
&& (track->codec_priv.size >= 86)
&& (track->codec_priv.data != NULL)) {
track->video.fourcc = AV_RL32(track->codec_priv.data);
codec_id=ff_codec_get_id(codec_movvideo_tags, track->video.fourcc);
codec_id=ff_codec_get_id(ff_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;
......
......@@ -480,7 +480,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
} else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
if (qt_id) {
if (!codec->codec_tag)
codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id);
codec->codec_tag = ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id);
if (codec->extradata_size)
avio_write(dyn_cp, codec->extradata, codec->extradata_size);
} else {
......@@ -583,7 +583,7 @@ static int mkv_write_tracks(AVFormatContext *s)
put_ebml_uint(pb, MATROSKA_ID_TRACKDEFAULTDURATION, av_q2d(codec->time_base)*1E9);
if (!native_id &&
ff_codec_get_tag(codec_movvideo_tags, codec->codec_id) &&
ff_codec_get_tag(ff_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
......
......@@ -297,7 +297,7 @@ AVInputFormat ff_mmf_demuxer = {
.read_probe = mmf_probe,
.read_header = mmf_read_header,
.read_packet = mmf_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
};
#endif
#if CONFIG_MMF_MUXER
......
......@@ -1126,7 +1126,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
if (st->codec->codec_tag &&
st->codec->codec_tag != format &&
(c->fc->video_codec_id ? ff_codec_get_id(codec_movvideo_tags, format) != c->fc->video_codec_id
(c->fc->video_codec_id ? ff_codec_get_id(ff_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
......@@ -1144,7 +1144,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
sc->dref_id= dref_id;
st->codec->codec_tag = format;
id = ff_codec_get_id(codec_movaudio_tags, format);
id = ff_codec_get_id(ff_codec_movaudio_tags, format);
if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8)))
id = ff_codec_get_id(ff_codec_wav_tags, av_bswap32(format)&0xFFFF);
......@@ -1152,7 +1152,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
} else if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO && /* do not overwrite codec type */
format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */
id = ff_codec_get_id(codec_movvideo_tags, format);
id = ff_codec_get_id(ff_codec_movvideo_tags, format);
if (id <= 0)
id = ff_codec_get_id(ff_codec_bmp_tags, format);
if (id > 0)
......
......@@ -829,7 +829,7 @@ 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 == AVMEDIA_TYPE_VIDEO) {
tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
tag = ff_codec_get_tag(ff_codec_movvideo_tags, track->enc->codec_id);
if (!tag) { // if no mac fcc found, try with Microsoft tags
tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id);
if (tag)
......@@ -837,7 +837,7 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track)
"the file may be unplayable!\n");
}
} else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id);
tag = ff_codec_get_tag(ff_codec_movaudio_tags, track->enc->codec_id);
if (!tag) { // if no mac fcc found, try with Microsoft tags
int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id);
if (ms_tag) {
......@@ -3230,7 +3230,7 @@ AVOutputFormat ff_mov_muxer = {
.write_packet = ff_mov_write_packet,
.write_trailer = mov_write_trailer,
.flags = AVFMT_GLOBALHEADER | AVFMT_ALLOW_FLUSH,
.codec_tag = (const AVCodecTag* const []){codec_movvideo_tags, codec_movaudio_tags, 0},
.codec_tag = (const AVCodecTag* const []){ff_codec_movvideo_tags, ff_codec_movaudio_tags, 0},
.priv_class = &mov_muxer_class,
};
#endif
......
......@@ -412,7 +412,7 @@ static int oma_read_seek(struct AVFormatContext *s, int stream_index, int64_t ti
{
OMAContext *oc = s->priv_data;
pcm_read_seek(s, stream_index, timestamp, flags);
ff_pcm_read_seek(s, stream_index, timestamp, flags);
if (oc->encrypted) {
/* readjust IV for CBC */
......
......@@ -23,8 +23,8 @@
#include "avformat.h"
#include "pcm.h"
int pcm_read_seek(AVFormatContext *s,
int stream_index, int64_t timestamp, int flags)
int ff_pcm_read_seek(AVFormatContext *s,
int stream_index, int64_t timestamp, int flags)
{
AVStream *st;
int block_align, byte_rate;
......
......@@ -24,7 +24,7 @@
#include "avformat.h"
int pcm_read_seek(AVFormatContext *s,
int stream_index, int64_t timestamp, int flags);
int ff_pcm_read_seek(AVFormatContext *s,
int stream_index, int64_t timestamp, int flags);
#endif /* AVFORMAT_PCM_H */
......@@ -67,7 +67,7 @@ AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \
.priv_data_size = sizeof(RawAudioDemuxerContext), \
.read_header = ff_raw_read_header, \
.read_packet = raw_read_packet, \
.read_seek = pcm_read_seek, \
.read_seek = ff_pcm_read_seek, \
.flags = AVFMT_GENERIC_INDEX, \
.extensions = ext, \
.raw_codec_id = codec, \
......
......@@ -94,6 +94,6 @@ AVInputFormat ff_rso_demuxer = {
.extensions = "rso",
.read_header = rso_read_header,
.read_packet = rso_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
.codec_tag = (const AVCodecTag* const []){ff_codec_rso_tags, 0},
};
......@@ -147,5 +147,5 @@ AVInputFormat ff_sol_demuxer = {
.read_probe = sol_probe,
.read_header = sol_read_header,
.read_packet = sol_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
};
......@@ -148,5 +148,5 @@ AVInputFormat ff_sox_demuxer = {
.read_probe = sox_probe,
.read_header = sox_read_header,
.read_packet = sox_read_packet,
.read_seek = pcm_read_seek,
.read_seek = ff_pcm_read_seek,
};
......@@ -45,7 +45,7 @@ typedef enum voc_type {
extern const unsigned char ff_voc_magic[21];
extern const AVCodecTag ff_voc_codec_tags[];
int voc_get_packet(AVFormatContext *s, AVPacket *pkt,
AVStream *st, int max_size);
int ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt,
AVStream *st, int max_size);
#endif /* AVFORMAT_VOC_H */
......@@ -62,7 +62,7 @@ static int voc_read_header(AVFormatContext *s)
}
int
voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
{
VocDecContext *voc = s->priv_data;
AVCodecContext *dec = st->codec;
......@@ -153,7 +153,7 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
static int voc_read_packet(AVFormatContext *s, AVPacket *pkt)
{
return voc_get_packet(s, pkt, s->streams[0], 0);
return ff_voc_get_packet(s, pkt, s->streams[0], 0);
}
AVInputFormat ff_voc_demuxer = {
......
......@@ -582,7 +582,7 @@ static int wav_read_seek(AVFormatContext *s,
default:
break;
}
return pcm_read_seek(s, stream_index, timestamp, flags);
return ff_pcm_read_seek(s, stream_index, timestamp, flags);
}
AVInputFormat ff_wav_demuxer = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment