Make the configure script select the input/output devices using
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 29 Jun 2009 18:49:15 +0000 (18:49 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 29 Jun 2009 18:49:15 +0000 (18:49 +0000)
--enable-indev, --enable-outdev rather than --enable-demuxer,
--enable-muxer as before, same for disabling them.

Originally committed as revision 19293 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure
libavdevice/Makefile
libavdevice/alldevices.c
libavdevice/oss_audio.c
libavformat/Makefile

index 3eaa8f8..4a378ff 100755 (executable)
--- a/configure
+++ b/configure
@@ -131,6 +131,8 @@ show_help(){
   echo "  --enable-protocol=NAME   enable protocol NAME"
   echo "  --disable-protocol=NAME  disable protocol NAME"
   echo "  --disable-protocols      disable all protocols"
   echo "  --enable-protocol=NAME   enable protocol NAME"
   echo "  --disable-protocol=NAME  disable protocol NAME"
   echo "  --disable-protocols      disable all protocols"
+  echo "  --disable-indev=NAME     disable input device NAME"
+  echo "  --disable-outdev=NAME    disable output device NAME"
   echo "  --disable-indevs         disable input devices"
   echo "  --disable-outdevs        disable output devices"
   echo "  --disable-devices        disable all devices"
   echo "  --disable-indevs         disable input devices"
   echo "  --disable-outdevs        disable output devices"
   echo "  --disable-devices        disable all devices"
@@ -1141,38 +1143,38 @@ libxvid_encoder_deps="libxvid"
 
 # demuxers / muxers
 ac3_demuxer_deps="ac3_parser"
 
 # demuxers / muxers
 ac3_demuxer_deps="ac3_parser"
-alsa_demuxer_deps="alsa_asoundlib_h snd_pcm_htimestamp"
-alsa_demuxer_extralibs="-lasound"
-alsa_muxer_deps="alsa_asoundlib_h"
-alsa_muxer_extralibs="-lasound"
-audio_beos_demuxer_deps="audio_beos"
-audio_beos_demuxer_extralibs="-lmedia -lbe"
-audio_beos_muxer_deps="audio_beos"
-audio_beos_muxer_extralibs="-lmedia -lbe"
+alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
+alsa_indev_extralibs="-lasound"
+alsa_outdev_deps="alsa_asoundlib_h"
+alsa_outdev_extralibs="-lasound"
+audio_beos_indev_deps="audio_beos"
+audio_beos_indev_extralibs="-lmedia -lbe"
+audio_beos_outdev_deps="audio_beos"
+audio_beos_outdev_extralibs="-lmedia -lbe"
 avisynth_demuxer_deps="avisynth"
 avisynth_demuxer_deps="avisynth"
-bktr_demuxer_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
+bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
 dirac_demuxer_deps="dirac_parser"
 dirac_demuxer_deps="dirac_parser"
-dv1394_demuxer_deps="dv1394 dv_demuxer"
-jack_demuxer_deps="jack_jack_h"
-jack_demuxer_extralibs="-ljack"
-libdc1394_demuxer_deps="libdc1394"
+dv1394_indev_deps="dv1394 dv_demuxer"
+jack_indev_deps="jack_jack_h"
+jack_indev_extralibs="-ljack"
+libdc1394_indev_deps="libdc1394"
 libnut_demuxer_deps="libnut"
 libnut_muxer_deps="libnut"
 matroska_demuxer_suggest="zlib bzlib"
 mov_demuxer_suggest="zlib"
 mp3_demuxer_deps="mpegaudio_parser"
 libnut_demuxer_deps="libnut"
 libnut_muxer_deps="libnut"
 matroska_demuxer_suggest="zlib bzlib"
 mov_demuxer_suggest="zlib"
 mp3_demuxer_deps="mpegaudio_parser"
-oss_demuxer_deps_any="soundcard_h sys_soundcard_h"
-oss_muxer_deps_any="soundcard_h sys_soundcard_h"
+oss_indev_deps_any="soundcard_h sys_soundcard_h"
+oss_outdev_deps_any="soundcard_h sys_soundcard_h"
 redir_demuxer_deps="network"
 rtp_muxer_deps="network rtp_protocol"
 rtsp_demuxer_deps="sdp_demuxer"
 sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
 redir_demuxer_deps="network"
 rtp_muxer_deps="network rtp_protocol"
 rtsp_demuxer_deps="sdp_demuxer"
 sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
-v4l_demuxer_deps="linux_videodev_h"
-v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h"
-vfwcap_demuxer_deps="capCreateCaptureWindow"
-vfwcap_demuxer_extralibs="-lvfw32"
-x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
-x11_grab_device_demuxer_extralibs="-lX11 -lXext"
+v4l_indev_deps="linux_videodev_h"
+v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
+vfwcap_indev_deps="capCreateCaptureWindow"
+vfwcap_indev_extralibs="-lvfw32"
+x11_grab_device_indev_deps="x11grab XShmCreateImage"
+x11_grab_device_indev_extralibs="-lX11 -lXext"
 
 # protocols
 gopher_protocol_deps="network"
 
 # protocols
 gopher_protocol_deps="network"
@@ -1296,8 +1298,8 @@ PARSER_LIST=$(find_things   parser   PARSER   libavcodec/allcodecs.c)
 BSF_LIST=$(find_things      bsf      BSF      libavcodec/allcodecs.c)
 MUXER_LIST=$(find_things    muxer    _MUX     libavformat/allformats.c)
 DEMUXER_LIST=$(find_things  demuxer  DEMUX    libavformat/allformats.c)
 BSF_LIST=$(find_things      bsf      BSF      libavcodec/allcodecs.c)
 MUXER_LIST=$(find_things    muxer    _MUX     libavformat/allformats.c)
 DEMUXER_LIST=$(find_things  demuxer  DEMUX    libavformat/allformats.c)
-OUTDEV_LIST=$(find_things   muxer    _MUX     libavdevice/alldevices.c)
-INDEV_LIST=$(find_things    demuxer  DEMUX    libavdevice/alldevices.c)
+OUTDEV_LIST=$(find_things   outdev   OUTDEV   libavdevice/alldevices.c)
+INDEV_LIST=$(find_things    indev    _IN      libavdevice/alldevices.c)
 PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
 FILTER_LIST=$(find_things   filter   FILTER   libavfilter/allfilters.c)
 
 PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
 FILTER_LIST=$(find_things   filter   FILTER   libavfilter/allfilters.c)
 
@@ -1343,7 +1345,7 @@ for opt do
     --enable-*=*|--disable-*=*)
     eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
     case "$thing" in
     --enable-*=*|--disable-*=*)
     eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
     case "$thing" in
