• 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 #define REGISTER_OUTDEV(X,x) { \
00026           extern AVOutputFormat x##_muxer; \
00027           if(CONFIG_##X##_OUTDEV)  av_register_output_format(&x##_muxer); }
00028 #define REGISTER_INDEV(X,x) { \
00029           extern AVInputFormat x##_demuxer; \
00030           if(CONFIG_##X##_INDEV)   av_register_input_format(&x##_demuxer); }
00031 #define REGISTER_INOUTDEV(X,x)  REGISTER_OUTDEV(X,x); REGISTER_INDEV(X,x)
00032 
00033 void avdevice_register_all(void)
00034 {
00035     static int initialized;
00036 
00037     if (initialized)
00038         return;
00039     initialized = 1;
00040 
00041     /* devices */
00042     REGISTER_INOUTDEV (ALSA, alsa);
00043     REGISTER_INOUTDEV (AUDIO_BEOS, audio_beos);
00044     REGISTER_INDEV    (BKTR, bktr);
00045     REGISTER_INDEV    (DV1394, dv1394);
00046     REGISTER_INDEV    (JACK, jack);
00047     REGISTER_INOUTDEV (OSS, oss);
00048     REGISTER_INDEV    (V4L2, v4l2);
00049     REGISTER_INDEV    (V4L, v4l);
00050     REGISTER_INDEV    (VFWCAP, vfwcap);
00051     REGISTER_INDEV    (X11_GRAB_DEVICE, x11_grab_device);
00052 
00053     /* external libraries */
00054     REGISTER_INDEV    (LIBDC1394, libdc1394);
00055 }

Generated on Fri Sep 16 2011 17:17:47 for FFmpeg by  doxygen 1.7.1