]> git.sesse.net Git - vlc/blob - modules/demux/avformat/avformat.c
avformat demux: AVFormatContext->nb_streams == 0 is valid
[vlc] / modules / demux / avformat / avformat.c
1 /*****************************************************************************
2  * avformat.c: demuxer and muxer using libavformat library
3  *****************************************************************************
4  * Copyright (C) 1999-2008 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *          Gildas Bazin <gbazin@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef MERGE_FFMPEG
26 #ifdef HAVE_CONFIG_H
27 # include "config.h"
28 #endif
29
30 #include <vlc_common.h>
31 #include <vlc_plugin.h>
32
33 #include "avformat.h"
34 #include "../../codec/avcodec/avcommon.h"
35
36 vlc_module_begin ()
37 #endif /* MERGE_FFMPEG */
38     add_shortcut( "ffmpeg", "avformat" )
39     set_category( CAT_INPUT )
40     set_subcategory( SUBCAT_INPUT_DEMUX )
41     set_description( N_("Avformat demuxer" ) )
42     set_shortname( N_("Avformat") )
43     set_capability( "demux", 2 )
44     set_callbacks( OpenDemux, CloseDemux )
45     add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT, true )
46     add_obsolete_string("ffmpeg-format") /* removed since 2.1.0 */
47 #if LIBAVFORMAT_VERSION_INT >= ((53<<16)+(26<<8)+0)
48     add_string( "avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
49 #endif
50
51 #ifdef ENABLE_SOUT
52     /* mux submodule */
53     add_submodule ()
54     add_shortcut( "ffmpeg", "avformat" )
55     set_description( N_("Avformat muxer" ) )
56     set_capability( "sout mux", 2 )
57     add_string( "sout-avformat-mux", NULL, MUX_TEXT, MUX_LONGTEXT, true )
58     add_obsolete_string("ffmpeg-mux") /* removed since 2.1.0 */
59 #if (LIBAVFORMAT_VERSION_INT >= ((53<<16)+(2<<8)+0))
60     add_string( "sout-avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
61 #endif
62     set_callbacks( OpenMux, CloseMux )
63 #endif
64 #ifndef MERGE_FFMPEG
65 vlc_module_end ()
66 #endif