-        encoder|decoder|hwaccel|muxer|demuxer|parser|bsf|protocol|filter) $action ${optval}_${thing} ;;
+        encoder|decoder|hwaccel|muxer|demuxer|indev|outdev|parser|bsf|protocol|filter) $action ${optval}_${thing} ;;
         *) die_unknown "$opt" ;;
     esac
     ;;
         *) die_unknown "$opt" ;;
     esac
     ;;
index b769d16..75607aa 100644 (file)
@@ -8,22 +8,22 @@ HEADERS = avdevice.h
 OBJS    = alldevices.o
 
 # input/output devices
 OBJS    = alldevices.o
 
 # input/output devices
-OBJS-$(CONFIG_ALSA_DEMUXER)              += alsa-audio-common.o alsa-audio-dec.o
-OBJS-$(CONFIG_ALSA_MUXER)                += alsa-audio-common.o alsa-audio-enc.o
-OBJS-$(CONFIG_BKTR_DEMUXER)              += bktr.o
-OBJS-$(CONFIG_DV1394_DEMUXER)            += dv1394.o
-OBJS-$(CONFIG_JACK_DEMUXER)              += jack_audio.o
-OBJS-$(CONFIG_OSS_DEMUXER)               += oss_audio.o
-OBJS-$(CONFIG_OSS_MUXER)                 += oss_audio.o
-OBJS-$(CONFIG_V4L2_DEMUXER)              += v4l2.o
-OBJS-$(CONFIG_V4L_DEMUXER)               += v4l.o
-OBJS-$(CONFIG_VFWCAP_DEMUXER)            += vfwcap.o
-OBJS-$(CONFIG_X11_GRAB_DEVICE_DEMUXER)   += x11grab.o
+OBJS-$(CONFIG_ALSA_INDEV)                += alsa-audio-common.o alsa-audio-dec.o
+OBJS-$(CONFIG_ALSA_OUTDEV)               += alsa-audio-common.o alsa-audio-enc.o
+OBJS-$(CONFIG_BKTR_INDEV)                += bktr.o
+OBJS-$(CONFIG_DV1394_INDEV)              += dv1394.o
+OBJS-$(CONFIG_JACK_INDEV)                += jack_audio.o
+OBJS-$(CONFIG_OSS_INDEV)                 += oss_audio.o
+OBJS-$(CONFIG_OSS_OUTDEV)                += oss_audio.o
+OBJS-$(CONFIG_V4L2_INDEV)                += v4l2.o
+OBJS-$(CONFIG_V4L_INDEV)                 += v4l.o
+OBJS-$(CONFIG_VFWCAP_INDEV)              += vfwcap.o
+OBJS-$(CONFIG_X11_GRAB_DEVICE_INDEV)     += x11grab.o
 
 # external libraries
 
 # external libraries
-OBJS-$(CONFIG_LIBDC1394_DEMUXER)         += libdc1394.o
+OBJS-$(CONFIG_LIBDC1394_INDEV)           += libdc1394.o
 
 
-OBJS-$(CONFIG_AUDIO_BEOS_DEMUXER)        += beosaudio.o
-OBJS-$(CONFIG_AUDIO_BEOS_MUXER)          += beosaudio.o
+OBJS-$(CONFIG_AUDIO_BEOS_INDEV)          += beosaudio.o
+OBJS-$(CONFIG_AUDIO_BEOS_OUTDEV)         += beosaudio.o
 
 include $(SUBDIR)../subdir.mak
 
 include $(SUBDIR)../subdir.mak
