Statistics
| Branch: | Revision:

ffmpeg / libavformat / allformats.c @ 649b918c

History | View | Annotate | Download (3.41 KB)

1 4624540b Fabrice Bellard
/*
2
 * Register all the formats and protocols
3
 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
19
#include "avformat.h"
20
21
/* If you do not call this function, then you can select exactly which
22
   formats you want to support */
23
24
/**
25
 * Initialize libavcodec and register all the codecs and formats.
26
 */
27
void av_register_all(void)
28
{
29 caaeefc5 Michael Niedermayer
    static int inited = 0;
30
    
31
    if (inited != 0)
32
        return;
33
    inited = 1;
34
35 4624540b Fabrice Bellard
    avcodec_init();
36
    avcodec_register_all();
37
38
    mpegps_init();
39
    mpegts_init();
40 764ef400 Mike Melanson
#ifdef CONFIG_ENCODERS
41 4624540b Fabrice Bellard
    crc_init();
42
    img_init();
43 03cfe134 Michael Niedermayer
    img2_init();
44 764ef400 Mike Melanson
#endif //CONFIG_ENCODERS
45 4624540b Fabrice Bellard
    raw_init();
46 6a58e151 Fabrice Bellard
    mp3_init();
47 4624540b Fabrice Bellard
    rm_init();
48
    asf_init();
49 764ef400 Mike Melanson
#ifdef CONFIG_ENCODERS
50 4624540b Fabrice Bellard
    avienc_init();
51 764ef400 Mike Melanson
#endif //CONFIG_ENCODERS
52 4624540b Fabrice Bellard
    avidec_init();
53 c3775e54 Ronald S. Bultje
    ff_wav_init();
54 4624540b Fabrice Bellard
    swf_init();
55
    au_init();
56 764ef400 Mike Melanson
#ifdef CONFIG_ENCODERS
57 4624540b Fabrice Bellard
    gif_init();
58 764ef400 Mike Melanson
#endif //CONFIG_ENCODERS
59 4624540b Fabrice Bellard
    mov_init();
60 764ef400 Mike Melanson
#ifdef CONFIG_ENCODERS
61 1cb5f7fd Michael Niedermayer
    movenc_init();
62 4624540b Fabrice Bellard
    jpeg_init();
63 764ef400 Mike Melanson
#endif //CONFIG_ENCODERS
64 c3775e54 Ronald S. Bultje
    ff_dv_init();
65 3c96b4ef Mike Melanson
    fourxm_init();
66 764ef400 Mike Melanson
#ifdef CONFIG_ENCODERS
67 d4f5d74a Garrick Meeker
    flvenc_init();
68 764ef400 Mike Melanson
#endif //CONFIG_ENCODERS
69 d4f5d74a Garrick Meeker
    flvdec_init();
70 3f16d933 Mike Melanson
    str_init();
71 3ef8be2b Mike Melanson
    roq_init();
72
    ipmovie_init();
73 493645eb Mike Melanson
    wc3_init();
74 2fdf638b Mike Melanson
    westwood_init();
75
    film_init();
76 4120a53a Mike Melanson
    idcin_init();
77 42cad81a Mike Melanson
    flic_init();
78 a7eb3c8d Mike Melanson
    vmd_init();
79 87a0a681 Fabrice Bellard
80 d663a1fd Michael Niedermayer
#if defined(AMR_NB) || defined(AMR_NB_FIXED) || defined(AMR_WB)
81 bc634f6f Zdenek Kabelac
    amr_init();
82
#endif
83 2864dfd5 D Richard Felker III
    yuv4mpeg_init();
84 f20dca40 Fabrice Bellard
    
85 5c5dea3f Nilesh Bansal
#ifdef CONFIG_LIBOGG
86 81e0d0b4 Mark Hills
    ogg_init();
87
#endif
88
89 4624540b Fabrice Bellard
    ffm_init();
90
#ifdef CONFIG_VIDEO4LINUX
91
    video_grab_init();
92
#endif
93 dfdfa47c Fran├žois Revol
#if defined(CONFIG_AUDIO_OSS) || defined(CONFIG_AUDIO_BEOS)
94 4624540b Fabrice Bellard
    audio_init();
95
#endif
96
97 8aa3ee32 Max Krasnyansky
#ifdef CONFIG_DV1394
98
    dv1394_init();
99
#endif
100
101 f02be79d Roman Shaposhnik
#ifdef CONFIG_DC1394
102
    dc1394_init();
103
#endif
104
105 3aa180b8 Alex Beregszaszi
    nut_init();
106 08abe0fd Michael Niedermayer
    matroska_init();
107 d08d7142 Mike Melanson
    sol_init();
108 ad81a9fe Mike Melanson
    ea_init();
109 27d5f18f Fran├žois Revol
    nsvdec_init();
110 3aa180b8 Alex Beregszaszi
111 764ef400 Mike Melanson
#ifdef CONFIG_ENCODERS
112 87a0a681 Fabrice Bellard
    /* image formats */
113 9286699a Michael Niedermayer
#if 0
114 87a0a681 Fabrice Bellard
    av_register_image_format(&pnm_image_format);
115
    av_register_image_format(&pbm_image_format);
116
    av_register_image_format(&pgm_image_format);
117
    av_register_image_format(&ppm_image_format);
118 8975ba81 Fabrice Bellard
    av_register_image_format(&pam_image_format);
119 87a0a681 Fabrice Bellard
    av_register_image_format(&pgmyuv_image_format);
120
    av_register_image_format(&yuv_image_format);
121 3a13f6bd Zdenek Kabelac
#ifdef CONFIG_ZLIB
122 0e04e4e9 Fabrice Bellard
    av_register_image_format(&png_image_format);
123 3a13f6bd Zdenek Kabelac
#endif
124 0250738f Fabrice Bellard
    av_register_image_format(&jpeg_image_format);
125 9286699a Michael Niedermayer
#endif
126 568e18b1 Michael Niedermayer
    av_register_image_format(&gif_image_format);  
127
//    av_register_image_format(&sgi_image_format); heap corruption, dont enable
128 764ef400 Mike Melanson
#endif //CONFIG_ENCODERS
129 87a0a681 Fabrice Bellard
130 4624540b Fabrice Bellard
    /* file protocols */
131
    register_protocol(&file_protocol);
132
    register_protocol(&pipe_protocol);
133
#ifdef CONFIG_NETWORK
134
    rtsp_init();
135
    rtp_init();
136
    register_protocol(&udp_protocol);
137
    register_protocol(&rtp_protocol);
138
    register_protocol(&tcp_protocol);
139
    register_protocol(&http_protocol);
140
#endif
141
}