2002-07-25 19:03:55 +03:00
|
|
|
/*
|
|
|
|
* Register all the formats and protocols
|
|
|
|
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
|
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
2002-07-25 19:03:55 +03:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
2006-10-07 18:30:46 +03:00
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2002-07-25 19:03:55 +03:00
|
|
|
*
|
2006-10-07 18:30:46 +03:00
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
2002-07-25 19:03:55 +03: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 18:30:46 +03:00
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
2006-01-13 00:43:26 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-07-25 19:03:55 +03:00
|
|
|
*/
|
|
|
|
#include "avformat.h"
|
2009-01-27 14:23:16 +02:00
|
|
|
#include "rtp.h"
|
2008-09-07 04:21:24 +03:00
|
|
|
#include "rdt.h"
|
2002-07-25 19:03:55 +03:00
|
|
|
|
2008-12-13 19:04:22 +02:00
|
|
|
#define REGISTER_MUXER(X,x) { \
|
2008-12-13 18:35:58 +02:00
|
|
|
extern AVOutputFormat x##_muxer; \
|
2009-01-14 19:19:17 +02:00
|
|
|
if(CONFIG_##X##_MUXER) av_register_output_format(&x##_muxer); }
|
2008-12-13 15:39:13 +02:00
|
|
|
|
2008-12-13 19:04:22 +02:00
|
|
|
#define REGISTER_DEMUXER(X,x) { \
|
2008-12-13 18:35:58 +02:00
|
|
|
extern AVInputFormat x##_demuxer; \
|
2009-01-14 19:19:17 +02:00
|
|
|
if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
|
2008-12-13 15:39:13 +02:00
|
|
|
|
2006-11-27 14:55:24 +02:00
|
|
|
#define REGISTER_MUXDEMUX(X,x) REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
|
2008-12-13 15:39:13 +02:00
|
|
|
|
2008-12-13 19:04:22 +02:00
|
|
|
#define REGISTER_PROTOCOL(X,x) { \
|
2008-12-13 18:35:58 +02:00
|
|
|
extern URLProtocol x##_protocol; \
|
2009-01-14 19:19:17 +02:00
|
|
|
if(CONFIG_##X##_PROTOCOL) register_protocol(&x##_protocol); }
|
2006-11-27 14:55:24 +02:00
|
|
|
|
2002-07-25 19:03:55 +03:00
|
|
|
void av_register_all(void)
|
|
|
|
{
|
2008-02-13 11:26:10 +02:00
|
|
|
static int initialized;
|
2005-12-17 20:14:38 +02:00
|
|
|
|
2008-02-13 11:26:10 +02:00
|
|
|
if (initialized)
|
2004-10-08 00:11:08 +03:00
|
|
|
return;
|
2008-02-13 11:26:10 +02:00
|
|
|
initialized = 1;
|
2004-10-08 00:11:08 +03:00
|
|
|
|
2002-07-25 19:03:55 +03:00
|
|
|
avcodec_register_all();
|
|
|
|
|
2007-11-08 00:02:02 +02:00
|
|
|
/* (de)muxers */
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (AAC, aac);
|
|
|
|
REGISTER_MUXDEMUX (AC3, ac3);
|
|
|
|
REGISTER_MUXER (ADTS, adts);
|
|
|
|
REGISTER_MUXDEMUX (AIFF, aiff);
|
|
|
|
REGISTER_MUXDEMUX (AMR, amr);
|
|
|
|
REGISTER_DEMUXER (APC, apc);
|
2007-09-13 06:22:47 +03:00
|
|
|
REGISTER_DEMUXER (APE, ape);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (ASF, asf);
|
2008-09-26 22:42:21 +03:00
|
|
|
REGISTER_MUXDEMUX (ASS, ass);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXER (ASF_STREAM, asf_stream);
|
|
|
|
REGISTER_MUXDEMUX (AU, au);
|
|
|
|
REGISTER_MUXDEMUX (AVI, avi);
|
2007-09-26 21:37:20 +03:00
|
|
|
REGISTER_DEMUXER (AVISYNTH, avisynth);
|
2008-01-20 20:31:56 +02:00
|
|
|
REGISTER_MUXER (AVM2, avm2);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (AVS, avs);
|
|
|
|
REGISTER_DEMUXER (BETHSOFTVID, bethsoftvid);
|
2008-04-14 00:06:31 +03:00
|
|
|
REGISTER_DEMUXER (BFI, bfi);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (C93, c93);
|
|
|
|
REGISTER_MUXER (CRC, crc);
|
2008-08-04 10:35:07 +03:00
|
|
|
REGISTER_MUXDEMUX (DAUD, daud);
|
2008-05-02 17:52:39 +03:00
|
|
|
REGISTER_MUXDEMUX (DIRAC, dirac);
|
2008-10-24 04:42:57 +03:00
|
|
|
REGISTER_MUXDEMUX (DNXHD, dnxhd);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (DSICIN, dsicin);
|
2008-04-20 23:28:12 +03:00
|
|
|
REGISTER_MUXDEMUX (DTS, dts);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (DV, dv);
|
|
|
|
REGISTER_DEMUXER (DXA, dxa);
|
|
|
|
REGISTER_DEMUXER (EA, ea);
|
2007-11-04 00:42:20 +02:00
|
|
|
REGISTER_DEMUXER (EA_CDATA, ea_cdata);
|
2008-09-01 17:33:54 +03:00
|
|
|
REGISTER_MUXDEMUX (EAC3, eac3);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (FFM, ffm);
|
|
|
|
REGISTER_MUXDEMUX (FLAC, flac);
|
|
|
|
REGISTER_DEMUXER (FLIC, flic);
|
|
|
|
REGISTER_MUXDEMUX (FLV, flv);
|
|
|
|
REGISTER_DEMUXER (FOURXM, fourxm);
|
|
|
|
REGISTER_MUXER (FRAMECRC, framecrc);
|
2008-07-13 21:47:24 +03:00
|
|
|
REGISTER_MUXER (GIF, gif);
|
2008-04-28 21:29:42 +03:00
|
|
|
REGISTER_DEMUXER (GSM, gsm);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (GXF, gxf);
|
|
|
|
REGISTER_MUXDEMUX (H261, h261);
|
|
|
|
REGISTER_MUXDEMUX (H263, h263);
|
|
|
|
REGISTER_MUXDEMUX (H264, h264);
|
|
|
|
REGISTER_DEMUXER (IDCIN, idcin);
|
2008-03-30 22:17:01 +03:00
|
|
|
REGISTER_DEMUXER (IFF, iff);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (IMAGE2, image2);
|
|
|
|
REGISTER_MUXDEMUX (IMAGE2PIPE, image2pipe);
|
|
|
|
REGISTER_DEMUXER (INGENIENT, ingenient);
|
|
|
|
REGISTER_DEMUXER (IPMOVIE, ipmovie);
|
2008-03-16 15:36:36 +02:00
|
|
|
REGISTER_MUXER (IPOD, ipod);
|
2009-01-17 22:08:43 +02:00
|
|
|
REGISTER_DEMUXER (ISS, iss);
|
2008-01-08 01:52:51 +02:00
|
|
|
REGISTER_DEMUXER (LMLM4, lmlm4);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (M4V, m4v);
|
|
|
|
REGISTER_MUXDEMUX (MATROSKA, matroska);
|
|
|
|
REGISTER_MUXER (MATROSKA_AUDIO, matroska_audio);
|
|
|
|
REGISTER_MUXDEMUX (MJPEG, mjpeg);
|
2008-05-30 19:05:56 +03:00
|
|
|
REGISTER_DEMUXER (MLP, mlp);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (MM, mm);
|
|
|
|
REGISTER_MUXDEMUX (MMF, mmf);
|
|
|
|
REGISTER_MUXDEMUX (MOV, mov);
|
|
|
|
REGISTER_MUXER (MP2, mp2);
|
|
|
|
REGISTER_MUXDEMUX (MP3, mp3);
|
|
|
|
REGISTER_MUXER (MP4, mp4);
|
|
|
|
REGISTER_DEMUXER (MPC, mpc);
|
2007-11-07 07:35:46 +02:00
|
|
|
REGISTER_DEMUXER (MPC8, mpc8);
|
2007-09-05 23:42:17 +03: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 (MPEGTSRAW, mpegtsraw);
|
|
|
|
REGISTER_DEMUXER (MPEGVIDEO, mpegvideo);
|
|
|
|
REGISTER_MUXER (MPJPEG, mpjpeg);
|
2008-03-18 21:54:47 +02:00
|
|
|
REGISTER_DEMUXER (MSNWC_TCP, msnwc_tcp);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (MTV, mtv);
|
2008-07-10 06:02:19 +03:00
|
|
|
REGISTER_DEMUXER (MVI, mvi);
|
2008-08-26 18:58:25 +03:00
|
|
|
REGISTER_MUXDEMUX (MXF, mxf);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (NSV, nsv);
|
|
|
|
REGISTER_MUXER (NULL, null);
|
|
|
|
REGISTER_MUXDEMUX (NUT, nut);
|
|
|
|
REGISTER_DEMUXER (NUV, nuv);
|
2007-11-10 20:27:03 +02:00
|
|
|
REGISTER_MUXDEMUX (OGG, ogg);
|
2008-06-08 20:12:25 +03:00
|
|
|
REGISTER_DEMUXER (OMA, oma);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (PCM_ALAW, pcm_alaw);
|
|
|
|
REGISTER_MUXDEMUX (PCM_MULAW, pcm_mulaw);
|
2008-08-24 01:36:35 +03:00
|
|
|
REGISTER_MUXDEMUX (PCM_F64BE, pcm_f64be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_F64LE, pcm_f64le);
|
|
|
|
REGISTER_MUXDEMUX (PCM_F32BE, pcm_f32be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_F32LE, pcm_f32le);
|
|
|
|
REGISTER_MUXDEMUX (PCM_S32BE, pcm_s32be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_S32LE, pcm_s32le);
|
|
|
|
REGISTER_MUXDEMUX (PCM_S24BE, pcm_s24be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_S24LE, pcm_s24le);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (PCM_S16BE, pcm_s16be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_S16LE, pcm_s16le);
|
|
|
|
REGISTER_MUXDEMUX (PCM_S8, pcm_s8);
|
2008-08-24 01:36:35 +03:00
|
|
|
REGISTER_MUXDEMUX (PCM_U32BE, pcm_u32be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_U32LE, pcm_u32le);
|
|
|
|
REGISTER_MUXDEMUX (PCM_U24BE, pcm_u24be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_U24LE, pcm_u24le);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (PCM_U16BE, pcm_u16be);
|
|
|
|
REGISTER_MUXDEMUX (PCM_U16LE, pcm_u16le);
|
|
|
|
REGISTER_MUXDEMUX (PCM_U8, pcm_u8);
|
|
|
|
REGISTER_MUXER (PSP, psp);
|
2008-01-02 12:45:28 +02:00
|
|
|
REGISTER_DEMUXER (PVA, pva);
|
2009-01-20 09:42:14 +02:00
|
|
|
REGISTER_DEMUXER (R3D, r3d);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (RAWVIDEO, rawvideo);
|
2008-03-28 12:40:19 +02:00
|
|
|
REGISTER_DEMUXER (REDIR, redir);
|
2008-03-21 16:02:13 +02:00
|
|
|
REGISTER_DEMUXER (RL2, rl2);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (RM, rm);
|
|
|
|
REGISTER_MUXDEMUX (ROQ, roq);
|
2008-03-31 13:44:33 +03:00
|
|
|
REGISTER_DEMUXER (RPL, rpl);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXER (RTP, rtp);
|
|
|
|
REGISTER_DEMUXER (RTSP, rtsp);
|
|
|
|
REGISTER_DEMUXER (SDP, sdp);
|
2009-01-14 01:44:16 +02:00
|
|
|
#if CONFIG_SDP_DEMUXER
|
2006-10-26 21:36:03 +03:00
|
|
|
av_register_rtp_dynamic_payload_handlers();
|
2008-09-07 04:21:24 +03:00
|
|
|
av_register_rdt_dynamic_payload_handlers();
|
2006-07-11 00:14:37 +03:00
|
|
|
#endif
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_DEMUXER (SEGAFILM, segafilm);
|
|
|
|
REGISTER_DEMUXER (SHORTEN, shorten);
|
2007-10-22 09:01:38 +03:00
|
|
|
REGISTER_DEMUXER (SIFF, siff);
|
2007-09-05 23:42:17 +03:00
|
|
|
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 (THP, thp);
|
|
|
|
REGISTER_DEMUXER (TIERTEXSEQ, tiertexseq);
|
|
|
|
REGISTER_DEMUXER (TTA, tta);
|
|
|
|
REGISTER_DEMUXER (TXD, txd);
|
|
|
|
REGISTER_DEMUXER (VC1, vc1);
|
2008-07-23 20:06:40 +03:00
|
|
|
REGISTER_MUXDEMUX (VC1T, vc1t);
|
2007-09-05 23:42:17 +03:00
|
|
|
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);
|
2008-04-14 17:31:43 +03:00
|
|
|
REGISTER_DEMUXER (XA, xa);
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_MUXDEMUX (YUV4MPEGPIPE, yuv4mpegpipe);
|
2004-10-22 05:04:30 +03:00
|
|
|
|
2007-11-08 00:04:00 +02:00
|
|
|
/* external libraries */
|
|
|
|
REGISTER_MUXDEMUX (LIBNUT, libnut);
|
|
|
|
|
2007-11-08 00:02:02 +02:00
|
|
|
/* protocols */
|
2007-09-05 23:42:17 +03:00
|
|
|
REGISTER_PROTOCOL (FILE, file);
|
|
|
|
REGISTER_PROTOCOL (HTTP, http);
|
|
|
|
REGISTER_PROTOCOL (PIPE, pipe);
|
|
|
|
REGISTER_PROTOCOL (RTP, rtp);
|
|
|
|
REGISTER_PROTOCOL (TCP, tcp);
|
|
|
|
REGISTER_PROTOCOL (UDP, udp);
|
2002-07-25 19:03:55 +03:00
|
|
|
}
|