index 7efc42a..1947eee 100644 (file)
@@ -27,13 +27,13 @@ unsigned avdevice_version(void)
     return LIBAVDEVICE_VERSION_INT;
 }
 
     return LIBAVDEVICE_VERSION_INT;
 }
 
-#define REGISTER_MUXER(X,x) { \
+#define REGISTER_OUTDEV(X,x) { \
           extern AVOutputFormat x##_muxer; \
           extern AVOutputFormat x##_muxer; \
-          if(CONFIG_##X##_MUXER)   av_register_output_format(&x##_muxer); }
-#define REGISTER_DEMUXER(X,x) { \
+          if(CONFIG_##X##_OUTDEV)  av_register_output_format(&x##_muxer); }
+#define REGISTER_INDEV(X,x) { \
           extern AVInputFormat x##_demuxer; \
           extern AVInputFormat x##_demuxer; \
-          if(CONFIG_##X##_DEMUXER) av_register_input_format(&x##_demuxer); }
-#define REGISTER_MUXDEMUX(X,x)  REGISTER_MUXER(X,x); REGISTER_DEMUXER(X,x)
+          if(CONFIG_##X##_INDEV)   av_register_input_format(&x##_demuxer); }
+#define REGISTER_INOUTDEV(X,x)  REGISTER_OUTDEV(X,x); REGISTER_INDEV(X,x)
 
 void avdevice_register_all(void)
 {
 
 void avdevice_register_all(void)
 {
@@ -44,17 +44,17 @@ void avdevice_register_all(void)
     initialized = 1;
 
     /* devices */
     initialized = 1;
 
     /* devices */
-    REGISTER_MUXDEMUX (ALSA, alsa);
-    REGISTER_MUXDEMUX (AUDIO_BEOS, audio_beos);
-    REGISTER_DEMUXER  (BKTR, bktr);
-    REGISTER_DEMUXER  (DV1394, dv1394);
-    REGISTER_DEMUXER  (JACK, jack);
-    REGISTER_MUXDEMUX (OSS, oss);
-    REGISTER_DEMUXER  (V4L2, v4l2);
-    REGISTER_DEMUXER  (V4L, v4l);
-    REGISTER_DEMUXER  (VFWCAP, vfwcap);
-    REGISTER_DEMUXER  (X11_GRAB_DEVICE, x11_grab_device);
+    REGISTER_INOUTDEV (ALSA, alsa);
+    REGISTER_INOUTDEV (AUDIO_BEOS, audio_beos);
+    REGISTER_INDEV    (BKTR, bktr);
+    REGISTER_INDEV    (DV1394, dv1394);
+    REGISTER_INDEV    (JACK, jack);
+    REGISTER_INOUTDEV (OSS, oss);
+    REGISTER_INDEV    (V4L2, v4l2);
+    REGISTER_INDEV    (V4L, v4l);
+    REGISTER_INDEV    (VFWCAP, vfwcap);
+    REGISTER_INDEV    (X11_GRAB_DEVICE, x11_grab_device);
 
     /* external libraries */
 
     /* external libraries */
-    REGISTER_DEMUXER  (LIBDC1394, libdc1394);
+    REGISTER_INDEV    (LIBDC1394, libdc1394);
 }
 }
index 8f3e678..a89c39a 100644 (file)
@@ -312,7 +312,7 @@ static int audio_read_close(AVFormatContext *s1)
     return 0;
 }
 
     return 0;
 }
 
-#if CONFIG_OSS_DEMUXER
+#if CONFIG_OSS_INDEV
 AVInputFormat oss_demuxer = {
     "oss",
     NULL_IF_CONFIG_SMALL("Open Sound System capture"),
 AVInputFormat oss_demuxer = {
     "oss",
     NULL_IF_CONFIG_SMALL("Open Sound System capture"),
@@ -325,7 +325,7 @@ AVInputFormat oss_demuxer = {
 };
 #endif
 
 };
 #endif
 
-#if CONFIG_OSS_MUXER
+#if CONFIG_OSS_OUTDEV
 AVOutputFormat oss_muxer = {
     "oss",
     NULL_IF_CONFIG_SMALL("Open Sound System playback"),
 AVOutputFormat oss_muxer = {
     "oss",
     NULL_IF_CONFIG_SMALL("Open Sound System playback"),
index 8973bef..8e8a869 100644 (file)
@@ -251,7 +251,7 @@ OBJS-$(CONFIG_TCP_PROTOCOL)              += tcp.o
 OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
 
 # libavdevice dependencies
 OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
 
 # libavdevice dependencies
-OBJS-$(CONFIG_JACK_DEMUXER)              += timefilter.o
+OBJS-$(CONFIG_JACK_INDEV)                += timefilter.o
 
 EXAMPLES  = output
 TESTPROGS = timefilter
 
 EXAMPLES  = output
 TESTPROGS = timefilter