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
 
c73c87b4
 #define REGISTER_OUTDEV(X, x)                                           \
     {                                                                   \
         extern AVOutputFormat ff_##x##_muxer;                           \
         if (CONFIG_##X##_OUTDEV)                                        \
             av_register_output_format(&ff_##x##_muxer);                 \
     }
 
 #define REGISTER_INDEV(X, x)                                            \
     {                                                                   \
         extern AVInputFormat ff_##x##_demuxer;                          \
         if (CONFIG_##X##_INDEV)                                         \
             av_register_input_format(&ff_##x##_demuxer);                \
     }
 
613001d7
 #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 */
c73c87b4
     REGISTER_INOUTDEV(ALSA,             alsa);
d2417061
     REGISTER_INDEV   (AVFOUNDATION,     avfoundation);
c73c87b4
     REGISTER_INDEV   (BKTR,             bktr);
83d4a844
     REGISTER_OUTDEV  (CACA,             caca);
bac6cfcb
     REGISTER_INOUTDEV(DECKLINK,         decklink);
83d4a844
     REGISTER_INDEV   (DSHOW,            dshow);
c73c87b4
     REGISTER_INDEV   (DV1394,           dv1394);
759388aa
     REGISTER_INOUTDEV(FBDEV,            fbdev);
08909fb5
     REGISTER_INDEV   (GDIGRAB,          gdigrab);
83d4a844
     REGISTER_INDEV   (IEC61883,         iec61883);
c73c87b4
     REGISTER_INDEV   (JACK,             jack);
83d4a844
     REGISTER_INDEV   (LAVFI,            lavfi);
     REGISTER_INDEV   (OPENAL,           openal);
ded6b3af
     REGISTER_OUTDEV  (OPENGL,           opengl);
c73c87b4
     REGISTER_INOUTDEV(OSS,              oss);
361b56c3
     REGISTER_INOUTDEV(PULSE,            pulse);
234f0bcb
     REGISTER_INDEV   (QTKIT,            qtkit);
83d4a844
     REGISTER_OUTDEV  (SDL,              sdl);
c73c87b4
     REGISTER_INOUTDEV(SNDIO,            sndio);
16a75eaa
     REGISTER_INOUTDEV(V4L2,             v4l2);
83d4a844
 //    REGISTER_INDEV   (V4L,              v4l
c73c87b4
     REGISTER_INDEV   (VFWCAP,           vfwcap);
     REGISTER_INDEV   (X11GRAB,          x11grab);
a6674d2e
     REGISTER_INDEV   (X11GRAB_XCB,      x11grab_xcb);
9f8937b5
     REGISTER_OUTDEV  (XV,               xv);
c721d803
 
     /* external libraries */
c73c87b4
     REGISTER_INDEV   (LIBCDIO,          libcdio);
     REGISTER_INDEV   (LIBDC1394,        libdc1394);
c721d803
 }