Luca Abeni <[EMAIL PROTECTED]> added the comment:

Alsa support: patch for configure & build system

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue247>
______________________________________________________
Index: configure
===================================================================
--- configure   (revision 10929)
+++ configure   (working copy)
@@ -589,6 +589,7 @@
 
 COMPONENT_LIST="
     bsfs
+    audio_alsa
     decoders
     demuxers
     encoders
@@ -789,6 +790,10 @@
 
 # demuxers / muxers
 ac3_demuxer_deps="ac3_parser"
+audio_alsa_demuxer_deps="alsa/asoundlib_h"
+audio_alsa_muxer_extralibs="-lasound"
+audio_alsa_muxer_deps="alsa/asoundlib_h"
+audio_alsa_demuxer_extralibs="-lasound"
 audio_beos_demuxer_deps="audio_beos"
 audio_beos_demuxer_extralibs="-lmedia -lbe"
 audio_beos_muxer_deps="audio_beos"
@@ -1205,6 +1210,7 @@
   linux)
     LDLATEFLAGS="-Wl,--as-needed $LDLATEFLAGS"
     enable dv1394
+    enable audio_alsa
     ;;
   irix*)
     targetos=irix
@@ -1676,6 +1682,8 @@
 check_header sys/soundcard.h
 check_header soundcard.h
 
+enabled audio_alsa       && require libasound alsa/asoundlib.h snd_pcm_open 
-lasound
+
 # Deal with the x11 frame grabber
 enabled x11grab                         &&
 check_header X11/Xlib.h                 &&
Index: libavformat/Makefile
===================================================================
--- libavformat/Makefile        (revision 10929)
+++ libavformat/Makefile        (working copy)
@@ -156,6 +156,11 @@
 OBJS-$(CONFIG_YUV4MPEGPIPE_MUXER)        += yuv4mpeg.o
 OBJS-$(CONFIG_YUV4MPEGPIPE_DEMUXER)      += yuv4mpeg.o
 
+ifeq ($(CONFIG_AUDIO_ALSA),yes)
+OBJS-$(CONFIG_ALSA_DEMUXER)              += alsa-audio-common.o 
alsa-audio-dec.o
+OBJS-$(CONFIG_ALSA_MUXER)                += alsa-audio-common.o 
alsa-audio-enc.o
+endif
+
 # external libraries
 OBJS-$(CONFIG_LIBDC1394_DEMUXER)         += libdc1394.o
 OBJS-$(CONFIG_LIBNUT_DEMUXER)            += libnut.o riff.o
Index: libavformat/allformats.c
===================================================================
--- libavformat/allformats.c    (revision 10929)
+++ libavformat/allformats.c    (working copy)
@@ -53,6 +53,9 @@
     REGISTER_MUXDEMUX (AC3, ac3);
     REGISTER_MUXER    (ADTS, adts);
     REGISTER_MUXDEMUX (AIFF, aiff);
+#ifdef CONFIG_AUDIO_ALSA
+    REGISTER_MUXDEMUX(ALSA, alsa);
+#endif
     REGISTER_MUXDEMUX (AMR, amr);
     REGISTER_DEMUXER  (APC, apc);
     REGISTER_DEMUXER  (APE, ape);

Reply via email to