#define AU_UNKOWN_SIZE ((UINT32)(~0))
/* The ffmpeg codecs we support, and the IDs they have in the file */
-CodecTag codec_au_tags[] = {
+static const CodecTag codec_au_tags[] = {
{ CODEC_ID_PCM_MULAW, 1 },
{ CODEC_ID_PCM_S16BE, 3 },
{ CODEC_ID_PCM_ALAW, 27 },
};
/* AUDIO_FILE header */
-int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
+static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
{
int tag;
return 0;
}
-AVInputFormat audio_in_format = {
+static AVInputFormat audio_in_format = {
"audio_device",
"audio grab and output",
sizeof(AudioData),
.flags = AVFMT_NOFILE,
};
-AVOutputFormat audio_out_format = {
+static AVOutputFormat audio_out_format = {
"audio_device",
"audio grab and output",
"",
int stristart(const char *str, const char *val, const char **ptr);
void pstrcpy(char *buf, int buf_size, const char *str);
char *pstrcat(char *buf, int buf_size, const char *s);
-int match_ext(const char *filename, const char *extensions);
struct in_addr;
int resolve_host(struct in_addr *sin_addr, const char *hostname);
#define AVIF_WASCAPTUREFILE 0x00010000
#define AVIF_COPYRIGHTED 0x00020000
-offset_t start_tag(ByteIOContext *pb, char *tag);
+offset_t start_tag(ByteIOContext *pb, const char *tag);
void end_tag(ByteIOContext *pb, offset_t start);
typedef struct CodecTag {
unsigned int invalid_asf : 1;
} CodecTag;
-void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, CodecTag *tags, int for_asf);
+void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf);
int put_wav_header(ByteIOContext *pb, AVCodecContext *enc);
int wav_codec_get_id(unsigned int tag, int bps);
void get_wav_header(ByteIOContext *pb, AVCodecContext *codec,
int has_extra_data);
-extern CodecTag codec_bmp_tags[];
-extern CodecTag codec_wav_tags[];
+extern const CodecTag codec_bmp_tags[];
+extern const CodecTag codec_wav_tags[];
unsigned int codec_get_tag(const CodecTag *tags, int id);
int codec_get_id(const CodecTag *tags, unsigned int tag);
return 0;
}
-AVOutputFormat crc_format = {
+static AVOutputFormat crc_format = {
"crc",
"crc testing format",
NULL,
}
/* XXX: build fake audio stream when DV audio decoder will be finished */
-int dv_read_packet(AVFormatContext *s,
- AVPacket *pkt)
+static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
{
int ret, size, dsf;
uint8_t buf[4];
return ret;
}
-int dv_read_close(AVFormatContext *s)
+static int dv_read_close(AVFormatContext *s)
{
return 0;
}
-AVInputFormat dv_iformat = {
+static AVInputFormat dv_iformat = {
"dv",
"DV video format",
sizeof(DVDemuxContext),
return 0;
}
-AVInputFormat ffm_iformat = {
+static AVInputFormat ffm_iformat = {
"ffm",
"ffm format",
sizeof(FFMContext),
ffm_seek,
};
-AVOutputFormat ffm_oformat = {
+static AVOutputFormat ffm_oformat = {
"ffm",
"ffm format",
"",
return 0;
}
-AVInputFormat video_grab_device_format = {
+static AVInputFormat video_grab_device_format = {
"video_grab_device",
"video grab",
sizeof(VideoData),
return 0;
}
-AVInputFormat aiw_grab_device_format = {
+static AVInputFormat aiw_grab_device_format = {
"aiw_grab_device",
"All-In-Wonder (km read-based) video grab",
sizeof(AIWVideoData),
return 0;
}
-AVInputFormat pgm_iformat = {
+static AVInputFormat pgm_iformat = {
"pgm",
"pgm image format",
sizeof(VideoData),
.extensions = "pgm",
};
-AVOutputFormat pgm_oformat = {
+static AVOutputFormat pgm_oformat = {
"pgm",
"pgm image format",
"",
AVFMT_NOFILE | AVFMT_NEEDNUMBER,
};
-AVInputFormat pgmyuv_iformat = {
+static AVInputFormat pgmyuv_iformat = {
"pgmyuv",
"pgm with YUV content image format",
sizeof(VideoData),
AVFMT_NOFILE | AVFMT_NEEDNUMBER,
};
-AVOutputFormat pgmyuv_oformat = {
+static AVOutputFormat pgmyuv_oformat = {
"pgmyuv",
"pgm with YUV content image format",
"",
AVFMT_NOFILE | AVFMT_NEEDNUMBER,
};
-AVInputFormat ppm_iformat = {
+static AVInputFormat ppm_iformat = {
"ppm",
"ppm image format",
sizeof(VideoData),
.extensions = "ppm",
};
-AVOutputFormat ppm_oformat = {
+static AVOutputFormat ppm_oformat = {
"ppm",
"ppm image format",
"",
AVFMT_NOFILE | AVFMT_NEEDNUMBER | AVFMT_RGB24,
};
-AVInputFormat imgyuv_iformat = {
+static AVInputFormat imgyuv_iformat = {
".Y.U.V",
".Y.U.V format",
sizeof(VideoData),
.extensions = "Y",
};
-AVOutputFormat imgyuv_oformat = {
+static AVOutputFormat imgyuv_oformat = {
".Y.U.V",
".Y.U.V format",
"",
AVFMT_NOFILE | AVFMT_NEEDNUMBER,
};
-AVInputFormat pgmpipe_iformat = {
+static AVInputFormat pgmpipe_iformat = {
"pgmpipe",
"PGM pipe format",
sizeof(VideoData),
NULL,
};
-AVOutputFormat pgmpipe_oformat = {
+static AVOutputFormat pgmpipe_oformat = {
"pgmpipe",
"PGM pipe format",
"",
img_write_trailer,
};
-AVInputFormat pgmyuvpipe_iformat = {
+static AVInputFormat pgmyuvpipe_iformat = {
"pgmyuvpipe",
"PGM YUV pipe format",
sizeof(VideoData),
NULL,
};
-AVOutputFormat pgmyuvpipe_oformat = {
+static AVOutputFormat pgmyuvpipe_oformat = {
"pgmyuvpipe",
"PGM YUV pipe format",
"",
img_write_trailer,
};
-AVInputFormat ppmpipe_iformat = {
+static AVInputFormat ppmpipe_iformat = {
"ppmpipe",
"PPM pipe format",
sizeof(VideoData),
.flags = AVFMT_RGB24,
};
-AVOutputFormat ppmpipe_oformat = {
+static AVOutputFormat ppmpipe_oformat = {
"ppmpipe",
"PPM pipe format",
"",
};
-AVOutputFormat yuv4mpegpipe_oformat = {
+static AVOutputFormat yuv4mpegpipe_oformat = {
"yuv4mpegpipe",
"YUV4MPEG pipe format",
"",
}
-AVOutputFormat ogg_oformat = {
+static AVOutputFormat ogg_oformat = {
"ogg",
"Ogg Vorbis",
"audio/x-vorbis",
return 0;
}
-AVInputFormat rm_iformat = {
+static AVInputFormat rm_iformat = {
"rm",
"rm format",
sizeof(RMContext),
rm_read_close,
};
-AVOutputFormat rm_oformat = {
+static AVOutputFormat rm_oformat = {
"rm",
"rm format",
"audio/x-pn-realaudio",
format->next = NULL;
}
-int match_ext(const char *filename, const char *extensions)
+static int match_ext(const char *filename, const char *extensions)
{
const char *ext, *p;
char ext1[32], *q;