* Prepared for some advances in the aout3 clock management.
* Added the first stone of the forthcoming stream output.
INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock input_info
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT := audio_output filters input mixer output
+STREAM_OUTPUT := stream_output
MISC := mtime modules threads cpu configuration netutils iso_lang messages objects extras
LIBVLC_OBJ := $(LIBVLC:%=src/%.o) \
$(INPUT:%=src/input/%.o) \
$(VIDEO_OUTPUT:%=src/video_output/%.o) \
$(AUDIO_OUTPUT:%=src/audio_output/%.o) \
+ $(STREAM_OUTPUT:%=src/stream_output/%.o) \
$(MISC:%=src/misc/%.o)
VLC_OBJ := $(VLC:%=src/%.o)
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.2 2002/08/08 00:35:10 sam Exp $
+ * $Id: aout_internal.h,v 1.3 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK ) \
{ \
(p_new_buffer) = alloca( (u64)(p_alloc)->i_bytes_per_sec \
- * i_nb_usec \
+ * (i_nb_usec) \
/ 1000000 + 1 + sizeof(aout_buffer_t) ); \
} \
else \
{ \
(p_new_buffer) = malloc( (u64)(p_alloc)->i_bytes_per_sec \
- * i_nb_usec \
+ * (i_nb_usec) \
/ 1000000 + 1 + sizeof(aout_buffer_t) ); \
} \
- (p_new_buffer)->i_alloc_type = (p_alloc)->i_alloc_type; \
- (p_new_buffer)->i_size = (u64)(p_alloc)->i_bytes_per_sec \
- * i_nb_usec / 1000000 + 1; \
- (p_new_buffer)->p_buffer = (byte_t *)(p_new_buffer) \
- + sizeof(aout_buffer_t); \
- if ( (p_previous_buffer) != NULL ) \
+ if ( p_new_buffer != NULL ) \
{ \
- (p_new_buffer)->start_date = \
- ((aout_buffer_t *)p_previous_buffer)->start_date; \
- (p_new_buffer)->end_date = \
- ((aout_buffer_t *)p_previous_buffer)->end_date; \
+ (p_new_buffer)->i_alloc_type = (p_alloc)->i_alloc_type; \
+ (p_new_buffer)->i_size = (u64)(p_alloc)->i_bytes_per_sec \
+ * (i_nb_usec) / 1000000 + 1; \
+ (p_new_buffer)->p_buffer = (byte_t *)(p_new_buffer) \
+ + sizeof(aout_buffer_t); \
+ if ( (p_previous_buffer) != NULL ) \
+ { \
+ (p_new_buffer)->start_date = \
+ ((aout_buffer_t *)p_previous_buffer)->start_date;\
+ (p_new_buffer)->end_date = \
+ ((aout_buffer_t *)p_previous_buffer)->end_date; \
+ } \
} \
+ /* we'll keep that for a while --Meuuh */ \
+ /* else printf("%s:%d\n", __FILE__, __LINE__); */ \
}
#define aout_BufferFree( p_buffer ) \
aout_fifo_t fifo;
+ mtime_t next_packet_date;
byte_t * p_first_byte_to_mix;
};
-/* include/defs.h.in. Generated automatically from configure.in by autoheader 2.13. */
+/* include/defs.h.in. Generated from configure.in by autoheader. */
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* Maximum supported data alignment */
+#undef ATTRIBUTE_ALIGNED_MAX
-/* Define to empty if the keyword does not work. */
-#undef const
+/* 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. */
+/* 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 if you have alloca, as a function or macro. */
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
+#undef DPMSINFO_IN_DPMS_H
+
+/* 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. */
+#undef HAVE_A52DEC_A52_H
+
+/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define to 1 if you have the `atoll' function. */
+#undef HAVE_ATOLL
-/* Define as the return type of signal handlers (int or void). */
-#undef RETSIGTYPE
+/* Define to 1 if you have the <Cocoa/Cocoa.h> header file. */
+#undef HAVE_COCOA_COCOA_H
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define to 1 if you have the <cthreads.h> header file. */
+#undef HAVE_CTHREADS_H
-/* If using the C implementation of alloca, define if you know the
- 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 `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define to 1 if you have the <ddraw.h> header file. */
+#undef HAVE_DDRAW_H
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
+/* Define if <time.h> defines nanosleep. */
+#undef HAVE_DECL_NANOSLEEP
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if you have the <dvbpsi/dr.h> header file. */
+#undef HAVE_DVBPSI_DR_H
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to 1 if you have the <dvdcss/dvdcss.h> header file. */
+#undef HAVE_DVDCSS_DVDCSS_H
-/* Define if you have the atoll function. */
-#undef HAVE_ATOLL
+/* Define to 1 if you have the <dvdplay/dvdplay.h> header file. */
+#undef HAVE_DVDPLAY_DVDPLAY_H
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the <dvdread/dvd_reader.h> header file. */
+#undef HAVE_DVDREAD_DVD_READER_H
+
+/* Define to 1 if you have the <faad.h> header file. */
+#undef HAVE_FAAD_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
-/* Define if you have the feof_unlocked function. */
+/* Define to 1 if you have the `feof_unlocked' function. */
#undef HAVE_FEOF_UNLOCKED
-/* Define if you have the fgets_unlocked function. */
+/* Define to 1 if you have the `fgets_unlocked' function. */
#undef HAVE_FGETS_UNLOCKED
-/* Define if you have the getcwd function. */
+/* Define to 1 if you have the <gdk/gdk.h> header file. */
+#undef HAVE_GDK_GDK_H
+
+/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
-/* Define if you have the getegid function. */
+/* Define to 1 if you have the `getegid' function. */
#undef HAVE_GETEGID
-/* Define if you have the geteuid function. */
+/* Define to 1 if you have the `geteuid' function. */
#undef HAVE_GETEUID
-/* Define if you have the getgid function. */
+/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID
-/* Define if you have the gethostbyname2 function. */
+/* Define to 1 if you have the `gethostbyname2' function. */
#undef HAVE_GETHOSTBYNAME2
-/* Define if you have the getpagesize function. */
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* getopt support */
+#undef HAVE_GETOPT_LONG
+
+/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define if you have the getpwuid function. */
+/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID
-/* Define if you have the gettimeofday function. */
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
-/* Define if you have the getuid function. */
+/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
-/* Define if you have the isatty function. */
-#undef HAVE_ISATTY
-
-/* Define if you have the memalign function. */
-#undef HAVE_MEMALIGN
-
-/* Define if you have the mempcpy function. */
-#undef HAVE_MEMPCPY
-
-/* Define if you have the munmap function. */
-#undef HAVE_MUNMAP
-
-/* Define if you have the posix_memalign function. */
-#undef HAVE_POSIX_MEMALIGN
-
-/* Define if you have the putenv function. */
-#undef HAVE_PUTENV
-
-/* Define if you have the select function. */
-#undef HAVE_SELECT
-
-/* Define if you have the setenv function. */
-#undef HAVE_SETENV
-
-/* Define if you have the setlocale function. */
-#undef HAVE_SETLOCALE
-
-/* Define if you have the sigrelse function. */
-#undef HAVE_SIGRELSE
-
-/* Define if you have the stpcpy function. */
-#undef HAVE_STPCPY
+/* Define to 1 if you have the <glib.h> header file. */
+#undef HAVE_GLIB_H
-/* Define if you have the strcasecmp function. */
-#undef HAVE_STRCASECMP
+/* Define to 1 if you have the <gnome.h> header file. */
+#undef HAVE_GNOME_H
-/* Define if you have the strchr function. */
-#undef HAVE_STRCHR
+/* Define to 1 if you have the <gtk/gtk.h> header file. */
+#undef HAVE_GTK_GTK_H
-/* Define if you have the strdup function. */
-#undef HAVE_STRDUP
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
-/* Define if you have the strerror function. */
-#undef HAVE_STRERROR
+/* Define to 1 if you have the <image.h> header file. */
+#undef HAVE_IMAGE_H
-/* Define if you have the strndup function. */
-#undef HAVE_STRNDUP
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the strtod function. */
-#undef HAVE_STRTOD
+/* For FreeBSD VCD support */
+#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
-/* Define if you have the strtol function. */
-#undef HAVE_STRTOL
+/* Define to 1 if you have the `isatty' function. */
+#undef HAVE_ISATTY
-/* Define if you have the strtoul function. */
-#undef HAVE_STRTOUL
+/* Define to 1 if you have the <kernel/OS.h> header file. */
+#undef HAVE_KERNEL_OS_H
-/* Define if you have the swab function. */
-#undef HAVE_SWAB
+/* Define to 1 if you have the <kernel/scheduler.h> header file. */
+#undef HAVE_KERNEL_SCHEDULER_H
-/* Define if you have the tsearch function. */
-#undef HAVE_TSEARCH
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
-/* Define if you have the vasprintf function. */
-#undef HAVE_VASPRINTF
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the <Cocoa/Cocoa.h> header file. */
-#undef HAVE_COCOA_COCOA_H
+/* Define to 1 if you have the <libdv/dv.h> header file. */
+#undef HAVE_LIBDV_DV_H
-/* Define if you have the <Ph.h> header file. */
-#undef HAVE_PH_H
+/* Define to 1 if you have the `pth' library (-lpth). */
+#undef HAVE_LIBPTH
-/* Define if you have the <X11/Xlib.h> header file. */
-#undef HAVE_X11_XLIB_H
+/* Define to 1 if you have the `st' library (-lst). */
+#undef HAVE_LIBST
-/* Define if you have the <X11/extensions/Xv.h> header file. */
-#undef HAVE_X11_EXTENSIONS_XV_H
+/* Define to 1 if you have the <libv4l/v4l.h> header file. */
+#undef HAVE_LIBV4L_V4L_H
-/* Define if you have the <X11/extensions/dpms.h> header file. */
-#undef HAVE_X11_EXTENSIONS_DPMS_H
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the <a52dec/a52.h> header file. */
-#undef HAVE_A52DEC_A52_H
+/* Define to 1 if you have the <linux/fb.h> header file. */
+#undef HAVE_LINUX_FB_H
-/* Define if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define to 1 if you have the <linux/version.h> header file. */
+#undef HAVE_LINUX_VERSION_H
-/* Define if you have the <arpa/inet.h> header file. */
-#undef HAVE_ARPA_INET_H
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the <cthreads.h> header file. */
-#undef HAVE_CTHREADS_H
+/* Define to 1 if you have the <machine/param.h> header file. */
+#undef HAVE_MACHINE_PARAM_H
-/* Define if you have the <ddraw.h> header file. */
-#undef HAVE_DDRAW_H
+/* Define to 1 if you have the <machine/soundcard.h> header file. */
+#undef HAVE_MACHINE_SOUNDCARD_H
-/* Define if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
+/* Define to 1 if you have the <mad.h> header file. */
+#undef HAVE_MAD_H
-/* Define if you have the <dvbpsi/dr.h> header file. */
-#undef HAVE_DVBPSI_DR_H
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the <dvdcss/dvdcss.h> header file. */
-#undef HAVE_DVDCSS_DVDCSS_H
+/* Define to 1 if you have the `memalign' function. */
+#undef HAVE_MEMALIGN
-/* Define if you have the <dvdplay/dvdplay.h> header file. */
-#undef HAVE_DVDPLAY_DVDPLAY_H
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the <dvdread/dvd_reader.h> header file. */
-#undef HAVE_DVDREAD_DVD_READER_H
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
-/* Define if you have the <faad.h> header file. */
-#undef HAVE_FAAD_H
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
-/* Define if you have the <gdk/gdk.h> header file. */
-#undef HAVE_GDK_GDK_H
+/* Define if nanosleep is available. */
+#undef HAVE_NANOSLEEP
-/* Define if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
-/* Define if you have the <glib.h> header file. */
-#undef HAVE_GLIB_H
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
-/* Define if you have the <gnome.h> header file. */
-#undef HAVE_GNOME_H
+/* Define to 1 if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
-/* Define if you have the <gtk/gtk.h> header file. */
-#undef HAVE_GTK_GTK_H
+/* Define to 1 if you have the <ogg/ogg.h> header file. */
+#undef HAVE_OGG_OGG_H
-/* Define if you have the <image.h> header file. */
-#undef HAVE_IMAGE_H
+/* Define to 1 if you have the <Ph.h> header file. */
+#undef HAVE_PH_H
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
-/* Define if you have the <kernel/OS.h> header file. */
-#undef HAVE_KERNEL_OS_H
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
-/* Define if you have the <kernel/scheduler.h> header file. */
-#undef HAVE_KERNEL_SCHEDULER_H
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
-/* Define if you have the <libdv/dv.h> header file. */
-#undef HAVE_LIBDV_DV_H
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
-/* Define if you have the <libv4l/v4l.h> header file. */
-#undef HAVE_LIBV4L_V4L_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
-/* Define if you have the <linux/fb.h> header file. */
-#undef HAVE_LINUX_FB_H
+/* Define to 1 if you have the `sigrelse' function. */
+#undef HAVE_SIGRELSE
-/* Define if you have the <linux/version.h> header file. */
-#undef HAVE_LINUX_VERSION_H
+/* Define to 1 if you have the <soundcard.h> header file. */
+#undef HAVE_SOUNDCARD_H
-/* Define if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
-/* Define if you have the <machine/param.h> header file. */
-#undef HAVE_MACHINE_PARAM_H
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
-/* Define if you have the <machine/soundcard.h> header file. */
-#undef HAVE_MACHINE_SOUNDCARD_H
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
-/* Define if you have the <mad.h> header file. */
-#undef HAVE_MAD_H
+/* Define to 1 if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
-/* Define if you have the <net/if.h> header file. */
-#undef HAVE_NET_IF_H
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
-/* Define if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
-/* Define if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
-/* Define if you have the <ogg/ogg.h> header file. */
-#undef HAVE_OGG_OGG_H
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
-/* Define if you have the <pthread.h> header file. */
-#undef HAVE_PTHREAD_H
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
-/* Define if you have the <soundcard.h> header file. */
-#undef HAVE_SOUNDCARD_H
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
-/* Define if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
+/* Define to 1 if you have the `strtod' function. */
+#undef HAVE_STRTOD
-/* Define if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
-/* Define if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
-/* Define if you have the <string.h> header file. */
-#undef HAVE_STRING_H
+/* Define if <sys/time.h> defines struct timespec. */
+#undef HAVE_STRUCT_TIMESPEC
-/* Define if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
+/* Define to 1 if you have the `swab' function. */
+#undef HAVE_SWAB
-/* Define if you have the <sys/int_types.h> header file. */
+/* Define to 1 if you have the <sys/int_types.h> header file. */
#undef HAVE_SYS_INT_TYPES_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <sys/shm.h> header file. */
+/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
-/* Define if you have the <sys/socket.h> header file. */
+/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
-/* Define if you have the <sys/sockio.h> header file. */
+/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
-/* Define if you have the <sys/soundcard.h> header file. */
+/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
-/* Define if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
-/* Define if you have the <sys/times.h> header file. */
+/* Define to 1 if you have the <sys/times.h> header file. */
#undef HAVE_SYS_TIMES_H
-/* Define if you have the <sys/types.h> header file. */
+/* Define to 1 if you have the <sys/time.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
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <zlib.h> header file. */
-#undef HAVE_ZLIB_H
+/* Support for variadic macros */
+#undef HAVE_VARIADIC_MACROS
-/* Define if you have the pth library (-lpth). */
-#undef HAVE_LIBPTH
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
-/* Define if you have the st library (-lst). */
-#undef HAVE_LIBST
+/* Define to 1 if you have the <X11/extensions/dpms.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DPMS_H
-/* Package name */
-#undef VLC_PACKAGE
+/* Define to 1 if you have the <X11/extensions/Xv.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XV_H
-/* Package version */
-#undef VLC_VERSION
+/* Define to 1 if you have the <X11/Xlib.h> header file. */
+#undef HAVE_X11_XLIB_H
-/* Define if you have the iconv() function. */
-#undef HAVE_ICONV
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define to 1 if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
-/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
-#undef HAVE_LANGINFO_CODESET
+/* String suffix for module functions */
+#undef MODULE_SUFFIX
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Symbol suffix for module functions */
+#undef MODULE_SYMBOL
-/* Define to 1 if translation of program messages to the user's native language
- is requested. */
-#undef ENABLE_NLS
+/* Define if <sys/param.h> defines ntohl. */
+#undef NTOHL_IN_SYS_PARAM_H
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#undef HAVE_GETTEXT
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
-/* Define if nanosleep is available. */
-#undef HAVE_NANOSLEEP
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
-/* long getopt support */
-#undef HAVE_GETOPT_LONG
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
-/* getopt support */
-#undef HAVE_GETOPT_LONG
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
/* Define if <pthread.h> defines pthread_cond_t. */
#undef PTHREAD_COND_T_IN_PTHREAD_H
/* Define if <pthread.h> defines pthread_once. */
#undef PTHREAD_ONCE_IN_PTHREAD_H
-/* Define if <strings.h> defines strncasecmp. */
-#undef STRNCASECMP_IN_STRINGS_H
-
-/* Define if <time.h> defines nanosleep. */
-#undef HAVE_DECL_NANOSLEEP
-
-/* Define if <sys/time.h> defines struct timespec. */
-#undef HAVE_STRUCT_TIMESPEC
-
-/* Define if <X11/extensions/dpms.h> defines DPMSInfo. */
-#undef DPMSINFO_IN_DPMS_H
-
-/* Define if <sys/param.h> defines ntohl. */
-#undef NTOHL_IN_SYS_PARAM_H
-
-/* Support for variadic macros */
-#undef HAVE_VARIADIC_MACROS
-
-/* Maximum supported data alignment */
-#undef ATTRIBUTE_ALIGNED_MAX
-
-/* Define if $CC groks 3D Now! inline assembly. */
-#undef CAN_COMPILE_3DNOW
-
-/* Define if $CC groks SSE inline assembly. */
-#undef CAN_COMPILE_SSE
-
-/* 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 <pth.h> defines pth_init */
+#undef PTH_INIT_IN_PTH_H
-/* For FreeBSD VCD support */
-#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
#undef SDL_INCLUDE_FILE
-/* big endian system */
-#undef WORDS_BIGENDIAN
+/* If using the C implementation of alloca, define if you know the
+ 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 if <pth.h> defines pth_init */
-#undef PTH_INIT_IN_PTH_H
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if <strings.h> defines strncasecmp. */
+#undef STRNCASECMP_IN_STRINGS_H
/* Define if <st.h> defines st_init */
#undef ST_INIT_IN_ST_H
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
/* Simple version string */
#undef VERSION_MESSAGE
-/* Copyright string */
-#undef COPYRIGHT_MESSAGE
+/* Package name */
+#undef VLC_PACKAGE
-/* The ./configure command line */
-#undef CONFIGURE_LINE
+/* Package version */
+#undef VLC_VERSION
-/* String suffix for module functions */
-#undef MODULE_SUFFIX
+/* big endian system */
+#undef WORDS_BIGENDIAN
-/* Symbol suffix for module functions */
-#undef MODULE_SYMBOL
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_ext-dec.h,v 1.68 2002/08/08 00:35:10 sam Exp $
+ * $Id: input_ext-dec.h,v 1.69 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
vlc_fourcc_t i_fourcc;
es_sys_t * p_demux_data;
stream_ctrl_t * p_stream_ctrl;
+ sout_instance_t * p_sout;
/* Module properties */
module_t * p_module;
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.75 2002/08/07 00:29:36 sam Exp $
+ * $Id: input_ext-intf.h,v 1.76 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Stream control */
stream_ctrl_t control;
+ /* Optional stream output */
+ sout_instance_t * p_sout;
+
/* Input info */
input_info_category_t * p_info;
--- /dev/null
+/*****************************************************************************
+ * stream_output.h : stream output module
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: stream_output.h,v 1.1 2002/08/12 22:12:50 massiot Exp $
+ *
+ * Authors: Christophe Massiot <massiot@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.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * sout_instance_t: stream output thread descriptor
+ *****************************************************************************/
+struct sout_instance_t
+{
+ VLC_COMMON_MEMBERS
+
+ char * psz_dest;
+ char * psz_access;
+ char * psz_mux;
+ char * psz_name;
+
+ module_t * p_access;
+ module_t * p_mux;
+};
+
+/*****************************************************************************
+ * Prototypes
+ *****************************************************************************/
+#define sout_NewInstance(a,b) __sout_NewInstance(VLC_OBJECT(a),b)
+VLC_EXPORT( sout_instance_t *, __sout_NewInstance, ( vlc_object_t *, char * ) );
+VLC_EXPORT( void, sout_DeleteInstance, ( sout_instance_t * ) );
+
+sout_fifo_t * sout_CreateFifo ( void );
+void sout_DestroyFifo ( sout_fifo_t * );
+void sout_FreeFifo ( sout_fifo_t * );
+
--- /dev/null
+/*****************************************************************************
+ * sout.h: video output header for vlc
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: sout.h,v 1.1 2002/08/12 22:12:50 massiot Exp $
+ *
+ * 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.
+ *****************************************************************************/
+
+#ifndef _VLC_SOUT_H
+#define _VLC_SOUT_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/*****************************************************************************
+ * Required public headers
+ *****************************************************************************/
+#include <vlc/vlc.h>
+
+/*****************************************************************************
+ * Required internal headers
+ *****************************************************************************/
+#include "stream_output.h"
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* <vlc/sout.h> */
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.18 2002/08/12 09:34:15 sam Exp $
+ * $Id: vlc_common.h,v 1.19 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
typedef struct subpicture_t subpicture_t;
typedef struct subpicture_sys_t subpicture_sys_t;
+/* Stream output */
+typedef struct sout_instance_t sout_instance_t;
+typedef struct sout_fifo_t sout_fifo_t;
+
/* Decoders */
typedef struct decoder_fifo_t decoder_fifo_t;
* vlc_objects.h: vlc_object_t definition.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: vlc_objects.h,v 1.6 2002/08/12 09:34:15 sam Exp $
+ * $Id: vlc_objects.h,v 1.7 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#define VLC_OBJECT_DECODER (-7)
#define VLC_OBJECT_VOUT (-8)
#define VLC_OBJECT_AOUT (-9)
+#define VLC_OBJECT_SOUT (-10)
#define VLC_OBJECT_GENERIC (-666)
/* Object search mode */
pgrm_descriptor_t * (* input_AddProgram_inner) ( input_thread_t *, u16, size_t ) ;
pgrm_descriptor_t * (* input_FindProgram_inner) ( input_thread_t *, u16 ) ;
picture_t * (* vout_CreatePicture_inner) ( vout_thread_t *, vlc_bool_t, vlc_bool_t, vlc_bool_t ) ;
+ sout_instance_t * (* __sout_NewInstance_inner) ( vlc_object_t *, char * ) ;
ssize_t (* input_FDNetworkRead_inner) ( input_thread_t *, byte_t *, size_t ) ;
ssize_t (* input_FDRead_inner) ( input_thread_t *, byte_t *, size_t ) ;
ssize_t (* input_FillBuffer_inner) ( input_thread_t * ) ;
void (* msleep_inner) ( mtime_t delay ) ;
void (* mwait_inner) ( mtime_t date ) ;
void (* playlist_Command_inner) ( playlist_t *, int, int ) ;
+ void (* sout_DeleteInstance_inner) ( sout_instance_t * ) ;
void (* vout_AllocatePicture_inner) ( vout_thread_t *, picture_t *, int, int, u32 ) ;
void (* vout_DatePicture_inner) ( vout_thread_t *, picture_t *, mtime_t ) ;
void (* vout_DestroyPicture_inner) ( vout_thread_t *, picture_t * ) ;
# define __msg_Warn p_symbols->__msg_Warn_inner
# define __network_ChannelCreate p_symbols->__network_ChannelCreate_inner
# define __network_ChannelJoin p_symbols->__network_ChannelJoin_inner
+# define __sout_NewInstance p_symbols->__sout_NewInstance_inner
# define __vlc_cond_destroy p_symbols->__vlc_cond_destroy_inner
# define __vlc_cond_init p_symbols->__vlc_cond_init_inner
# define __vlc_dumpstructure p_symbols->__vlc_dumpstructure_inner
# define playlist_Add p_symbols->playlist_Add_inner
# define playlist_Command p_symbols->playlist_Command_inner
# define playlist_Delete p_symbols->playlist_Delete_inner
+# define sout_DeleteInstance p_symbols->sout_DeleteInstance_inner
# define vout_AllocatePicture p_symbols->vout_AllocatePicture_inner
# define vout_ChromaCmp p_symbols->vout_ChromaCmp_inner
# define vout_CreatePicture p_symbols->vout_CreatePicture_inner
* trivial.c : trivial resampler (skips samples or pads with zeroes)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.2 2002/08/10 20:01:00 massiot Exp $
+ * $Id: trivial.c,v 1.3 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
vlc_module_end();
/*****************************************************************************
- * Create: allocate trivial mixer
+ * Create: allocate trivial resampler
*****************************************************************************
* This function allocates and initializes a Crop vout method.
*****************************************************************************/
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.3 2002/08/11 22:36:35 massiot Exp $
+ * $Id: trivial.c,v 1.4 2002/08/12 22:12:50 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
(u32 *)p_input->p_first_byte_to_mix;
u32 * p_out = (u32 *)p_buffer->p_buffer;
-
if ( p_input->input.i_channels < p_aout->mixer.output.i_channels )
{
/* Zero out the destination buffer, to avoid static on unavailable
* file.c : audio output which writes the samples to a file
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: file.c,v 1.3 2002/08/09 23:47:23 massiot Exp $
+ * $Id: file.c,v 1.4 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "aout_internal.h"
+#define FRAME_SIZE 2048
+
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
}
p_aout->output.output.i_format = format_int[i];
- p_aout->output.i_nb_samples = 2048;
+ p_aout->output.i_nb_samples = FRAME_SIZE;
return 0;
}
* spdif.c: A52 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001-2002 VideoLAN
- * $Id: spdif.c,v 1.3 2002/08/11 23:26:28 massiot Exp $
+ * $Id: spdif.c,v 1.4 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
p_buffer->end_date = last_date;
/* Get the whole frame. */
- memcpy( p_buffer->p_buffer + sizeof(u16), p_header, 7 );
- GetChunk( &p_dec->bit_stream, p_buffer->p_buffer + 7 + sizeof(u16),
+ memcpy( p_buffer->p_buffer, p_header, 7 );
+ GetChunk( &p_dec->bit_stream, p_buffer->p_buffer + 7,
i_frame_size - 7 );
if( p_dec->p_fifo->b_die ) break;
* aout_dummy.c : dummy audio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout.c,v 1.2 2002/08/07 21:36:56 massiot Exp $
+ * $Id: aout.c,v 1.3 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "aout_internal.h"
+#define FRAME_SIZE 2048
+
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
*****************************************************************************/
static int SetFormat( aout_instance_t * p_aout )
{
- p_aout->output.i_nb_samples = 2048;
+ p_aout->output.i_nb_samples = FRAME_SIZE;
return 0;
}
* aout_sdl.c : audio sdl functions library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: aout.c,v 1.3 2002/08/12 09:34:15 sam Exp $
+ * $Id: aout.c,v 1.4 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
#include SDL_INCLUDE_FILE
-#define DEFAULT_FRAME_SIZE 2048
+#define FRAME_SIZE 2048
/*****************************************************************************
* Local prototypes
desired.channels = p_aout->output.output.i_channels;
desired.callback = SDLCallback;
desired.userdata = p_aout;
- desired.samples = DEFAULT_FRAME_SIZE;
+ desired.samples = FRAME_SIZE;
- /* Open the sound device - FIXME : get the "natural" paramaters */
+ /* Open the sound device - FIXME : get the "natural" parameters */
if( SDL_OpenAudio( &desired, NULL ) < 0 )
{
return -1;
/* FIXME : take into account SDL latency instead of mdate() */
aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate() );
- if ( i_len != DEFAULT_FRAME_SIZE * sizeof(s16)
+ if ( i_len != FRAME_SIZE * sizeof(s16)
* p_aout->output.output.i_channels )
{
msg_Err( p_aout, "SDL doesn't know its buffer size (%d)", i_len );
* input.c : internal management of input streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: input.c,v 1.2 2002/08/09 23:47:23 massiot Exp $
+ * $Id: input.c,v 1.3 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Prepare FIFO. */
aout_FifoInit( p_aout, &p_input->fifo );
p_input->p_first_byte_to_mix = NULL;
+ p_input->next_packet_date = 0;
/* Create filters. */
if ( aout_FiltersCreatePipeline( p_aout, p_input->pp_filters,
* mixer.c : audio output mixing operations
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: mixer.c,v 1.2 2002/08/11 22:36:35 massiot Exp $
+ * $Id: mixer.c,v 1.3 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/* Run the mixer. */
aout_BufferAlloc( &p_aout->mixer.output_alloc,
- (u64)(p_aout->output.i_nb_samples * 1000000)
+ ((u64)p_aout->output.i_nb_samples * 1000000)
/ p_aout->output.output.i_rate,
/* This is a bit kludgy, but is actually only used
* for the S/PDIF dummy mixer : */
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: output.c,v 1.3 2002/08/11 22:36:35 massiot Exp $
+ * $Id: output.c,v 1.4 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* aout_OutputNextBuffer : give the audio output plug-in the right buffer
+ *****************************************************************************
+ * If b_can_sleek is 1, the aout core functions won't try to resample
+ * new buffers to catch up - that is we suppose that the output plug-in can
+ * do it by itself. S/PDIF outputs should always set b_can_sleek = 1.
*****************************************************************************/
aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
- mtime_t start_date )
+ mtime_t start_date /*,
+ vlc_bool_t b_can_sleek */ )
{
aout_buffer_t * p_buffer;
return NULL;
}
+ /* Here we suppose that all buffers have the same duration - this is
+ * generally true, and anyway if it's wrong it won't be a disaster. */
if ( p_buffer->start_date > start_date
- + (mtime_t)p_aout->output.i_nb_samples
- * 1000000 / p_aout->output.output.i_rate )
+ + (p_buffer->end_date - p_buffer->start_date) )
{
vlc_mutex_unlock( &p_aout->output.fifo.lock );
msg_Dbg( p_aout, "audio output is starving (%lld)",
return NULL;
}
- /* FIXME : there we should handle the case where start_date is not
- * completely equal to p_buffer->start_date. */
+#if 0
+ if ( !b_can_sleek )
+ {
+ /* Try to compensate the drift by doing some resampling. */
+ int i;
+
+ /* Take the mixer lock because no input can be removed when the
+ * the mixer lock is taken. */
+ vlc_mutex_lock( &p_aout->mixer_lock );
+ for ( i = 0; i < p_input->i_nb_inputs; i++ )
+ {
+ aout_input_t * p_input = p_aout->pp_inputs[i];
+ }
+ vlc_mutex_lock( &p_aout->mixer_lock );
+ }
+#endif
p_aout->output.fifo.p_first = p_buffer->p_next;
if ( p_buffer->p_next == NULL )
* Read an MPEG2 stream, demultiplex and parse it before sending it to
* decoders.
*****************************************************************************
- * Copyright (C) 1998-2001 VideoLAN
- * $Id: input.c,v 1.209 2002/07/31 20:56:52 sam Exp $
+ * Copyright (C) 1998-2002 VideoLAN
+ * $Id: input.c,v 1.210 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
+#include "stream_output.h"
+
#include "interface.h"
/*****************************************************************************
p_input->stream.b_new_mute = MUTE_NO_CHANGE;
p_input->stream.i_mux_rate = 0;
p_input->stream.b_seekable = 0;
+ p_input->stream.p_sout = NULL;
/* no stream, no program, no area, no es */
p_input->stream.p_new_program = NULL;
return -1;
}
+ /* Initialize optional stream output. */
+ psz_parser = config_GetPsz( p_input, "sout" );
+ if ( psz_parser != NULL )
+ {
+ if ( (p_input->stream.p_sout = sout_NewInstance( p_input, psz_parser ))
+ == NULL )
+ {
+ msg_Err( p_input, "cannot start stream output instance, aborting" );
+ free( psz_parser );
+ module_Unneed( p_input, p_input->p_access );
+ module_Unneed( p_input, p_input->p_demux );
+ return -1;
+ }
+
+ free( psz_parser );
+ }
+
return 0;
}
/* Free all ES and destroy all decoder threads */
input_EndStream( p_input );
+ /* Close optional stream output instance */
+ if ( p_input->stream.p_sout != NULL )
+ {
+ sout_DeleteInstance( p_input->stream.p_sout );
+ }
+
/* Free demultiplexer's data */
module_Unneed( p_input, p_input->p_demux );
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.44 2002/08/12 09:34:15 sam Exp $
+ * $Id: input_dec.c,v 1.45 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_fifo->p_demux_data = p_es->p_demux_data;
p_fifo->p_stream_ctrl = &p_input->stream.control;
+ p_fifo->p_sout = p_input->stream.p_sout;
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.h,v 1.12 2002/08/08 00:35:11 sam Exp $
+ * $Id: libvlc.h,v 1.13 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
"'any' at the end of the list to make sure there is a fallback for the " \
"types you didn't specify.")
+#define SOUT_TEXT N_("choose a stream output")
+#define SOUT_LONGTEXT N_( \
+ "Empty if no stream output.")
+
#define MMX_TEXT N_("enable CPU MMX support")
#define MMX_LONGTEXT N_( \
"If your processor supports the MMX instructions set, vlc can take " \
add_module( "memcpy", "memcpy", NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT );
add_module( "access", "access", NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT );
add_module( "demux", "demux", NULL, NULL, DEMUX_TEXT, DEMUX_LONGTEXT );
+ add_string( "sout", NULL, NULL, SOUT_TEXT, SOUT_LONGTEXT );
#if defined(WIN32)
add_bool( "fast-mutex", 0, NULL, FAST_MUTEX_TEXT, FAST_MUTEX_LONGTEXT );
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.83 2002/08/12 09:34:15 sam Exp $
+ * $Id: modules.c,v 1.84 2002/08/12 22:12:51 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
#include "audio_output.h"
+#include "stream_output.h"
+
#include "iso_lang.h"
#ifdef HAVE_DYNAMIC_PLUGINS
(p_symbols)->msleep_inner = msleep; \
(p_symbols)->__network_ChannelJoin_inner = __network_ChannelJoin; \
(p_symbols)->__network_ChannelCreate_inner = __network_ChannelCreate; \
+ (p_symbols)->__sout_NewInstance_inner = __sout_NewInstance; \
+ (p_symbols)->sout_DeleteInstance_inner = sout_DeleteInstance; \
(p_symbols)->__vout_CreateThread_inner = __vout_CreateThread; \
(p_symbols)->vout_DestroyThread_inner = vout_DestroyThread; \
(p_symbols)->vout_ChromaCmp_inner = vout_ChromaCmp; \
--- /dev/null
+/*****************************************************************************
+ * stream_output.c : stream output module
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: stream_output.c,v 1.1 2002/08/12 22:12:51 massiot Exp $
+ *
+ * Authors: Christophe Massiot <massiot@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 <errno.h> /* ENOMEM */
+#include <stdlib.h> /* free() */
+#include <stdio.h> /* sprintf() */
+#include <string.h> /* strerror() */
+
+#include <vlc/vlc.h>
+
+#include <vlc/sout.h>
+
+/*****************************************************************************
+ * Local prototypes
+ *****************************************************************************/
+static int InitInstance ( sout_instance_t * );
+
+/*****************************************************************************
+ * sout_NewInstance: creates a new stream output instance
+ *****************************************************************************/
+sout_instance_t * __sout_NewInstance ( vlc_object_t *p_parent,
+ char * psz_dest )
+{
+ sout_instance_t * p_sout;
+
+ /* Allocate descriptor */
+ p_sout = vlc_object_create( p_parent, VLC_OBJECT_SOUT );
+ if( p_sout == NULL )
+ {
+ msg_Err( p_parent, "out of memory" );
+ return NULL;
+ }
+
+ p_sout->psz_dest = psz_dest;
+ if ( InitInstance( p_sout ) == -1 )
+ {
+ vlc_object_destroy( p_sout );
+ return NULL;
+ }
+
+ return p_sout;
+}
+
+/*****************************************************************************
+ * InitInstance: opens appropriate modules
+ *****************************************************************************/
+static int InitInstance( sout_instance_t * p_sout )
+{
+ /* Parse dest string. Syntax : [[<access>][/<mux>]:][<dest>] */
+ /* This code is identical to input.c:InitThread. FIXME : factorize it ? */
+ char * psz_parser = p_sout->psz_dest;
+
+ /* Skip the plug-in names */
+ while( *psz_parser && *psz_parser != ':' )
+ {
+ psz_parser++;
+ }
+#ifdef WIN32
+ if( psz_parser - psz_dest == 1 )
+ {
+ msg_Warn( p_sout, "drive letter %c: found in source string",
+ p_sout->psz_dest ) ;
+ psz_parser = "";
+ }
+#endif
+
+ if( !*psz_parser )
+ {
+ p_sout->psz_access = p_sout->psz_mux = "";
+ p_sout->psz_name = p_sout->psz_dest;
+ }
+ else
+ {
+ *psz_parser++ = '\0';
+
+ /* let's skip '//' */
+ if( psz_parser[0] == '/' && psz_parser[1] == '/' )
+ {
+ psz_parser += 2 ;
+ }
+
+ p_sout->psz_name = psz_parser ;
+
+ /* Come back to parse the access and mux plug-ins */
+ psz_parser = p_sout->psz_dest;
+
+ if( !*psz_parser )
+ {
+ /* No access */
+ p_sout->psz_access = "";
+ }
+ else if( *psz_parser == '/' )
+ {
+ /* No access */
+ p_sout->psz_access = "";
+ psz_parser++;
+ }
+ else
+ {
+ p_sout->psz_access = psz_parser;
+
+ while( *psz_parser && *psz_parser != '/' )
+ {
+ psz_parser++;
+ }
+
+ if( *psz_parser == '/' )
+ {
+ *psz_parser++ = '\0';
+ }
+ }
+
+ if( !*psz_parser )
+ {
+ /* No mux */
+ p_sout->psz_mux = "";
+ }
+ else
+ {
+ p_sout->psz_mux = psz_parser;
+ }
+ }
+
+ msg_Dbg( p_sout, "access `%s', mux `%s', name `%s'",
+ p_sout->psz_access, p_sout->psz_mux, p_sout->psz_name );
+
+
+ /* Find and open appropriate access module */
+ p_sout->p_access =
+ module_Need( p_sout, "sout access", p_sout->psz_access );
+
+ if( p_sout->p_access == NULL )
+ {
+ msg_Err( p_sout, "no suitable sout access module for `%s/%s://%s'",
+ p_sout->psz_access, p_sout->psz_mux, p_sout->psz_name );
+ return -1;
+ }
+
+ /* Find and open appropriate mux module */
+ p_sout->p_mux =
+ module_Need( p_sout, "sout mux", p_sout->psz_mux );
+
+ if( p_sout->p_mux == NULL )
+ {
+ msg_Err( p_sout, "no suitable mux module for `%s/%s://%s'",
+ p_sout->psz_access, p_sout->psz_mux, p_sout->psz_name );
+ module_Unneed( p_sout, p_sout->p_access );
+ return -1;
+ }
+}
+
+
+/*****************************************************************************
+ * sout_DeleteInstance: delete a previously allocated instance
+ *****************************************************************************/
+void sout_DeleteInstance( sout_instance_t * p_sout )
+{
+ /* Unlink object */
+ vlc_object_detach( p_sout );
+
+ /* Free structure */
+ vlc_object_destroy( p_sout );
+}
+