[Ffmpeg-devel] OpenBSD support

Jacob Meuser jakemsr
Mon May 9 12:23:37 CEST 2005


attached are some patches for OpenBSD for configure and
libavformat/audio.c.

-- 
<jakemsr at jakemsr.com>

-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
retrieving revision 1.175
diff -u -r1.175 configure
--- configure	8 May 2005 15:04:59 -0000	1.175
+++ configure	9 May 2005 09:11:59 -0000
@@ -254,6 +254,15 @@
 ;;
 esac
 ;;
+OpenBSD)
+v4l="no"
+audio_oss="yes"
+dv1394="no"
+make="gmake"
+CFLAGS="$CFLAGS \$(PIC)"
+LDFLAGS="$LDFLAGS -export-dynamic -pthread"
+extralibs="$extralibs -lossaudio"
+;;
 FreeBSD)
 v4l="no"
 audio_oss="yes"
@@ -1295,7 +1304,7 @@
   echo "HAVE_PTHREADS=yes" >> config.mak
   echo "#define HAVE_PTHREADS 1" >> $TMPH
   echo "#define HAVE_THREADS 1" >> $TMPH
-  if test $targetos != FreeBSD; then
+  if test $targetos != FreeBSD -a $targetos != OpenBSD ; then
      extralibs="$extralibs -lpthread"
   fi
 fi
Index: libavformat/audio.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/audio.c,v
retrieving revision 1.23
diff -u -r1.23 audio.c
--- libavformat/audio.c	19 Jun 2004 03:59:34 -0000	1.23
+++ libavformat/audio.c	9 May 2005 09:12:06 -0000
@@ -21,7 +21,11 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#ifdef __OpenBSD__
+#include <soundcard.h>
+#else
 #include <sys/soundcard.h>
+#endif
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -49,7 +53,11 @@
 
     /* open linux audio device */
     if (!audio_device)
+#ifdef __OpenBSD__
+	audio_device = "/dev/sound";
+#else
         audio_device = "/dev/dsp";
+#endif
 
     if (is_output)
         audio_fd = open(audio_device, O_WRONLY);



More information about the ffmpeg-devel mailing list