Skip to content

Commit

Permalink
Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.
Browse files Browse the repository at this point in the history
This also lists the objects from those two libraries as internal (by adding
the ff_ prefix) so that they can then be hidden via linker scripts.
  • Loading branch information
Flameeyes authored and mansr committed Jan 26, 2011
1 parent 225b6d7 commit c6610a2
Show file tree
Hide file tree
Showing 186 changed files with 274 additions and 274 deletions.
8 changes: 4 additions & 4 deletions libavdevice/alldevices.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "avdevice.h"

#define REGISTER_OUTDEV(X,x) { \
extern AVOutputFormat x##_muxer; \
if(CONFIG_##X##_OUTDEV) av_register_output_format(&x##_muxer); }
extern AVOutputFormat ff_##x##_muxer; \
if(CONFIG_##X##_OUTDEV) av_register_output_format(&ff_##x##_muxer); }
#define REGISTER_INDEV(X,x) { \
extern AVInputFormat x##_demuxer; \
if(CONFIG_##X##_INDEV) av_register_input_format(&x##_demuxer); }
extern AVInputFormat ff_##x##_demuxer; \
if(CONFIG_##X##_INDEV) av_register_input_format(&ff_##x##_demuxer); }
#define REGISTER_INOUTDEV(X,x) REGISTER_OUTDEV(X,x); REGISTER_INDEV(X,x)

void avdevice_register_all(void)
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/alsa-audio-dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
return 0;
}

AVInputFormat alsa_demuxer = {
AVInputFormat ff_alsa_demuxer = {
"alsa",
NULL_IF_CONFIG_SMALL("ALSA audio input"),
sizeof(AlsaData),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/alsa-audio-enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
return 0;
}

AVOutputFormat alsa_muxer = {
AVOutputFormat ff_alsa_muxer = {
"alsa",
NULL_IF_CONFIG_SMALL("ALSA audio output"),
"",
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/bktr.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int grab_read_close(AVFormatContext *s1)
return 0;
}

AVInputFormat bktr_demuxer = {
AVInputFormat ff_bktr_demuxer = {
"bktr",
NULL_IF_CONFIG_SMALL("video grab"),
sizeof(VideoData),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/dv1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static int dv1394_close(AVFormatContext * context)
return 0;
}

AVInputFormat dv1394_demuxer = {
AVInputFormat ff_dv1394_demuxer = {
.name = "dv1394",
.long_name = NULL_IF_CONFIG_SMALL("DV1394 A/V grab"),
.priv_data_size = sizeof(struct dv1394_data),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/jack_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static int audio_read_close(AVFormatContext *context)
return 0;
}

AVInputFormat jack_demuxer = {
AVInputFormat ff_jack_demuxer = {
"jack",
NULL_IF_CONFIG_SMALL("JACK Audio Connection Kit"),
sizeof(JackData),
Expand Down
4 changes: 2 additions & 2 deletions libavdevice/libdc1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int dc1394_v2_close(AVFormatContext * context)
return 0;
}

AVInputFormat libdc1394_demuxer = {
AVInputFormat ff_libdc1394_demuxer = {
.name = "libdc1394",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
Expand All @@ -360,7 +360,7 @@ AVInputFormat libdc1394_demuxer = {

#endif
#if HAVE_LIBDC1394_1
AVInputFormat libdc1394_demuxer = {
AVInputFormat ff_libdc1394_demuxer = {
.name = "libdc1394",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.1 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
Expand Down
4 changes: 2 additions & 2 deletions libavdevice/oss_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ static int audio_read_close(AVFormatContext *s1)
}

#if CONFIG_OSS_INDEV
AVInputFormat oss_demuxer = {
AVInputFormat ff_oss_demuxer = {
"oss",
NULL_IF_CONFIG_SMALL("Open Sound System capture"),
sizeof(AudioData),
Expand All @@ -306,7 +306,7 @@ AVInputFormat oss_demuxer = {
#endif

#if CONFIG_OSS_OUTDEV
AVOutputFormat oss_muxer = {
AVOutputFormat ff_oss_muxer = {
"oss",
NULL_IF_CONFIG_SMALL("Open Sound System playback"),
"",
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/v4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static int grab_read_close(AVFormatContext *s1)
return 0;
}

AVInputFormat v4l_demuxer = {
AVInputFormat ff_v4l_demuxer = {
"video4linux",
NULL_IF_CONFIG_SMALL("Video4Linux device grab"),
sizeof(VideoData),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ static int v4l2_read_close(AVFormatContext *s1)
return 0;
}

AVInputFormat v4l2_demuxer = {
AVInputFormat ff_v4l2_demuxer = {
"video4linux2",
NULL_IF_CONFIG_SMALL("Video4Linux2 device grab"),
sizeof(struct video_data),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/vfwcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static int vfw_read_packet(AVFormatContext *s, AVPacket *pkt)
return pkt->size;
}

AVInputFormat vfwcap_demuxer = {
AVInputFormat ff_vfwcap_demuxer = {
"vfwcap",
NULL_IF_CONFIG_SMALL("VFW video capture"),
sizeof(struct vfw_ctx),
Expand Down
2 changes: 1 addition & 1 deletion libavdevice/x11grab.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ x11grab_read_close(AVFormatContext *s1)
}

/** x11 grabber device demuxer declaration */
AVInputFormat x11_grab_device_demuxer =
AVInputFormat ff_x11_grab_device_demuxer =
{
"x11grab",
NULL_IF_CONFIG_SMALL("X11grab"),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/4xm.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static int fourxm_read_close(AVFormatContext *s)
return 0;
}

AVInputFormat fourxm_demuxer = {
AVInputFormat ff_fourxm_demuxer = {
"4xm",
NULL_IF_CONFIG_SMALL("4X Technologies format"),
sizeof(FourxmDemuxContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/a64.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int a64_write_trailer(struct AVFormatContext *s)
return 0;
}

AVOutputFormat a64_muxer = {
AVOutputFormat ff_a64_muxer = {
.name = "a64",
.long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),
.mime_type = NULL,
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aacdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int adts_aac_read_header(AVFormatContext *s,
return 0;
}

AVInputFormat aac_demuxer = {
AVInputFormat ff_aac_demuxer = {
"aac",
NULL_IF_CONFIG_SMALL("raw ADTS AAC"),
0,
Expand Down
4 changes: 2 additions & 2 deletions libavformat/ac3dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int ac3_probe(AVProbeData *p)
return ac3_eac3_probe(p, CODEC_ID_AC3);
}

AVInputFormat ac3_demuxer = {
AVInputFormat ff_ac3_demuxer = {
"ac3",
NULL_IF_CONFIG_SMALL("raw AC-3"),
0,
Expand All @@ -89,7 +89,7 @@ static int eac3_probe(AVProbeData *p)
return ac3_eac3_probe(p, CODEC_ID_EAC3);
}

AVInputFormat eac3_demuxer = {
AVInputFormat ff_eac3_demuxer = {
"eac3",
NULL_IF_CONFIG_SMALL("raw E-AC-3"),
0,
Expand Down
2 changes: 1 addition & 1 deletion libavformat/adtsenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}

AVOutputFormat adts_muxer = {
AVOutputFormat ff_adts_muxer = {
"adts",
NULL_IF_CONFIG_SMALL("ADTS AAC"),
"audio/aac",
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aea.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static int aea_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
}

AVInputFormat aea_demuxer = {
AVInputFormat ff_aea_demuxer = {
"aea",
NULL_IF_CONFIG_SMALL("MD STUDIO audio"),
0,
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aiffdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static int aiff_read_packet(AVFormatContext *s,
return 0;
}

AVInputFormat aiff_demuxer = {
AVInputFormat ff_aiff_demuxer = {
"aiff",
NULL_IF_CONFIG_SMALL("Audio IFF"),
sizeof(AIFFInputContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/aiffenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int aiff_write_trailer(AVFormatContext *s)
return 0;
}

AVOutputFormat aiff_muxer = {
AVOutputFormat ff_aiff_muxer = {
"aiff",
NULL_IF_CONFIG_SMALL("Audio IFF"),
"audio/aiff",
Expand Down
12 changes: 6 additions & 6 deletions libavformat/allformats.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
#include "rdt.h"

#define REGISTER_MUXER(X,x) { \
extern AVOutputFormat x##_muxer; \
if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
extern AVOutputFormat ff_##x##_muxer; \
if(CONFIG_##X##_MUXER) av_register_output_format(&ff_##x##_muxer); }

#define REGISTER_DEMUXER(X,x) { \
extern AVInputFormat x##_demuxer; \
if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
extern AVInputFormat ff_##x##_demuxer; \
if(CONFIG_##X##_DEMUXER) av_register_input_format(&ff_##x##_demuxer); }

#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)

#define REGISTER_PROTOCOL(X,x) { \
extern URLProtocol x##_protocol; \
if(CONFIG_##X##_PROTOCOL) av_register_protocol2(&x##_protocol, sizeof(x##_protocol)); }
extern URLProtocol ff_##x##_protocol; \
if(CONFIG_##X##_PROTOCOL) av_register_protocol2(&ff_##x##_protocol, sizeof(ff_##x##_protocol)); }

void av_register_all(void)
{
Expand Down
4 changes: 2 additions & 2 deletions libavformat/amr.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static int amr_read_packet(AVFormatContext *s,
}

#if CONFIG_AMR_DEMUXER
AVInputFormat amr_demuxer = {
AVInputFormat ff_amr_demuxer = {
"amr",
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
0, /*priv_data_size*/
Expand All @@ -181,7 +181,7 @@ AVInputFormat amr_demuxer = {
#endif

#if CONFIG_AMR_MUXER
AVOutputFormat amr_muxer = {
AVOutputFormat ff_amr_muxer = {
"amr",
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
"audio/amr",
Expand Down
2 changes: 1 addition & 1 deletion libavformat/anm.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static int read_packet(AVFormatContext *s,
return 0;
}

AVInputFormat anm_demuxer = {
AVInputFormat ff_anm_demuxer = {
"anm",
NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
sizeof(AnmDemuxContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int apc_read_packet(AVFormatContext *s, AVPacket *pkt)
return 0;
}

AVInputFormat apc_demuxer = {
AVInputFormat ff_apc_demuxer = {
"apc",
NULL_IF_CONFIG_SMALL("CRYO APC format"),
0,
Expand Down
2 changes: 1 addition & 1 deletion libavformat/ape.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ static int ape_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
return 0;
}

AVInputFormat ape_demuxer = {
AVInputFormat ff_ape_demuxer = {
"ape",
NULL_IF_CONFIG_SMALL("Monkey's Audio"),
sizeof(APEContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/applehttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ static int applehttp_probe(AVProbeData *p)
return 0;
}

AVInputFormat applehttp_demuxer = {
AVInputFormat ff_applehttp_demuxer = {
"applehttp",
NULL_IF_CONFIG_SMALL("Apple HTTP Live Streaming format"),
sizeof(AppleHTTPContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/asf.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ extern const AVMetadataConv ff_asf_metadata_conv[];

#define ASF_PL_FLAG_KEY_FRAME 0x80 //1000 0000

extern AVInputFormat asf_demuxer;
extern AVInputFormat ff_asf_demuxer;
int ff_guidcmp(const void *g1, const void *g2);
void ff_get_guid(ByteIOContext *s, ff_asf_guid *g);

Expand Down
2 changes: 1 addition & 1 deletion libavformat/asfdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
return 0;
}

AVInputFormat asf_demuxer = {
AVInputFormat ff_asf_demuxer = {
"asf",
NULL_IF_CONFIG_SMALL("ASF format"),
sizeof(ASFContext),
Expand Down
4 changes: 2 additions & 2 deletions libavformat/asfenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ static int asf_write_trailer(AVFormatContext *s)
}

#if CONFIG_ASF_MUXER
AVOutputFormat asf_muxer = {
AVOutputFormat ff_asf_muxer = {
"asf",
NULL_IF_CONFIG_SMALL("ASF format"),
"video/x-ms-asf",
Expand All @@ -876,7 +876,7 @@ AVOutputFormat asf_muxer = {
#endif

#if CONFIG_ASF_STREAM_MUXER
AVOutputFormat asf_stream_muxer = {
AVOutputFormat ff_asf_stream_muxer = {
"asf_stream",
NULL_IF_CONFIG_SMALL("ASF format"),
"video/x-ms-asf",
Expand Down
2 changes: 1 addition & 1 deletion libavformat/assdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static int read_seek2(AVFormatContext *s, int stream_index,
return 0;
}

AVInputFormat ass_demuxer = {
AVInputFormat ff_ass_demuxer = {
.name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("Advanced SubStation Alpha subtitle format"),
.priv_data_size = sizeof(ASSContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/assenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static int write_trailer(AVFormatContext *s)
return 0;
}

AVOutputFormat ass_muxer = {
AVOutputFormat ff_ass_muxer = {
.name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("Advanced SubStation Alpha subtitle format"),
.mime_type = "text/x-ssa",
Expand Down
4 changes: 2 additions & 2 deletions libavformat/au.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int au_read_packet(AVFormatContext *s,
}

#if CONFIG_AU_DEMUXER
AVInputFormat au_demuxer = {
AVInputFormat ff_au_demuxer = {
"au",
NULL_IF_CONFIG_SMALL("SUN AU format"),
0,
Expand All @@ -197,7 +197,7 @@ AVInputFormat au_demuxer = {
#endif

#if CONFIG_AU_MUXER
AVOutputFormat au_muxer = {
AVOutputFormat ff_au_muxer = {
"au",
NULL_IF_CONFIG_SMALL("SUN AU format"),
"audio/basic",
Expand Down
2 changes: 1 addition & 1 deletion libavformat/avidec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,7 @@ static int avi_probe(AVProbeData *p)
return 0;
}

AVInputFormat avi_demuxer = {
AVInputFormat ff_avi_demuxer = {
"avi",
NULL_IF_CONFIG_SMALL("AVI format"),
sizeof(AVIContext),
Expand Down
2 changes: 1 addition & 1 deletion libavformat/avienc.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static int avi_write_trailer(AVFormatContext *s)
return res;
}

AVOutputFormat avi_muxer = {
AVOutputFormat ff_avi_muxer = {
"avi",
NULL_IF_CONFIG_SMALL("AVI format"),
"video/x-msvideo",
Expand Down
2 changes: 1 addition & 1 deletion libavformat/avisynth.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static int avisynth_read_seek(AVFormatContext *s, int stream_index, int64_t pts,
return 0;
}

AVInputFormat avisynth_demuxer = {
AVInputFormat ff_avisynth_demuxer = {
"avs",
NULL_IF_CONFIG_SMALL("AVISynth"),
sizeof(AVISynthContext),
Expand Down
Loading

0 comments on commit c6610a2

Please sign in to comment.