2002-07-25 16:03:55 +00:00
|
|
|
/*
|
|
|
|
* Register all the formats and protocols
|
|
|
|
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
|
|
|
|
*
|
2006-10-07 15:30:46 +00:00
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2002-07-25 16:03:55 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 15:30:46 +00:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2002-07-25 16:03:55 +00:00
|
|
|
*
|
2006-10-07 15:30:46 +00:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2002-07-25 16:03:55 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2006-10-07 15:30:46 +00:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2006-01-12 22:43:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-07-25 16:03:55 +00:00
|
|
|
*/
|
|
|
|
#include "avformat.h"
|
2006-06-30 07:41:25 +00:00
|
|
|
#include "allformats.h"
|
2002-07-25 16:03:55 +00:00
|
|
|
|
2006-11-27 12:55:24 +00:00
|
|
|
#define REGISTER_MUXER(X,x) \
|
|
|
|
if(ENABLE_##X##_MUXER) av_register_output_format(&x##_muxer)
|
|
|
|
#define REGISTER_DEMUXER(X,x) \
|
|
|
|
if(ENABLE_##X##_DEMUXER) av_register_input_format(&x##_demuxer)
|
|
|
|
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
|
|
|
|
|
2002-07-25 16:03:55 +00:00
|
|
|
/* If you do not call this function, then you can select exactly which
|
|
|
|
formats you want to support */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize libavcodec and register all the codecs and formats.
|
|
|
|
*/
|
|
|
|
void av_register_all(void)
|
|
|
|
{
|
2004-10-07 21:11:08 +00:00
|
|
|
static int inited = 0;
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2004-10-07 21:11:08 +00:00
|
|
|
if (inited != 0)
|
|
|
|
return;
|
|
|
|
inited = 1;
|
|
|
|
|
2002-07-25 16:03:55 +00:00
|
|
|
avcodec_init();
|
|
|
|
avcodec_register_all();
|
|
|
|
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_DEMUXER (AAC, aac);
|
|
|
|
REGISTER_MUXDEMUX(AC3, ac3);
|
|
|
|
REGISTER_MUXER (ADTS, adts);
|
|
|
|
REGISTER_MUXDEMUX(AIFF, aiff);
|
|
|
|
REGISTER_MUXDEMUX(AMR, amr);
|
|
|
|
REGISTER_MUXDEMUX(ASF, asf);
|
|
|
|
REGISTER_MUXER (ASF_STREAM, asf_stream);
|
|
|
|
REGISTER_MUXDEMUX(AU, au);
|
|
|
|
REGISTER_MUXDEMUX(AUDIO, audio);
|
|
|
|
REGISTER_MUXDEMUX(AVI, avi);
|
2006-08-29 07:34:58 +00:00
|
|
|
#ifdef CONFIG_AVISYNTH
|
|
|
|
av_register_input_format(&avisynth_demuxer);
|
|
|
|
#endif
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_DEMUXER (AVS, avs);
|
|
|
|
REGISTER_MUXER (CRC, crc);
|
|
|
|
REGISTER_DEMUXER (DAUD, daud);
|
|
|
|
REGISTER_DEMUXER (DC1394, dc1394);
|
|
|
|
REGISTER_DEMUXER (DSICIN, dsicin);
|
|
|
|
REGISTER_DEMUXER (DTS, dts);
|
|
|
|
REGISTER_MUXDEMUX(DV, dv);
|
|
|
|
REGISTER_DEMUXER (DV1394, dv1394);
|
|
|
|
REGISTER_DEMUXER (EA, ea);
|
|
|
|
REGISTER_MUXDEMUX(FFM, ffm);
|
|
|
|
REGISTER_MUXDEMUX(FLAC, flac);
|
|
|
|
REGISTER_DEMUXER (FLIC, flic);
|
|
|
|
REGISTER_MUXDEMUX(FLV, flv);
|
|
|
|
REGISTER_DEMUXER (FOURXM, fourxm);
|
|
|
|
REGISTER_MUXER (FRAMECRC, framecrc);
|
|
|
|
REGISTER_MUXDEMUX(GIF, gif);
|
|
|
|
REGISTER_DEMUXER (GXF, gxf);
|
|
|
|
REGISTER_MUXER (GXF, gxf);
|
|
|
|
REGISTER_MUXDEMUX(H261, h261);
|
|
|
|
REGISTER_MUXDEMUX(H263, h263);
|
|
|
|
REGISTER_MUXDEMUX(H264, h264);
|
|
|
|
REGISTER_DEMUXER (IDCIN, idcin);
|
|
|
|
REGISTER_MUXDEMUX(IMAGE2, image2);
|
|
|
|
REGISTER_MUXDEMUX(IMAGE2PIPE, image2pipe);
|
|
|
|
REGISTER_DEMUXER (INGENIENT, ingenient);
|
|
|
|
REGISTER_DEMUXER (IPMOVIE, ipmovie);
|
2007-02-09 08:28:47 +00:00
|
|
|
if (!ENABLE_NUT_DEMUXER) REGISTER_DEMUXER (LIBNUT, libnut);
|
|
|
|
REGISTER_MUXER (LIBNUT, libnut);
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_MUXDEMUX(M4V, m4v);
|
|
|
|
REGISTER_DEMUXER (MATROSKA, matroska);
|
|
|
|
REGISTER_MUXDEMUX(MJPEG, mjpeg);
|
|
|
|
REGISTER_DEMUXER (MM, mm);
|
|
|
|
REGISTER_MUXDEMUX(MMF, mmf);
|
|
|
|
REGISTER_MUXDEMUX(MOV, mov);
|
|
|
|
REGISTER_MUXER (MP2, mp2);
|
|
|
|
REGISTER_MUXDEMUX(MP3, mp3);
|
|
|
|
REGISTER_MUXER (MP4, mp4);
|
2006-12-24 04:51:43 +00:00
|
|
|
REGISTER_DEMUXER (MPC, mpc);
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_MUXER (MPEG1SYSTEM, mpeg1system);
|
|
|
|
REGISTER_MUXER (MPEG1VCD, mpeg1vcd);
|
|
|
|
REGISTER_MUXER (MPEG1VIDEO, mpeg1video);
|
|
|
|
REGISTER_MUXER (MPEG2DVD, mpeg2dvd);
|
|
|
|
REGISTER_MUXER (MPEG2SVCD, mpeg2svcd);
|
|
|
|
REGISTER_MUXER (MPEG2VIDEO, mpeg2video);
|
|
|
|
REGISTER_MUXER (MPEG2VOB, mpeg2vob);
|
|
|
|
REGISTER_DEMUXER (MPEGPS, mpegps);
|
|
|
|
REGISTER_MUXDEMUX(MPEGTS, mpegts);
|
|
|
|
REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
|
|
|
|
REGISTER_MUXER (MPJPEG, mpjpeg);
|
|
|
|
REGISTER_DEMUXER (MTV, mtv);
|
|
|
|
REGISTER_DEMUXER (MXF, mxf);
|
|
|
|
REGISTER_DEMUXER (NSV, nsv);
|
|
|
|
REGISTER_MUXER (NULL, null);
|
|
|
|
REGISTER_DEMUXER (NUT, nut);
|
|
|
|
REGISTER_DEMUXER (NUV, nuv);
|
|
|
|
REGISTER_DEMUXER (OGG, ogg);
|
|
|
|
REGISTER_MUXER (OGG, ogg);
|
|
|
|
REGISTER_MUXDEMUX(PCM_ALAW, pcm_alaw);
|
|
|
|
REGISTER_MUXDEMUX(PCM_MULAW, pcm_mulaw);
|
|
|
|
REGISTER_MUXDEMUX(PCM_S16BE, pcm_s16be);
|
|
|
|
REGISTER_MUXDEMUX(PCM_S16LE, pcm_s16le);
|
|
|
|
REGISTER_MUXDEMUX(PCM_S8, pcm_s8);
|
|
|
|
REGISTER_MUXDEMUX(PCM_U16BE, pcm_u16be);
|
|
|
|
REGISTER_MUXDEMUX(PCM_U16LE, pcm_u16le);
|
|
|
|
REGISTER_MUXDEMUX(PCM_U8, pcm_u8);
|
|
|
|
REGISTER_MUXER (PSP, psp);
|
|
|
|
REGISTER_MUXDEMUX(RAWVIDEO, rawvideo);
|
|
|
|
REGISTER_MUXDEMUX(RM, rm);
|
|
|
|
REGISTER_DEMUXER (ROQ, roq);
|
|
|
|
REGISTER_DEMUXER (REDIR, redir);
|
|
|
|
REGISTER_MUXER (RTP, rtp);
|
|
|
|
REGISTER_DEMUXER (RTSP, rtsp);
|
|
|
|
REGISTER_DEMUXER (SDP, sdp);
|
2007-01-21 21:04:01 +00:00
|
|
|
#ifdef CONFIG_NETWORK
|
2006-10-26 18:36:03 +00:00
|
|
|
av_register_rtp_dynamic_payload_handlers();
|
2006-07-10 21:14:37 +00:00
|
|
|
#endif
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_DEMUXER (SEGAFILM, segafilm);
|
|
|
|
REGISTER_DEMUXER (SHORTEN, shorten);
|
|
|
|
REGISTER_DEMUXER (SMACKER, smacker);
|
|
|
|
REGISTER_DEMUXER (SOL, sol);
|
|
|
|
REGISTER_DEMUXER (STR, str);
|
|
|
|
REGISTER_MUXDEMUX(SWF, swf);
|
|
|
|
REGISTER_MUXER (TG2, tg2);
|
|
|
|
REGISTER_MUXER (TGP, tgp);
|
|
|
|
REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
|
|
|
|
REGISTER_DEMUXER (TTA, tta);
|
|
|
|
REGISTER_DEMUXER (V4L2, v4l2);
|
2007-02-09 12:10:15 +00:00
|
|
|
REGISTER_DEMUXER (VC1, vc1);
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_DEMUXER (VIDEO_GRAB_DEVICE, video_grab_device);
|
|
|
|
REGISTER_DEMUXER (VMD, vmd);
|
|
|
|
REGISTER_MUXDEMUX(VOC, voc);
|
|
|
|
REGISTER_MUXDEMUX(WAV, wav);
|
|
|
|
REGISTER_DEMUXER (WC3, wc3);
|
|
|
|
REGISTER_DEMUXER (WSAUD, wsaud);
|
|
|
|
REGISTER_DEMUXER (WSVQA, wsvqa);
|
|
|
|
REGISTER_DEMUXER (WV, wv);
|
2006-12-13 08:45:36 +00:00
|
|
|
REGISTER_DEMUXER (X11_GRAB_DEVICE, x11_grab_device);
|
2006-11-27 12:55:24 +00:00
|
|
|
REGISTER_MUXDEMUX(YUV4MPEGPIPE, yuv4mpegpipe);
|
2004-10-22 02:04:30 +00:00
|
|
|
|
2006-01-21 18:36:32 +00:00
|
|
|
#ifdef CONFIG_PROTOCOLS
|
2002-07-25 16:03:55 +00:00
|
|
|
/* file protocols */
|
|
|
|
register_protocol(&file_protocol);
|
|
|
|
register_protocol(&pipe_protocol);
|
|
|
|
#ifdef CONFIG_NETWORK
|
|
|
|
register_protocol(&udp_protocol);
|
|
|
|
register_protocol(&rtp_protocol);
|
|
|
|
register_protocol(&tcp_protocol);
|
|
|
|
register_protocol(&http_protocol);
|
|
|
|
#endif
|
2006-01-21 18:36:32 +00:00
|
|
|
#endif
|
2002-07-25 16:03:55 +00:00
|
|
|
}
|