• 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 "avdevice.h"
00023 
00024 #define REGISTER_OUTDEV(X,x) { \
00025           extern AVOutputFormat ff_##x##_muxer; \
00026           if(CONFIG_##X##_OUTDEV)  av_register_output_format(&ff_##x##_muxer); }
00027 #define REGISTER_INDEV(X,x) { \
00028           extern AVInputFormat ff_##x##_demuxer; \
00029           if(CONFIG_##X##_INDEV)   av_register_input_format(&ff_##x##_demuxer); }
00030 #define REGISTER_INOUTDEV(X,x)  REGISTER_OUTDEV(X,x); REGISTER_INDEV(X,x)
00031 
00032 void avdevice_register_all(void)
00033 {
00034     static int initialized;
00035 
00036     if (initialized)
00037         return;
00038     initialized = 1;
00039 
00040     /* devices */
00041     REGISTER_INOUTDEV (ALSA, alsa);
00042     REGISTER_INDEV    (BKTR, bktr);
00043     REGISTER_INDEV    (DSHOW, dshow);
00044     REGISTER_INDEV    (DV1394, dv1394);
00045     REGISTER_INDEV    (FBDEV, fbdev);
00046     REGISTER_INDEV    (JACK, jack);
00047     REGISTER_INDEV    (LAVFI, lavfi);
00048     REGISTER_INDEV    (OPENAL, openal);
00049     REGISTER_INOUTDEV (OSS, oss);
00050     REGISTER_INDEV    (PULSE, pulse);
00051     REGISTER_OUTDEV   (SDL, sdl);
00052     REGISTER_INOUTDEV (SNDIO, sndio);
00053     REGISTER_INDEV    (V4L2, v4l2);
00054     REGISTER_INDEV    (V4L, v4l);
00055     REGISTER_INDEV    (VFWCAP, vfwcap);
00056     REGISTER_INDEV    (X11_GRAB_DEVICE, x11_grab_device);
00057 
00058     /* external libraries */
00059     REGISTER_INDEV    (LIBCDIO, libcdio);
00060     REGISTER_INDEV    (LIBDC1394, libdc1394);
00061 }
Generated on Fri Feb 1 2013 14:34:47 for FFmpeg by doxygen 1.7.1