Commit bde15e74 authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Diego Biurrun
Browse files

Make long_names in lavf/lavdev optional depending on CONFIG_SMALL.

patch by Stefano Sabatini, stefano.sabatini-lala poste.it
along with some spelling/consistency fixes for the long names by me

Originally committed as revision 13649 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ca162a50
......@@ -315,7 +315,7 @@ static int audio_read_close(AVFormatContext *s1)
#ifdef CONFIG_OSS_DEMUXER
AVInputFormat oss_demuxer = {
"oss",
"audio grab and output",
NULL_IF_CONFIG_SMALL("audio grab and output"),
sizeof(AudioData),
NULL,
audio_read_header,
......@@ -328,7 +328,7 @@ AVInputFormat oss_demuxer = {
#ifdef CONFIG_OSS_MUXER
AVOutputFormat oss_muxer = {
"oss",
"audio grab and output",
NULL_IF_CONFIG_SMALL("audio grab and output"),
"",
"",
sizeof(AudioData),
......
......@@ -311,7 +311,7 @@ static int grab_read_close(AVFormatContext *s1)
AVInputFormat bktr_demuxer = {
"bktr",
"video grab",
NULL_IF_CONFIG_SMALL("video grab"),
sizeof(VideoData),
NULL,
grab_read_header,
......
......@@ -228,7 +228,7 @@ static int dv1394_close(AVFormatContext * context)
AVInputFormat dv1394_demuxer = {
.name = "dv1394",
.long_name = "dv1394 A/V grab",
.long_name = NULL_IF_CONFIG_SMALL("DV1394 A/V grab"),
.priv_data_size = sizeof(struct dv1394_data),
.read_header = dv1394_read_header,
.read_packet = dv1394_read_packet,
......
......@@ -350,7 +350,7 @@ static int dc1394_v2_close(AVFormatContext * context)
AVInputFormat libdc1394_demuxer = {
.name = "libdc1394",
.long_name = "dc1394 v.2 A/V grab",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.2 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
.read_header = dc1394_v2_read_header,
.read_packet = dc1394_v2_read_packet,
......@@ -362,7 +362,7 @@ AVInputFormat libdc1394_demuxer = {
#if ENABLE_LIBDC1394_1
AVInputFormat libdc1394_demuxer = {
.name = "libdc1394",
.long_name = "dc1394 v.1 A/V grab",
.long_name = NULL_IF_CONFIG_SMALL("dc1394 v.1 A/V grab"),
.priv_data_size = sizeof(struct dc1394_data),
.read_header = dc1394_v1_read_header,
.read_packet = dc1394_v1_read_packet,
......
......@@ -346,7 +346,7 @@ static int grab_read_close(AVFormatContext *s1)
AVInputFormat v4l_demuxer = {
"video4linux",
"video grab",
NULL_IF_CONFIG_SMALL("video grab"),
sizeof(VideoData),
NULL,
grab_read_header,
......
......@@ -635,7 +635,7 @@ static int v4l2_read_close(AVFormatContext *s1)
AVInputFormat v4l2_demuxer = {
"video4linux2",
"video grab",
NULL_IF_CONFIG_SMALL("video grab"),
sizeof(struct video_data),
NULL,
v4l2_read_header,
......
......@@ -456,7 +456,7 @@ static int vfw_read_close(AVFormatContext *s)
AVInputFormat vfwcap_demuxer = {
"vfwcap",
"VFW video capture",
NULL_IF_CONFIG_SMALL("VFW video capture"),
sizeof(struct vfw_ctx),
NULL,
vfw_read_header,
......
......@@ -519,7 +519,7 @@ x11grab_read_close(AVFormatContext *s1)
AVInputFormat x11_grab_device_demuxer =
{
"x11grab",
"X11grab",
NULL_IF_CONFIG_SMALL("X11grab"),
sizeof(x11_grab_t),
NULL,
x11grab_read_header,
......
......@@ -328,7 +328,7 @@ static int fourxm_read_close(AVFormatContext *s)
AVInputFormat fourxm_demuxer = {
"4xm",
"4X Technologies format",
NULL_IF_CONFIG_SMALL("4X Technologies format"),
sizeof(FourxmDemuxContext),
fourxm_probe,
fourxm_read_header,
......
......@@ -107,7 +107,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
AVOutputFormat adts_muxer = {
"adts",
"ADTS AAC",
NULL_IF_CONFIG_SMALL("ADTS AAC"),
"audio/aac",
"aac",
sizeof(ADTSContext),
......
......@@ -442,7 +442,7 @@ static int aiff_read_seek(AVFormatContext *s,
#ifdef CONFIG_AIFF_DEMUXER
AVInputFormat aiff_demuxer = {
"aiff",
"Audio IFF",
NULL_IF_CONFIG_SMALL("Audio IFF"),
0,
aiff_probe,
aiff_read_header,
......@@ -456,7 +456,7 @@ AVInputFormat aiff_demuxer = {
#ifdef CONFIG_AIFF_MUXER
AVOutputFormat aiff_muxer = {
"aiff",
"Audio IFF",
NULL_IF_CONFIG_SMALL("Audio IFF"),
"audio/aiff",
"aif,aiff,afc,aifc",
sizeof(AIFFOutputContext),
......
......@@ -169,7 +169,7 @@ static int amr_read_packet(AVFormatContext *s,
#ifdef CONFIG_AMR_DEMUXER
AVInputFormat amr_demuxer = {
"amr",
"3gpp amr file format",
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
0, /*priv_data_size*/
amr_probe,
amr_read_header,
......@@ -181,7 +181,7 @@ AVInputFormat amr_demuxer = {
#ifdef CONFIG_AMR_MUXER
AVOutputFormat amr_muxer = {
"amr",
"3gpp amr file format",
NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
"audio/amr",
"amr",
0,
......
......@@ -82,7 +82,7 @@ static int apc_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat apc_demuxer = {
"apc",
"CRYO APC format",
NULL_IF_CONFIG_SMALL("CRYO APC format"),
0,
apc_probe,
apc_read_header,
......
......@@ -511,7 +511,7 @@ static int ape_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
AVInputFormat ape_demuxer = {
"ape",
"Monkey's Audio",
NULL_IF_CONFIG_SMALL("Monkey's Audio"),
sizeof(APEContext),
ape_probe,
ape_read_header,
......
......@@ -815,7 +815,7 @@ static int asf_write_trailer(AVFormatContext *s)
#ifdef CONFIG_ASF_MUXER
AVOutputFormat asf_muxer = {
"asf",
"asf format",
NULL_IF_CONFIG_SMALL("ASF format"),
"video/x-ms-asf",
"asf,wmv,wma",
sizeof(ASFContext),
......@@ -836,7 +836,7 @@ AVOutputFormat asf_muxer = {
#ifdef CONFIG_ASF_STREAM_MUXER
AVOutputFormat asf_stream_muxer = {
"asf_stream",
"asf format",
NULL_IF_CONFIG_SMALL("ASF format"),
"video/x-ms-asf",
"asf,wmv,wma",
sizeof(ASFContext),
......
......@@ -1094,7 +1094,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
AVInputFormat asf_demuxer = {
"asf",
"asf format",
NULL_IF_CONFIG_SMALL("ASF format"),
sizeof(ASFContext),
asf_probe,
asf_read_header,
......
......@@ -180,7 +180,7 @@ static int au_read_close(AVFormatContext *s)
#ifdef CONFIG_AU_DEMUXER
AVInputFormat au_demuxer = {
"au",
"SUN AU Format",
NULL_IF_CONFIG_SMALL("SUN AU format"),
0,
au_probe,
au_read_header,
......@@ -194,7 +194,7 @@ AVInputFormat au_demuxer = {
#ifdef CONFIG_AU_MUXER
AVOutputFormat au_muxer = {
"au",
"SUN AU Format",
NULL_IF_CONFIG_SMALL("SUN AU format"),
"audio/basic",
"au",
0,
......
......@@ -185,6 +185,11 @@ typedef struct AVFormatParameters {
typedef struct AVOutputFormat {
const char *name;
/**
* Descriptive name for the format, meant to be more human-readable
* than \p name. You \e should use the NULL_IF_CONFIG_SMALL() macro
* to define it.
*/
const char *long_name;
const char *mime_type;
const char *extensions; /**< comma separated filename extensions */
......@@ -216,6 +221,11 @@ typedef struct AVOutputFormat {
typedef struct AVInputFormat {
const char *name;
/**
* Descriptive name for the format, meant to be more human-readable
* than \p name. You \e should use the NULL_IF_CONFIG_SMALL() macro
* to define it.
*/
const char *long_name;
/** size of private data so that it can be allocated in the wrapper */
int priv_data_size;
......
......@@ -1087,7 +1087,7 @@ static int avi_probe(AVProbeData *p)
AVInputFormat avi_demuxer = {
"avi",
"avi format",
NULL_IF_CONFIG_SMALL("AVI format"),
sizeof(AVIContext),
avi_probe,
avi_read_header,
......
......@@ -593,7 +593,7 @@ static int avi_write_trailer(AVFormatContext *s)
AVOutputFormat avi_muxer = {
"avi",
"avi format",
NULL_IF_CONFIG_SMALL("AVI format"),
"video/x-msvideo",
"avi",
sizeof(AVIContext),
......
......@@ -209,7 +209,7 @@ static int avisynth_read_seek(AVFormatContext *s, int stream_index, int64_t pts,
AVInputFormat avisynth_demuxer = {
"avs",
"AVISynth",
NULL_IF_CONFIG_SMALL("AVISynth"),
sizeof(AVISynthContext),
NULL,
avisynth_read_header,
......
......@@ -217,7 +217,7 @@ static int avs_read_close(AVFormatContext * s)
AVInputFormat avs_demuxer = {
"avs",
"avs format",
NULL_IF_CONFIG_SMALL("AVS format"),
sizeof(avs_format_t),
avs_probe,
avs_read_header,
......
......@@ -225,7 +225,7 @@ static int vid_read_packet(AVFormatContext *s,
AVInputFormat bethsoftvid_demuxer = {
"bethsoftvid",
"Bethesda Softworks 'Daggerfall' VID format",
NULL_IF_CONFIG_SMALL("Bethesda Softworks VID format"),
sizeof(BVID_DemuxContext),
vid_probe,
vid_read_header,
......
......@@ -159,7 +159,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt)
AVInputFormat bfi_demuxer = {
"bfi",
"Brute Force & Ignorance",
NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
sizeof(BFIContext),
bfi_probe,
bfi_read_header,
......
......@@ -190,7 +190,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat c93_demuxer = {
"c93",
"Interplay C93",
NULL_IF_CONFIG_SMALL("Interplay C93"),
sizeof(C93DemuxContext),
probe,
read_header,
......
......@@ -56,7 +56,7 @@ static int crc_write_trailer(struct AVFormatContext *s)
AVOutputFormat crc_muxer = {
"crc",
"crc testing format",
NULL_IF_CONFIG_SMALL("CRC testing format"),
NULL,
"",
sizeof(CRCState),
......
......@@ -49,7 +49,7 @@ static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
AVInputFormat daud_demuxer = {
"daud",
"D-Cinema audio format",
NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
0,
NULL,
daud_header,
......
......@@ -213,7 +213,7 @@ static int cin_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat dsicin_demuxer = {
"dsicin",
"Delphine Software International CIN format",
NULL_IF_CONFIG_SMALL("Delphine Software International CIN format"),
sizeof(CinDemuxContext),
cin_probe,
cin_read_header,
......
......@@ -440,7 +440,7 @@ static int dv_read_close(AVFormatContext *s)
#ifdef CONFIG_DV_DEMUXER
AVInputFormat dv_demuxer = {
"dv",
"DV video format",
NULL_IF_CONFIG_SMALL("DV video format"),
sizeof(RawDVContext),
NULL,
dv_read_header,
......
......@@ -402,7 +402,7 @@ static int dv_write_trailer(struct AVFormatContext *s)
#ifdef CONFIG_DV_MUXER
AVOutputFormat dv_muxer = {
"dv",
"DV video format",
NULL_IF_CONFIG_SMALL("DV video format"),
NULL,
"dv",
sizeof(DVMuxContext),
......
......@@ -204,7 +204,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat dxa_demuxer = {
"dxa",
"dxa",
NULL_IF_CONFIG_SMALL("DXA"),
sizeof(DXAContext),
dxa_probe,
dxa_read_header,
......
......@@ -91,7 +91,7 @@ static int cdata_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ea_cdata_demuxer = {
"ea_cdata",
"Electronic Arts cdata",
NULL_IF_CONFIG_SMALL("Electronic Arts cdata"),
sizeof(CdataDemuxContext),
cdata_probe,
cdata_read_header,
......
......@@ -465,7 +465,7 @@ static int ea_read_packet(AVFormatContext *s,
AVInputFormat ea_demuxer = {
"ea",
"Electronic Arts Multimedia Format",
NULL_IF_CONFIG_SMALL("Electronic Arts Multimedia Format"),
sizeof(EaDemuxContext),
ea_probe,
ea_read_header,
......
......@@ -480,7 +480,7 @@ static int ffm_probe(AVProbeData *p)
AVInputFormat ffm_demuxer = {
"ffm",
"ffm format",
NULL_IF_CONFIG_SMALL("ffm format"),
sizeof(FFMContext),
ffm_probe,
ffm_read_header,
......
......@@ -253,7 +253,7 @@ static int ffm_write_trailer(AVFormatContext *s)
AVOutputFormat ffm_muxer = {
"ffm",
"ffm format",
NULL_IF_CONFIG_SMALL("ffm format"),
"",
"ffm",
sizeof(FFMContext),
......
......@@ -194,7 +194,7 @@ static int flic_read_close(AVFormatContext *s)
AVInputFormat flic_demuxer = {
"flic",
"FLI/FLC/FLX animation format",
NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation format"),
sizeof(FlicDemuxContext),
flic_probe,
flic_read_header,
......
......@@ -419,7 +419,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat flv_demuxer = {
"flv",
"flv format",
NULL_IF_CONFIG_SMALL("FLV format"),
0,
flv_probe,
flv_read_header,
......
......@@ -374,7 +374,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
AVOutputFormat flv_muxer = {
"flv",
"flv format",
NULL_IF_CONFIG_SMALL("FLV format"),
"video/x-flv",
"flv",
sizeof(FLVContext),
......
......@@ -35,7 +35,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVOutputFormat framecrc_muxer = {
"framecrc",
"framecrc testing format",
NULL_IF_CONFIG_SMALL("framecrc testing format"),
NULL,
"",
0,
......
......@@ -407,7 +407,7 @@ static int gif_write_trailer(AVFormatContext *s)
AVOutputFormat gif_muxer = {
"gif",
"GIF Animation",
NULL_IF_CONFIG_SMALL("GIF Animation"),
"image/gif",
"gif",
sizeof(GIFContext),
......
......@@ -581,7 +581,7 @@ static int gif_read_close(AVFormatContext *s1)
AVInputFormat gif_demuxer =
{
"gif",
"gif format",
NULL_IF_CONFIG_SMALL("GIF format"),
sizeof(GifState),
gif_video_probe,
gif_read_header,
......
......@@ -492,7 +492,7 @@ static int64_t gxf_read_timestamp(AVFormatContext *s, int stream_index,
AVInputFormat gxf_demuxer = {
"gxf",
"GXF format",
NULL_IF_CONFIG_SMALL("GXF format"),
0,
gxf_probe,
gxf_header,
......
......@@ -813,7 +813,7 @@ static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pk
AVOutputFormat gxf_muxer = {
"gxf",
"GXF format",
NULL_IF_CONFIG_SMALL("GXF format"),
NULL,
"gxf",
sizeof(GXFContext),
......
......@@ -288,7 +288,7 @@ static int idcin_read_close(AVFormatContext *s)
AVInputFormat idcin_demuxer = {
"idcin",
"Id CIN format",
NULL_IF_CONFIG_SMALL("Id CIN format"),
sizeof(IdcinDemuxContext),
idcin_probe,
idcin_read_header,
......
......@@ -279,7 +279,7 @@ static int roq_read_close(AVFormatContext *s)
AVInputFormat roq_demuxer = {
"RoQ",
"Id RoQ format",
NULL_IF_CONFIG_SMALL("Id RoQ format"),
sizeof(RoqDemuxContext),
roq_probe,
roq_read_header,
......
......@@ -192,7 +192,7 @@ static int iff_read_packet(AVFormatContext *s,
AVInputFormat iff_demuxer = {
"IFF",
"IFF format",
NULL_IF_CONFIG_SMALL("IFF format"),
sizeof(IffDemuxContext),
iff_probe,
iff_read_header,
......
......@@ -379,7 +379,7 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
#ifdef CONFIG_IMAGE2_DEMUXER
AVInputFormat image2_demuxer = {
"image2",
"image2 sequence",
NULL_IF_CONFIG_SMALL("image2 sequence"),
sizeof(VideoData),
image_probe,
img_read_header,
......@@ -393,7 +393,7 @@ AVInputFormat image2_demuxer = {
#ifdef CONFIG_IMAGE2PIPE_DEMUXER
AVInputFormat image2pipe_demuxer = {
"image2pipe",
"piped image2 sequence",
NULL_IF_CONFIG_SMALL("piped image2 sequence"),
sizeof(VideoData),
NULL, /* no probe */
img_read_header,
......@@ -407,7 +407,7 @@ AVInputFormat image2pipe_demuxer = {
#ifdef CONFIG_IMAGE2_MUXER
AVOutputFormat image2_muxer = {
"image2",
"image2 sequence",
NULL_IF_CONFIG_SMALL("image2 sequence"),
"",
"",
sizeof(VideoData),
......@@ -422,7 +422,7 @@ AVOutputFormat image2_muxer = {
#ifdef CONFIG_IMAGE2PIPE_MUXER
AVOutputFormat image2pipe_muxer = {
"image2pipe",
"piped image2 sequence",
NULL_IF_CONFIG_SMALL("piped image2 sequence"),
"",
"",
sizeof(VideoData),
......
......@@ -616,7 +616,7 @@ static int ipmovie_read_close(AVFormatContext *s)
AVInputFormat ipmovie_demuxer = {
"ipmovie",
"Interplay MVE format",
NULL_IF_CONFIG_SMALL("Interplay MVE format"),
sizeof(IPMVEContext),
ipmovie_probe,
ipmovie_read_header,
......
......@@ -299,7 +299,7 @@ static int nut_read_close(AVFormatContext *s) {
AVInputFormat libnut_demuxer = {
"libnut",
"nut format",
NULL_IF_CONFIG_SMALL("NUT format"),
sizeof(NUTContext),
nut_probe,
nut_read_header,
......
......@@ -118,7 +118,7 @@ static int lmlm4_read_packet(AVFormatContext *s, AVPacket *pkt) {
AVInputFormat lmlm4_demuxer = {
"lmlm4",
"lmlm4 raw format",
NULL_IF_CONFIG_SMALL("lmlm4 raw format"),
0,
lmlm4_probe,
lmlm4_read_header,
......
......@@ -3248,7 +3248,7 @@ matroska_read_close (AVFormatContext *s)
AVInputFormat matroska_demuxer = {
"matroska",
"Matroska file format",
NULL_IF_CONFIG_SMALL("Matroska file format"),
sizeof(MatroskaDemuxContext),
matroska_probe,
matroska_read_header,
......
......@@ -819,7 +819,7 @@ static int mkv_write_trailer(AVFormatContext *s)
AVOutputFormat matroska_muxer = {
"matroska",
"Matroska File Format",