Commit 5a64fbd7 authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/audio_output/oss.c: we spare a variable by using p_aout->b_die

    instead of our own variable.
  * ./modules/audio_filter/converter/a52tospdif.c, ./modules/codec/a52.c: added
    <unistd.h>, required for bswap.
  * ./modules/demux/mp4/libmp4.c: removed an unneccessary semicolon in a
    macro definition.
  * ./modules/audio_output/esd.c: first attempt at getting esd to work.
  * ./modules/video_output/*: split sdl.so into a video and an audio plugin,
    and removed useless subdirectories.
  * ./modules/audio_output/sdl.c: compilation fix.
parent f1d40d7e
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1331,7 +1331,7 @@ then ...@@ -1331,7 +1331,7 @@ then
fi fi
if test "x${SDL_CONFIG}" != "xno" if test "x${SDL_CONFIG}" != "xno"
then then
PLUGINS="${PLUGINS} video_output/sdl/sdl" PLUGINS="${PLUGINS} video_output/sdl audio_output/sdl"
sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`" sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`" sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}" CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
...@@ -1396,7 +1396,7 @@ AC_ARG_ENABLE(fb, ...@@ -1396,7 +1396,7 @@ AC_ARG_ENABLE(fb,
if test "x${enable_fb}" != "xno" if test "x${enable_fb}" != "xno"
then then
AC_CHECK_HEADERS(linux/fb.h, [ AC_CHECK_HEADERS(linux/fb.h, [
PLUGINS="${PLUGINS} video_output/fb/fb" PLUGINS="${PLUGINS} video_output/fb"
]) ])
fi fi
...@@ -1417,7 +1417,7 @@ AC_ARG_ENABLE(ggi, ...@@ -1417,7 +1417,7 @@ AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI support (default disabled)]) [ --enable-ggi GGI support (default disabled)])
if test "x${enable_ggi}" = "xyes" if test "x${enable_ggi}" = "xyes"
then then
PLUGINS="${PLUGINS} video_output/ggi/ggi" PLUGINS="${PLUGINS} video_output/ggi"
ggi_LDFLAGS="${ggi_LDFLAGS} -lggi" ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
AC_ARG_WITH(ggi, AC_ARG_WITH(ggi,
[ --with-ggi=PATH path to libggi], [ --with-ggi=PATH path to libggi],
...@@ -1435,7 +1435,7 @@ AC_ARG_ENABLE(glide, ...@@ -1435,7 +1435,7 @@ AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) support (default disabled)]) [ --enable-glide Glide (3dfx) support (default disabled)])
if test "x${enable_glide}" = "xyes" if test "x${enable_glide}" = "xyes"
then then
PLUGINS="${PLUGINS} video_output/glide/glide" PLUGINS="${PLUGINS} video_output/glide"
glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm" glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide" glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
AC_ARG_WITH(glide, AC_ARG_WITH(glide,
...@@ -1457,7 +1457,7 @@ then ...@@ -1457,7 +1457,7 @@ then
AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false") AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
if test "x${have_aa}" = "xtrue" if test "x${have_aa}" = "xtrue"
then then
PLUGINS="${PLUGINS} video_output/aa/aa" PLUGINS="${PLUGINS} video_output/aa"
aa_LDFLAGS="${aa_LDFLAGS} -laa" aa_LDFLAGS="${aa_LDFLAGS} -laa"
fi fi
fi fi
......
...@@ -214,3 +214,11 @@ the Boston strangler is to the woman home alone. ...@@ -214,3 +214,11 @@ the Boston strangler is to the woman home alone.
-- #videolan -- #videolan
% %
<zBen_home> mais truc[tres_grand] sur la pile ca me parait idiot :)
<tooney> zBen_home - ou mais c'est truc[tout_petit] donc ca va
<zBen_home> ah vi alors ca va
<zBen_home> parceque meuh donnait un example avec un entier assez costaud
<tooney> c'est parce qu'il etait pas content
-- #videolan
%
/* include/defs.h.in. Generated from configure.in by autoheader. */ /* include/defs.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Maximum supported data alignment */ /* Define if using alloca.c. */
#undef ATTRIBUTE_ALIGNED_MAX
/* Define if $CC groks 3D Now! inline assembly. */
#undef CAN_COMPILE_3DNOW
/* Define if $CC groks AltiVec inline assembly. */
#undef CAN_COMPILE_ALTIVEC
/* Define if your compiler groks C AltiVec extensions. */
#undef CAN_COMPILE_C_ALTIVEC
/* Define if $CC groks SSE inline assembly. */
#undef CAN_COMPILE_SSE
/* The ./configure command line */
#undef CONFIGURE_LINE
/* Copyright string */
#undef COPYRIGHT_MESSAGE
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA #undef C_ALLOCA
/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */ /* Define to empty if the keyword does not work. */
#undef DPMSINFO_IN_DPMS_H #undef const
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have the <a52dec/a52.h> header file. */ /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
#undef HAVE_A52DEC_A52_H This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define to 1 if you have `alloca', as a function or macro. */ /* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA #undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix). /* Define if you have <alloca.h> and it should be used (not on Ultrix). */
*/
#undef HAVE_ALLOCA_H #undef HAVE_ALLOCA_H
/* Define to 1 if you have the <argz.h> header file. */ /* Define if you have a working `mmap' system call. */
#undef HAVE_ARGZ_H #undef HAVE_MMAP
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `atoll' function. */
#undef HAVE_ATOLL
/* Define to 1 if you have the <Cocoa/Cocoa.h> header file. */ /* Define as __inline if that's what the C compiler calls it. */
#undef HAVE_COCOA_COCOA_H #undef inline
/* Define to 1 if you have the <cthreads.h> header file. */ /* Define to `long' if <sys/types.h> doesn't define. */
#undef HAVE_CTHREADS_H #undef off_t
/* Define to 1 if you have the `dcgettext' function. */ /* Define as the return type of signal handlers (int or void). */
#undef HAVE_DCGETTEXT #undef RETSIGTYPE
/* Define to 1 if you have the <ddraw.h> header file. */ /* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef HAVE_DDRAW_H #undef size_t
/* Define if <time.h> defines nanosleep. */ /* If using the C implementation of alloca, define if you know the
#undef HAVE_DECL_NANOSLEEP direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define if you have the ANSI C header files. */
#undef HAVE_DLFCN_H #undef STDC_HEADERS
/* Define to 1 if you have the <dvbpsi/dr.h> header file. */ /* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef HAVE_DVBPSI_DR_H #undef TIME_WITH_SYS_TIME
/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */ /* Define if you have the __argz_count function. */
#undef HAVE_DVDCSS_DVDCSS_H #undef HAVE___ARGZ_COUNT
/* Define to 1 if you have the <dvdplay/dvdplay.h> header file. */ /* Define if you have the __argz_next function. */
#undef HAVE_DVDPLAY_DVDPLAY_H #undef HAVE___ARGZ_NEXT
/* Define to 1 if you have the <dvdread/dvd_reader.h> header file. */ /* Define if you have the __argz_stringify function. */
#undef HAVE_DVDREAD_DVD_READER_H #undef HAVE___ARGZ_STRINGIFY
/* Define to 1 if you have the <faad.h> header file. */ /* Define if you have the atoll function. */
#undef HAVE_FAAD_H #undef HAVE_ATOLL
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define if you have the dcgettext function. */
#undef HAVE_FCNTL_H #undef HAVE_DCGETTEXT
/* Define to 1 if you have the `feof_unlocked' function. */ /* Define if you have the feof_unlocked function. */
#undef HAVE_FEOF_UNLOCKED #undef HAVE_FEOF_UNLOCKED
/* Define to 1 if you have the `fgets_unlocked' function. */ /* Define if you have the fgets_unlocked function. */
#undef HAVE_FGETS_UNLOCKED #undef HAVE_FGETS_UNLOCKED
/* Define to 1 if you have the <gdk/gdk.h> header file. */ /* Define if you have the getcwd function. */
#undef HAVE_GDK_GDK_H
/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD #undef HAVE_GETCWD
/* Define to 1 if you have the `getegid' function. */ /* Define if you have the getegid function. */
#undef HAVE_GETEGID #undef HAVE_GETEGID
/* Define to 1 if you have the `geteuid' function. */ /* Define if you have the geteuid function. */
#undef HAVE_GETEUID #undef HAVE_GETEUID
/* Define to 1 if you have the `getgid' function. */ /* Define if you have the getgid function. */
#undef HAVE_GETGID #undef HAVE_GETGID
/* Define to 1 if you have the `gethostbyname2' function. */ /* Define if you have the gethostbyname2 function. */
#undef HAVE_GETHOSTBYNAME2 #undef HAVE_GETHOSTBYNAME2
/* Define to 1 if you have the <getopt.h> header file. */ /* Define if you have the getpagesize function. */
#undef HAVE_GETOPT_H
/* getopt support */
#undef HAVE_GETOPT_LONG
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE #undef HAVE_GETPAGESIZE
/* Define to 1 if you have the `getpwuid' function. */ /* Define if you have the getpwuid function. */
#undef HAVE_GETPWUID #undef HAVE_GETPWUID
/* Define if the GNU gettext() function is already present or preinstalled. */ /* Define if you have the gettimeofday function. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY #undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `getuid' function. */ /* Define if you have the getuid function. */
#undef HAVE_GETUID #undef HAVE_GETUID
/* Define to 1 if you have the <glib.h> header file. */ /* Define if you have the isatty function. */
#undef HAVE_GLIB_H #undef HAVE_ISATTY
/* Define to 1 if you have the <gnome.h> header file. */ /* Define if you have the memalign function. */
#undef HAVE_GNOME_H #undef HAVE_MEMALIGN
/* Define to 1 if you have the <gtk/gtk.h> header file. */ /* Define if you have the mempcpy function. */
#undef HAVE_GTK_GTK_H #undef HAVE_MEMPCPY
/* Define if you have the iconv() function. */ /* Define if you have the munmap function. */
#undef HAVE_ICONV #undef HAVE_MUNMAP
/* Define to 1 if you have the <image.h> header file. */ /* Define if you have the posix_memalign function. */
#undef HAVE_IMAGE_H #undef HAVE_POSIX_MEMALIGN
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define if you have the putenv function. */
#undef HAVE_INTTYPES_H #undef HAVE_PUTENV
/* For FreeBSD VCD support */ /* Define if you have the select function. */
#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H #undef HAVE_SELECT
/* Define to 1 if you have the `isatty' function. */ /* Define if you have the setenv function. */
#undef HAVE_ISATTY #undef HAVE_SETENV
/* Define to 1 if you have the <kernel/OS.h> header file. */ /* Define if you have the setlocale function. */
#undef HAVE_KERNEL_OS_H #undef HAVE_SETLOCALE
/* Define to 1 if you have the <kernel/scheduler.h> header file. */ /* Define if you have the sigrelse function. */
#undef HAVE_KERNEL_SCHEDULER_H #undef HAVE_SIGRELSE
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ /* Define if you have the stpcpy function. */
#undef HAVE_LANGINFO_CODESET #undef HAVE_STPCPY
/* Define if your <locale.h> file defines LC_MESSAGES. */ /* Define if you have the strcasecmp function. */
#undef HAVE_LC_MESSAGES #undef HAVE_STRCASECMP
/* Define to 1 if you have the <libdv/dv.h> header file. */ /* Define if you have the strchr function. */
#undef HAVE_LIBDV_DV_H #undef HAVE_STRCHR
/* Define to 1 if you have the `pth' library (-lpth). */ /* Define if you have the strdup function. */
#undef HAVE_LIBPTH #undef HAVE_STRDUP
/* Define to 1 if you have the `st' library (-lst). */ /* Define if you have the strerror function. */
#undef HAVE_LIBST #undef HAVE_STRERROR
/* Define to 1 if you have the <libv4l/v4l.h> header file. */ /* Define if you have the strndup function. */
#undef HAVE_LIBV4L_V4L_H #undef HAVE_STRNDUP
/* Define to 1 if you have the <limits.h> header file. */ /* Define if you have the strtod function. */
#undef HAVE_LIMITS_H #undef HAVE_STRTOD
/* Define to 1 if you have the <linux/fb.h> header file. */ /* Define if you have the strtol function. */
#undef HAVE_LINUX_FB_H #undef HAVE_STRTOL
/* Define to 1 if you have the <linux/version.h> header file. */ /* Define if you have the strtoul function. */
#undef HAVE_LINUX_VERSION_H #undef HAVE_STRTOUL
/* Define to 1 if you have the <locale.h> header file. */ /* Define if you have the swab function. */
#undef HAVE_LOCALE_H #undef HAVE_SWAB
/* Define to 1 if you have the <machine/param.h> header file. */ /* Define if you have the tsearch function. */
#undef HAVE_MACHINE_PARAM_H #undef HAVE_TSEARCH
/* Define to 1 if you have the <machine/soundcard.h> header file. */ /* Define if you have the vasprintf function. */
#undef HAVE_MACHINE_SOUNDCARD_H #undef HAVE_VASPRINTF
/* Define to 1 if you have the <mad.h> header file. */ /* Define if you have the <Cocoa/Cocoa.h> header file. */
#undef HAVE_MAD_H #undef HAVE_COCOA_COCOA_H
/* Define to 1 if you have the <malloc.h> header file. */ /* Define if you have the <Ph.h> header file. */
#undef HAVE_MALLOC_H #undef HAVE_PH_H
/* Define to 1 if you have the `memalign' function. */ /* Define if you have the <X11/Xlib.h> header file. */
#undef HAVE_MEMALIGN #undef HAVE_X11_XLIB_H
/* Define to 1 if you have the <memory.h> header file. */ /* Define if you have the <X11/extensions/Xv.h> header file. */
#undef HAVE_MEMORY_H #undef HAVE_X11_EXTENSIONS_XV_H
/* Define to 1 if you have the `mempcpy' function. */ /* Define if you have the <X11/extensions/dpms.h> header file. */
#undef HAVE_MEMPCPY #undef HAVE_X11_EXTENSIONS_DPMS_H
/* Define to 1 if you have a working `mmap' system call. */ /* Define if you have the <a52dec/a52.h> header file. */
#undef HAVE_MMAP #undef HAVE_A52DEC_A52_H
/* Define to 1 if you have the `munmap' function. */ /* Define if you have the <argz.h> header file. */
#undef HAVE_MUNMAP #undef HAVE_ARGZ_H
/* Define if nanosleep is available. */ /* Define if you have the <arpa/inet.h> header file. */
#undef HAVE_NANOSLEEP #undef HAVE_ARPA_INET_H
/* Define to 1 if you have the <netinet/in.h> header file. */ /* Define if you have the <cthreads.h> header file. */
#undef HAVE_NETINET_IN_H #undef HAVE_CTHREADS_H
/* Define to 1 if you have the <net/if.h> header file. */ /* Define if you have the <ddraw.h> header file. */
#undef HAVE_NET_IF_H #undef HAVE_DDRAW_H
/* Define to 1 if you have the <nl_types.h> header file. */ /* Define if you have the <dlfcn.h> header file. */
#undef HAVE_NL_TYPES_H #undef HAVE_DLFCN_H
/* Define to 1 if you have the <ogg/ogg.h> header file. */ /* Define if you have the <dvbpsi/dr.h> header file. */
#undef HAVE_OGG_OGG_H #undef HAVE_DVBPSI_DR_H
/* Define to 1 if you have the <Ph.h> header file. */ /* Define if you have the <dvdcss/dvdcss.h> header file. */
#undef HAVE_PH_H #undef HAVE_DVDCSS_DVDCSS_H
/* Define to 1 if you have the `posix_memalign' function. */ /* Define if you have the <dvdplay/dvdplay.h> header file. */
#undef HAVE_POSIX_MEMALIGN #undef HAVE_DVDPLAY_DVDPLAY_H
/* Define to 1 if you have the <pthread.h> header file. */ /* Define if you have the <dvdread/dvd_reader.h> header file. */
#undef HAVE_PTHREAD_H #undef HAVE_DVDREAD_DVD_READER_H
/* Define to 1 if you have the `putenv' function. */ /* Define if you have the <faad.h> header file. */
#undef HAVE_PUTENV #undef HAVE_FAAD_H
/* Define to 1 if you have the `select' function. */ /* Define if you have the <fcntl.h> header file. */
#undef HAVE_SELECT #undef HAVE_FCNTL_H
/* Define to 1 if you have the `setenv' function. */ /* Define if you have the <gdk/gdk.h> header file. */
#undef HAVE_SETENV #undef HAVE_GDK_GDK_H
/* Define to 1 if you have the `setlocale' function. */ /* Define if you have the <getopt.h> header file. */
#undef HAVE_SETLOCALE #undef HAVE_GETOPT_H
/* Define to 1 if you have the `sigrelse' function. */ /* Define if you have the <glib.h> header file. */
#undef HAVE_SIGRELSE #undef HAVE_GLIB_H
/* Define to 1 if you have the <soundcard.h> header file. */ /* Define if you have the <gnome.h> header file. */
#undef HAVE_SOUNDCARD_H #undef HAVE_GNOME_H
/* Define to 1 if you have the <stddef.h> header file. */ /* Define if you have the <gtk/gtk.h> header file. */
#undef HAVE_STDDEF_H #undef HAVE_GTK_GTK_H
/* Define to 1 if you have the <stdint.h> header file. */ /* Define if you have the <image.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_IMAGE_H
/* Define to 1 if you have the <stdlib.h> header file. */ /* Define if you have the <inttypes.h> header file. */
#undef HAVE_STDLIB_H #undef HAVE_INTTYPES_H
/* Define to 1 if you have the `stpcpy' function. */ /* Define if you have the <kernel/OS.h> header file. */
#undef HAVE_STPCPY #undef HAVE_KERNEL_OS_H
/* Define to 1 if you have the `strcasecmp' function. */ /* Define if you have the <kernel/scheduler.h> header file. */
#undef HAVE_STRCASECMP #undef HAVE_KERNEL_SCHEDULER_H
/* Define to 1 if you have the `strchr' function. */ /* Define if you have the <libdv/dv.h> header file. */
#undef HAVE_STRCHR #undef HAVE_LIBDV_DV_H
/* Define to 1 if you have the `strdup' function. */ /* Define if you have the <libv4l/v4l.h> header file. */
#undef HAVE_STRDUP #undef HAVE_LIBV4L_V4L_H
/* Define to 1 if you have the `strerror' function. */ /* Define if you have the <limits.h> header file. */
#undef HAVE_STRERROR #undef HAVE_LIMITS_H
/* Define to 1 if you have the <strings.h> header file. */ /* Define if you have the <linux/fb.h> header file. */
#undef HAVE_STRINGS_H #undef HAVE_LINUX_FB_H
/* Define to 1 if you have the <string.h> header file. */ /* Define if you have the <linux/version.h> header file. */
#undef HAVE_STRING_H #undef HAVE_LINUX_VERSION_H
/* Define to 1 if you have the `strndup' function. */ /* Define if you have the <locale.h> header file. */
#undef HAVE_STRNDUP #undef HAVE_LOCALE_H
/* Define to 1 if you have the `strtod' function. */ /* Define if you have the <machine/param.h> header file. */
#undef HAVE_STRTOD #undef HAVE_MACHINE_PARAM_H
/* Define to 1 if you have the `strtol' function. */ /* Define if you have the <machine/soundcard.h> header file. */
#undef HAVE_STRTOL #undef HAVE_MACHINE_SOUNDCARD_H
/* Define to 1 if you have the `strtoul' function. */ /* Define if you have the <mad.h> header file. */
#undef HAVE_STRTOUL #undef HAVE_MAD_H
/* Define if <sys/time.h> defines struct timespec. */ /* Define if you have the <malloc.h> header file. */
#undef HAVE_STRUCT_TIMESPEC #undef HAVE_MALLOC_H
/* Define to 1 if you have the `swab' function. */ /* Define if you have the <net/if.h> header file. */
#undef HAVE_SWAB #undef HAVE_NET_IF_H
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <ogg/ogg.h> header file. */
#undef HAVE_OGG_OGG_H
/* Define if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define if you have the <soundcard.h> header file. */
#undef HAVE_SOUNDCARD_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <sys/int_types.h> header file. */ /* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define if you have the <sys/int_types.h> header file. */
#undef HAVE_SYS_INT_TYPES_H #undef HAVE_SYS_INT_TYPES_H
/* Define to 1 if you have the <sys/param.h> header file. */ /* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H #undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/shm.h> header file. */ /* Define if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H #undef HAVE_SYS_SHM_H
/* Define to 1 if you have the <sys/socket.h> header file. */ /* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H #undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/sockio.h> header file. */ /* Define if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H #undef HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/soundcard.h> header file. */ /* Define if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H #undef HAVE_SYS_SOUNDCARD_H
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/times.h> header file. */ /* Define if you have the <sys/times.h> header file. */
#undef HAVE_SYS_TIMES_H #undef HAVE_SYS_TIMES_H
/* Define to 1 if you have the <sys/time.h> header file. */ /* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H #undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `tsearch' function. */ /* Define if you have the <unistd.h> header file. */
#undef HAVE_TSEARCH
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Support for variadic macros */ /* Define if you have the <zlib.h> header file. */
#undef HAVE_VARIADIC_MACROS #undef HAVE_ZLIB_H
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
#undef HAVE_X11_EXTENSIONS_DPMS_H
/* Define to 1 if you have the <X11/extensions/Xv.h> header file. */
#undef HAVE_X11_EXTENSIONS_XV_H
/* Define to 1 if you have the <X11/Xlib.h> header file. */ /* Define if you have the pth library (-lpth). */
#undef HAVE_X11_XLIB_H #undef HAVE_LIBPTH
/* Define to 1 if you have the <zlib.h> header file. */ /* Define if you have the st library (-lst). */
#undef HAVE_ZLIB_H #undef HAVE_LIBST
/* Define to 1 if you have the `__argz_count' function. */ /* Package name */
#undef HAVE___ARGZ_COUNT #undef VLC_PACKAGE
/* Define to 1 if you have the `__argz_next' function. */ /* Package version */
#undef HAVE___ARGZ_NEXT #undef VLC_VERSION
/* Define to 1 if you have the `__argz_stringify' function. */ /* Define if you have the iconv() function. */
#undef HAVE___ARGZ_STRINGIFY #undef HAVE_ICONV
/* Define as const if the declaration of iconv() needs const. */ /* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST #undef ICONV_CONST
/* String suffix for module functions */ /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef MODULE_SUFFIX #undef HAVE_LANGINFO_CODESET
/* Symbol suffix for module functions */
#undef MODULE_SYMBOL
/* Define if <sys/param.h> defines ntohl. */ /* Define if your <locale.h> file defines LC_MESSAGES. */
#undef NTOHL_IN_SYS_PARAM_H #undef HAVE_LC_MESSAGES
/* Define to the address where bug reports for this package should be sent. */ /* Define to 1 if translation of program messages to the user's native language
#undef PACKAGE_BUGREPORT is requested. */
#undef ENABLE_NLS
/* Define to the full name of this package. */ /* Define if the GNU gettext() function is already present or preinstalled. */
#undef PACKAGE_NAME #undef HAVE_GETTEXT
/* Define to the full name and version of this package. */ /* Define if nanosleep is available. */
#undef PACKAGE_STRING #undef HAVE_NANOSLEEP
/* Define to the one symbol short name of this package. */ /* long getopt support */
#undef PACKAGE_TARNAME #undef HAVE_GETOPT_LONG
/* Define to the version of this package. */ /* getopt support */
#undef PACKAGE_VERSION #undef HAVE_GETOPT_LONG
/* Define if <pthread.h> defines pthread_cond_t. */ /* Define if <pthread.h> defines pthread_cond_t. */
#undef PTHREAD_COND_T_IN_PTHREAD_H #undef PTHREAD_COND_T_IN_PTHREAD_H
...@@ -409,56 +380,66 @@ ...@@ -409,56 +380,66 @@
/* Define if <pthread.h> defines pthread_once. */ /* Define if <pthread.h> defines pthread_once. */
#undef PTHREAD_ONCE_IN_PTHREAD_H #undef PTHREAD_ONCE_IN_PTHREAD_H
/* Define if <pth.h> defines pth_init */ /* Define if <strings.h> defines strncasecmp. */
#undef PTH_INIT_IN_PTH_H #undef STRNCASECMP_IN_STRINGS_H
/* Define as the return type of signal handlers (`int' or `void'). */ /* Define if <time.h> defines nanosleep. */
#undef RETSIGTYPE #undef HAVE_DECL_NANOSLEEP
/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */ /* Define if <sys/time.h> defines struct timespec. */
#undef SDL_INCLUDE_FILE #undef HAVE_STRUCT_TIMESPEC
/* If using the C implementation of alloca, define if you know the /* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
direction of stack growth for your system; otherwise it will be #undef DPMSINFO_IN_DPMS_H
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */ /* Define if <sys/param.h> defines ntohl. */
#undef STDC_HEADERS #undef NTOHL_IN_SYS_PARAM_H
/* Define if <strings.h> defines strncasecmp. */ /* Support for variadic macros */
#undef STRNCASECMP_IN_STRINGS_H #undef HAVE_VARIADIC_MACROS
/* Define if <st.h> defines st_init */ /* Maximum supported data alignment */
#undef ST_INIT_IN_ST_H #undef ATTRIBUTE_ALIGNED_MAX
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ /* Define if $CC groks 3D Now! inline assembly. */
#undef TIME_WITH_SYS_TIME #undef CAN_COMPILE_3DNOW
/* Simple version string */ /* Define if $CC groks SSE inline assembly. */
#undef VERSION_MESSAGE #undef CAN_COMPILE_SSE
/* Package name */ /* Define if $CC groks AltiVec inline assembly. */
#undef VLC_PACKAGE #undef CAN_COMPILE_ALTIVEC
/* Package version */ /* Define if your compiler groks C AltiVec extensions. */
#undef VLC_VERSION #undef CAN_COMPILE_C_ALTIVEC
/* For FreeBSD VCD support */
#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
#undef SDL_INCLUDE_FILE
/* big endian system */ /* big endian system */
#undef WORDS_BIGENDIAN #undef WORDS_BIGENDIAN
/* Define to empty if `const' does not conform to ANSI C. */ /* Define if <pth.h> defines pth_init */
#undef const #undef PTH_INIT_IN_PTH_H
/* Define as `__inline' if that's what the C compiler calls it, or to nothing /* Define if <st.h> defines st_init */
if it is not supported. */ #undef ST_INIT_IN_ST_H
#undef inline
/* Define to `long' if <sys/types.h> does not define. */ /* Simple version string */
#undef off_t #undef VERSION_MESSAGE
/* Copyright string */
#undef COPYRIGHT_MESSAGE
/* The ./configure command line */
#undef CONFIGURE_LINE
/* String suffix for module functions */
#undef MODULE_SUFFIX
/* Symbol suffix for module functions */
#undef MODULE_SYMBOL
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* a52tospdif.c : encapsulates A/52 frames into S/PDIF packets * a52tospdif.c : encapsulates A/52 frames into S/PDIF packets
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: a52tospdif.c,v 1.3 2002/08/12 22:48:18 massiot Exp $ * $Id: a52tospdif.c,v 1.4 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
#include <string.h> #include <string.h>
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "audio_output.h" #include "audio_output.h"
#include "aout_internal.h" #include "aout_internal.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* float32tos16.c : converter from float32 to signed 16 bits integer * float32tos16.c : converter from float32 to signed 16 bits integer
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: float32tos16.c,v 1.3 2002/08/12 22:48:18 massiot Exp $ * $Id: float32tos16.c,v 1.4 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -87,7 +87,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, ...@@ -87,7 +87,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
float * p_in = (float *)p_in_buf->p_buffer; float * p_in = (float *)p_in_buf->p_buffer;
s16 * p_out = (s16 *)p_out_buf->p_buffer; s16 * p_out = (s16 *)p_out_buf->p_buffer;
for ( i = 0; i < p_in_buf->i_nb_samples * p_filter->input.i_channels; i++ ) for ( i = p_in_buf->i_nb_samples * p_filter->input.i_channels ; i-- ; )
{ {
#if 0 #if 0
/* Slow version */ /* Slow version */
......
...@@ -3,4 +3,5 @@ arts_SOURCES = arts.c ...@@ -3,4 +3,5 @@ arts_SOURCES = arts.c
esd_SOURCES = esd.c esd_SOURCES = esd.c
file_SOURCES = file.c file_SOURCES = file.c
oss_SOURCES = oss.c oss_SOURCES = oss.c
sdl_SOURCES = sdl.c
waveout_SOURCES = waveout.c waveout_SOURCES = waveout.c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* esd.c : EsounD module * esd.c : EsounD module
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: esd.c,v 1.1 2002/08/07 21:36:55 massiot Exp $ * $Id: esd.c,v 1.2 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -32,9 +32,12 @@ ...@@ -32,9 +32,12 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/aout.h> #include <vlc/aout.h>
#include "aout_internal.h"
#include <esd.h> #include <esd.h>
#define DEFAULT_FRAME_SIZE 2048*2
/***************************************************************************** /*****************************************************************************
* aout_sys_t: esd audio output method descriptor * aout_sys_t: esd audio output method descriptor
***************************************************************************** *****************************************************************************
...@@ -45,6 +48,7 @@ struct aout_sys_t ...@@ -45,6 +48,7 @@ struct aout_sys_t
{ {
esd_format_t esd_format; esd_format_t esd_format;
int i_fd; int i_fd;
vlc_bool_t b_initialized;
}; };
/***************************************************************************** /*****************************************************************************
...@@ -53,15 +57,15 @@ struct aout_sys_t ...@@ -53,15 +57,15 @@ struct aout_sys_t
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static int SetFormat ( aout_thread_t * ); static int SetFormat ( aout_instance_t * );
static int GetBufInfo ( aout_thread_t *, int ); static void Play ( aout_instance_t *, aout_buffer_t * );
static void Play ( aout_thread_t *, byte_t *, int ); static int ESDThread ( aout_instance_t * );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
vlc_module_begin(); vlc_module_begin();
set_description( _("EsounD audio module") ); set_description( _("EsounD audio module") );
set_capability( "audio output", 50 ); set_capability( "audio output", 50 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
add_shortcut( "esound" ); add_shortcut( "esound" );
...@@ -72,123 +76,181 @@ vlc_module_end(); ...@@ -72,123 +76,181 @@ vlc_module_end();
*****************************************************************************/ *****************************************************************************/
static int Open( vlc_object_t *p_this ) static int Open( vlc_object_t *p_this )
{ {
aout_thread_t *p_aout = (aout_thread_t *)p_this; aout_instance_t *p_aout = (aout_instance_t *)p_this;
struct aout_sys_t * p_sys;
/* mpg123 does it this way */
int i_bits = ESD_BITS16;
int i_mode = ESD_STREAM;
int i_func = ESD_PLAY;
/* Allocate structure */ /* Allocate structure */
p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL ) if( p_sys == NULL )
{ {
msg_Err( p_aout, "out of memory" ); msg_Err( p_aout, "out of memory" );
return( 1 ); return -1;
} }
/* Initialize some variables */ p_aout->output.p_sys = p_sys;
p_aout->i_rate = esd_audio_rate; /* We use actual esd rate value, not
* initial value */
i_bits = ESD_BITS16;
i_mode = ESD_STREAM;
i_func = ESD_PLAY;
p_aout->p_sys->esd_format = (i_bits | i_mode | i_func) & (~ESD_MASK_CHAN);
if( p_aout->i_channels == 1 ) /* Create ESD thread and wait for its readiness. */
p_sys->b_initialized = VLC_FALSE;
if( vlc_thread_create( p_aout, "aout", ESDThread, VLC_FALSE ) )
{ {
p_aout->p_sys->esd_format |= ESD_MONO; msg_Err( p_aout, "cannot create ESD thread (%s)", strerror(errno) );
free( p_sys );
return -1;
} }
else
p_aout->output.pf_setformat = SetFormat;
p_aout->output.pf_play = Play;
return( 0 );
}
/*****************************************************************************
* SetFormat: set the output format
*****************************************************************************/
static int SetFormat( aout_instance_t *p_aout )
{
struct aout_sys_t * p_sys = p_aout->output.p_sys;
p_sys->b_initialized = VLC_FALSE;
/* Initialize some variables */
p_sys->esd_format = ESD_BITS16 | ESD_STREAM | ESD_PLAY;
p_sys->esd_format &= ~ESD_MASK_CHAN;
switch( p_aout->output.output.i_channels )
{ {
p_aout->p_sys->esd_format |= ESD_STEREO; case 1:
p_sys->esd_format |= ESD_MONO;
break;
case 2:
p_sys->esd_format |= ESD_STEREO;
break;
default:
return -1;
} }
/* open a socket for playing a stream /* open a socket for playing a stream
* and try to open /dev/dsp if there's no EsounD */ * and try to open /dev/dsp if there's no EsounD */
if ( (p_aout->p_sys->i_fd p_sys->i_fd = esd_play_stream_fallback( p_sys->esd_format,
= esd_play_stream_fallback(p_aout->p_sys->esd_format, p_aout->output.output.i_rate, NULL, "vlc" );
p_aout->i_rate, NULL, "vlc")) < 0 ) if( p_sys->i_fd < 0 )
{ {
msg_Err( p_aout, "cannot open esound socket (format 0x%08x at %ld Hz)", msg_Err( p_aout, "cannot open esound socket (format 0x%08x at %ld Hz)",
p_aout->p_sys->esd_format, p_aout->i_rate ); p_sys->esd_format, p_aout->output.output.i_rate );
return( -1 ); return -1;
} }
p_aout->pf_setformat = SetFormat; p_aout->output.output.i_format = AOUT_FMT_S16_NE;
p_aout->pf_getbufinfo = GetBufInfo; p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE;
p_aout->pf_play = Play;
return( 0 ); p_sys->b_initialized = VLC_TRUE;
return 0;
} }
/***************************************************************************** /*****************************************************************************
* SetFormat: set the output format * Play: queue a buffer for playing by ESDThread
*****************************************************************************/ *****************************************************************************/
static int SetFormat( aout_thread_t *p_aout ) static void Play( aout_instance_t *p_aout, aout_buffer_t * p_buffer )
{ {
int i_fd; aout_FifoPush( p_aout, &p_aout->output.fifo, p_buffer );
i_fd = esd_open_sound(NULL);
p_aout->i_latency = esd_get_latency(i_fd);
msg_Dbg( p_aout, "aout_esd_latency: %d", p_aout->i_latency );
return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* GetBufInfo: buffer status query * Close: close the Esound socket
*****************************************************************************/ *****************************************************************************/
static int GetBufInfo( aout_thread_t *p_aout, int i_buffer_limit ) static void Close( vlc_object_t *p_this )
{ {
/* arbitrary value that should be changed */ aout_instance_t *p_aout = (aout_instance_t *)p_this;
return( i_buffer_limit ); struct aout_sys_t * p_sys = p_aout->output.p_sys;
p_aout->b_die = 1;
vlc_thread_join( p_aout );
close( p_sys->i_fd );
free( p_sys );
} }
/***************************************************************************** /*****************************************************************************
* Play: play a sound samples buffer * ESDThread: asynchronous thread used to DMA the data to the device
*****************************************************************************
* This function writes a buffer of i_length bytes in the socket
*****************************************************************************/ *****************************************************************************/
static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) static int ESDThread( aout_instance_t * p_aout )
{ {
int i_amount; struct aout_sys_t * p_sys = p_aout->output.p_sys;
if (p_aout->p_sys->esd_format & ESD_STEREO) while ( !p_aout->b_die )
{ {
if (p_aout->p_sys->esd_format & ESD_BITS16) aout_buffer_t * p_buffer;
mtime_t next_date = 0;
int i_tmp, i_size;
byte_t * p_bytes;
if( !p_sys->b_initialized )
{ {
i_amount = (44100 * (ESD_BUF_SIZE + 64)) / p_aout->i_rate; msleep( THREAD_SLEEP );
continue;
} }
else
if ( p_aout->output.output.i_format != AOUT_FMT_SPDIF )
{ {
i_amount = (44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate; /* Get the presentation date of the next write() operation. It
* is equal to the current date + esd latency */
/* FIXME: wtf ? it works better with a - here */
next_date = -(mtime_t)esd_get_latency(esd_open_sound(NULL))
* 1000000
/ aout_FormatToByterate( &p_aout->output.output,
p_aout->output.output.i_rate );
next_date += mdate();
} }
}
else p_buffer = aout_OutputNextBuffer( p_aout, next_date );
{
if (p_aout->p_sys->esd_format & ESD_BITS16) if ( p_buffer != NULL )
{ {
i_amount = (2 * 44100 * (ESD_BUF_SIZE + 128)) / p_aout->i_rate; p_bytes = p_buffer->p_buffer;
i_size = aout_FormatToSize( &p_aout->output.output,
p_buffer->i_nb_samples );
} }
else else
{ {
i_amount = (2 * 44100 * (ESD_BUF_SIZE + 256)) / p_aout->i_rate; i_size = aout_FormatToSize( &p_aout->output.output,
DEFAULT_FRAME_SIZE );
p_bytes = alloca( i_size );
memset( p_bytes, 0, i_size );
}
i_tmp = write( p_sys->i_fd, p_bytes, i_size );
if( i_tmp < 0 )
{
msg_Err( p_aout, "write failed (%s)", strerror(errno) );
}
if ( p_buffer != NULL )
{
aout_BufferFree( p_buffer );
} }
} }
write( p_aout->p_sys->i_fd, buffer, i_size ); return 0;
} }
#if 0
/***************************************************************************** /*****************************************************************************
* Close: close the Esound socket * Play: play a sound samples buffer
*****************************************************************************
* This function writes a buffer of i_length bytes in the socket
*****************************************************************************/ *****************************************************************************/
static void Close( vlc_object_t *p_this ) static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
{ {
aout_thread_t *p_aout = (aout_thread_t *)p_this; int i_amount;
int m1 = p_aout->output.p_sys->esd_format & ESD_STEREO ? 1 : 2;
int m2 = p_aout->output.p_sys->esd_format & ESD_BITS16 ? 64 : 128;
i_amount = (m1 * 44100 * (ESD_BUF_SIZE + m1 * m2)) / p_aout->i_rate;
close( p_aout->p_sys->i_fd ); write( p_aout->output.p_sys->i_fd, buffer, i_size );
} }
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc * oss.c : OSS /dev/dsp module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2002 VideoLAN * Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.7 2002/08/12 09:34:15 sam Exp $ * $Id: oss.c,v 1.8 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
struct aout_sys_t struct aout_sys_t
{ {
int i_fd; int i_fd;
volatile vlc_bool_t b_die;
volatile vlc_bool_t b_initialized; volatile vlc_bool_t b_initialized;
}; };
...@@ -120,8 +119,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -120,8 +119,7 @@ static int Open( vlc_object_t *p_this )
/* Open the sound device */ /* Open the sound device */
if( (p_sys->i_fd = open( psz_device, O_WRONLY )) < 0 ) if( (p_sys->i_fd = open( psz_device, O_WRONLY )) < 0 )
{ {
msg_Err( p_aout, "cannot open audio device (%s)", msg_Err( p_aout, "cannot open audio device (%s)", psz_device );
psz_device );
free( psz_device ); free( psz_device );
free( p_sys ); free( p_sys );
return -1; return -1;
...@@ -129,7 +127,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -129,7 +127,6 @@ static int Open( vlc_object_t *p_this )
free( psz_device ); free( psz_device );
/* Create OSS thread and wait for its readiness. */ /* Create OSS thread and wait for its readiness. */
p_sys->b_die = 0;
p_sys->b_initialized = VLC_FALSE; p_sys->b_initialized = VLC_FALSE;
if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_FALSE ) ) if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_FALSE ) )
{ {
...@@ -255,7 +252,7 @@ static void Close( vlc_object_t * p_this ) ...@@ -255,7 +252,7 @@ static void Close( vlc_object_t * p_this )
aout_instance_t *p_aout = (aout_instance_t *)p_this; aout_instance_t *p_aout = (aout_instance_t *)p_this;
struct aout_sys_t * p_sys = p_aout->output.p_sys; struct aout_sys_t * p_sys = p_aout->output.p_sys;
p_sys->b_die = 1; p_aout->b_die = 1;
vlc_thread_join( p_aout ); vlc_thread_join( p_aout );
close( p_sys->i_fd ); close( p_sys->i_fd );
...@@ -291,7 +288,7 @@ static int OSSThread( aout_instance_t * p_aout ) ...@@ -291,7 +288,7 @@ static int OSSThread( aout_instance_t * p_aout )
{ {
struct aout_sys_t * p_sys = p_aout->output.p_sys; struct aout_sys_t * p_sys = p_aout->output.p_sys;
while ( !p_sys->b_die ) while ( !p_aout->b_die )
{ {
aout_buffer_t * p_buffer; aout_buffer_t * p_buffer;
mtime_t next_date = 0; mtime_t next_date = 0;
......
/***************************************************************************** /*****************************************************************************
* aout_sdl.c : audio sdl functions library * sdl.c : SDL audio output plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 2000-2002 VideoLAN
* $Id: aout.c,v 1.4 2002/08/12 22:12:51 massiot Exp $ * $Id: sdl.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org> * Pierre Baillet <oct@zoy.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -38,47 +38,63 @@ ...@@ -38,47 +38,63 @@
#include SDL_INCLUDE_FILE #include SDL_INCLUDE_FILE
#define FRAME_SIZE 2048 #define FRAME_SIZE 2048*2
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
static int SetFormat ( aout_instance_t * ); static int Open ( vlc_object_t * );
static void Play ( aout_instance_t *, aout_buffer_t * ); static void Close ( vlc_object_t * );
static void SDLCallback ( void *, Uint8 *, int ); static int SetFormat ( aout_instance_t * );
static void Play ( aout_instance_t *, aout_buffer_t * );
static void SDLCallback ( void *, Uint8 *, int );
/***************************************************************************** /*****************************************************************************
* OpenAudio: open the audio device * Module descriptor
*****************************************************************************/ *****************************************************************************/
int E_(OpenAudio) ( aout_instance_t *p_aout ) vlc_module_begin();
set_description( _("Simple DirectMedia Layer audio module") );
set_capability( "audio output", 40 );
set_callbacks( Open, Close );
vlc_module_end();
/*****************************************************************************
* Open: open the audio device
*****************************************************************************/
static int Open ( vlc_object_t *p_this )
{ {
if( SDL_WasInit( SDL_INIT_AUDIO ) != 0 ) aout_instance_t *p_aout = (aout_instance_t *)p_this;
Uint32 i_flags = SDL_INIT_AUDIO;
if( SDL_WasInit( i_flags ) )
{ {
return( 1 ); return 1;
} }
p_aout->output.pf_setformat = SetFormat; p_aout->output.pf_setformat = SetFormat;
p_aout->output.pf_play = Play; p_aout->output.pf_play = Play;
/* Initialize library */
if( SDL_Init( SDL_INIT_AUDIO
#ifndef WIN32 #ifndef WIN32
/* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/ /* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet*/
| SDL_INIT_EVENTTHREAD i_flags |= SDL_INIT_EVENTTHREAD;
#endif #endif
#ifdef DEBUG #ifdef DEBUG
/* In debug mode you may want vlc to dump a core instead of staying /* In debug mode you may want vlc to dump a core instead of staying
* stuck */ * stuck */
| SDL_INIT_NOPARACHUTE i_flags |= SDL_INIT_NOPARACHUTE;
#endif #endif
) < 0 )
/* Initialize library */
if( SDL_Init( i_flags ) < 0 )
{ {
msg_Err( p_aout, "cannot initialize SDL (%s)", SDL_GetError() ); msg_Err( p_aout, "cannot initialize SDL (%s)", SDL_GetError() );
return( 1 ); return 1;
} }
return( 0 ); return 0;
} }
/***************************************************************************** /*****************************************************************************
...@@ -103,7 +119,7 @@ static int SetFormat( aout_instance_t *p_aout ) ...@@ -103,7 +119,7 @@ static int SetFormat( aout_instance_t *p_aout )
} }
p_aout->output.output.i_format = AOUT_FMT_S16_NE; p_aout->output.output.i_format = AOUT_FMT_S16_NE;
p_aout->output.i_nb_samples = DEFAULT_FRAME_SIZE; p_aout->output.i_nb_samples = FRAME_SIZE;
SDL_PauseAudio( 0 ); SDL_PauseAudio( 0 );
...@@ -123,14 +139,12 @@ static void Play( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) ...@@ -123,14 +139,12 @@ static void Play( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
} }
/***************************************************************************** /*****************************************************************************
* CloseAudio: close the audio device * Close: close the audio device
*****************************************************************************/ *****************************************************************************/
void E_(CloseAudio) ( aout_instance_t *p_aout ) static void Close ( vlc_object_t *p_this )
{ {
SDL_PauseAudio( 1 ); SDL_PauseAudio( 1 );
SDL_CloseAudio(); SDL_CloseAudio();
SDL_QuitSubSystem( SDL_INIT_AUDIO ); SDL_QuitSubSystem( SDL_INIT_AUDIO );
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (http://liba52.sf.net/). * (http://liba52.sf.net/).
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: a52.c,v 1.2 2002/08/11 22:46:34 massiot Exp $ * $Id: a52.c,v 1.3 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
# include <inttypes.h> /* int16_t .. */ # include <inttypes.h> /* int16_t .. */
#endif #endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef USE_A52DEC_TREE /* liba52 header file */ #ifdef USE_A52DEC_TREE /* liba52 header file */
# include "include/a52.h" # include "include/a52.h"
#else #else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc * libmp4.c : LibMP4 library for mp4 module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.3 2002/08/11 08:30:01 gbazin Exp $ * $Id: libmp4.c,v 1.4 2002/08/13 11:59:36 sam Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
+ ( p_box->i_type == FOURCC_uuid ? 16 : 0 ) ) + ( p_box->i_type == FOURCC_uuid ? 16 : 0 ) )
#define MP4_BOX_DESCEND( p_box ) \ #define MP4_BOX_DESCEND( p_box ) \
MP4_SeekStream( p_stream, p_box->i_pos + MP4_BOX_HEADERSIZE( p_box ) ); MP4_SeekStream( p_stream, p_box->i_pos + MP4_BOX_HEADERSIZE( p_box ) )
#define MP4_GET1BYTE( dst ) \ #define MP4_GET1BYTE( dst ) \
dst = *p_peek; p_peek++; i_read-- dst = *p_peek; p_peek++; i_read--
......
aa_SOURCES = aa.c
fb_SOURCES = fb.c
ggi_SOURCES = ggi.c
glide_SOURCES = glide.c
sdl_SOURCES = sdl.c
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_aa.c: Aa video output display method for testing purposes * vout_aa.c: Aa video output display method for testing purposes
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: aa.c,v 1.1 2002/08/04 17:23:43 sam Exp $ * $Id: aa.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* fb.c : framebuffer plugin for vlc * fb.c : framebuffer plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: fb.c,v 1.2 2002/08/08 22:28:22 sam Exp $ * $Id: fb.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ggi.c : GGI plugin for vlc * ggi.c : GGI plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: ggi.c,v 1.1 2002/08/04 17:23:43 sam Exp $ * $Id: ggi.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* glide.c : 3dfx Glide plugin for vlc * glide.c : 3dfx Glide plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: glide.c,v 1.2 2002/08/08 22:28:22 sam Exp $ * $Id: glide.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
......
/***************************************************************************** /*****************************************************************************
* vout_sdl.c: SDL video output display method * sdl.c: SDL video output display method
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: vout.c,v 1.1 2002/08/04 17:23:44 sam Exp $ * $Id: sdl.c,v 1.1 2002/08/13 11:59:36 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org> * Pierre Baillet <oct@zoy.org>
...@@ -85,6 +85,8 @@ struct picture_sys_t ...@@ -85,6 +85,8 @@ struct picture_sys_t
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
static int Init ( vout_thread_t * ); static int Init ( vout_thread_t * );
static void End ( vout_thread_t * ); static void End ( vout_thread_t * );
static int Manage ( vout_thread_t * ); static int Manage ( vout_thread_t * );
...@@ -95,6 +97,15 @@ static void CloseDisplay ( vout_thread_t * ); ...@@ -95,6 +97,15 @@ static void CloseDisplay ( vout_thread_t * );
static int NewPicture ( vout_thread_t *, picture_t * ); static int NewPicture ( vout_thread_t *, picture_t * );
static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("Simple DirectMedia Layer video module") );
set_capability( "video output", 40 );
set_callbacks( Open, Close );
vlc_module_end();
/***************************************************************************** /*****************************************************************************
* OpenVideo: allocate SDL video thread output method * OpenVideo: allocate SDL video thread output method
***************************************************************************** *****************************************************************************
...@@ -102,7 +113,7 @@ static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); ...@@ -102,7 +113,7 @@ static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * );
* vout properties to choose the correct mode, and change them according to the * vout properties to choose the correct mode, and change them according to the
* mode actually used. * mode actually used.
*****************************************************************************/ *****************************************************************************/
int E_(OpenVideo) ( vlc_object_t *p_this ) static int Open ( vlc_object_t *p_this )
{ {
vout_thread_t * p_vout = (vout_thread_t *)p_this; vout_thread_t * p_vout = (vout_thread_t *)p_this;
...@@ -276,7 +287,7 @@ static void End( vout_thread_t *p_vout ) ...@@ -276,7 +287,7 @@ static void End( vout_thread_t *p_vout )
***************************************************************************** *****************************************************************************
* Terminate an output method created by vout_SDLCreate * Terminate an output method created by vout_SDLCreate
*****************************************************************************/ *****************************************************************************/
void E_(CloseVideo) ( vlc_object_t *p_this ) static void Close ( vlc_object_t *p_this )
{ {
vout_thread_t * p_vout = (vout_thread_t *)p_this; vout_thread_t * p_vout = (vout_thread_t *)p_this;
......
sdl_SOURCES = sdl.c vout.c aout.c
/*****************************************************************************
* sdl.c : SDL plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: sdl.c,v 1.1 2002/08/04 17:23:44 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <vlc/vlc.h>
/*****************************************************************************
* External prototypes
*****************************************************************************/
int E_(OpenVideo) ( vlc_object_t * );
void E_(CloseVideo) ( vlc_object_t * );
int E_(OpenAudio) ( vlc_object_t * );
void E_(CloseAudio) ( vlc_object_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("Simple DirectMedia Layer module") );
add_submodule();
set_capability( "video output", 40 );
set_callbacks( E_(OpenVideo), E_(CloseVideo) );
add_submodule();
set_capability( "audio output", 40 );
set_callbacks( E_(OpenAudio), E_(CloseAudio) );
vlc_module_end();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment