mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Replace CONFIG_ENCODERS/CONFIG_DECODERS with CONFIG_MUXERS/CONFIG_DEMUXERS
in libavformat to allow building (de)coders and (de)muxers independently at some point + support for this option in configure. Originally committed as revision 4611 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
288f1e6815
commit
a9e3509529
20
configure
vendored
20
configure
vendored
@ -78,6 +78,8 @@ echo " --enable-codec=codec enables codec"
|
|||||||
echo " --disable-codec=codec disables codec"
|
echo " --disable-codec=codec disables codec"
|
||||||
echo " --disable-encoders disables all encoders"
|
echo " --disable-encoders disables all encoders"
|
||||||
echo " --disable-decoders disables all decoders"
|
echo " --disable-decoders disables all decoders"
|
||||||
|
echo " --disable-muxers disables all muxers"
|
||||||
|
echo " --disable-demuxers disables all demuxers"
|
||||||
echo ""
|
echo ""
|
||||||
echo "NOTE: The object files are build at the place where configure is launched"
|
echo "NOTE: The object files are build at the place where configure is launched"
|
||||||
exit 1
|
exit 1
|
||||||
@ -218,6 +220,8 @@ sunmlib="no"
|
|||||||
pthreads="no"
|
pthreads="no"
|
||||||
gpl="no"
|
gpl="no"
|
||||||
memalignhack="no"
|
memalignhack="no"
|
||||||
|
muxers="yes"
|
||||||
|
demuxers="yes"
|
||||||
|
|
||||||
# OS specific
|
# OS specific
|
||||||
targetos=`uname -s`
|
targetos=`uname -s`
|
||||||
@ -533,6 +537,10 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
|
--disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
|
||||||
;;
|
;;
|
||||||
|
--disable-muxers) muxers="no"
|
||||||
|
;;
|
||||||
|
--disable-demuxers) demuxers="no"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -1399,6 +1407,18 @@ echo "CONFIG_ENCODERS=yes" >> config.mak
|
|||||||
echo "#define CONFIG_DECODERS 1" >> $TMPH
|
echo "#define CONFIG_DECODERS 1" >> $TMPH
|
||||||
echo "CONFIG_DECODERS=yes" >> config.mak
|
echo "CONFIG_DECODERS=yes" >> config.mak
|
||||||
|
|
||||||
|
# muxers
|
||||||
|
if test "$muxers" = "yes" ; then
|
||||||
|
echo "#define CONFIG_MUXERS 1" >> $TMPH
|
||||||
|
echo "CONFIG_MUXERS=yes" >> config.mak
|
||||||
|
fi
|
||||||
|
|
||||||
|
# demuxers
|
||||||
|
if test "$demuxers" = "yes" ; then
|
||||||
|
echo "#define CONFIG_DEMUXERS 1" >> $TMPH
|
||||||
|
echo "CONFIG_DEMUXERS=yes" >> config.mak
|
||||||
|
fi
|
||||||
|
|
||||||
# AC3
|
# AC3
|
||||||
if test "$a52" = "yes" ; then
|
if test "$a52" = "yes" ; then
|
||||||
echo "#define CONFIG_AC3 1" >> $TMPH
|
echo "#define CONFIG_AC3 1" >> $TMPH
|
||||||
|
@ -37,36 +37,36 @@ void av_register_all(void)
|
|||||||
|
|
||||||
mpegps_init();
|
mpegps_init();
|
||||||
mpegts_init();
|
mpegts_init();
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
crc_init();
|
crc_init();
|
||||||
img_init();
|
img_init();
|
||||||
img2_init();
|
img2_init();
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
raw_init();
|
raw_init();
|
||||||
mp3_init();
|
mp3_init();
|
||||||
rm_init();
|
rm_init();
|
||||||
asf_init();
|
asf_init();
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
avienc_init();
|
avienc_init();
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
avidec_init();
|
avidec_init();
|
||||||
ff_wav_init();
|
ff_wav_init();
|
||||||
ff_mmf_init();
|
ff_mmf_init();
|
||||||
swf_init();
|
swf_init();
|
||||||
au_init();
|
au_init();
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
gif_init();
|
gif_init();
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
mov_init();
|
mov_init();
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
movenc_init();
|
movenc_init();
|
||||||
jpeg_init();
|
jpeg_init();
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
ff_dv_init();
|
ff_dv_init();
|
||||||
fourxm_init();
|
fourxm_init();
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
flvenc_init();
|
flvenc_init();
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
flvdec_init();
|
flvdec_init();
|
||||||
str_init();
|
str_init();
|
||||||
roq_init();
|
roq_init();
|
||||||
@ -111,7 +111,7 @@ void av_register_all(void)
|
|||||||
nsvdec_init();
|
nsvdec_init();
|
||||||
daud_init();
|
daud_init();
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* image formats */
|
/* image formats */
|
||||||
#if 0
|
#if 0
|
||||||
av_register_image_format(&pnm_image_format);
|
av_register_image_format(&pnm_image_format);
|
||||||
@ -128,7 +128,7 @@ void av_register_all(void)
|
|||||||
#endif
|
#endif
|
||||||
av_register_image_format(&gif_image_format);
|
av_register_image_format(&gif_image_format);
|
||||||
// av_register_image_format(&sgi_image_format); heap corruption, dont enable
|
// av_register_image_format(&sgi_image_format); heap corruption, dont enable
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* file protocols */
|
/* file protocols */
|
||||||
register_protocol(&file_protocol);
|
register_protocol(&file_protocol);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
|
|
||||||
|
|
||||||
#define ASF_INDEXED_INTERVAL 10000000
|
#define ASF_INDEXED_INTERVAL 10000000
|
||||||
@ -858,4 +858,4 @@ AVOutputFormat asf_stream_oformat = {
|
|||||||
asf_write_trailer,
|
asf_write_trailer,
|
||||||
.flags = AVFMT_GLOBALHEADER,
|
.flags = AVFMT_GLOBALHEADER,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
@ -792,17 +792,17 @@ static AVInputFormat asf_iformat = {
|
|||||||
asf_read_pts,
|
asf_read_pts,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
extern AVOutputFormat asf_oformat;
|
extern AVOutputFormat asf_oformat;
|
||||||
extern AVOutputFormat asf_stream_oformat;
|
extern AVOutputFormat asf_stream_oformat;
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int asf_init(void)
|
int asf_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&asf_iformat);
|
av_register_input_format(&asf_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&asf_oformat);
|
av_register_output_format(&asf_oformat);
|
||||||
av_register_output_format(&asf_stream_oformat);
|
av_register_output_format(&asf_stream_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ static const CodecTag codec_au_tags[] = {
|
|||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* AUDIO_FILE header */
|
/* AUDIO_FILE header */
|
||||||
static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
|
static int put_au_header(ByteIOContext *pb, AVCodecContext *enc)
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ static int au_write_trailer(AVFormatContext *s)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
static int au_probe(AVProbeData *p)
|
static int au_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ static AVInputFormat au_iformat = {
|
|||||||
pcm_read_seek,
|
pcm_read_seek,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat au_oformat = {
|
static AVOutputFormat au_oformat = {
|
||||||
"au",
|
"au",
|
||||||
"SUN AU Format",
|
"SUN AU Format",
|
||||||
@ -201,13 +201,13 @@ static AVOutputFormat au_oformat = {
|
|||||||
au_write_packet,
|
au_write_packet,
|
||||||
au_write_trailer,
|
au_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int au_init(void)
|
int au_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&au_iformat);
|
av_register_input_format(&au_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&au_oformat);
|
av_register_output_format(&au_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
* - fill all fields if non streamed (nb_frames for example)
|
* - fill all fields if non streamed (nb_frames for example)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
typedef struct AVIIentry {
|
typedef struct AVIIentry {
|
||||||
unsigned int flags, pos, len;
|
unsigned int flags, pos, len;
|
||||||
} AVIIentry;
|
} AVIIentry;
|
||||||
@ -71,7 +71,7 @@ void end_tag(ByteIOContext *pb, offset_t start)
|
|||||||
put_le32(pb, (uint32_t)(pos - start));
|
put_le32(pb, (uint32_t)(pos - start));
|
||||||
url_fseek(pb, pos, SEEK_SET);
|
url_fseek(pb, pos, SEEK_SET);
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* Note: when encoding, the first matching tag is used, so order is
|
/* Note: when encoding, the first matching tag is used, so order is
|
||||||
important if multiple tags possible for a given codec. */
|
important if multiple tags possible for a given codec. */
|
||||||
@ -245,7 +245,7 @@ enum CodecID codec_get_wav_id(unsigned int tag)
|
|||||||
return codec_get_id(codec_wav_tags, tag);
|
return codec_get_id(codec_wav_tags, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* BITMAPINFOHEADER header */
|
/* BITMAPINFOHEADER header */
|
||||||
void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf)
|
void put_bmp_header(ByteIOContext *pb, AVCodecContext *enc, const CodecTag *tags, int for_asf)
|
||||||
{
|
{
|
||||||
@ -752,4 +752,4 @@ int avienc_init(void)
|
|||||||
av_register_output_format(&avi_oformat);
|
av_register_output_format(&avi_oformat);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
@ -100,7 +100,7 @@ int url_read(URLContext *h, unsigned char *buf, int size)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
int url_write(URLContext *h, unsigned char *buf, int size)
|
int url_write(URLContext *h, unsigned char *buf, int size)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -112,7 +112,7 @@ int url_write(URLContext *h, unsigned char *buf, int size)
|
|||||||
ret = h->prot->url_write(h, buf, size);
|
ret = h->prot->url_write(h, buf, size);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
offset_t url_seek(URLContext *h, offset_t pos, int whence)
|
offset_t url_seek(URLContext *h, offset_t pos, int whence)
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ int init_put_byte(ByteIOContext *s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static void flush_buffer(ByteIOContext *s)
|
static void flush_buffer(ByteIOContext *s)
|
||||||
{
|
{
|
||||||
if (s->buf_ptr > s->buffer) {
|
if (s->buf_ptr > s->buffer) {
|
||||||
@ -104,7 +104,7 @@ void put_flush_packet(ByteIOContext *s)
|
|||||||
flush_buffer(s);
|
flush_buffer(s);
|
||||||
s->must_flush = 0;
|
s->must_flush = 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
|
offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
|
||||||
{
|
{
|
||||||
@ -113,7 +113,7 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
|
|||||||
if (whence != SEEK_CUR && whence != SEEK_SET)
|
if (whence != SEEK_CUR && whence != SEEK_SET)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
if (s->write_flag) {
|
if (s->write_flag) {
|
||||||
if (whence == SEEK_CUR) {
|
if (whence == SEEK_CUR) {
|
||||||
offset1 = s->pos + (s->buf_ptr - s->buffer);
|
offset1 = s->pos + (s->buf_ptr - s->buffer);
|
||||||
@ -136,7 +136,7 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
|
|||||||
s->pos = offset;
|
s->pos = offset;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
{
|
{
|
||||||
if (whence == SEEK_CUR) {
|
if (whence == SEEK_CUR) {
|
||||||
offset1 = s->pos - (s->buf_end - s->buffer) + (s->buf_ptr - s->buffer);
|
offset1 = s->pos - (s->buf_end - s->buffer) + (s->buf_ptr - s->buffer);
|
||||||
@ -193,7 +193,7 @@ int url_ferror(ByteIOContext *s)
|
|||||||
return s->error;
|
return s->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
void put_le32(ByteIOContext *s, unsigned int val)
|
void put_le32(ByteIOContext *s, unsigned int val)
|
||||||
{
|
{
|
||||||
put_byte(s, val);
|
put_byte(s, val);
|
||||||
@ -254,7 +254,7 @@ void put_tag(ByteIOContext *s, const char *tag)
|
|||||||
put_byte(s, *tag++);
|
put_byte(s, *tag++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* Input stream */
|
/* Input stream */
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ uint64_t get_be64(ByteIOContext *s)
|
|||||||
|
|
||||||
/* link with avio functions */
|
/* link with avio functions */
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static int url_write_packet(void *opaque, uint8_t *buf, int buf_size)
|
static int url_write_packet(void *opaque, uint8_t *buf, int buf_size)
|
||||||
{
|
{
|
||||||
URLContext *h = opaque;
|
URLContext *h = opaque;
|
||||||
@ -471,7 +471,7 @@ static int url_write_packet(void *opaque, uint8_t *buf, int buf_size)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define url_write_packet NULL
|
#define url_write_packet NULL
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
static int url_read_packet(void *opaque, uint8_t *buf, int buf_size)
|
static int url_read_packet(void *opaque, uint8_t *buf, int buf_size)
|
||||||
{
|
{
|
||||||
@ -564,7 +564,7 @@ URLContext *url_fileno(ByteIOContext *s)
|
|||||||
return s->opaque;
|
return s->opaque;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* XXX: currently size is limited */
|
/* XXX: currently size is limited */
|
||||||
int url_fprintf(ByteIOContext *s, const char *fmt, ...)
|
int url_fprintf(ByteIOContext *s, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
@ -578,7 +578,7 @@ int url_fprintf(ByteIOContext *s, const char *fmt, ...)
|
|||||||
put_buffer(s, buf, strlen(buf));
|
put_buffer(s, buf, strlen(buf));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* note: unlike fgets, the EOL character is not returned and a whole
|
/* note: unlike fgets, the EOL character is not returned and a whole
|
||||||
line is parsed. return NULL if first char read was EOF */
|
line is parsed. return NULL if first char read was EOF */
|
||||||
@ -616,7 +616,7 @@ int url_fget_max_packet_size(ByteIOContext *s)
|
|||||||
return s->max_packet_size;
|
return s->max_packet_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* buffer handling */
|
/* buffer handling */
|
||||||
int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags)
|
int url_open_buf(ByteIOContext *s, uint8_t *buf, int buf_size, int flags)
|
||||||
{
|
{
|
||||||
@ -779,4 +779,4 @@ int url_close_dyn_buf(ByteIOContext *s, uint8_t **pbuffer)
|
|||||||
av_free(d);
|
av_free(d);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
@ -56,7 +56,7 @@ static int64_t get_pts(AVFormatContext *s, offset_t pos);
|
|||||||
/* disable pts hack for testing */
|
/* disable pts hack for testing */
|
||||||
int ffm_nopts = 0;
|
int ffm_nopts = 0;
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static void flush_packet(AVFormatContext *s)
|
static void flush_packet(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
FFMContext *ffm = s->priv_data;
|
FFMContext *ffm = s->priv_data;
|
||||||
@ -294,7 +294,7 @@ static int ffm_write_trailer(AVFormatContext *s)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* ffm demux */
|
/* ffm demux */
|
||||||
|
|
||||||
@ -763,7 +763,7 @@ static AVInputFormat ffm_iformat = {
|
|||||||
ffm_seek,
|
ffm_seek,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat ffm_oformat = {
|
static AVOutputFormat ffm_oformat = {
|
||||||
"ffm",
|
"ffm",
|
||||||
"ffm format",
|
"ffm format",
|
||||||
@ -777,13 +777,13 @@ static AVOutputFormat ffm_oformat = {
|
|||||||
ffm_write_packet,
|
ffm_write_packet,
|
||||||
ffm_write_trailer,
|
ffm_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int ffm_init(void)
|
int ffm_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&ffm_iformat);
|
av_register_input_format(&ffm_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&ffm_oformat);
|
av_register_output_format(&ffm_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,7 @@ static int jpeg_read(ByteIOContext *f,
|
|||||||
return jctx.ret_code;
|
return jctx.ret_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static int jpeg_write(ByteIOContext *pb, AVImageInfo *info)
|
static int jpeg_write(ByteIOContext *pb, AVImageInfo *info)
|
||||||
{
|
{
|
||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
@ -222,7 +222,7 @@ static int jpeg_write(ByteIOContext *pb, AVImageInfo *info)
|
|||||||
av_free(c);
|
av_free(c);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVImageFormat jpeg_image_format = {
|
AVImageFormat jpeg_image_format = {
|
||||||
"jpeg",
|
"jpeg",
|
||||||
@ -230,9 +230,9 @@ AVImageFormat jpeg_image_format = {
|
|||||||
jpeg_probe,
|
jpeg_probe,
|
||||||
jpeg_read,
|
jpeg_read,
|
||||||
(1 << PIX_FMT_YUVJ420P) | (1 << PIX_FMT_YUVJ422P) | (1 << PIX_FMT_YUVJ444P),
|
(1 << PIX_FMT_YUVJ420P) | (1 << PIX_FMT_YUVJ422P) | (1 << PIX_FMT_YUVJ444P),
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
jpeg_write,
|
jpeg_write,
|
||||||
#else
|
#else
|
||||||
NULL,
|
NULL,
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,7 @@ typedef struct {
|
|||||||
offset_t data_size;
|
offset_t data_size;
|
||||||
} MMFContext;
|
} MMFContext;
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 };
|
static int mmf_rates[] = { 4000, 8000, 11025, 22050, 44100 };
|
||||||
|
|
||||||
static int mmf_rate_code(int rate)
|
static int mmf_rate_code(int rate)
|
||||||
@ -160,7 +160,7 @@ static int mmf_write_trailer(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
static int mmf_probe(AVProbeData *p)
|
static int mmf_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
@ -308,7 +308,7 @@ static AVInputFormat mmf_iformat = {
|
|||||||
mmf_read_seek,
|
mmf_read_seek,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat mmf_oformat = {
|
static AVOutputFormat mmf_oformat = {
|
||||||
"mmf",
|
"mmf",
|
||||||
"mmf format",
|
"mmf format",
|
||||||
@ -321,14 +321,14 @@ static AVOutputFormat mmf_oformat = {
|
|||||||
mmf_write_packet,
|
mmf_write_packet,
|
||||||
mmf_write_trailer,
|
mmf_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int ff_mmf_init(void)
|
int ff_mmf_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&mmf_iformat);
|
av_register_input_format(&mmf_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&mmf_oformat);
|
av_register_output_format(&mmf_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ static int mp3_read_close(AVFormatContext *s)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* simple formats */
|
/* simple formats */
|
||||||
static int mp3_write_header(struct AVFormatContext *s)
|
static int mp3_write_header(struct AVFormatContext *s)
|
||||||
{
|
{
|
||||||
@ -340,7 +340,7 @@ static int mp3_write_trailer(struct AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat mp3_iformat = {
|
AVInputFormat mp3_iformat = {
|
||||||
"mp3",
|
"mp3",
|
||||||
@ -353,7 +353,7 @@ AVInputFormat mp3_iformat = {
|
|||||||
.extensions = "mp2,mp3,m2a", /* XXX: use probe */
|
.extensions = "mp2,mp3,m2a", /* XXX: use probe */
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat mp2_oformat = {
|
AVOutputFormat mp2_oformat = {
|
||||||
"mp2",
|
"mp2",
|
||||||
"MPEG audio layer 2",
|
"MPEG audio layer 2",
|
||||||
@ -385,16 +385,16 @@ AVOutputFormat mp3_oformat = {
|
|||||||
mp3_write_trailer,
|
mp3_write_trailer,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int mp3_init(void)
|
int mp3_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&mp3_iformat);
|
av_register_input_format(&mp3_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&mp2_oformat);
|
av_register_output_format(&mp2_oformat);
|
||||||
#ifdef CONFIG_MP3LAME
|
#ifdef CONFIG_MP3LAME
|
||||||
av_register_output_format(&mp3_oformat);
|
av_register_output_format(&mp3_oformat);
|
||||||
#endif
|
#endif
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ typedef struct {
|
|||||||
|
|
||||||
static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
|
static const int lpcm_freq_tab[4] = { 48000, 96000, 44100, 32000 };
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat mpeg1system_mux;
|
static AVOutputFormat mpeg1system_mux;
|
||||||
static AVOutputFormat mpeg1vcd_mux;
|
static AVOutputFormat mpeg1vcd_mux;
|
||||||
static AVOutputFormat mpeg2vob_mux;
|
static AVOutputFormat mpeg2vob_mux;
|
||||||
@ -1253,7 +1253,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* demux code */
|
/* demux code */
|
||||||
@ -1707,7 +1707,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index,
|
|||||||
return dts;
|
return dts;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat mpeg1system_mux = {
|
static AVOutputFormat mpeg1system_mux = {
|
||||||
"mpeg",
|
"mpeg",
|
||||||
"MPEG1 System format",
|
"MPEG1 System format",
|
||||||
@ -1775,7 +1775,7 @@ static AVOutputFormat mpeg2dvd_mux = {
|
|||||||
mpeg_mux_end,
|
mpeg_mux_end,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat mpegps_demux = {
|
AVInputFormat mpegps_demux = {
|
||||||
"mpeg",
|
"mpeg",
|
||||||
@ -1792,13 +1792,13 @@ AVInputFormat mpegps_demux = {
|
|||||||
|
|
||||||
int mpegps_init(void)
|
int mpegps_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&mpeg1system_mux);
|
av_register_output_format(&mpeg1system_mux);
|
||||||
av_register_output_format(&mpeg1vcd_mux);
|
av_register_output_format(&mpeg1vcd_mux);
|
||||||
av_register_output_format(&mpeg2vob_mux);
|
av_register_output_format(&mpeg2vob_mux);
|
||||||
av_register_output_format(&mpeg2svcd_mux);
|
av_register_output_format(&mpeg2svcd_mux);
|
||||||
av_register_output_format(&mpeg2dvd_mux);
|
av_register_output_format(&mpeg2dvd_mux);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
av_register_input_format(&mpegps_demux);
|
av_register_input_format(&mpegps_demux);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1498,7 +1498,7 @@ AVInputFormat mpegts_demux = {
|
|||||||
int mpegts_init(void)
|
int mpegts_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&mpegts_demux);
|
av_register_input_format(&mpegts_demux);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&mpegts_mux);
|
av_register_output_format(&mpegts_mux);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#define BOUNDARY_TAG "ffserver"
|
#define BOUNDARY_TAG "ffserver"
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static int mpjpeg_write_header(AVFormatContext *s)
|
static int mpjpeg_write_header(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
uint8_t buf1[256];
|
uint8_t buf1[256];
|
||||||
@ -70,4 +70,4 @@ int jpeg_init(void)
|
|||||||
av_register_output_format(&mpjpeg_format);
|
av_register_output_format(&mpjpeg_format);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
@ -394,7 +394,7 @@ static int64_t find_startcode(ByteIOContext *bc, uint64_t code, int64_t pos){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
|
|
||||||
static void put_v(ByteIOContext *bc, uint64_t val)
|
static void put_v(ByteIOContext *bc, uint64_t val)
|
||||||
{
|
{
|
||||||
@ -843,7 +843,7 @@ static int nut_write_trailer(AVFormatContext *s)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
static int nut_probe(AVProbeData *p)
|
static int nut_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
@ -1430,7 +1430,7 @@ static AVInputFormat nut_iformat = {
|
|||||||
.extensions = "nut",
|
.extensions = "nut",
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat nut_oformat = {
|
static AVOutputFormat nut_oformat = {
|
||||||
"nut",
|
"nut",
|
||||||
"nut format",
|
"nut format",
|
||||||
@ -1450,13 +1450,13 @@ static AVOutputFormat nut_oformat = {
|
|||||||
nut_write_trailer,
|
nut_write_trailer,
|
||||||
.flags = AVFMT_GLOBALHEADER,
|
.flags = AVFMT_GLOBALHEADER,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int nut_init(void)
|
int nut_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&nut_iformat);
|
av_register_input_format(&nut_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&nut_oformat);
|
av_register_output_format(&nut_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ typedef struct OggContext {
|
|||||||
} OggContext ;
|
} OggContext ;
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static int ogg_write_header(AVFormatContext *avfcontext)
|
static int ogg_write_header(AVFormatContext *avfcontext)
|
||||||
{
|
{
|
||||||
OggContext *context = avfcontext->priv_data;
|
OggContext *context = avfcontext->priv_data;
|
||||||
@ -149,7 +149,7 @@ static AVOutputFormat ogg_oformat = {
|
|||||||
ogg_write_packet,
|
ogg_write_packet,
|
||||||
ogg_write_trailer,
|
ogg_write_trailer,
|
||||||
} ;
|
} ;
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static int next_packet(AVFormatContext *avfcontext, ogg_packet *op) {
|
static int next_packet(AVFormatContext *avfcontext, ogg_packet *op) {
|
||||||
@ -267,7 +267,7 @@ static AVInputFormat ogg_iformat = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int libogg_init(void) {
|
int libogg_init(void) {
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&ogg_oformat) ;
|
av_register_output_format(&ogg_oformat) ;
|
||||||
#endif
|
#endif
|
||||||
/* av_register_input_format(&ogg_iformat); */
|
/* av_register_input_format(&ogg_iformat); */
|
||||||
|
@ -44,7 +44,7 @@ static ogg_codec_t *ogg_codecs[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0 // CONFIG_ENCODERS
|
#if 0 // CONFIG_MUXERS
|
||||||
static int
|
static int
|
||||||
ogg_write_header (AVFormatContext * avfcontext)
|
ogg_write_header (AVFormatContext * avfcontext)
|
||||||
{
|
{
|
||||||
@ -74,7 +74,7 @@ static AVOutputFormat ogg_oformat = {
|
|||||||
ogg_write_packet,
|
ogg_write_packet,
|
||||||
ogg_write_trailer,
|
ogg_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
//FIXME We could avoid some structure duplication
|
//FIXME We could avoid some structure duplication
|
||||||
static int
|
static int
|
||||||
@ -638,7 +638,7 @@ static AVInputFormat ogg_iformat = {
|
|||||||
int
|
int
|
||||||
ogg_init (void)
|
ogg_init (void)
|
||||||
{
|
{
|
||||||
#if 0 // CONFIG_ENCODERS
|
#if 0 // CONFIG_MUXERS
|
||||||
av_register_output_format (&ogg_oformat);
|
av_register_output_format (&ogg_oformat);
|
||||||
#endif
|
#endif
|
||||||
av_register_input_format (&ogg_iformat);
|
av_register_input_format (&ogg_iformat);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* simple formats */
|
/* simple formats */
|
||||||
static int raw_write_header(struct AVFormatContext *s)
|
static int raw_write_header(struct AVFormatContext *s)
|
||||||
{
|
{
|
||||||
@ -36,7 +36,7 @@ static int raw_write_trailer(struct AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* raw input */
|
/* raw input */
|
||||||
static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||||
@ -329,7 +329,7 @@ AVInputFormat ac3_iformat = {
|
|||||||
.extensions = "ac3",
|
.extensions = "ac3",
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat ac3_oformat = {
|
AVOutputFormat ac3_oformat = {
|
||||||
"ac3",
|
"ac3",
|
||||||
"raw ac3",
|
"raw ac3",
|
||||||
@ -342,7 +342,7 @@ AVOutputFormat ac3_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat dts_iformat = {
|
AVInputFormat dts_iformat = {
|
||||||
"dts",
|
"dts",
|
||||||
@ -367,7 +367,7 @@ AVInputFormat h261_iformat = {
|
|||||||
.value = CODEC_ID_H261,
|
.value = CODEC_ID_H261,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat h261_oformat = {
|
AVOutputFormat h261_oformat = {
|
||||||
"h261",
|
"h261",
|
||||||
"raw h261",
|
"raw h261",
|
||||||
@ -380,7 +380,7 @@ AVOutputFormat h261_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat h263_iformat = {
|
AVInputFormat h263_iformat = {
|
||||||
"h263",
|
"h263",
|
||||||
@ -394,7 +394,7 @@ AVInputFormat h263_iformat = {
|
|||||||
.value = CODEC_ID_H263,
|
.value = CODEC_ID_H263,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat h263_oformat = {
|
AVOutputFormat h263_oformat = {
|
||||||
"h263",
|
"h263",
|
||||||
"raw h263",
|
"raw h263",
|
||||||
@ -407,7 +407,7 @@ AVOutputFormat h263_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat m4v_iformat = {
|
AVInputFormat m4v_iformat = {
|
||||||
"m4v",
|
"m4v",
|
||||||
@ -421,7 +421,7 @@ AVInputFormat m4v_iformat = {
|
|||||||
.value = CODEC_ID_MPEG4,
|
.value = CODEC_ID_MPEG4,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat m4v_oformat = {
|
AVOutputFormat m4v_oformat = {
|
||||||
"m4v",
|
"m4v",
|
||||||
"raw MPEG4 video format",
|
"raw MPEG4 video format",
|
||||||
@ -434,7 +434,7 @@ AVOutputFormat m4v_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat h264_iformat = {
|
AVInputFormat h264_iformat = {
|
||||||
"h264",
|
"h264",
|
||||||
@ -448,7 +448,7 @@ AVInputFormat h264_iformat = {
|
|||||||
.value = CODEC_ID_H264,
|
.value = CODEC_ID_H264,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat h264_oformat = {
|
AVOutputFormat h264_oformat = {
|
||||||
"h264",
|
"h264",
|
||||||
"raw H264 video format",
|
"raw H264 video format",
|
||||||
@ -461,7 +461,7 @@ AVOutputFormat h264_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat mpegvideo_iformat = {
|
AVInputFormat mpegvideo_iformat = {
|
||||||
"mpegvideo",
|
"mpegvideo",
|
||||||
@ -474,7 +474,7 @@ AVInputFormat mpegvideo_iformat = {
|
|||||||
.value = CODEC_ID_MPEG1VIDEO,
|
.value = CODEC_ID_MPEG1VIDEO,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat mpeg1video_oformat = {
|
AVOutputFormat mpeg1video_oformat = {
|
||||||
"mpeg1video",
|
"mpeg1video",
|
||||||
"MPEG video",
|
"MPEG video",
|
||||||
@ -487,9 +487,9 @@ AVOutputFormat mpeg1video_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat mpeg2video_oformat = {
|
AVOutputFormat mpeg2video_oformat = {
|
||||||
"mpeg2video",
|
"mpeg2video",
|
||||||
"MPEG2 video",
|
"MPEG2 video",
|
||||||
@ -502,7 +502,7 @@ AVOutputFormat mpeg2video_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
AVInputFormat mjpeg_iformat = {
|
AVInputFormat mjpeg_iformat = {
|
||||||
"mjpeg",
|
"mjpeg",
|
||||||
@ -516,7 +516,7 @@ AVInputFormat mjpeg_iformat = {
|
|||||||
.value = CODEC_ID_MJPEG,
|
.value = CODEC_ID_MJPEG,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat mjpeg_oformat = {
|
AVOutputFormat mjpeg_oformat = {
|
||||||
"mjpeg",
|
"mjpeg",
|
||||||
"MJPEG video",
|
"MJPEG video",
|
||||||
@ -529,7 +529,7 @@ AVOutputFormat mjpeg_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* pcm formats */
|
/* pcm formats */
|
||||||
|
|
||||||
@ -547,7 +547,7 @@ AVInputFormat pcm_ ## name ## _iformat = {\
|
|||||||
.value = codec,\
|
.value = codec,\
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(CONFIG_ENCODERS) && defined(CONFIG_DECODERS)
|
#if !defined(CONFIG_MUXERS) && defined(CONFIG_DEMUXERS)
|
||||||
|
|
||||||
#define PCMDEF(name, long_name, ext, codec) \
|
#define PCMDEF(name, long_name, ext, codec) \
|
||||||
PCMINPUTDEF(name, long_name, ext, codec)
|
PCMINPUTDEF(name, long_name, ext, codec)
|
||||||
@ -569,7 +569,7 @@ AVOutputFormat pcm_ ## name ## _oformat = {\
|
|||||||
raw_write_packet,\
|
raw_write_packet,\
|
||||||
raw_write_trailer,\
|
raw_write_trailer,\
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
#define BE_DEF(s) s
|
#define BE_DEF(s) s
|
||||||
@ -638,7 +638,7 @@ AVInputFormat rawvideo_iformat = {
|
|||||||
.value = CODEC_ID_RAWVIDEO,
|
.value = CODEC_ID_RAWVIDEO,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
AVOutputFormat rawvideo_oformat = {
|
AVOutputFormat rawvideo_oformat = {
|
||||||
"rawvideo",
|
"rawvideo",
|
||||||
"raw video format",
|
"raw video format",
|
||||||
@ -651,9 +651,9 @@ AVOutputFormat rawvideo_oformat = {
|
|||||||
raw_write_packet,
|
raw_write_packet,
|
||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
|
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@ -676,12 +676,12 @@ AVOutputFormat null_oformat = {
|
|||||||
raw_write_trailer,
|
raw_write_trailer,
|
||||||
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE,
|
.flags = AVFMT_NOFILE | AVFMT_RAWPICTURE,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
#ifndef CONFIG_ENCODERS
|
#ifndef CONFIG_MUXERS
|
||||||
#define av_register_output_format(format)
|
#define av_register_output_format(format)
|
||||||
#endif
|
#endif
|
||||||
#ifndef CONFIG_DECODERS
|
#ifndef CONFIG_DEMUXERS
|
||||||
#define av_register_input_format(format)
|
#define av_register_input_format(format)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ typedef struct {
|
|||||||
int remaining_len;
|
int remaining_len;
|
||||||
} RMContext;
|
} RMContext;
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static void put_str(ByteIOContext *s, const char *tag)
|
static void put_str(ByteIOContext *s, const char *tag)
|
||||||
{
|
{
|
||||||
put_be16(s,strlen(tag));
|
put_be16(s,strlen(tag));
|
||||||
@ -443,7 +443,7 @@ static int rm_write_trailer(AVFormatContext *s)
|
|||||||
put_flush_packet(pb);
|
put_flush_packet(pb);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
@ -969,7 +969,7 @@ static AVInputFormat rm_iformat = {
|
|||||||
rm_read_dts,
|
rm_read_dts,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat rm_oformat = {
|
static AVOutputFormat rm_oformat = {
|
||||||
"rm",
|
"rm",
|
||||||
"rm format",
|
"rm format",
|
||||||
@ -982,13 +982,13 @@ static AVOutputFormat rm_oformat = {
|
|||||||
rm_write_packet,
|
rm_write_packet,
|
||||||
rm_write_trailer,
|
rm_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int rm_init(void)
|
int rm_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&rm_iformat);
|
av_register_input_format(&rm_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&rm_oformat);
|
av_register_output_format(&rm_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ static int sgi_read(ByteIOContext *f,
|
|||||||
return 0; /* not reached */
|
return 0; /* not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static void write_sgi_header(ByteIOContext *f, const SGIInfo *info)
|
static void write_sgi_header(ByteIOContext *f, const SGIInfo *info)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -442,7 +442,7 @@ static int sgi_write(ByteIOContext *pb, AVImageInfo *info)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // CONFIG_ENCODERS
|
#endif // CONFIG_MUXERS
|
||||||
|
|
||||||
AVImageFormat sgi_image_format = {
|
AVImageFormat sgi_image_format = {
|
||||||
"sgi",
|
"sgi",
|
||||||
@ -450,9 +450,9 @@ AVImageFormat sgi_image_format = {
|
|||||||
sgi_probe,
|
sgi_probe,
|
||||||
sgi_read,
|
sgi_read,
|
||||||
(1 << PIX_FMT_GRAY8) | (1 << PIX_FMT_RGB24) | (1 << PIX_FMT_RGBA32),
|
(1 << PIX_FMT_GRAY8) | (1 << PIX_FMT_RGB24) | (1 << PIX_FMT_RGBA32),
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
sgi_write,
|
sgi_write,
|
||||||
#else
|
#else
|
||||||
NULL,
|
NULL,
|
||||||
#endif // CONFIG_ENCODERS
|
#endif // CONFIG_MUXERS
|
||||||
};
|
};
|
||||||
|
@ -148,7 +148,7 @@ static int swf_mp3_info(void *data, int *byteSize, int *samplesPerFrame, int *sa
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static void put_swf_tag(AVFormatContext *s, int tag)
|
static void put_swf_tag(AVFormatContext *s, int tag)
|
||||||
{
|
{
|
||||||
SWFContext *swf = s->priv_data;
|
SWFContext *swf = s->priv_data;
|
||||||
@ -691,7 +691,7 @@ static int swf_write_trailer(AVFormatContext *s)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* Extract FLV encoded frame and MP3 from swf
|
/* Extract FLV encoded frame and MP3 from swf
|
||||||
@ -909,7 +909,7 @@ static AVInputFormat swf_iformat = {
|
|||||||
swf_read_close,
|
swf_read_close,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat swf_oformat = {
|
static AVOutputFormat swf_oformat = {
|
||||||
"swf",
|
"swf",
|
||||||
"Flash format",
|
"Flash format",
|
||||||
@ -922,13 +922,13 @@ static AVOutputFormat swf_oformat = {
|
|||||||
swf_write_packet,
|
swf_write_packet,
|
||||||
swf_write_trailer,
|
swf_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int swf_init(void)
|
int swf_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&swf_iformat);
|
av_register_input_format(&swf_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&swf_oformat);
|
av_register_output_format(&swf_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ const CodecTag codec_wav_tags[] = {
|
|||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
/* WAVEFORMATEX header */
|
/* WAVEFORMATEX header */
|
||||||
/* returns the size or -1 on error */
|
/* returns the size or -1 on error */
|
||||||
int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
|
int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
|
||||||
@ -135,7 +135,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
|
|||||||
|
|
||||||
return hdrsize;
|
return hdrsize;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* We could be given one of the three possible structures here:
|
/* We could be given one of the three possible structures here:
|
||||||
* WAVEFORMAT, PCMWAVEFORMAT or WAVEFORMATEX. Each structure
|
* WAVEFORMAT, PCMWAVEFORMAT or WAVEFORMATEX. Each structure
|
||||||
@ -194,7 +194,7 @@ int wav_codec_get_id(unsigned int tag, int bps)
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
typedef struct {
|
typedef struct {
|
||||||
offset_t data;
|
offset_t data;
|
||||||
} WAVContext;
|
} WAVContext;
|
||||||
@ -253,7 +253,7 @@ static int wav_write_trailer(AVFormatContext *s)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* return the size of the found tag */
|
/* return the size of the found tag */
|
||||||
/* XXX: > 2GB ? */
|
/* XXX: > 2GB ? */
|
||||||
@ -395,7 +395,7 @@ static AVInputFormat wav_iformat = {
|
|||||||
wav_read_seek,
|
wav_read_seek,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
static AVOutputFormat wav_oformat = {
|
static AVOutputFormat wav_oformat = {
|
||||||
"wav",
|
"wav",
|
||||||
"wav format",
|
"wav format",
|
||||||
@ -408,13 +408,13 @@ static AVOutputFormat wav_oformat = {
|
|||||||
wav_write_packet,
|
wav_write_packet,
|
||||||
wav_write_trailer,
|
wav_write_trailer,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
int ff_wav_init(void)
|
int ff_wav_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&wav_iformat);
|
av_register_input_format(&wav_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&wav_oformat);
|
av_register_output_format(&wav_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#define Y4M_FRAME_MAGIC "FRAME"
|
#define Y4M_FRAME_MAGIC "FRAME"
|
||||||
#define Y4M_LINE_MAX 256
|
#define Y4M_LINE_MAX 256
|
||||||
|
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
|
|
||||||
static int yuv4_generate_header(AVFormatContext *s, char* buf)
|
static int yuv4_generate_header(AVFormatContext *s, char* buf)
|
||||||
{
|
{
|
||||||
@ -179,7 +179,7 @@ AVOutputFormat yuv4mpegpipe_oformat = {
|
|||||||
yuv4_write_trailer,
|
yuv4_write_trailer,
|
||||||
.flags = AVFMT_RAWPICTURE,
|
.flags = AVFMT_RAWPICTURE,
|
||||||
};
|
};
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
|
|
||||||
/* Header size increased to allow room for optional flags */
|
/* Header size increased to allow room for optional flags */
|
||||||
#define MAX_YUV4_HEADER 80
|
#define MAX_YUV4_HEADER 80
|
||||||
@ -393,9 +393,9 @@ AVInputFormat yuv4mpegpipe_iformat = {
|
|||||||
int yuv4mpeg_init(void)
|
int yuv4mpeg_init(void)
|
||||||
{
|
{
|
||||||
av_register_input_format(&yuv4mpegpipe_iformat);
|
av_register_input_format(&yuv4mpegpipe_iformat);
|
||||||
#ifdef CONFIG_ENCODERS
|
#ifdef CONFIG_MUXERS
|
||||||
av_register_output_format(&yuv4mpegpipe_oformat);
|
av_register_output_format(&yuv4mpegpipe_oformat);
|
||||||
#endif //CONFIG_ENCODERS
|
#endif //CONFIG_MUXERS
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user