Libav 0.7.1
|
00001 /* 00002 * Register all the grabbing devices. 00003 * 00004 * This file is part of Libav. 00005 * 00006 * Libav 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 * Libav 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 Libav; 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 ff_##x##_muxer; \ 00027 if(CONFIG_##X##_OUTDEV) av_register_output_format(&ff_##x##_muxer); } 00028 #define REGISTER_INDEV(X,x) { \ 00029 extern AVInputFormat ff_##x##_demuxer; \ 00030 if(CONFIG_##X##_INDEV) av_register_input_format(&ff_##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_INDEV (BKTR, bktr); 00044 REGISTER_INDEV (DV1394, dv1394); 00045 REGISTER_INDEV (FBDEV, fbdev); 00046 REGISTER_INDEV (JACK, jack); 00047 REGISTER_INOUTDEV (OSS, oss); 00048 REGISTER_INOUTDEV (SNDIO, sndio); 00049 REGISTER_INDEV (V4L2, v4l2); 00050 #if FF_API_V4L 00051 REGISTER_INDEV (V4L, v4l); 00052 #endif 00053 REGISTER_INDEV (VFWCAP, vfwcap); 00054 REGISTER_INDEV (X11_GRAB_DEVICE, x11_grab_device); 00055 00056 /* external libraries */ 00057 REGISTER_INDEV (LIBDC1394, libdc1394); 00058 }