• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavdevice/alldevices.c

Go to the documentation of this file.
00001 /*
00002  * Register all the grabbing devices.
00003  *
00004  * This file is part of FFmpeg.
00005  *
00006  * FFmpeg is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * FFmpeg is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with FFmpeg; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00021 #include "config.h"
00022 #include "libavformat/avformat.h"
00023 #include "avdevice.h"
00024 
00025 unsigned avdevice_version(void)
00026 {
00027     return LIBAVDEVICE_VERSION_INT;
00028 }
00029 
00030 #define REGISTER_MUXER(X,x) { \
00031           extern AVOutputFormat x##_muxer; \
00032           if(CONFIG_##X##_MUXER)   av_register_output_format(&x##_muxer); }
00033 #define REGISTER_DEMUXER(X,x) { \
00034           extern AVInputFormat x##_demuxer; \
00035           if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
00036 #define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
00037 
00038 void avdevice_register_all(void)
00039 {
00040     static int initialized;
00041 
00042     if (initialized)
00043         return;
00044     initialized = 1;
00045 
00046     /* devices */
00047     REGISTER_MUXDEMUX (ALSA, alsa);
00048     REGISTER_MUXDEMUX (AUDIO_BEOS, audio_beos);
00049     REGISTER_DEMUXER  (BKTR, bktr);
00050     REGISTER_DEMUXER  (DV1394, dv1394);
00051     REGISTER_MUXDEMUX (OSS, oss);
00052     REGISTER_DEMUXER  (V4L2, v4l2);
00053     REGISTER_DEMUXER  (V4L, v4l);
00054     REGISTER_DEMUXER  (VFWCAP, vfwcap);
00055     REGISTER_DEMUXER  (X11_GRAB_DEVICE, x11_grab_device);
00056 
00057     /* external libraries */
00058     REGISTER_DEMUXER  (LIBDC1394, libdc1394);
00059 }

Generated on Sat Feb 16 2013 09:23:14 for ffmpeg by  doxygen 1.7.1