libavdevice/alldevices.c
c721d803
 /*
  * Register all the grabbing devices.
  *
  * This file is part of FFmpeg.
  *
  * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
  * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
245976da
 
1f944923
 #include "config.h"
c26e58e3
 #include "avdevice.h"
c721d803
 
38e54a75
 #define REGISTER_OUTDEV(X,x) { \
66355be3
           extern AVOutputFormat ff_##x##_muxer; \
           if(CONFIG_##X##_OUTDEV)  av_register_output_format(&ff_##x##_muxer); }
38e54a75
 #define REGISTER_INDEV(X,x) { \
66355be3
           extern AVInputFormat ff_##x##_demuxer; \
           if(CONFIG_##X##_INDEV)   av_register_input_format(&ff_##x##_demuxer); }
38e54a75
 #define REGISTER_INOUTDEV(X,x)  REGISTER_OUTDEV(X,x); REGISTER_INDEV(X,x)
c721d803
 
 void avdevice_register_all(void)
 {
5e534865
     static int initialized;
c721d803
 
5e534865
     if (initialized)
c721d803
         return;
5e534865
     initialized = 1;
c721d803
 
     /* devices */
38e54a75
     REGISTER_INOUTDEV (ALSA, alsa);
     REGISTER_INDEV    (BKTR, bktr);
95eb2e3a
     REGISTER_INDEV    (DSHOW, dshow);
38e54a75
     REGISTER_INDEV    (DV1394, dv1394);
1a204f07
     REGISTER_INDEV    (FBDEV, fbdev);
38e54a75
     REGISTER_INDEV    (JACK, jack);
     REGISTER_INOUTDEV (OSS, oss);
b2a6f25c
     REGISTER_OUTDEV   (SDL, sdl);
15d59d2c
     REGISTER_INOUTDEV (SNDIO, sndio);
38e54a75
     REGISTER_INDEV    (V4L2, v4l2);
aaea1490
 #if FF_API_V4L
38e54a75
     REGISTER_INDEV    (V4L, v4l);
aaea1490
 #endif
38e54a75
     REGISTER_INDEV    (VFWCAP, vfwcap);
     REGISTER_INDEV    (X11_GRAB_DEVICE, x11_grab_device);
c721d803
 
     /* external libraries */
38e54a75
     REGISTER_INDEV    (LIBDC1394, libdc1394);
c721d803
 }