switch ( p_config->i_type )
{
case CONFIG_ITEM_BOOL :
- p_retval = PyBool_FromLong( p_config->i_value );
+ p_retval = PyBool_FromLong( p_config->value.i );
break;
case CONFIG_ITEM_INTEGER :
- p_retval = PyInt_FromLong( ( long )p_config->i_value );
+ p_retval = PyInt_FromLong( ( long )p_config->value.i );
break;
case CONFIG_ITEM_KEY :
- p_retval = PyString_FromFormat( "A hotkey variable ( %d )", p_config->i_value );
+ p_retval = PyString_FromFormat( "A hotkey variable ( %d )", p_config->value.i );
break;
case CONFIG_ITEM_FILE :
case CONFIG_ITEM_STRING :
case CONFIG_ITEM_DIRECTORY :
case CONFIG_ITEM_MODULE :
vlc_mutex_lock( p_config->p_lock );
- if( p_config->psz_value )
- p_retval = PyString_FromString( p_config->psz_value );
+ if( p_config->value.psz )
+ p_retval = PyString_FromString( p_config->value.psz );
else
p_retval = PyString_FromString( "" );
vlc_mutex_unlock( p_config->p_lock );
( ( vlcObject* )p_retval )->p_object = value.p_object;
break;
case CONFIG_ITEM_FLOAT :
- p_retval = PyFloat_FromDouble( ( double )p_config->f_value );
+ p_retval = PyFloat_FromDouble( ( double )p_config->value.f );
break;
default:
p_retval = Py_None;
dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
dnl New definitions with value matching 0.9.0 release
-module_symbol="0_9_0a"
+module_symbol="0_9_0b"
AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $module_symbol, [Symbol suffix for module functions])
VLC_ENTRY="vlc_entry__${module_symbol}"
+++ /dev/null
-/*****************************************************************************
- * aout_internal.h : internal defines for audio output
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * aout_alloc_t : allocation of memory in the audio output
- *****************************************************************************/
-typedef struct aout_alloc_t
-{
- int i_alloc_type;
- int i_bytes_per_sec;
-} aout_alloc_t;
-
-#define AOUT_ALLOC_NONE 0
-#define AOUT_ALLOC_STACK 1
-#define AOUT_ALLOC_HEAP 2
-
-#if defined( __APPLE__ ) || defined( SYS_BSD )
-#undef HAVE_ALLOCA
-#endif
-
-#ifdef HAVE_ALLOCA
-# define ALLOCA_TEST( p_alloc, p_new_buffer ) \
- if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK ) \
- { \
- (p_new_buffer) = alloca( i_alloc_size + sizeof(aout_buffer_t) );\
- i_alloc_type = AOUT_ALLOC_STACK; \
- } \
- else
-#else
-# define ALLOCA_TEST( p_alloc, p_new_buffer )
-#endif
-
-#define aout_BufferAlloc( p_alloc, i_nb_usec, p_previous_buffer, \
- p_new_buffer ) \
- if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_NONE ) \
- { \
- (p_new_buffer) = p_previous_buffer; \
- } \
- else \
- { \
- int i_alloc_size, i_alloc_type; \
- i_alloc_size = (int)( (uint64_t)(p_alloc)->i_bytes_per_sec \
- * (i_nb_usec) / 1000000 + 1 ); \
- ALLOCA_TEST( p_alloc, p_new_buffer ) \
- { \
- (p_new_buffer) = malloc( i_alloc_size + sizeof(aout_buffer_t) );\
- i_alloc_type = AOUT_ALLOC_HEAP; \
- } \
- if ( p_new_buffer != NULL ) \
- { \
- (p_new_buffer)->i_alloc_type = i_alloc_type; \
- (p_new_buffer)->i_size = i_alloc_size; \
- (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 ) \
- if( p_buffer != NULL && (p_buffer)->i_alloc_type == AOUT_ALLOC_HEAP ) \
- { \
- free( p_buffer ); \
- } \
- p_buffer = NULL;
-
-/*****************************************************************************
- * aout_fifo_t : audio output buffer FIFO
- *****************************************************************************/
-struct aout_fifo_t
-{
- aout_buffer_t * p_first;
- aout_buffer_t ** pp_last;
- audio_date_t end_date;
-};
-
-/*****************************************************************************
- * aout_filter_t : audio output filter
- *****************************************************************************/
-struct aout_filter_t
-{
- VLC_COMMON_MEMBERS
-
- audio_sample_format_t input;
- audio_sample_format_t output;
- aout_alloc_t output_alloc;
-
- module_t * p_module;
- struct aout_filter_sys_t * p_sys;
- void (* pf_do_work)( struct aout_instance_t *,
- struct aout_filter_t *,
- struct aout_buffer_t *,
- struct aout_buffer_t * );
- vlc_bool_t b_in_place;
- vlc_bool_t b_continuity;
-};
-
-/*****************************************************************************
- * aout_mixer_t : audio output mixer
- *****************************************************************************/
-typedef struct aout_mixer_t
-{
- audio_sample_format_t mixer;
- aout_alloc_t output_alloc;
-
- module_t * p_module;
- struct aout_mixer_sys_t * p_sys;
- void (* pf_do_work)( struct aout_instance_t *,
- struct aout_buffer_t * );
-
- /* If b_error == 1, there is no mixer. */
- vlc_bool_t b_error;
- /* Multiplier used to raise or lower the volume of the sound in
- * software. Beware, this creates sound distortion and should be avoided
- * as much as possible. This isn't available for non-float32 mixer. */
- float f_multiplier;
-} aout_mixer_t;
-
-/*****************************************************************************
- * aout_input_t : input stream for the audio output
- *****************************************************************************/
-#define AOUT_RESAMPLING_NONE 0
-#define AOUT_RESAMPLING_UP 1
-#define AOUT_RESAMPLING_DOWN 2
-struct aout_input_t
-{
- /* When this lock is taken, the pipeline cannot be changed by a
- * third-party. */
- vlc_mutex_t lock;
-
- /* The input thread that spawned this input */
- input_thread_t *p_input_thread;
-
- audio_sample_format_t input;
- aout_alloc_t input_alloc;
-
- /* pre-filters */
- aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
- int i_nb_filters;
-
- /* resamplers */
- aout_filter_t * pp_resamplers[AOUT_MAX_FILTERS];
- int i_nb_resamplers;
- int i_resampling_type;
- mtime_t i_resamp_start_date;
- int i_resamp_start_drift;
-
- aout_fifo_t fifo;
-
- /* Mixer information */
- byte_t * p_first_byte_to_mix;
-
- /* If b_restart == 1, the input pipeline will be re-created. */
- vlc_bool_t b_restart;
-
- /* If b_error == 1, there is no input pipeline. */
- vlc_bool_t b_error;
-
- /* Did we just change the output format? (expect buffer inconsistencies) */
- vlc_bool_t b_changed;
-
- /* internal caching delay from input */
- int i_pts_delay;
- /* desynchronisation delay request by the user */
- int i_desync;
-
-};
-
-/*****************************************************************************
- * aout_output_t : output stream for the audio output
- *****************************************************************************/
-typedef struct aout_output_t
-{
- audio_sample_format_t output;
- /* Indicates whether the audio output is currently starving, to avoid
- * printing a 1,000 "output is starving" messages. */
- vlc_bool_t b_starving;
-
- /* post-filters */
- aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
- int i_nb_filters;
-
- aout_fifo_t fifo;
-
- struct module_t * p_module;
- struct aout_sys_t * p_sys;
- void (* pf_play)( aout_instance_t * );
- int (* pf_volume_get )( aout_instance_t *, audio_volume_t * );
- int (* pf_volume_set )( aout_instance_t *, audio_volume_t );
- int (* pf_volume_infos )( aout_instance_t *, audio_volume_t * );
- int i_nb_samples;
-
- /* Current volume for the output - it's just a placeholder, the plug-in
- * may or may not use it. */
- audio_volume_t i_volume;
-
- /* If b_error == 1, there is no audio output pipeline. */
- vlc_bool_t b_error;
-} aout_output_t;
-
-/*****************************************************************************
- * aout_instance_t : audio output thread descriptor
- *****************************************************************************/
-struct aout_instance_t
-{
- VLC_COMMON_MEMBERS
-
- /* Locks : please note that if you need several of these locks, it is
- * mandatory (to avoid deadlocks) to take them in the following order :
- * mixer_lock, p_input->lock, output_fifo_lock, input_fifos_lock.
- * --Meuuh */
- /* When input_fifos_lock is taken, none of the p_input->fifo structures
- * can be read or modified by a third-party thread. */
- vlc_mutex_t input_fifos_lock;
- /* When mixer_lock is taken, all decoder threads willing to mix a
- * buffer must wait until it is released. The output pipeline cannot
- * be modified. No input stream can be added or removed. */
- vlc_mutex_t mixer_lock;
- /* When output_fifo_lock is taken, the p_aout->output.fifo structure
- * cannot be read or written by a third-party thread. */
- vlc_mutex_t output_fifo_lock;
-
- /* Input streams & pre-filters */
- aout_input_t * pp_inputs[AOUT_MAX_INPUTS];
- int i_nb_inputs;
-
- /* Mixer */
- aout_mixer_t mixer;
-
- /* Output plug-in */
- aout_output_t output;
-};
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-/* From input.c : */
-int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input );
-int aout_InputDelete( aout_instance_t * p_aout, aout_input_t * p_input );
-int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
- aout_buffer_t * p_buffer );
-
-/* From filters.c : */
-VLC_EXPORT( int, aout_FiltersCreatePipeline, ( aout_instance_t * p_aout, aout_filter_t ** pp_filters, int * pi_nb_filters, const audio_sample_format_t * p_input_format, const audio_sample_format_t * p_output_format ) );
-VLC_EXPORT( void, aout_FiltersDestroyPipeline, ( aout_instance_t * p_aout, aout_filter_t ** pp_filters, int i_nb_filters ) );
-VLC_EXPORT( void, aout_FiltersPlay, ( aout_instance_t * p_aout, aout_filter_t ** pp_filters, int i_nb_filters, aout_buffer_t ** pp_input_buffer ) );
-void aout_FiltersHintBuffers( aout_instance_t * p_aout, aout_filter_t ** pp_filters, int i_nb_filters, aout_alloc_t * p_first_alloc );
-
-/* From mixer.c : */
-int aout_MixerNew( aout_instance_t * p_aout );
-void aout_MixerDelete( aout_instance_t * p_aout );
-void aout_MixerRun( aout_instance_t * p_aout );
-int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier );
-int aout_MixerMultiplierGet( aout_instance_t * p_aout, float * pf_multiplier );
-
-/* From output.c : */
-int aout_OutputNew( aout_instance_t * p_aout,
- audio_sample_format_t * p_format );
-void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
-void aout_OutputDelete( aout_instance_t * p_aout );
-VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) );
-
-/* From common.c : */
-VLC_EXPORT( unsigned int, aout_FormatNbChannels, ( const audio_sample_format_t * p_format ) );
-VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
-VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) );
-VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 ) );
-VLC_EXPORT( const char *, aout_FormatPrintChannels, ( const audio_sample_format_t * ) );
-void aout_FifoInit( aout_instance_t *, aout_fifo_t *, uint32_t );
-mtime_t aout_FifoNextStart( aout_instance_t *, aout_fifo_t * );
-void aout_FifoPush( aout_instance_t *, aout_fifo_t *, aout_buffer_t * );
-void aout_FifoSet( aout_instance_t *, aout_fifo_t *, mtime_t );
-void aout_FifoMoveDates( aout_instance_t *, aout_fifo_t *, mtime_t );
-VLC_EXPORT( aout_buffer_t *, aout_FifoPop, ( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) );
-void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo );
-VLC_EXPORT( mtime_t, aout_FifoFirstDate, ( aout_instance_t *, aout_fifo_t * ) );
-
-/* From intf.c :*/
-VLC_EXPORT( void, aout_VolumeSoftInit, ( aout_instance_t * ) );
-int aout_VolumeSoftGet( aout_instance_t *, audio_volume_t * );
-int aout_VolumeSoftSet( aout_instance_t *, audio_volume_t );
-int aout_VolumeSoftInfos( aout_instance_t *, audio_volume_t * );
-VLC_EXPORT( void, aout_VolumeNoneInit, ( aout_instance_t * ) );
-int aout_VolumeNoneGet( aout_instance_t *, audio_volume_t * );
-int aout_VolumeNoneSet( aout_instance_t *, audio_volume_t );
-int aout_VolumeNoneInfos( aout_instance_t *, audio_volume_t * );
-
+++ /dev/null
-/*****************************************************************************
- * audio_output.h : audio output interface
- *****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-#ifndef _VLC_AUDIO_OUTPUT_H
-#define _VLC_AUDIO_OUTPUT_H 1
-
-#include "vlc_es.h"
-
-#define AOUT_FMTS_IDENTICAL( p_first, p_second ) ( \
- ((p_first)->i_format == (p_second)->i_format) \
- && ((p_first)->i_rate == (p_second)->i_rate) \
- && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
- && ((p_first)->i_original_channels == (p_second)->i_original_channels) )
-
-/* Check if i_rate == i_rate and i_channels == i_channels */
-#define AOUT_FMTS_SIMILAR( p_first, p_second ) ( \
- ((p_first)->i_rate == (p_second)->i_rate) \
- && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
- && ((p_first)->i_original_channels == (p_second)->i_original_channels) )
-
-#ifdef WORDS_BIGENDIAN
-# define AOUT_FMT_S16_NE VLC_FOURCC('s','1','6','b')
-# define AOUT_FMT_U16_NE VLC_FOURCC('u','1','6','b')
-# define AOUT_FMT_S24_NE VLC_FOURCC('s','2','4','b')
-# define AOUT_FMT_SPDIF_NE VLC_FOURCC('s','p','d','b')
-#else
-# define AOUT_FMT_S16_NE VLC_FOURCC('s','1','6','l')
-# define AOUT_FMT_U16_NE VLC_FOURCC('u','1','6','l')
-# define AOUT_FMT_S24_NE VLC_FOURCC('s','2','4','l')
-# define AOUT_FMT_SPDIF_NE VLC_FOURCC('s','p','d','i')
-#endif
-
-#define AOUT_FMT_NON_LINEAR( p_format ) \
- ( ((p_format)->i_format == VLC_FOURCC('s','p','d','i')) \
- || ((p_format)->i_format == VLC_FOURCC('s','p','d','b')) \
- || ((p_format)->i_format == VLC_FOURCC('a','5','2',' ')) \
- || ((p_format)->i_format == VLC_FOURCC('d','t','s',' ')) )
-
-/* This is heavily borrowed from libmad, by Robert Leslie <rob@mars.org> */
-/*
- * Fixed-point format: 0xABBBBBBB
- * A == whole part (sign + 3 bits)
- * B == fractional part (28 bits)
- *
- * Values are signed two's complement, so the effective range is:
- * 0x80000000 to 0x7fffffff
- * -8.0 to +7.9999999962747097015380859375
- *
- * The smallest representable value is:
- * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
- *
- * 28 bits of fractional accuracy represent about
- * 8.6 digits of decimal accuracy.
- *
- * Fixed-point numbers can be added or subtracted as normal
- * integers, but multiplication requires shifting the 64-bit result
- * from 56 fractional bits back to 28 (and rounding.)
- */
-typedef int32_t vlc_fixed_t;
-#define FIXED32_FRACBITS 28
-#define FIXED32_MIN ((vlc_fixed_t) -0x80000000L)
-#define FIXED32_MAX ((vlc_fixed_t) +0x7fffffffL)
-#define FIXED32_ONE ((vlc_fixed_t) 0x10000000)
-
-
-/*
- * Channels descriptions
- */
-
-/* Values available for physical and original channels */
-#define AOUT_CHAN_CENTER 0x1
-#define AOUT_CHAN_LEFT 0x2
-#define AOUT_CHAN_RIGHT 0x4
-#define AOUT_CHAN_REARCENTER 0x10
-#define AOUT_CHAN_REARLEFT 0x20
-#define AOUT_CHAN_REARRIGHT 0x40
-#define AOUT_CHAN_MIDDLELEFT 0x100
-#define AOUT_CHAN_MIDDLERIGHT 0x200
-#define AOUT_CHAN_LFE 0x1000
-
-/* Values available for original channels only */
-#define AOUT_CHAN_DOLBYSTEREO 0x10000
-#define AOUT_CHAN_DUALMONO 0x20000
-#define AOUT_CHAN_REVERSESTEREO 0x40000
-
-#define AOUT_CHAN_PHYSMASK 0xFFFF
-#define AOUT_CHAN_MAX 9
-
-/* Values used for the audio-device and audio-channels object variables */
-#define AOUT_VAR_MONO 1
-#define AOUT_VAR_STEREO 2
-#define AOUT_VAR_2F2R 4
-#define AOUT_VAR_3F2R 5
-#define AOUT_VAR_5_1 6
-#define AOUT_VAR_6_1 7
-#define AOUT_VAR_7_1 8
-#define AOUT_VAR_SPDIF 10
-
-#define AOUT_VAR_CHAN_STEREO 1
-#define AOUT_VAR_CHAN_RSTEREO 2
-#define AOUT_VAR_CHAN_LEFT 3
-#define AOUT_VAR_CHAN_RIGHT 4
-#define AOUT_VAR_CHAN_DOLBYS 5
-
-/*****************************************************************************
- * aout_buffer_t : audio output buffer
- *****************************************************************************/
-struct aout_buffer_t
-{
- byte_t * p_buffer;
- int i_alloc_type;
- /* i_size is the real size of the buffer (used for debug ONLY), i_nb_bytes
- * is the number of significative bytes in it. */
- size_t i_size, i_nb_bytes;
- unsigned int i_nb_samples;
- mtime_t start_date, end_date;
-
- struct aout_buffer_t * p_next;
-
- /** Private data (aout_buffer_t will disappear soon so no need for an
- * aout_buffer_sys_t type) */
- void * p_sys;
-
- /** This way the release can be overloaded */
- void (*pf_release)( aout_buffer_t * );
-};
-
-/* Size of a frame for S/PDIF output. */
-#define AOUT_SPDIF_SIZE 6144
-
-/* Number of samples in an A/52 frame. */
-#define A52_FRAME_NB 1536
-
-/*****************************************************************************
- * audio_date_t : date incrementation without long-term rounding errors
- *****************************************************************************/
-struct audio_date_t
-{
- mtime_t date;
- uint32_t i_divider;
- uint32_t i_remainder;
-};
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-/* From common.c : */
-#define aout_New(a) __aout_New(VLC_OBJECT(a))
-VLC_EXPORT( aout_instance_t *, __aout_New, ( vlc_object_t * ) );
-VLC_EXPORT( void, aout_Delete, ( aout_instance_t * ) );
-VLC_EXPORT( void, aout_DateInit, ( audio_date_t *, uint32_t ) );
-VLC_EXPORT( void, aout_DateSet, ( audio_date_t *, mtime_t ) );
-VLC_EXPORT( void, aout_DateMove, ( audio_date_t *, mtime_t ) );
-VLC_EXPORT( mtime_t, aout_DateGet, ( const audio_date_t * ) );
-VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, uint32_t ) );
-
-VLC_EXPORT( int, aout_CheckChannelReorder, ( const uint32_t *, const uint32_t *, uint32_t, int, int * ) );
-VLC_EXPORT( void, aout_ChannelReorder, ( uint8_t *, int, int, const int *, int ) );
-
-/* From dec.c : */
-#define aout_DecNew(a, b, c) __aout_DecNew(VLC_OBJECT(a), b, c)
-VLC_EXPORT( aout_input_t *, __aout_DecNew, ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) );
-VLC_EXPORT( int, aout_DecDelete, ( aout_instance_t *, aout_input_t * ) );
-VLC_EXPORT( aout_buffer_t *, aout_DecNewBuffer, ( aout_instance_t *, aout_input_t *, size_t ) );
-VLC_EXPORT( void, aout_DecDeleteBuffer, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
-VLC_EXPORT( int, aout_DecPlay, ( aout_instance_t *, aout_input_t *, aout_buffer_t * ) );
-
-/* From intf.c : */
-#define aout_VolumeGet(a, b) __aout_VolumeGet(VLC_OBJECT(a), b)
-VLC_EXPORT( int, __aout_VolumeGet, ( vlc_object_t *, audio_volume_t * ) );
-#define aout_VolumeSet(a, b) __aout_VolumeSet(VLC_OBJECT(a), b)
-VLC_EXPORT( int, __aout_VolumeSet, ( vlc_object_t *, audio_volume_t ) );
-#define aout_VolumeInfos(a, b) __aout_VolumeInfos(VLC_OBJECT(a), b)
-VLC_EXPORT( int, __aout_VolumeInfos, ( vlc_object_t *, audio_volume_t * ) );
-#define aout_VolumeUp(a, b, c) __aout_VolumeUp(VLC_OBJECT(a), b, c)
-VLC_EXPORT( int, __aout_VolumeUp, ( vlc_object_t *, int, audio_volume_t * ) );
-#define aout_VolumeDown(a, b, c) __aout_VolumeDown(VLC_OBJECT(a), b, c)
-VLC_EXPORT( int, __aout_VolumeDown, ( vlc_object_t *, int, audio_volume_t * ) );
-#define aout_VolumeMute(a, b) __aout_VolumeMute(VLC_OBJECT(a), b)
-VLC_EXPORT( int, __aout_VolumeMute, ( vlc_object_t *, audio_volume_t * ) );
-VLC_EXPORT( int, aout_Restart, ( aout_instance_t * p_aout ) );
-VLC_EXPORT( int, aout_FindAndRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
-VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
-
-VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, vlc_bool_t ));
-
-#define aout_VisualNext(a) aout_VisualChange( VLC_OBJECT(a),1 )
-#define aout_VisualPrev(a) aout_VisualChange( VLC_OBJECT(a),-1 )
-
-VLC_EXPORT( char *, aout_VisualChange, (vlc_object_t *, int ) );
-
-#endif /* _VLC_AUDIO_OUTPUT_H */
+++ /dev/null
-/*****************************************************************************
- * beos_specific.h: BeOS specific features
- *****************************************************************************
- * Copyright (C) 1999, 2000 the VideoLAN team
- * $Id$
- *
- * Authors: Jean-Marc Dressler <polux@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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
+++ /dev/null
-/*****************************************************************************
- * charset.h: Unicode UTF-8 wrappers function
- *****************************************************************************
- * Copyright (C) 2003-2005 the VideoLAN team
- * Copyright © 2005-2006 Rémi Denis-Courmont
- * $Id$
- *
- * Author: Rémi Denis-Courmont <rem # videolan,org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef __VLC_CHARSET_H
-#define __VLC_CHARSET_H 1
-
-#include <stdarg.h>
-#include <sys/types.h>
-#include <dirent.h>
-
-VLC_EXPORT( void, LocaleFree, ( const char * ) );
-VLC_EXPORT( char *, FromLocale, ( const char * ) );
-VLC_EXPORT( char *, FromLocaleDup, ( const char * ) );
-VLC_EXPORT( char *, ToLocale, ( const char * ) );
-
-VLC_EXPORT( int, utf8_open, ( const char *filename, int flags, mode_t mode ) );
-VLC_EXPORT( FILE *, utf8_fopen, ( const char *filename, const char *mode ) );
-VLC_EXPORT( DIR *, utf8_opendir, ( const char *dirname ) );
-VLC_EXPORT( char *, utf8_readdir, ( DIR *dir ) );
-VLC_EXPORT( int, utf8_scandir, ( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
-
-#ifdef WIN32
-# define stat _stati64
-#endif
-
-VLC_EXPORT( int, utf8_stat, ( const char *filename, struct stat *buf ) );
-VLC_EXPORT( int, utf8_lstat, ( const char *filename, struct stat *buf ) );
-VLC_EXPORT( int, utf8_mkdir, ( const char *filename ) );
-
-VLC_EXPORT( int, utf8_vfprintf, ( FILE *stream, const char *fmt, va_list ap ) );
-VLC_EXPORT( int, utf8_fprintf, ( FILE *, const char *, ... ) );
-
-VLC_EXPORT( char *, EnsureUTF8, ( char * ) );
-VLC_EXPORT( const char *, IsUTF8, ( const char * ) );
-
-#ifdef WIN32
-static inline char *FromWide (const wchar_t *wide)
-{
- size_t len = WideCharToMultiByte (CP_UTF8, 0, wide, -1, NULL, 0, NULL, NULL);
- if (len == 0)
- return NULL;
-
- char *out = (char *)malloc (len);
-
- WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL);
- return out;
-}
-#endif
-
-VLC_INTERNAL( char *, vlc_fix_readdir, ( const char * ) );
-VLC_INTERNAL( vlc_bool_t, vlc_current_charset, ( char ** ) );
-
-VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) );
-
-VLC_INTERNAL( double, i18n_strtod, ( const char *, char ** ) );
-VLC_INTERNAL( double, i18n_atof, ( const char * ) );
-VLC_EXPORT( double, us_strtod, ( const char *, char ** ) );
-VLC_EXPORT( double, us_atof, ( const char * ) );
-
-#endif
+++ /dev/null
-/*****************************************************************************
- * codecs.h: codec related structures needed by the demuxers and decoders
- *****************************************************************************
- * Copyright (C) 1999-2001 the VideoLAN team
- * $Id$
- *
- * Author: Gildas Bazin <gbazin@videolan.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_CODECS_H
-#define _VLC_CODECS_H 1
-
-/* Structures exported to the demuxers and decoders */
-
-#if !(defined _GUID_DEFINED || defined GUID_DEFINED)
-#define GUID_DEFINED
-typedef struct _GUID
-{
- uint32_t Data1;
- uint16_t Data2;
- uint16_t Data3;
- uint8_t Data4[8];
-} GUID, *REFGUID, *LPGUID;
-#endif /* GUID_DEFINED */
-
-#ifndef _WAVEFORMATEX_
-#define _WAVEFORMATEX_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-_WAVEFORMATEX {
- uint16_t wFormatTag;
- uint16_t nChannels;
- uint32_t nSamplesPerSec;
- uint32_t nAvgBytesPerSec;
- uint16_t nBlockAlign;
- uint16_t wBitsPerSample;
- uint16_t cbSize;
-} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
-#endif /* _WAVEFORMATEX_ */
-
-#ifndef _WAVEFORMATEXTENSIBLE_
-#define _WAVEFORMATEXTENSIBLE_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-_WAVEFORMATEXTENSIBLE {
- WAVEFORMATEX Format;
- union {
- uint16_t wValidBitsPerSample;
- uint16_t wSamplesPerBlock;
- uint16_t wReserved;
- } Samples;
- uint32_t dwChannelMask;
- GUID SubFormat;
-} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
-#endif /* _WAVEFORMATEXTENSIBLE_ */
-
-#ifndef _WAVEHEADER_
-#define _WAVEHEADER_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-_WAVEHEADER {
- uint32_t MainChunkID;
- uint32_t Length;
- uint32_t ChunkTypeID;
- uint32_t SubChunkID;
- uint32_t SubChunkLength;
- uint16_t Format;
- uint16_t Modus;
- uint32_t SampleFreq;
- uint32_t BytesPerSec;
- uint16_t BytesPerSample;
- uint16_t BitsPerSample;
- uint32_t DataChunkID;
- uint32_t DataLength;
-} WAVEHEADER;
-#endif /* _WAVEHEADER_ */
-
-#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
-#define _BITMAPINFOHEADER_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- uint32_t biSize;
- uint32_t biWidth;
- uint32_t biHeight;
- uint16_t biPlanes;
- uint16_t biBitCount;
- uint32_t biCompression;
- uint32_t biSizeImage;
- uint32_t biXPelsPerMeter;
- uint32_t biYPelsPerMeter;
- uint32_t biClrUsed;
- uint32_t biClrImportant;
-} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
-
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- BITMAPINFOHEADER bmiHeader;
- int bmiColors[1];
-} BITMAPINFO, *LPBITMAPINFO;
-#endif
-
-#ifndef _RECT32_
-#define _RECT32_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- int left, top, right, bottom;
-} RECT32;
-#endif
-
-#ifndef _REFERENCE_TIME_
-#define _REFERENCE_TIME_
-typedef int64_t REFERENCE_TIME;
-#endif
-
-#ifndef _VIDEOINFOHEADER_
-#define _VIDEOINFOHEADER_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- RECT32 rcSource;
- RECT32 rcTarget;
- uint32_t dwBitRate;
- uint32_t dwBitErrorRate;
- REFERENCE_TIME AvgTimePerFrame;
- BITMAPINFOHEADER bmiHeader;
-} VIDEOINFOHEADER;
-#endif
-
-#ifndef _RGBQUAD_
-#define _RGBQUAD_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- uint8_t rgbBlue;
- uint8_t rgbGreen;
- uint8_t rgbRed;
- uint8_t rgbReserved;
-} RGBQUAD1;
-#endif
-
-#ifndef _TRUECOLORINFO_
-#define _TRUECOLORINFO_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- uint32_t dwBitMasks[3];
- RGBQUAD1 bmiColors[256];
-} TRUECOLORINFO;
-#endif
-
-#ifndef _VIDEOINFO_
-#define _VIDEOINFO_
-typedef struct
-#ifdef HAVE_ATTRIBUTE_PACKED
- __attribute__((__packed__))
-#endif
-{
- RECT32 rcSource;
- RECT32 rcTarget;
- uint32_t dwBitRate;
- uint32_t dwBitErrorRate;
- REFERENCE_TIME AvgTimePerFrame;
- BITMAPINFOHEADER bmiHeader;
-
- union
- {
- RGBQUAD1 bmiColors[256]; /* Colour palette */
- uint32_t dwBitMasks[3]; /* True colour masks */
- TRUECOLORINFO TrueColorInfo; /* Both of the above */
- };
-
-} VIDEOINFO;
-#endif
-
-/* WAVE format wFormatTag IDs */
-#define WAVE_FORMAT_UNKNOWN 0x0000 /* Microsoft Corporation */
-#define WAVE_FORMAT_PCM 0x0001 /* Microsoft Corporation */
-#define WAVE_FORMAT_ADPCM 0x0002 /* Microsoft Corporation */
-#define WAVE_FORMAT_IEEE_FLOAT 0x0003 /* Microsoft Corporation */
-#define WAVE_FORMAT_ALAW 0x0006 /* Microsoft Corporation */
-#define WAVE_FORMAT_MULAW 0x0007 /* Microsoft Corporation */
-#define WAVE_FORMAT_DTS_MS 0x0008 /* Microsoft Corporation */
-#define WAVE_FORMAT_WMAS 0x000a /* WMA 9 Speech */
-#define WAVE_FORMAT_IMA_ADPCM 0x0011 /* Intel Corporation */
-#define WAVE_FORMAT_GSM610 0x0031 /* Microsoft Corporation */
-#define WAVE_FORMAT_MSNAUDIO 0x0032 /* Microsoft Corporation */
-#define WAVE_FORMAT_G726 0x0045 /* ITU-T standard */
-#define WAVE_FORMAT_MPEG 0x0050 /* Microsoft Corporation */
-#define WAVE_FORMAT_MPEGLAYER3 0x0055 /* ISO/MPEG Layer3 Format Tag */
-#define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092 /* Sonic Foundry */
-
-#define WAVE_FORMAT_A52 0x2000
-#define WAVE_FORMAT_DTS 0x2001
-#define WAVE_FORMAT_WMA1 0x0160 /* WMA version 1 */
-#define WAVE_FORMAT_WMA2 0x0161 /* WMA (v2) 7, 8, 9 Series */
-#define WAVE_FORMAT_WMAP 0x0162 /* WMA 9 Professional */
-#define WAVE_FORMAT_WMAL 0x0163 /* WMA 9 Lossless */
-#define WAVE_FORMAT_DIVIO_AAC 0x4143
-#define WAVE_FORMAT_AAC 0x00FF
-
-/* Need to check these */
-#define WAVE_FORMAT_DK3 0x0061
-#define WAVE_FORMAT_DK4 0x0062
-
-#define WAVE_FORMAT_VORB_1 0x674f
-#define WAVE_FORMAT_VORB_1PLUS 0x676f
-#define WAVE_FORMAT_VORB_2 0x6750
-#define WAVE_FORMAT_VORB_2PLUS 0x6770
-#define WAVE_FORMAT_VORB_3 0x6751
-#define WAVE_FORMAT_VORB_3PLUS 0x6771
-#define WAVE_FORMAT_SPEEX 0xa109 /* Speex audio */
-
-
-#if !defined(WAVE_FORMAT_EXTENSIBLE)
-#define WAVE_FORMAT_EXTENSIBLE 0xFFFE /* Microsoft */
-#endif
-
-/* GUID SubFormat IDs */
-/* We need both b/c const variables are not compile-time constants in C, giving
- * us an error if we use the const GUID in an enum */
-
-#ifndef _KSDATAFORMAT_SUBTYPE_PCM_
-#define _KSDATAFORMAT_SUBTYPE_PCM_ {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}
-static const GUID VLC_KSDATAFORMAT_SUBTYPE_PCM = {0xE923AABF, 0xCB58, 0x4471, {0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62}};
-#define KSDATAFORMAT_SUBTYPE_PCM VLC_KSDATAFORMAT_SUBTYPE_PCM
-#endif
-
-#ifndef _KSDATAFORMAT_SUBTYPE_UNKNOWN_
-#define _KSDATAFORMAT_SUBTYPE_UNKNOWN_ {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}
-static const GUID VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
-#define KSDATAFORMAT_SUBTYPE_UNKNOWN VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN
-#endif
-
-/* Microsoft speaker definitions */
-#define WAVE_SPEAKER_FRONT_LEFT 0x1
-#define WAVE_SPEAKER_FRONT_RIGHT 0x2
-#define WAVE_SPEAKER_FRONT_CENTER 0x4
-#define WAVE_SPEAKER_LOW_FREQUENCY 0x8
-#define WAVE_SPEAKER_BACK_LEFT 0x10
-#define WAVE_SPEAKER_BACK_RIGHT 0x20
-#define WAVE_SPEAKER_FRONT_LEFT_OF_CENTER 0x40
-#define WAVE_SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
-#define WAVE_SPEAKER_BACK_CENTER 0x100
-#define WAVE_SPEAKER_SIDE_LEFT 0x200
-#define WAVE_SPEAKER_SIDE_RIGHT 0x400
-#define WAVE_SPEAKER_TOP_CENTER 0x800
-#define WAVE_SPEAKER_TOP_FRONT_LEFT 0x1000
-#define WAVE_SPEAKER_TOP_FRONT_CENTER 0x2000
-#define WAVE_SPEAKER_TOP_FRONT_RIGHT 0x4000
-#define WAVE_SPEAKER_TOP_BACK_LEFT 0x8000
-#define WAVE_SPEAKER_TOP_BACK_CENTER 0x10000
-#define WAVE_SPEAKER_TOP_BACK_RIGHT 0x20000
-#define WAVE_SPEAKER_RESERVED 0x80000000
-
-static struct
-{
- uint16_t i_tag;
- vlc_fourcc_t i_fourcc;
- const char *psz_name;
-}
-wave_format_tag_to_fourcc[] =
-{
- { WAVE_FORMAT_PCM, VLC_FOURCC( 'a', 'r', 'a', 'w' ), "Raw audio" },
- { WAVE_FORMAT_ADPCM, VLC_FOURCC( 'm', 's', 0x00,0x02), "ADPCM" },
- { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "IEEE Float audio" },
- { WAVE_FORMAT_ALAW, VLC_FOURCC( 'a', 'l', 'a', 'w' ), "A-Law" },
- { WAVE_FORMAT_MULAW, VLC_FOURCC( 'm', 'l', 'a', 'w' ), "Mu-Law" },
- { WAVE_FORMAT_IMA_ADPCM, VLC_FOURCC( 'm', 's', 0x00,0x11), "Ima-ADPCM" },
- { WAVE_FORMAT_G726, VLC_FOURCC( 'g', '7', '2', '6' ), "G.726 ADPCM" },
- { WAVE_FORMAT_MPEGLAYER3, VLC_FOURCC( 'm', 'p', 'g', 'a' ), "Mpeg Audio" },
- { WAVE_FORMAT_MPEG, VLC_FOURCC( 'm', 'p', 'g', 'a' ), "Mpeg Audio" },
- { WAVE_FORMAT_A52, VLC_FOURCC( 'a', '5', '2', ' ' ), "A/52" },
- { WAVE_FORMAT_WMA1, VLC_FOURCC( 'w', 'm', 'a', '1' ), "Window Media Audio v1" },
- { WAVE_FORMAT_WMA2, VLC_FOURCC( 'w', 'm', 'a', '2' ), "Window Media Audio v2" },
- { WAVE_FORMAT_WMA2, VLC_FOURCC( 'w', 'm', 'a', ' ' ), "Window Media Audio v2" },
- { WAVE_FORMAT_WMAP, VLC_FOURCC( 'w', 'm', 'a', 'p' ), "Window Media Audio 9 Professional" },
- { WAVE_FORMAT_WMAL, VLC_FOURCC( 'w', 'm', 'a', 'l' ), "Window Media Audio 9 Lossless" },
- { WAVE_FORMAT_WMAS, VLC_FOURCC( 'w', 'm', 'a', 's' ), "Window Media Audio 9 Speech" },
- { WAVE_FORMAT_DK3, VLC_FOURCC( 'm', 's', 0x00,0x61), "Duck DK3" },
- { WAVE_FORMAT_DK4, VLC_FOURCC( 'm', 's', 0x00,0x62), "Duck DK4" },
- { WAVE_FORMAT_DTS, VLC_FOURCC( 'd', 't', 's', ' ' ), "DTS Coherent Acoustics" },
- { WAVE_FORMAT_DTS_MS, VLC_FOURCC( 'd', 't', 's', ' ' ), "DTS Coherent Acoustics" },
- { WAVE_FORMAT_DIVIO_AAC, VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio (Divio)" },
- { WAVE_FORMAT_AAC, VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio" },
- { WAVE_FORMAT_VORB_1, VLC_FOURCC( 'v', 'o', 'r', '1' ), "Vorbis 1 Audio" },
- { WAVE_FORMAT_VORB_1PLUS, VLC_FOURCC( 'v', 'o', '1', '+' ), "Vorbis 1+ Audio" },
- { WAVE_FORMAT_VORB_2, VLC_FOURCC( 'v', 'o', 'r', '2' ), "Vorbis 2 Audio" },
- { WAVE_FORMAT_VORB_2PLUS, VLC_FOURCC( 'v', 'o', '2', '+' ), "Vorbis 2+ Audio" },
- { WAVE_FORMAT_VORB_3, VLC_FOURCC( 'v', 'o', 'r', '3' ), "Vorbis 3 Audio" },
- { WAVE_FORMAT_VORB_3PLUS, VLC_FOURCC( 'v', 'o', '3', '+' ), "Vorbis 3+ Audio" },
- { WAVE_FORMAT_SPEEX, VLC_FOURCC( 's', 'p', 'x', ' ' ), "Speex Audio" },
- { WAVE_FORMAT_UNKNOWN, VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
-};
-
-static inline void wf_tag_to_fourcc( uint16_t i_tag, vlc_fourcc_t *fcc,
- const char **ppsz_name )
-{
- int i;
- for( i = 0; wave_format_tag_to_fourcc[i].i_tag != 0; i++ )
- {
- if( wave_format_tag_to_fourcc[i].i_tag == i_tag ) break;
- }
- if( fcc ) *fcc = wave_format_tag_to_fourcc[i].i_fourcc;
- if( ppsz_name ) *ppsz_name = wave_format_tag_to_fourcc[i].psz_name;
-}
-
-static inline void fourcc_to_wf_tag( vlc_fourcc_t fcc, uint16_t *pi_tag )
-{
- int i;
- for( i = 0; wave_format_tag_to_fourcc[i].i_tag != 0; i++ )
- {
- if( wave_format_tag_to_fourcc[i].i_fourcc == fcc ) break;
- }
- if( pi_tag ) *pi_tag = wave_format_tag_to_fourcc[i].i_tag;
-}
-
-/* If wFormatTag is WAVEFORMATEXTENSIBLE, we must look at the SubFormat tag
- * to determine the actual format. Microsoft has stopped giving out wFormatTag
- * assignments in lieu of letting 3rd parties generate their own GUIDs
- */
-static struct
-{
- GUID guid_tag;
- vlc_fourcc_t i_fourcc;
- const char *psz_name;
-}
-sub_format_tag_to_fourcc[] =
-{
- { _KSDATAFORMAT_SUBTYPE_PCM_, VLC_FOURCC( 'p', 'c', 'm', ' ' ), "PCM" },
- { _KSDATAFORMAT_SUBTYPE_UNKNOWN_, VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
-};
-
-/* compares two GUIDs, returns 1 if identical, 0 otherwise */
-static inline int guidcmp( const GUID *s1, const GUID *s2 )
-{
- return( s1->Data1 == s2->Data1 && s1->Data2 == s2->Data2 &&
- s1->Data3 == s2->Data3 && !memcmp( s1->Data4, s2->Data4, 8 ) );
-}
-
-static inline void sf_tag_to_fourcc( GUID *guid_tag,
- vlc_fourcc_t *fcc, const char **ppsz_name )
-{
- int i;
-
- for( i = 0; !guidcmp( &sub_format_tag_to_fourcc[i].guid_tag,
- &KSDATAFORMAT_SUBTYPE_UNKNOWN ); i++ )
- {
- if( guidcmp( &sub_format_tag_to_fourcc[i].guid_tag, guid_tag ) ) break;
- }
- if( fcc ) *fcc = sub_format_tag_to_fourcc[i].i_fourcc;
- if( ppsz_name ) *ppsz_name = sub_format_tag_to_fourcc[i].psz_name;
-}
-
-/**
- * Structure to hold information concerning subtitles.
- * Used between demuxers and decoders of subtitles.
- */
-typedef struct es_sys_t
-{
- char *psz_header; /* for 'ssa ' and 'subt' */
-
- /* for spudec */
- unsigned int i_orig_height;
- unsigned int i_orig_width;
- unsigned int i_origin_x;
- unsigned int i_origin_y;
- unsigned int i_scale_h;
- unsigned int i_scale_v;
- unsigned int i_alpha;
- vlc_bool_t b_smooth;
- mtime_t i_fade_in;
- mtime_t i_fade_out;
- unsigned int i_align;
- mtime_t i_time_offset;
- vlc_bool_t b_forced_subs;
- unsigned int palette[16];
- unsigned int colors[4];
-
-} subtitle_data_t;
-
-#endif /* "codecs.h" */
+++ /dev/null
-/*****************************************************************************
- * configuration.h : configuration management module
- * This file describes the programming interface for the configuration module.
- * It includes functions allowing to declare, get or set configuration options.
- *****************************************************************************
- * Copyright (C) 1999-2006 the VideoLAN team
- * $Id$
- *
- * Authors: Gildas Bazin <gbazin@videolan.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Macros used to build the configuration structure.
- *****************************************************************************/
-
-/* Configuration hint types */
-
-
-#define CONFIG_HINT_CATEGORY 0x0002 /* Start of new category */
-#define CONFIG_HINT_SUBCATEGORY 0x0003 /* Start of sub-category */
-#define CONFIG_HINT_SUBCATEGORY_END 0x0004 /* End of sub-category */
-#define CONFIG_HINT_USAGE 0x0005 /* Usage information */
-
-#define CONFIG_CATEGORY 0x0006 /* Set category */
-#define CONFIG_SUBCATEGORY 0x0007 /* Set subcategory */
-#define CONFIG_SECTION 0x0008 /* Start of new section */
-
-#define CONFIG_HINT 0x000F
-
-/* Configuration item types */
-#define CONFIG_ITEM_STRING 0x0010 /* String option */
-#define CONFIG_ITEM_FILE 0x0020 /* File option */
-#define CONFIG_ITEM_MODULE 0x0030 /* Module option */
-#define CONFIG_ITEM_INTEGER 0x0040 /* Integer option */
-#define CONFIG_ITEM_BOOL 0x0050 /* Bool option */
-#define CONFIG_ITEM_FLOAT 0x0060 /* Float option */
-#define CONFIG_ITEM_DIRECTORY 0x0070 /* Directory option */
-#define CONFIG_ITEM_KEY 0x0080 /* Hot key option */
-#define CONFIG_ITEM_MODULE_CAT 0x0090 /* Module option */
-#define CONFIG_ITEM_MODULE_LIST 0x00A0 /* Module option */
-#define CONFIG_ITEM_MODULE_LIST_CAT 0x00B0 /* Module option */
-
-#define CONFIG_ITEM 0x00F0
-
-/* Item types that use a string value (i.e. serialized in the module cache) */
-#define CONFIG_STRING_TYPES \
- { \
- CONFIG_ITEM_STRING, CONFIG_ITEM_FILE, CONFIG_ITEM_MODULE, \
- CONFIG_ITEM_DIRECTORY, CONFIG_ITEM_MODULE_CAT, \
- CONFIG_ITEM_MODULE_LIST, CONFIG_ITEM_MODULE_LIST_CAT \
- }
-
-static inline int IsConfigStringType (int type)
-{
- const unsigned char config_string_types[] = CONFIG_STRING_TYPES;
-
- /* NOTE: this needs to be changed if we ever get more than 255 types */
- return memchr (config_string_types, type, sizeof (config_string_types))
- != NULL;
-}
-
-static inline int IsConfigIntegerType (int type)
-{
- return (type == CONFIG_ITEM_INTEGER) || (type == CONFIG_ITEM_KEY)
- || (type == CONFIG_ITEM_BOOL);
-}
-
-static inline int IsConfigFloatType (int type)
-{
- return type == CONFIG_ITEM_FLOAT;
-}
-
-/*******************************************************************
- * All predefined categories and subcategories
- *******************************************************************/
-#define CAT_INTERFACE 1
- #define SUBCAT_INTERFACE_GENERAL 101
- #define SUBCAT_INTERFACE_MAIN 102
- #define SUBCAT_INTERFACE_CONTROL 103
- #define SUBCAT_INTERFACE_HOTKEYS 104
-
-#define CAT_AUDIO 2
- #define SUBCAT_AUDIO_GENERAL 201
- #define SUBCAT_AUDIO_AOUT 202
- #define SUBCAT_AUDIO_AFILTER 203
- #define SUBCAT_AUDIO_VISUAL 204
- #define SUBCAT_AUDIO_MISC 205
-
-#define CAT_VIDEO 3
- #define SUBCAT_VIDEO_GENERAL 301
- #define SUBCAT_VIDEO_VOUT 302
- #define SUBCAT_VIDEO_VFILTER 303
- #define SUBCAT_VIDEO_TEXT 304
- #define SUBCAT_VIDEO_SUBPIC 305
- #define SUBCAT_VIDEO_VFILTER2 306
-
-#define CAT_INPUT 4
- #define SUBCAT_INPUT_GENERAL 401
- #define SUBCAT_INPUT_ACCESS 402
- #define SUBCAT_INPUT_ACCESS_FILTER 403
- #define SUBCAT_INPUT_DEMUX 404
- #define SUBCAT_INPUT_VCODEC 405
- #define SUBCAT_INPUT_ACODEC 406
- #define SUBCAT_INPUT_SCODEC 407
-
-#define CAT_SOUT 5
- #define SUBCAT_SOUT_GENERAL 501
- #define SUBCAT_SOUT_STREAM 502
- #define SUBCAT_SOUT_MUX 503
- #define SUBCAT_SOUT_ACO 504
- #define SUBCAT_SOUT_PACKETIZER 505
- #define SUBCAT_SOUT_SAP 506
- #define SUBCAT_SOUT_VOD 507
-
-#define CAT_ADVANCED 6
- #define SUBCAT_ADVANCED_CPU 601
- #define SUBCAT_ADVANCED_MISC 602
- #define SUBCAT_ADVANCED_NETWORK 603
- #define SUBCAT_ADVANCED_XML 604
-
-#define CAT_PLAYLIST 7
- #define SUBCAT_PLAYLIST_GENERAL 701
- #define SUBCAT_PLAYLIST_SD 702
- #define SUBCAT_PLAYLIST_EXPORT 703
-
-struct config_category_t
-{
- int i_id;
- const char *psz_name;
- const char *psz_help;
-};
-
-typedef union
-{
- const char *psz;
- int i;
- float f;
-} module_value_t;
-
-typedef union
-{
- int i;
- float f;
-} module_nvalue_t;
-
-struct module_config_t
-{
- int i_type; /* Configuration type */
- const char *psz_type; /* Configuration subtype */
- const char *psz_name; /* Option name */
- char i_short; /* Optional short option name */
- const char *psz_text; /* Short comment on the configuration option */
- const char *psz_longtext; /* Long comment on the configuration option */
- module_value_t value; /* Option value */
- module_value_t orig;
- module_value_t saved;
- module_nvalue_t min;
- module_nvalue_t max;
-
- /* Function to call when commiting a change */
- vlc_callback_t pf_callback;
- void *p_callback_data;
-
- /* Values list */
- const char **ppsz_list; /* List of possible values for the option */
- int *pi_list; /* Idem for integers */
- const char **ppsz_list_text; /* Friendly names for list values */
- int i_list; /* Options list size */
-
- /* Actions list */
- vlc_callback_t *ppf_action; /* List of possible actions for a config */
- const char **ppsz_action_text; /* Friendly names for actions */
- int i_action; /* actions list size */
-
- /* Misc */
- vlc_mutex_t *p_lock; /* Lock to use when modifying the config */
- vlc_bool_t b_dirty; /* Dirty flag to indicate a config change */
- vlc_bool_t b_advanced; /* Flag to indicate an advanced option */
- vlc_bool_t b_internal; /* Flag to indicate option is not to be shown */
- vlc_bool_t b_restart; /* Flag to indicate the option need a restart */
- /* to take effect */
-
- /* Deprecated */
- const char *psz_current; /* Good option name */
- vlc_bool_t b_strict; /* Transitionnal or strict */
-
- /* Option values loaded from config file */
- vlc_bool_t b_autosave; /* Config will be auto-saved at exit time */
- vlc_bool_t b_unsaveable; /* confg should be saved*/
-};
-
-/*****************************************************************************
- * Prototypes - these methods are used to get, set or manipulate configuration
- * data.
- *****************************************************************************/
-VLC_EXPORT( int, __config_GetType, (vlc_object_t *, const char *) );
-VLC_EXPORT( int, __config_GetInt, (vlc_object_t *, const char *) );
-VLC_EXPORT( void, __config_PutInt, (vlc_object_t *, const char *, int) );
-VLC_EXPORT( float, __config_GetFloat, (vlc_object_t *, const char *) );
-VLC_EXPORT( void, __config_PutFloat, (vlc_object_t *, const char *, float) );
-VLC_EXPORT( char *, __config_GetPsz, (vlc_object_t *, const char *) );
-VLC_EXPORT( void, __config_PutPsz, (vlc_object_t *, const char *, const char *) );
-
-VLC_EXPORT( int, __config_LoadCmdLine, ( vlc_object_t *, int *, char *[], vlc_bool_t ) );
-VLC_EXPORT( char *, config_GetHomeDir, ( void ) );
-VLC_EXPORT( char *, config_GetUserDir, ( void ) );
-VLC_EXPORT( const char *, config_GetDataDir, ( const vlc_object_t * ) );
-VLC_EXPORT( int, __config_LoadConfigFile, ( vlc_object_t *, const char * ) );
-VLC_EXPORT( int, __config_SaveConfigFile, ( vlc_object_t *, const char * ) );
-VLC_EXPORT( void, __config_ResetAll, ( vlc_object_t * ) );
-
-VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) );
-VLC_EXPORT( module_t *, config_FindModule,( vlc_object_t *, const char * ) );
-
-VLC_EXPORT( int, config_Duplicate, ( module_t *, const module_config_t *, size_t ) );
- void config_Free ( module_t * );
-
-VLC_EXPORT( void, config_SetCallbacks, ( module_config_t *, module_config_t *, size_t ) );
-VLC_EXPORT( void, config_UnsetCallbacks, ( module_config_t *, size_t ) );
-
-#define config_GetType(a,b) __config_GetType(VLC_OBJECT(a),b)
-#define config_GetInt(a,b) __config_GetInt(VLC_OBJECT(a),b)
-#define config_PutInt(a,b,c) __config_PutInt(VLC_OBJECT(a),b,c)
-#define config_GetFloat(a,b) __config_GetFloat(VLC_OBJECT(a),b)
-#define config_PutFloat(a,b,c) __config_PutFloat(VLC_OBJECT(a),b,c)
-#define config_GetPsz(a,b) __config_GetPsz(VLC_OBJECT(a),b)
-#define config_PutPsz(a,b,c) __config_PutPsz(VLC_OBJECT(a),b,c)
-
-#define config_LoadCmdLine(a,b,c,d) __config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
-#define config_LoadConfigFile(a,b) __config_LoadConfigFile(VLC_OBJECT(a),b)
-#define config_SaveConfigFile(a,b) __config_SaveConfigFile(VLC_OBJECT(a),b)
-#define config_ResetAll(a) __config_ResetAll(VLC_OBJECT(a))
-
-/* internal only */
-int config_CreateDir( vlc_object_t *, const char * );
-int config_AutoSaveConfigFile( vlc_object_t * );
-
-/*****************************************************************************
- * Macros used to build the configuration structure.
- *
- * Note that internally we support only 3 types of config data: int, float
- * and string.
- * The other types declared here just map to one of these 3 basic types but
- * have the advantage of also providing very good hints to a configuration
- * interface so as to make it more user friendly.
- * The configuration structure also includes category hints. These hints can
- * provide a configuration interface with some very useful data and again
- * allow for a more user friendly interface.
- *****************************************************************************/
-
-#define add_config_inner( ) \
- i_config++; \
- if( (i_config % 10) == 0 ) \
- p_config = (module_config_t *) \
- realloc(p_config, (i_config+11) * sizeof(module_config_t)); \
- memset( p_config + i_config, 0, sizeof( *p_config ) )
-
-#define add_type_inner( type ) \
- add_config_inner( ); \
- p_config[i_config].i_type = type
-
-#define add_typedesc_inner( type, text, longtext ) \
- add_type_inner( type ); \
- p_config[i_config].psz_text = text; \
- p_config[i_config].psz_longtext = longtext
-
-#define add_typeadv_inner( type, text, longtext, advc ) \
- add_typedesc_inner( type, text, longtext ); \
- p_config[i_config].b_advanced = advc
-
-#define add_typename_inner( type, name, text, longtext, advc, cb ) \
- add_typeadv_inner( type, text, longtext, advc ); \
- p_config[i_config].psz_name = name; \
- p_config[i_config].pf_callback = cb
-
-#define add_string_inner( type, name, text, longtext, advc, cb, v ) \
- add_typename_inner( type, name, text, longtext, advc, cb ); \
- p_config[i_config].value.psz = v
-
-#define add_int_inner( type, name, text, longtext, advc, cb, v ) \
- add_typename_inner( type, name, text, longtext, advc, cb ); \
- p_config[i_config].value.i = v
-
-
-#define set_category( i_id ) \
- add_type_inner( CONFIG_CATEGORY ); \
- p_config[i_config].value.i = i_id
-
-#define set_subcategory( i_id ) \
- add_type_inner( CONFIG_SUBCATEGORY ); \
- p_config[i_config].value.i = i_id
-
-#define set_section( text, longtext ) \
- add_typedesc_inner( CONFIG_SECTION, text, longtext )
-
-#define add_category_hint( text, longtext, advc ) \
- add_typeadv_inner( CONFIG_HINT_CATEGORY, text, longtext, advc )
-
-#define add_subcategory_hint( text, longtext ) \
- add_typedesc_inner( CONFIG_HINT_SUBCATEGORY, text, longtext )
-
-#define end_subcategory_hint \
- add_type_inner( CONFIG_HINT_SUBCATEGORY_END )
-
-#define add_usage_hint( text ) \
- add_typedesc_inner( CONFIG_HINT_USAGE, text, NULL )
-
-#define add_string( name, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_STRING, name, text, longtext, advc, p_callback, value )
-
-#define add_file( name, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_FILE, name, text, longtext, advc, p_callback, value )
-
-#define add_directory( name, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_DIRECTORY, name, text, longtext, advc, p_callback, value )
-
-#define add_module( name, psz_caps, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_MODULE, name, text, longtext, advc, p_callback, value ); \
- p_config[i_config].psz_type = psz_caps
-
-#define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, p_callback, value ); \
- p_config[i_config].min.i = i_subcategory /* gruik */
-
-#define add_module_list( name, psz_caps, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, p_callback, value ); \
- p_config[i_config].psz_type = psz_caps
-
-#define add_module_list_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \
- add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, advc, p_callback, value ); \
- p_config[i_config].min.i = i_subcategory /* gruik */
-
-#define add_integer( name, value, p_callback, text, longtext, advc ) \
- add_int_inner( CONFIG_ITEM_INTEGER, name, text, longtext, advc, p_callback, value )
-
-#define add_key( name, value, p_callback, text, longtext, advc ) \
- add_int_inner( CONFIG_ITEM_KEY, name, text, longtext, advc, p_callback, value )
-
-#define add_integer_with_range( name, value, i_min, i_max, p_callback, text, longtext, advc ) \
- add_integer( name, value, p_callback, text, longtext, advc ); \
- change_integer_range( i_min, i_max )
-
-#define add_float( name, v, p_callback, text, longtext, advc ) \
- add_typename_inner( CONFIG_ITEM_FLOAT, name, text, longtext, advc, p_callback ); \
- p_config[i_config].value.f = v
-
-#define add_float_with_range( name, value, f_min, f_max, p_callback, text, longtext, advc ) \
- add_float( name, value, p_callback, text, longtext, advc ); \
- change_float_range( f_min, f_max )
-
-#define add_bool( name, v, p_callback, text, longtext, advc ) \
- add_typename_inner( CONFIG_ITEM_BOOL, name, text, longtext, advc, p_callback ); \
- p_config[i_config].value.i = v
-
-/* For renamed option */
-#define add_deprecated( name, strict ) \
- add_config_inner( ); \
- p_config[ i_config ].i_type = p_config[ i_config -1 ].i_type; \
- p_config[ i_config ].psz_name = name; \
- p_config[i_config].b_strict = strict; \
- p_config[ i_config ].psz_current = p_config[ i_config-1].psz_current \
- ? p_config[ i_config-1 ].psz_current \
- : p_config[ i_config-1 ].psz_name;
-
-/* For removed option */
-#define add_suppressed_inner( name, type ) \
- add_type_inner( type ); \
- p_config[ i_config ].psz_name = name; \
- p_config[ i_config ].psz_current = "SUPPRESSED";
-
-#define add_suppressed_bool( name ) \
- add_suppressed_inner( name, CONFIG_ITEM_BOOL )
-
-#define add_suppressed_integer( name ) \
- add_suppressed_inner( name, CONFIG_ITEM_INTEGER )
-
-#define add_suppressed_float( name ) \
- add_suppressed_inner( name, CONFIG_ITEM_FLOAT )
-
-#define add_suppressed_string( name ) \
- add_suppressed_inner( name, CONFIG_ITEM_STRING )
-
-/* Modifier macros for the config options (used for fine tuning) */
-#define change_short( ch ) \
- p_config[i_config].i_short = ch;
-
-#define change_string_list( list, list_text, list_update_func ) \
- p_config[i_config].i_list = sizeof(list)/sizeof(char *); \
- p_config[i_config].ppsz_list = list; \
- p_config[i_config].ppsz_list_text = list_text;
-
-#define change_integer_list( list, list_text, list_update_func ) \
- p_config[i_config].i_list = sizeof(list)/sizeof(int); \
- p_config[i_config].pi_list = (int *)list; \
- p_config[i_config].ppsz_list_text = list_text;
-
-#define change_integer_range( minv, maxv ) \
- p_config[i_config].min.i = minv; \
- p_config[i_config].max.i = maxv;
-
-#define change_float_range( minv, maxv ) \
- p_config[i_config].min.f = minv; \
- p_config[i_config].max.f = maxv;
-
-#define change_action_add( pf_action, action_text ) \
- if( !p_config[i_config].i_action ) \
- { p_config[i_config].ppsz_action_text = 0; \
- p_config[i_config].ppf_action = 0; } \
- p_config[i_config].ppf_action = (vlc_callback_t *) \
- realloc( p_config[i_config].ppf_action, \
- (p_config[i_config].i_action + 1) * sizeof(void *) ); \
- p_config[i_config].ppsz_action_text = (const char **)\
- realloc( p_config[i_config].ppsz_action_text, \
- (p_config[i_config].i_action + 1) * sizeof(void *) ); \
- p_config[i_config].ppf_action[p_config[i_config].i_action] = pf_action; \
- p_config[i_config].ppsz_action_text[p_config[i_config].i_action] = \
- action_text; \
- p_config[i_config].i_action++;
-
-#define change_internal() \
- p_config[i_config].b_internal = VLC_TRUE;
-
-#define change_need_restart() \
- p_config[i_config].b_restart = VLC_TRUE;
-
-#define change_autosave() \
- p_config[i_config].b_autosave = VLC_TRUE;
-
-#define change_unsaveable() \
- p_config[i_config].b_unsaveable = VLC_TRUE;
-
-/****************************************************************************
- * config_chain_t:
- ****************************************************************************/
-struct config_chain_t
-{
- config_chain_t *p_next;
-
- char *psz_name;
- char *psz_value;
-};
-
-#define config_ChainParse( a, b, c, d ) __config_ChainParse( VLC_OBJECT(a), b, c, d )
-VLC_EXPORT( void, __config_ChainParse, ( vlc_object_t *, const char *psz_prefix, const char **ppsz_options, config_chain_t * ) );
-VLC_EXPORT( char *, config_ChainCreate, ( char **, config_chain_t **, const char * ) );
-VLC_EXPORT( void, config_ChainDestroy, ( config_chain_t * ) );
-
-static inline config_chain_t *config_chain_find( config_chain_t *p_cfg, const char *psz_name )
-{
- while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
- {
- p_cfg = p_cfg->p_next;
- }
-
- return p_cfg;
-}
-
-static inline char *config_chain_find_value( config_chain_t *p_cfg, const char *psz_name )
-{
- while( p_cfg && strcmp( p_cfg->psz_name, psz_name ) )
- {
- p_cfg = p_cfg->p_next;
- }
-
- if( p_cfg && p_cfg->psz_value )
- {
- return( p_cfg->psz_value );
- }
-
- return NULL;
-}
+++ /dev/null
-/*****************************************************************************
- * darwin_specific.h: Darwin specific features
- *****************************************************************************
- * Copyright (C) 2001 the VideoLAN team
- * $Id$
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
+++ /dev/null
-/*****************************************************************************
- * intf_eject.h: CD/DVD-ROM ejection handling functions
- *****************************************************************************
- * Copyright (C) 2001, 2002 the VideoLAN team
- * $Id$
- *
- * Author: Julien Blache <jb@technologeek.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#define intf_Eject(a,b) __intf_Eject(VLC_OBJECT(a),b)
-VLC_EXPORT( int, __intf_Eject, ( vlc_object_t *, const char * ) );
-
+++ /dev/null
-/*****************************************************************************
- * libvlc_internal.h : Definition of opaque structures for libvlc exported API
- * Also contains some internal utility functions
- *****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
- * $Id: control_structures.h 13752 2005-12-15 10:14:42Z oaubert $
- *
- * Authors: Clément Stenac <zorglub@videolan.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _LIBVLC_INTERNAL_H
-#define _LIBVLC_INTERNAL_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-#include <vlc/vlc.h>
-
-/***************************************************************************
- * Internal creation and destruction functions
- ***************************************************************************/
-libvlc_int_t *libvlc_InternalCreate();
-int libvlc_InternalInit( libvlc_int_t *, int, char *ppsz_argv[] );
-int libvlc_InternalCleanup( libvlc_int_t * );
-int libvlc_InternalDestroy( libvlc_int_t *, vlc_bool_t );
-
-int libvlc_InternalAddIntf( libvlc_int_t *, const char *, vlc_bool_t,
- vlc_bool_t, int, const char *const * );
-
-/***************************************************************************
- * Opaque structures for libvlc API
- ***************************************************************************/
-
-struct libvlc_instance_t
-{
- libvlc_int_t *p_libvlc_int;
- vlm_t *p_vlm;
-};
-
-struct libvlc_input_t
-{
- int i_input_id; ///< Input object id. We don't use a pointer to
- /// avoid any crash
- struct libvlc_instance_t *p_instance; ///< Parent instance
-};
-
-#define RAISENULL( psz,a... ) { libvlc_exception_raise( p_e, psz,##a ); \
- return NULL; }
-#define RAISEVOID( psz,a... ) { libvlc_exception_raise( p_e, psz,##a ); \
- return; }
-#define RAISEZERO( psz,a... ) { libvlc_exception_raise( p_e, psz,##a ); \
- return 0; }
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
+++ /dev/null
-/*****************************************************************************
- * control.h: private header for mediacontrol
- *****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
- * $Id: vlc.h 10101 2005-03-02 16:47:31Z robux4 $
- *
- * Authors: Olivier Aubert <olivier.aubert@liris.univ-lyon1.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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_MEDIACONTROL_INTERNAL_H
-#define _VLC_MEDIACONTROL_INTERNAL_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-#include <vlc/vlc.h>
-#include <vlc/mediacontrol_structures.h>
-#include <libvlc_internal.h>
-#include <vlc/libvlc.h>
-
-struct mediacontrol_Instance {
- struct libvlc_instance_t * p_instance;
- playlist_t *p_playlist;
-};
-
-vlc_int64_t mediacontrol_unit_convert( input_thread_t *p_input,
- mediacontrol_PositionKey from,
- mediacontrol_PositionKey to,
- vlc_int64_t value );
-vlc_int64_t mediacontrol_position2microsecond(
- input_thread_t *p_input,
- const mediacontrol_Position *pos );
-
-#define RAISE( c, m ) exception->code = c; \
- exception->message = strdup(m);
-
-#define RAISE_NULL( c, m ) { RAISE( c, m ); return NULL; }
-#define RAISE_VOID( c, m ) { RAISE( c, m ); return; }
-
-#define HANDLE_LIBVLC_EXCEPTION_VOID( e ) if( libvlc_exception_raised( e ) ) { \
- RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \
- libvlc_exception_clear( e ); \
- return; }
-
-#define HANDLE_LIBVLC_EXCEPTION_NULL( e ) if( libvlc_exception_raised( e ) ) { \
- RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \
- libvlc_exception_clear( e ); \
- return NULL; }
-
-#define HANDLE_LIBVLC_EXCEPTION_ZERO( e ) if( libvlc_exception_raised( e ) ) { \
- RAISE( mediacontrol_InternalException, libvlc_exception_get_message( e )); \
- libvlc_exception_clear( e ); \
- return 0; }
-
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
+++ /dev/null
-/*****************************************************************************
- * modules.h : Module management functions.
- *****************************************************************************
- * Copyright (C) 2001 the VideoLAN team
- * $Id$
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Module #defines.
- *****************************************************************************/
-
-/* Number of tries before we unload an unused module */
-#define MODULE_HIDE_DELAY 50
-#define MODULE_SHORTCUT_MAX 50
-
-/* The module handle type. */
-#if defined(HAVE_DL_DYLD)
-# if defined (HAVE_MACH_O_DYLD_H)
-# include <mach-o/dyld.h>
-# endif
-typedef NSModule module_handle_t;
-#elif defined(HAVE_IMAGE_H)
-typedef int module_handle_t;
-#elif defined(WIN32) || defined(UNDER_CE)
-typedef void * module_handle_t;
-#elif defined(HAVE_DL_DLOPEN)
-typedef void * module_handle_t;
-#elif defined(HAVE_DL_SHL_LOAD)
-typedef shl_t module_handle_t;
-#endif
-
-/*****************************************************************************
- * module_bank_t: the module bank
- *****************************************************************************
- * This variable is accessed by any function using modules.
- *****************************************************************************/
-struct module_bank_t
-{
- VLC_COMMON_MEMBERS
-
- int i_usage;
-#ifndef HAVE_SHARED_LIBVLC
- module_symbols_t symbols;
-#endif
-
- vlc_bool_t b_main;
- vlc_bool_t b_builtins;
- vlc_bool_t b_plugins;
-
- /* Plugins cache */
- vlc_bool_t b_cache;
- vlc_bool_t b_cache_dirty;
- vlc_bool_t b_cache_delete;
-
- int i_cache;
- module_cache_t **pp_cache;
-
- int i_loaded_cache;
- module_cache_t **pp_loaded_cache;
-};
-
-/*****************************************************************************
- * Module description structure
- *****************************************************************************/
-struct module_t
-{
- VLC_COMMON_MEMBERS
-
- /*
- * Variables set by the module to identify itself
- */
- const char *psz_shortname; /* Module name */
- const char *psz_longname; /* Module descriptive name */
- const char *psz_help; /* Long help string for "special" modules */
-
- /*
- * Variables set by the module to tell us what it can do
- */
- const char *psz_program; /* Program name which will activate the module */
-
- const char *pp_shortcuts[ MODULE_SHORTCUT_MAX ]; /* Shortcuts to the module */
-
- const char *psz_capability; /* Capability */
- int i_score; /* Score for each capability */
- uint32_t i_cpu; /* Required CPU capabilities */
-
- vlc_bool_t b_unloadable; /* Can we be dlclosed? */
- vlc_bool_t b_reentrant; /* Are we reentrant? */
- vlc_bool_t b_submodule; /* Is this a submodule? */
-
- /* Callbacks */
- int ( * pf_activate ) ( vlc_object_t * );
- void ( * pf_deactivate ) ( vlc_object_t * );
-
- /*
- * Variables set by the module to store its config options
- */
- module_config_t *p_config; /* Module configuration structure */
- size_t confsize; /* Number of module_config_t items */
- unsigned int i_config_items; /* number of configuration items */
- unsigned int i_bool_items; /* number of bool config items */
-
- /*
- * Variables used internally by the module manager
- */
- /* Plugin-specific stuff */
- module_handle_t handle; /* Unique handle */
- char * psz_filename; /* Module filename */
-
- vlc_bool_t b_builtin; /* Set to true if the module is built in */
- vlc_bool_t b_loaded; /* Set to true if the dll is loaded */
-
- /*
- * Symbol table we send to the module so that it can access vlc symbols
- */
- module_symbols_t *p_symbols;
-};
-
-/*****************************************************************************
- * Module cache description structure
- *****************************************************************************/
-struct module_cache_t
-{
- /* Mandatory cache entry header */
- char *psz_file;
- int64_t i_time;
- int64_t i_size;
- vlc_bool_t b_junk;
-
- /* Optional extra data */
- module_t *p_module;
-};
-
-/*****************************************************************************
- * Exported functions.
- *****************************************************************************/
-#define module_InitBank(a) __module_InitBank(VLC_OBJECT(a))
-void __module_InitBank ( vlc_object_t * );
-#define module_LoadMain(a) __module_LoadMain(VLC_OBJECT(a))
-void __module_LoadMain ( vlc_object_t * );
-#define module_LoadBuiltins(a) __module_LoadBuiltins(VLC_OBJECT(a))
-void __module_LoadBuiltins ( vlc_object_t * );
-#define module_LoadPlugins(a) __module_LoadPlugins(VLC_OBJECT(a))
-void __module_LoadPlugins ( vlc_object_t * );
-#define module_EndBank(a) __module_EndBank(VLC_OBJECT(a))
-void __module_EndBank ( vlc_object_t * );
-#define module_ResetBank(a) __module_ResetBank(VLC_OBJECT(a))
-void __module_ResetBank ( vlc_object_t * );
-
-#define module_Need(a,b,c,d) __module_Need(VLC_OBJECT(a),b,c,d)
-VLC_EXPORT( module_t *, __module_Need, ( vlc_object_t *, const char *, const char *, vlc_bool_t ) );
-#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
-VLC_EXPORT( void, __module_Unneed, ( vlc_object_t *, module_t * ) );
-
+++ /dev/null
-/*****************************************************************************
- * modules_inner.h : Macros used from within a module.
- *****************************************************************************
- * Copyright (C) 2001-2006 the VideoLAN team
- * $Id$
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * If we are not within a module, assume we're in the vlc core.
- *****************************************************************************/
-#if !defined( __PLUGIN__ ) && !defined( __BUILTIN__ )
-# define MODULE_NAME main
-#endif
-
-/*****************************************************************************
- * Add a few defines. You do not want to read this section. Really.
- *****************************************************************************/
-
-/* Explanation:
- *
- * if user has #defined MODULE_NAME foo, then we will need:
- * #define MODULE_STRING "foo"
- *
- * and, if __BUILTIN__ is set, we will also need:
- * #define MODULE_FUNC( zog ) module_foo_zog
- *
- * this can't easily be done with the C preprocessor, thus a few ugly hacks.
- */
-
-/* I can't believe I need to do this to change « foo » to « "foo" » */
-#define STRINGIFY( z ) UGLY_KLUDGE( z )
-#define UGLY_KLUDGE( z ) #z
-/* And I need to do _this_ to change « foo bar » to « module_foo_bar » ! */
-#define CONCATENATE( y, z ) CRUDE_HACK( y, z )
-#define CRUDE_HACK( y, z ) y##__##z
-
-/* If the module is built-in, then we need to define foo_InitModule instead
- * of InitModule. Same for Activate- and DeactivateModule. */
-#if defined( __BUILTIN__ )
-# define E_( function ) CONCATENATE( function, MODULE_NAME )
-# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME )
-# define DECLARE_SYMBOLS struct _u_n_u_s_e_d_
-# define STORE_SYMBOLS struct _u_n_u_s_e_d_
-#elif defined( __PLUGIN__ )
-# define E_( function ) CONCATENATE( function, MODULE_SYMBOL )
-# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_SYMBOL )
-# define DECLARE_SYMBOLS module_symbols_t* p_symbols
-# define STORE_SYMBOLS p_symbols = p_module->p_symbols
-#endif
-
-#if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
-# define DLL_SYMBOL __declspec(dllexport)
-# define CDECL_SYMBOL __cdecl
-#else
-# define DLL_SYMBOL
-# define CDECL_SYMBOL
-#endif
-
-#if defined( __cplusplus )
-# define EXTERN_SYMBOL extern "C"
-#else
-# define EXTERN_SYMBOL
-#endif
-
-#if defined( USE_DLL )
-# define IMPORT_SYMBOL __declspec(dllimport)
-#else
-# define IMPORT_SYMBOL
-#endif
-
-#define MODULE_STRING STRINGIFY( MODULE_NAME )
-
-/*
- * InitModule: this function is called once and only once, when the module
- * is looked at for the first time. We get the useful data from it, for
- * instance the module name, its shortcuts, its capabilities... we also create
- * a copy of its config because the module can be unloaded at any time.
- */
-#if defined (__PLUGIN__) || defined (__BUILTIN__)
-EXTERN_SYMBOL DLL_SYMBOL int CDECL_SYMBOL
-E_(vlc_entry) ( module_t *p_module );
-#endif
-
-#define vlc_module_begin( ) \
- DECLARE_SYMBOLS; \
- EXTERN_SYMBOL DLL_SYMBOL int CDECL_SYMBOL \
- __VLC_SYMBOL(vlc_entry) ( module_t *p_module ) \
- { \
- int i_shortcut = 1, res; \
- size_t i_config = (size_t)(-1); \
- module_config_t *p_config = NULL; \
- STORE_SYMBOLS; \
- p_module->b_submodule = VLC_FALSE; \
- p_module->b_unloadable = VLC_TRUE; \
- p_module->b_reentrant = VLC_TRUE; \
- p_module->psz_object_name = MODULE_STRING; \
- p_module->psz_shortname = NULL; \
- p_module->psz_longname = MODULE_STRING; \
- p_module->psz_help = NULL; \
- p_module->pp_shortcuts[ 0 ] = MODULE_STRING; \
- p_module->i_cpu = 0; \
- p_module->psz_program = NULL; \
- p_module->psz_capability = ""; \
- p_module->i_score = 1; \
- p_module->pf_activate = NULL; \
- p_module->pf_deactivate = NULL; \
- { \
- module_t *p_submodule = p_module /* the ; gets added */
-
-#define vlc_module_end( ) \
- p_submodule->pp_shortcuts[ i_shortcut ] = NULL; \
- } \
- res = config_Duplicate( p_module, p_config, ++i_config ); \
- for( size_t i = 0; i < i_config; i++ ) \
- { \
- if( p_config[ i ].i_action ) \
- { \
- free( p_config[ i ].ppf_action ); \
- free( p_config[ i ].ppsz_action_text ); \
- } \
- } \
- free( p_config ); \
- if (res) \
- return res; \
- (void)i_shortcut; \
- return VLC_SUCCESS; \
- } \
- struct _u_n_u_s_e_d_ /* the ; gets added */
-
-
-#define add_submodule( ) \
- p_submodule->pp_shortcuts[ i_shortcut ] = NULL; \
- p_submodule = \
- (module_t *)vlc_object_create( p_module, VLC_OBJECT_MODULE ); \
- vlc_object_attach( p_submodule, p_module ); \
- p_submodule->b_submodule = VLC_TRUE; \
- /* Nuahahaha! Heritage! Polymorphism! Ugliness!! */ \
- for( i_shortcut = 0; p_module->pp_shortcuts[ i_shortcut ]; i_shortcut++ ) \
- { \
- p_submodule->pp_shortcuts[ i_shortcut ] = \
- p_module->pp_shortcuts[ i_shortcut ]; \
- } \
- p_submodule->psz_object_name = p_module->psz_object_name; \
- p_submodule->psz_shortname = p_module->psz_shortname; \
- p_submodule->psz_longname = p_module->psz_longname; \
- p_submodule->psz_program = p_module->psz_program; \
- p_submodule->psz_capability = p_module->psz_capability; \
- p_submodule->i_score = p_module->i_score; \
- p_submodule->i_cpu = p_module->i_cpu; \
- p_submodule->pf_activate = NULL; \
- p_submodule->pf_deactivate = NULL
-
-#define add_requirement( cap ) \
- p_module->i_cpu |= CPU_CAPABILITY_##cap
-
-#define add_shortcut( shortcut ) \
- p_submodule->pp_shortcuts[ i_shortcut ] = shortcut; \
- i_shortcut++
-
-#define set_shortname( desc ) \
- p_submodule->psz_shortname = desc
-
-#define set_description( desc ) \
- p_submodule->psz_longname = desc
-
-#define set_help( help ) \
- p_submodule->psz_help = help
-
-#define set_capability( cap, score ) \
- p_submodule->psz_capability = cap; \
- p_submodule->i_score = score
-
-#define set_program( program ) \
- p_submodule->psz_program = program
-
-#define set_callbacks( activate, deactivate ) \
- p_submodule->pf_activate = activate; \
- p_submodule->pf_deactivate = deactivate
-
-#define linked_with_a_crap_library_which_uses_atexit( ) \
- p_module->b_unloadable = VLC_FALSE
-
+++ /dev/null
-/*****************************************************************************
- * mtime.h: high resolution time management functions
- * This header provides portable high precision time management functions,
- * which should be the only ones used in other segments of the program, since
- * functions like gettimeofday() and ftime() are not always supported.
- * Most functions are declared as inline or as macros since they are only
- * interfaces to system calls and have to be called frequently.
- * 'm' stands for 'micro', since maximum resolution is the microsecond.
- * Functions prototyped are implemented in interface/mtime.c.
- *****************************************************************************
- * Copyright (C) 1996, 1997, 1998, 1999, 2000 the VideoLAN team
- * $Id$
- *
- * Authors: Vincent Seguin <seguin@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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * LAST_MDATE: date which will never happen
- *****************************************************************************
- * This date can be used as a 'never' date, to mark missing events in a function
- * supposed to return a date, such as nothing to display in a function
- * returning the date of the first image to be displayed. It can be used in
- * comparaison with other values: all existing dates will be earlier.
- *****************************************************************************/
-#define LAST_MDATE ((mtime_t)((uint64_t)(-1)/2))
-
-/*****************************************************************************
- * MSTRTIME_MAX_SIZE: maximum possible size of mstrtime
- *****************************************************************************
- * This values is the maximal possible size of the string returned by the
- * mstrtime() function, including '-' and the final '\0'. It should be used to
- * allocate the buffer.
- *****************************************************************************/
-#define MSTRTIME_MAX_SIZE 22
-
-/* Well, Duh? But it does clue us in that we are converting from
- millisecond quantity to a second quantity or vice versa.
-*/
-#define MILLISECONDS_PER_SEC 1000
-
-#define msecstotimestr(psz_buffer, msecs) \
- secstotimestr( psz_buffer, (msecs / (int) MILLISECONDS_PER_SEC) )
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-VLC_EXPORT( char *, mstrtime, ( char *psz_buffer, mtime_t date ) );
-VLC_EXPORT( mtime_t, mdate, ( void ) );
-VLC_EXPORT( void, mwait, ( mtime_t date ) );
-VLC_EXPORT( void, msleep, ( mtime_t delay ) );
-VLC_EXPORT( char *, secstotimestr, ( char *psz_buffer, int secs ) );
-
-/*****************************************************************************
- * date_t: date incrementation without long-term rounding errors
- *****************************************************************************/
-struct date_t
-{
- mtime_t date;
- uint32_t i_divider_num;
- uint32_t i_divider_den;
- uint32_t i_remainder;
-};
-
-VLC_EXPORT( void, date_Init, ( date_t *, uint32_t, uint32_t ) );
-VLC_EXPORT( void, date_Change, ( date_t *, uint32_t, uint32_t ) );
-VLC_EXPORT( void, date_Set, ( date_t *, mtime_t ) );
-VLC_EXPORT( mtime_t, date_Get, ( const date_t * ) );
-VLC_EXPORT( void, date_Move, ( date_t *, mtime_t ) );
-VLC_EXPORT( mtime_t, date_Increment, ( date_t *, uint32_t ) );
+++ /dev/null
-/*****************************************************************************
- * network.h: interface to communicate with network plug-ins
- *****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
- * $Id$
- *
- * Authors: Christophe Massiot <massiot@via.ecp.fr>
- * Laurent Aimar <fenrir@via.ecp.fr>
- * Rémi Denis-Courmont <rem # videolan.org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef __VLC_NETWORK_H
-# define __VLC_NETWORK_H
-
-#if defined( WIN32 )
-# if defined(UNDER_CE) && defined(sockaddr_storage)
-# undef sockaddr_storage
-# endif
-# if defined(UNDER_CE)
-# define HAVE_STRUCT_ADDRINFO
-# else
-# define _NO_OLDNAMES 1
-# include <io.h>
-# endif
-# include <winsock2.h>
-# include <ws2tcpip.h>
-# define ENETUNREACH WSAENETUNREACH
-# define net_errno (WSAGetLastError())
-extern const char *net_strerror( int val );
-#else
-# if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-# endif
-# if HAVE_NETINET_IN_H
-# include <netinet/in.h>
-# endif
-# if HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-# elif defined( SYS_BEOS )
-# include <net/netdb.h>
-# endif
-# include <netdb.h>
-# define net_errno errno
-# define net_strerror strerror
-#endif
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/* Portable networking layer communication */
-int net_Socket (vlc_object_t *obj, int family, int socktype, int proto);
-
-#define net_ConnectTCP(a, b, c) __net_ConnectTCP(VLC_OBJECT(a), b, c)
-#define net_OpenTCP(a, b, c) __net_ConnectTCP(VLC_OBJECT(a), b, c)
-VLC_EXPORT( int, __net_ConnectTCP, ( vlc_object_t *p_this, const char *psz_host, int i_port ) );
-
-int *net_Listen (vlc_object_t *p_this, const char *psz_host, int i_port,
- int family, int socktype, int protocol);
-VLC_EXPORT( int, net_ListenSingle, (vlc_object_t *p_this, const char *psz_host, int i_port, int family, int socktype, int protocol) );
-
-#define net_ListenTCP(a, b, c) __net_ListenTCP(VLC_OBJECT(a), b, c)
-VLC_EXPORT( int *, __net_ListenTCP, ( vlc_object_t *, const char *, int ) );
-
-#define net_Accept(a, b, c) __net_Accept(VLC_OBJECT(a), b, c)
-VLC_EXPORT( int, __net_Accept, ( vlc_object_t *, int *, mtime_t ) );
-
-#define net_ConnectUDP(a, b, c, d ) __net_ConnectUDP(VLC_OBJECT(a), b, c, d)
-VLC_EXPORT( int, __net_ConnectUDP, ( vlc_object_t *p_this, const char *psz_host, int i_port, int hlim ) );
-
-static inline int net_ListenUDP1 (vlc_object_t *obj, const char *host, int port)
-{
- return net_ListenSingle (obj, host, port, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP);
-}
-
-#define net_OpenUDP(a, b, c, d, e ) __net_OpenUDP(VLC_OBJECT(a), b, c, d, e)
-VLC_EXPORT( int, __net_OpenUDP, ( vlc_object_t *p_this, const char *psz_bind, int i_bind, const char *psz_server, int i_server ) );
-
-VLC_EXPORT( void, net_Close, ( int fd ) );
-VLC_EXPORT( void, net_ListenClose, ( int *fd ) );
-
-VLC_EXPORT( int, net_SetDSCP, ( int fd, uint8_t dscp ) );
-int net_Subscribe (vlc_object_t *obj, int fd, const struct sockaddr *addr,
- socklen_t addrlen);
-
-/* Functions to read from or write to the networking layer */
-struct virtual_socket_t
-{
- void *p_sys;
- int (*pf_recv) ( void *, void *, int );
- int (*pf_send) ( void *, const void *, int );
-};
-
-#define net_Read(a,b,c,d,e,f) __net_Read(VLC_OBJECT(a),b,c,d,e,f)
-VLC_EXPORT( int, __net_Read, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, int i_data, vlc_bool_t b_retry ) );
-
-#define net_ReadNonBlock(a,b,c,d,e,f) __net_ReadNonBlock(VLC_OBJECT(a),b,c,d,e,f)
-VLC_EXPORT( int, __net_ReadNonBlock, ( vlc_object_t *p_this, int fd, const v_socket_t *, uint8_t *p_data, int i_data, mtime_t i_wait ) );
-
-#define net_Select(a,b,c,d,e,f,g) __net_Select(VLC_OBJECT(a),b,c,d,e,f,g)
-VLC_EXPORT( int, __net_Select, ( vlc_object_t *p_this, const int *pi_fd, const v_socket_t *const *, int i_fd, uint8_t *p_data, int i_data, mtime_t i_wait ) );
-
-#define net_Write(a,b,c,d,e) __net_Write(VLC_OBJECT(a),b,c,d,e)
-VLC_EXPORT( int, __net_Write, ( vlc_object_t *p_this, int fd, const v_socket_t *, const uint8_t *p_data, int i_data ) );
-
-#define net_Gets(a,b,c) __net_Gets(VLC_OBJECT(a),b,c)
-VLC_EXPORT( char *, __net_Gets, ( vlc_object_t *p_this, int fd, const v_socket_t * ) );
-
-VLC_EXPORT( int, net_Printf, ( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, ... ) );
-
-#define net_vaPrintf(a,b,c,d,e) __net_vaPrintf(VLC_OBJECT(a),b,c,d,e)
-VLC_EXPORT( int, __net_vaPrintf, ( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, va_list args ) );
-
-
-#ifndef HAVE_INET_PTON
-/* only in core, so no need for C++ extern "C" */
-int inet_pton(int af, const char *src, void *dst);
-#endif
-
-
-/*****************************************************************************
- * net_StopRecv/Send
- *****************************************************************************
- * Wrappers for shutdown()
- *****************************************************************************/
-#if defined (SHUT_WR)
-/* the standard way */
-# define net_StopSend( fd ) (void)shutdown( fd, SHUT_WR )
-# define net_StopRecv( fd ) (void)shutdown( fd, SHUT_RD )
-#elif defined (SD_SEND)
-/* the Microsoft seemingly-purposedly-different-for-the-sake-of-it way */
-# define net_StopSend( fd ) (void)shutdown( fd, SD_SEND )
-# define net_StopRecv( fd ) (void)shutdown( fd, SD_RECEIVE )
-#else
-# ifndef SYS_BEOS /* R5 just doesn't have a working shutdown() */
-# warning FIXME: implement shutdown on your platform!
-# endif
-# define net_StopSend( fd ) (void)0
-# define net_StopRecv( fd ) (void)0
-#endif
-
-/* Portable network names/addresses resolution layer */
-
-/* GAI error codes */
-# ifndef EAI_BADFLAGS
-# define EAI_BADFLAGS -1
-# endif
-# ifndef EAI_NONAME
-# define EAI_NONAME -2
-# endif
-# ifndef EAI_AGAIN
-# define EAI_AGAIN -3
-# endif
-# ifndef EAI_FAIL
-# define EAI_FAIL -4
-# endif
-# ifndef EAI_NODATA
-# define EAI_NODATA -5
-# endif
-# ifndef EAI_FAMILY
-# define EAI_FAMILY -6
-# endif
-# ifndef EAI_SOCKTYPE
-# define EAI_SOCKTYPE -7
-# endif
-# ifndef EAI_SERVICE
-# define EAI_SERVICE -8
-# endif
-# ifndef EAI_ADDRFAMILY
-# define EAI_ADDRFAMILY -9
-# endif
-# ifndef EAI_MEMORY
-# define EAI_MEMORY -10
-# endif
-# ifndef EAI_SYSTEM
-# define EAI_SYSTEM -11
-# endif
-
-
-# ifndef NI_MAXHOST
-# define NI_MAXHOST 1025
-# define NI_MAXSERV 32
-# endif
-# define NI_MAXNUMERICHOST 64
-
-# ifndef NI_NUMERICHOST
-# define NI_NUMERICHOST 0x01
-# define NI_NUMERICSERV 0x02
-# define NI_NOFQDN 0x04
-# define NI_NAMEREQD 0x08
-# define NI_DGRAM 0x10
-# endif
-
-# ifndef HAVE_STRUCT_ADDRINFO
-struct addrinfo
-{
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- size_t ai_addrlen;
- struct sockaddr *ai_addr;
- char *ai_canonname;
- struct addrinfo *ai_next;
-};
-# define AI_PASSIVE 1
-# define AI_CANONNAME 2
-# define AI_NUMERICHOST 4
-# endif /* if !HAVE_STRUCT_ADDRINFO */
-
-VLC_EXPORT( const char *, vlc_gai_strerror, ( int ) );
-VLC_EXPORT( int, vlc_getnameinfo, ( const struct sockaddr *, int, char *, int, int *, int ) );
-VLC_EXPORT( int, vlc_getaddrinfo, ( vlc_object_t *, const char *, int, const struct addrinfo *, struct addrinfo ** ) );
-VLC_EXPORT( void, vlc_freeaddrinfo, ( struct addrinfo * ) );
-
-
-static inline vlc_bool_t
-net_SockAddrIsMulticast (const struct sockaddr *addr, socklen_t len)
-{
- switch (addr->sa_family)
- {
-#ifdef IN_MULTICAST
- case AF_INET:
- {
- struct sockaddr_in *v4 = (struct sockaddr_in *)addr;
- if ((size_t)len < sizeof (*v4))
- return VLC_FALSE;
- return IN_MULTICAST (ntohl (v4->sin_addr.s_addr)) != 0;
- }
-#endif
-
-#ifdef IN6_IS_ADDR_MULTICAST
- case AF_INET6:
- {
- struct sockaddr_in6 *v6 = (struct sockaddr_in6 *)addr;
- if ((size_t)len < sizeof (*v6))
- return VLC_FALSE;
- return IN6_IS_ADDR_MULTICAST (&v6->sin6_addr) != 0;
- }
-#endif
- }
-
- return VLC_FALSE;
-}
-
-
-
-/**
- * net_AddressIsMulticast
- * @return VLC_FALSE iff the psz_addr does not specify a multicast address,
- * or the address is not a valid address.
- */
-static inline vlc_bool_t net_AddressIsMulticast( vlc_object_t *p_object, const char *psz_addr )
-{
- struct addrinfo hints, *res;
-
- memset (&hints, 0, sizeof (hints));
- hints.ai_socktype = SOCK_DGRAM; /* UDP */
- hints.ai_flags = AI_NUMERICHOST;
-
- int i = vlc_getaddrinfo (p_object, psz_addr, 0,
- &hints, &res);
- if (i)
- {
- msg_Err (p_object, "invalid address \"%s\" for net_AddressIsMulticast (%s)",
- psz_addr, vlc_gai_strerror (i));
- return VLC_FALSE;
- }
-
- vlc_bool_t b = net_SockAddrIsMulticast (res->ai_addr, res->ai_addrlen);
- vlc_freeaddrinfo (res);
- return b;
-}
-
-static inline int net_GetSockAddress( int fd, char *address, int *port )
-{
- struct sockaddr_storage addr;
- socklen_t addrlen = sizeof( addr );
-
- return getsockname( fd, (struct sockaddr *)&addr, &addrlen )
- || vlc_getnameinfo( (struct sockaddr *)&addr, addrlen, address,
- NI_MAXNUMERICHOST, port, NI_NUMERICHOST )
- ? VLC_EGENERIC : 0;
-}
-
-static inline int net_GetPeerAddress( int fd, char *address, int *port )
-{
- struct sockaddr_storage addr;
- socklen_t addrlen = sizeof( addr );
-
- return getpeername( fd, (struct sockaddr *)&addr, &addrlen )
- || vlc_getnameinfo( (struct sockaddr *)&addr, addrlen, address,
- NI_MAXNUMERICHOST, port, NI_NUMERICHOST )
- ? VLC_EGENERIC : 0;
-}
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
+++ /dev/null
-/*****************************************************************************
- * os_specific.h: OS specific features
- *****************************************************************************
- * Copyright (C) 2001 the VideoLAN team
- * $Id$
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- * Gildas Bazin <gbazin@netcourrier.com>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _NEED_OS_SPECIFIC_H
-# define _NEED_OS_SPECIFIC_H 1
-#endif
-
-#if defined( SYS_BEOS )
-# include "beos_specific.h"
-#elif defined( __APPLE__ )
-# include "darwin_specific.h"
-#elif defined( WIN32 ) || defined( UNDER_CE )
-# include "win32_specific.h"
-#else
-# undef _NEED_OS_SPECIFIC_H
-#endif
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-#ifdef _NEED_OS_SPECIFIC_H
- void system_Init ( libvlc_int_t *, int *, char *[] );
- void system_Configure ( libvlc_int_t *, int *, char *[] );
- void system_End ( libvlc_int_t * );
-#else
-# define system_Init( a, b, c ) {}
-# define system_Configure( a, b, c ) {}
-# define system_End( a ) {}
-#endif
-
-# ifdef __cplusplus
-}
-# endif
+++ /dev/null
-/*
- * Copyright (C) 2004the VideoLAN team
- * $Id$
- *
- * Authors: Olivier Aubert <oaubert 47 videolan d07 org>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- **************************************************************************** */
-
-
-
-typedef struct snapshot_t {
- char *p_data; /* Data area */
-
- int i_width; /* In pixels */
- int i_height; /* In pixels */
- int i_datasize; /* In bytes */
- mtime_t date; /* Presentation time */
-} snapshot_t;
+++ /dev/null
-/*****************************************************************************
- * stream_output.h : stream output module
- *****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
- * $Id$
- *
- * Authors: Christophe Massiot <massiot@via.ecp.fr>
- * Laurent Aimar <fenrir@via.ecp.fr>
- * Eric Petit <titer@videolan.org>
- * Jean-Paul Saman <jpsaman #_at_# m2x.nl>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * sout_instance_t: stream output thread descriptor
- *****************************************************************************/
-
-#include "vlc_es.h"
-
-/****************************************************************************
- * sout_instance_t: p_sout
- ****************************************************************************/
-struct sout_instance_t
-{
- VLC_COMMON_MEMBERS
-
- char *psz_sout;
- char *psz_chain;
-
- /* meta data (Read only) XXX it won't be set before the first packet received */
- vlc_meta_t *p_meta;
-
- int i_out_pace_nocontrol; /* count of output that can't control the space */
-
- vlc_mutex_t lock;
- sout_stream_t *p_stream;
-
- /* sout private */
- sout_instance_sys_t *p_sys;
-};
-
-/****************************************************************************
- * sout_stream_id_t: opaque (private for all sout_stream_t)
- ****************************************************************************/
-typedef struct sout_stream_id_t sout_stream_id_t;
-
-/****************************************************************************
- * sout_packetizer_input_t: p_sout <-> p_packetizer
- ****************************************************************************/
-struct sout_packetizer_input_t
-{
- sout_instance_t *p_sout;
-
- es_format_t *p_fmt;
-
- sout_stream_id_t *id;
-};
-
-#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 * ) );
-
-VLC_EXPORT( sout_packetizer_input_t *, sout_InputNew,( sout_instance_t *, es_format_t * ) );
-VLC_EXPORT( int, sout_InputDelete, ( sout_packetizer_input_t * ) );
-VLC_EXPORT( int, sout_InputSendBuffer, ( sout_packetizer_input_t *, block_t* ) );
-
-/****************************************************************************
- * sout_access_out_t:
- ****************************************************************************/
-struct sout_access_out_t
-{
- VLC_COMMON_MEMBERS
-
- module_t *p_module;
-
- sout_instance_t *p_sout;
-
- char *psz_access;
- config_chain_t *p_cfg;
-
- int i_writes;
- int64_t i_sent_bytes; ///< This is a "local" counter that is reset each
- // time it is transferred to stats
-
- char *psz_name;
- sout_access_out_sys_t *p_sys;
- int (*pf_seek)( sout_access_out_t *, off_t );
- int (*pf_read)( sout_access_out_t *, block_t * );
- int (*pf_write)( sout_access_out_t *, block_t * );
-};
-
-VLC_EXPORT( sout_access_out_t *,sout_AccessOutNew, ( sout_instance_t *, char *psz_access, char *psz_name ) );
-VLC_EXPORT( void, sout_AccessOutDelete, ( sout_access_out_t * ) );
-VLC_EXPORT( int, sout_AccessOutSeek, ( sout_access_out_t *, off_t ) );
-VLC_EXPORT( int, sout_AccessOutRead, ( sout_access_out_t *, block_t * ) );
-VLC_EXPORT( int, sout_AccessOutWrite, ( sout_access_out_t *, block_t * ) );
-
-/****************************************************************************
- * mux:
- ****************************************************************************/
-struct sout_mux_t
-{
- VLC_COMMON_MEMBERS
- module_t *p_module;
-
- sout_instance_t *p_sout;
-
- char *psz_mux;
- config_chain_t *p_cfg;
-
- sout_access_out_t *p_access;
-
- int (*pf_addstream)( sout_mux_t *, sout_input_t * );
- int (*pf_delstream)( sout_mux_t *, sout_input_t * );
- int (*pf_mux) ( sout_mux_t * );
- int (*pf_control) ( sout_mux_t *, int, va_list );
-
- /* here are all inputs accepted by muxer */
- int i_nb_inputs;
- sout_input_t **pp_inputs;
-
-
- /* mux private */
- sout_mux_sys_t *p_sys;
-
- /* XXX private to stream_output.c */
- /* if muxer doesn't support adding stream at any time then we first wait
- * for stream then we refuse all stream and start muxing */
- vlc_bool_t b_add_stream_any_time;
- vlc_bool_t b_waiting_stream;
- /* we wait one second after first stream added */
- mtime_t i_add_stream_start;
-};
-
-enum sout_mux_query_e
-{
- /* capabilities */
- MUX_CAN_ADD_STREAM_WHILE_MUXING, /* arg1= vlc_bool_t *, res=cannot fail */
- /* properties */
- MUX_GET_ADD_STREAM_WAIT, /* arg1= vlc_bool_t *, res=cannot fail */
- MUX_GET_MIME, /* arg1= char ** res=can fail */
-};
-
-struct sout_input_t
-{
- sout_instance_t *p_sout;
-
- es_format_t *p_fmt;
- block_fifo_t *p_fifo;
-
- void *p_sys;
-};
-
-
-VLC_EXPORT( sout_mux_t *, sout_MuxNew, ( sout_instance_t*, char *, sout_access_out_t * ) );
-VLC_EXPORT( sout_input_t *, sout_MuxAddStream, ( sout_mux_t *, es_format_t * ) );
-VLC_EXPORT( void, sout_MuxDeleteStream, ( sout_mux_t *, sout_input_t * ) );
-VLC_EXPORT( void, sout_MuxDelete, ( sout_mux_t * ) );
-VLC_EXPORT( void, sout_MuxSendBuffer, ( sout_mux_t *, sout_input_t *, block_t * ) );
-
-static inline int sout_MuxControl( sout_mux_t *p_mux, int i_query, ... )
-{
- va_list args;
- int i_result;
-
- va_start( args, i_query );
- i_result = p_mux->pf_control( p_mux, i_query, args );
- va_end( args );
- return i_result;
-}
-
-/****************************************************************************
- * sout_stream:
- ****************************************************************************/
-struct sout_stream_t
-{
- VLC_COMMON_MEMBERS
-
- module_t *p_module;
- sout_instance_t *p_sout;
-
- char *psz_name;
- config_chain_t *p_cfg;
- char *psz_next;
-
- /* Subpicture unit */
- spu_t *p_spu;
-
- /* add, remove a stream */
- sout_stream_id_t *(*pf_add)( sout_stream_t *, es_format_t * );
- int (*pf_del)( sout_stream_t *, sout_stream_id_t * );
- /* manage a packet */
- int (*pf_send)( sout_stream_t *, sout_stream_id_t *, block_t* );
-
- /* private */
- sout_stream_sys_t *p_sys;
-};
-
-VLC_EXPORT( sout_stream_t *, sout_StreamNew, ( sout_instance_t *, char *psz_chain ) );
-VLC_EXPORT( void, sout_StreamDelete, ( sout_stream_t * ) );
-
-static inline sout_stream_id_t *sout_StreamIdAdd( sout_stream_t *s, es_format_t *fmt )
-{
- return s->pf_add( s, fmt );
-}
-static inline int sout_StreamIdDel( sout_stream_t *s, sout_stream_id_t *id )
-{
- return s->pf_del( s, id );
-}
-static inline int sout_StreamIdSend( sout_stream_t *s, sout_stream_id_t *id, block_t *b )
-{
- return s->pf_send( s, id, b );
-}
-
-/****************************************************************************
- * Announce handler mess
- ****************************************************************************/
-struct sap_session_t;
-
-struct session_descriptor_t
-{
- char *psz_name;
- char *psz_uri;
- int i_port;
- int i_ttl;
- int i_payload; /* SAP Payload type */
-
- char *psz_group;
-
- sap_session_t *p_sap; /* If we have a sap session, remember it */
- char *psz_sdp;
- vlc_bool_t b_rtp;
-};
-
-#define METHOD_TYPE_SAP 1
-
-struct announce_method_t
-{
- int i_type;
-};
-
-
-/* A SAP session descriptor, enqueued in the SAP handler queue */
-struct sap_session_t
-{
- char *psz_sdp;
- uint8_t *psz_data;
- unsigned i_length;
- sap_address_t *p_address;
-
- /* Last and next send */
- mtime_t i_last;
- mtime_t i_next;
-};
-
-/* The SAP handler, running in a separate thread */
-struct sap_handler_t
-{
- VLC_COMMON_MEMBERS /* needed to create a thread */
-
- sap_session_t **pp_sessions;
- sap_address_t **pp_addresses;
-
- vlc_bool_t b_control;
-
- int i_sessions;
- int i_addresses;
-
- int i_current_session;
-
- int (*pf_add) ( sap_handler_t*, session_descriptor_t *);
- int (*pf_del) ( sap_handler_t*, session_descriptor_t *);
-
- /* private data, not in p_sys as there is one kind of sap_handler_t */
-};
-
-/* The main announce handler object */
-struct announce_handler_t
-{
- VLC_COMMON_MEMBERS
-
- sap_handler_t *p_sap;
-};
-
-/* End */
-
-/* Announce system */
-VLC_EXPORT( int, sout_AnnounceRegister, (sout_instance_t *,session_descriptor_t*, announce_method_t* ) );
-VLC_EXPORT(session_descriptor_t*,sout_AnnounceRegisterSDP, (sout_instance_t *,const char *, const char *, announce_method_t* ) );
-VLC_EXPORT( int, sout_AnnounceUnRegister, (sout_instance_t *,session_descriptor_t* ) );
-
-VLC_EXPORT(session_descriptor_t*,sout_AnnounceSessionCreate, (void) );
-VLC_EXPORT(void, sout_AnnounceSessionDestroy, (session_descriptor_t *) );
-VLC_EXPORT(announce_method_t*, sout_AnnounceMethodCreate, (int) );
-
-#define announce_HandlerCreate(a) __announce_HandlerCreate(VLC_OBJECT(a))
-announce_handler_t* __announce_HandlerCreate( vlc_object_t *);
-
-/* Private functions for the announce handler */
-int announce_HandlerDestroy( announce_handler_t * );
-int announce_Register( announce_handler_t *p_announce,
- session_descriptor_t *p_session,
- announce_method_t *p_method );
-int announce_UnRegister( announce_handler_t *p_announce,
- session_descriptor_t *p_session );
-
-sap_handler_t *announce_SAPHandlerCreate( announce_handler_t *p_announce );
-void announce_SAPHandlerDestroy( sap_handler_t *p_sap );
+++ /dev/null
-/*****************************************************************************
- * variables.h: variables handling
- *****************************************************************************
- * Copyright (C) 2002-2004 the VideoLAN team
- * $Id$
- *
- * Authors: Samuel Hocevar <sam@zoy.org>
- * Gildas Bazin <gbazin@netcourrier.com>
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/**
- * \defgroup variables Variables
- *
- * Functions for using the object variables in vlc.
- *
- * Vlc have a very powerful "object variable" infrastructure useful
- * for many things.
- *
- * @{
- */
-
-typedef struct callback_entry_t callback_entry_t;
-
-/**
- * The structure describing a variable.
- * \note vlc_value_t is the common union for variable values
- */
-struct variable_t
-{
- /** The variable's exported value */
- vlc_value_t val;
-
- char * psz_name; /**< The variable unique name */
- uint32_t i_hash; /**< (almost) unique hashed value */
- int i_type; /**< The type of the variable */
-
- /** The variable display name, mainly for use by the interfaces */
- char * psz_text;
-
- /** A pointer to a comparison function */
- int ( * pf_cmp ) ( vlc_value_t, vlc_value_t );
- /** A pointer to a duplication function */
- void ( * pf_dup ) ( vlc_value_t * );
- /** A pointer to a deallocation function */
- void ( * pf_free ) ( vlc_value_t * );
-
- /** Creation count: we only destroy the variable if it reaches 0 */
- int i_usage;
-
- /** If the variable has min/max/step values */
- vlc_value_t min, max, step;
-
- /** Index of the default choice, if the variable is to be chosen in
- * a list */
- int i_default;
- /** List of choices */
- vlc_list_t choices;
- /** List of friendly names for the choices */
- vlc_list_t choices_text;
-
- /** Set to TRUE if the variable is in a callback */
- vlc_bool_t b_incallback;
-
- /** Number of registered callbacks */
- int i_entries;
- /** Array of registered callbacks */
- callback_entry_t * p_entries;
-};
-
-/*****************************************************************************
- * Variable types - probably very incomplete
- *****************************************************************************/
-#define VLC_VAR_TYPE 0x00ff
-#define VLC_VAR_FLAGS 0xff00
-
-/** \defgroup var_flags Additive flags
- * These flags are added to the type field of the variable. Most as a result of
- * a __var_Change() call, but some may be added at creation time
- * @{
- */
-#define VLC_VAR_HASCHOICE 0x0100
-#define VLC_VAR_HASMIN 0x0200
-#define VLC_VAR_HASMAX 0x0400
-#define VLC_VAR_HASSTEP 0x0800
-
-#define VLC_VAR_ISLIST 0x1000
-#define VLC_VAR_ISCOMMAND 0x2000
-#define VLC_VAR_ISCONFIG 0x2000
-
-/** Creation flag */
-#define VLC_VAR_DOINHERIT 0x8000
-/**@}*/
-
-/**
- * \defgroup var_action Variable actions
- * These are the different actions that can be used with __var_Change().
- * The parameters given are the meaning of the two last parameters of
- * __var_Change() when this action is being used.
- * @{
- */
-
-/**
- * Set the minimum value of this variable
- * \param p_val The new minimum value
- * \param p_val2 Unused
- */
-#define VLC_VAR_SETMIN 0x0010
-/**
- * Set the maximum value of this variable
- * \param p_val The new maximum value
- * \param p_val2 Unused
- */
-#define VLC_VAR_SETMAX 0x0011
-#define VLC_VAR_SETSTEP 0x0012
-
-/**
- * Set the value of this variable without triggering any callbacks
- * \param p_val The new value
- * \param p_val2 Unused
- */
-#define VLC_VAR_SETVALUE 0x0013
-
-#define VLC_VAR_SETTEXT 0x0014
-#define VLC_VAR_GETTEXT 0x0015
-
-#define VLC_VAR_ADDCHOICE 0x0020
-#define VLC_VAR_DELCHOICE 0x0021
-#define VLC_VAR_CLEARCHOICES 0x0022
-#define VLC_VAR_SETDEFAULT 0x0023
-#define VLC_VAR_GETCHOICES 0x0024
-#define VLC_VAR_FREECHOICES 0x0025
-#define VLC_VAR_GETLIST 0x0026
-#define VLC_VAR_FREELIST 0x0027
-#define VLC_VAR_CHOICESCOUNT 0x0028
-
-#define VLC_VAR_INHERITVALUE 0x0030
-#define VLC_VAR_TRIGGER_CALLBACKS 0x0035
-/**@}*/
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-VLC_EXPORT( int, __var_Create, ( vlc_object_t *, const char *, int ) );
-VLC_EXPORT( int, __var_Destroy, ( vlc_object_t *, const char * ) );
-
-VLC_EXPORT( int, __var_Change, ( vlc_object_t *, const char *, int, vlc_value_t *, vlc_value_t * ) );
-
-VLC_EXPORT( int, __var_Type, ( vlc_object_t *, const char * ) );
-VLC_EXPORT( int, __var_Set, ( vlc_object_t *, const char *, vlc_value_t ) );
-VLC_EXPORT( int, __var_Get, ( vlc_object_t *, const char *, vlc_value_t * ) );
-
-#define var_OptionParse(a,b) __var_OptionParse( VLC_OBJECT( a ) , b )
-VLC_EXPORT( void, __var_OptionParse, ( vlc_object_t *, const char * ) );
-
-/**
- * __var_Create() with automatic casting.
- */
-#define var_Create(a,b,c) __var_Create( VLC_OBJECT(a), b, c )
-/**
- * __var_Destroy() with automatic casting
- */
-#define var_Destroy(a,b) __var_Destroy( VLC_OBJECT(a), b )
-
-/**
- * __var_Change() with automatic casting
- */
-#define var_Change(a,b,c,d,e) __var_Change( VLC_OBJECT(a), b, c, d, e )
-
-/**
- * __var_Type() with automatic casting
- */
-#define var_Type(a,b) __var_Type( VLC_OBJECT(a), b )
-/**
- * __var_Set() with automatic casting
- */
-#define var_Set(a,b,c) __var_Set( VLC_OBJECT(a), b, c )
-/**
- * __var_Get() with automatic casting
- */
-#define var_Get(a,b,c) __var_Get( VLC_OBJECT(a), b, c )
-
-/*****************************************************************************
- * Variable callbacks
- *****************************************************************************
- * int MyCallback( vlc_object_t *p_this,
- * char const *psz_variable,
- * vlc_value_t oldvalue,
- * vlc_value_t newvalue,
- * void *p_data);
- *****************************************************************************/
-VLC_EXPORT( int, __var_AddCallback, ( vlc_object_t *, const char *, vlc_callback_t, void * ) );
-VLC_EXPORT( int, __var_DelCallback, ( vlc_object_t *, const char *, vlc_callback_t, void * ) );
-
-/**
- * __var_AddCallback() with automatic casting
- */
-#define var_AddCallback(a,b,c,d) __var_AddCallback( VLC_OBJECT(a), b, c, d )
-
-/**
- * __var_DelCallback() with automatic casting
- */
-#define var_DelCallback(a,b,c,d) __var_DelCallback( VLC_OBJECT(a), b, c, d )
-
-/*****************************************************************************
- * helpers functions
- *****************************************************************************/
-
-/**
- * Set the value of an integer variable
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- * \param i The new integer value of this variable
- */
-static inline int __var_SetInteger( vlc_object_t *p_obj, const char *psz_name, int i )
-{
- vlc_value_t val;
- val.i_int = i;
- return __var_Set( p_obj, psz_name, val );
-}
-#define var_SetInteger(a,b,c) __var_SetInteger( VLC_OBJECT(a),b,c)
-/**
- * Set the value of an boolean variable
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- * \param b The new boolean value of this variable
- */
-static inline int __var_SetBool( vlc_object_t *p_obj, const char *psz_name, vlc_bool_t b )
-{
- vlc_value_t val;
- val.b_bool = b;
- return __var_Set( p_obj, psz_name, val );
-}
-
-/**
- * Set the value of a time variable
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- * \param i The new time value of this variable
- */
-static inline int __var_SetTime( vlc_object_t *p_obj, const char *psz_name, int64_t i )
-{
- vlc_value_t val;
- val.i_time = i;
- return __var_Set( p_obj, psz_name, val );
-}
-
-/**
- * Set the value of a float variable
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- * \param f The new float value of this variable
- */
-static inline int __var_SetFloat( vlc_object_t *p_obj, const char *psz_name, float f )
-{
- vlc_value_t val;
- val.f_float = f;
- return __var_Set( p_obj, psz_name, val );
-}
-
-/**
- * Set the value of a string variable
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- * \param psz_string The new string value of this variable
- */
-static inline int __var_SetString( vlc_object_t *p_obj, const char *psz_name, const char *psz_string )
-{
- vlc_value_t val;
- val.psz_string = (char *)psz_string;
- return __var_Set( p_obj, psz_name, val );
-}
-
-/**
- * Trigger the callbacks on a void variable
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int __var_SetVoid( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;
- val.b_bool = VLC_TRUE;
- return __var_Set( p_obj, psz_name, val );
-}
-#define var_SetVoid(a,b) __var_SetVoid( VLC_OBJECT(a),b)
-
-/**
- * __var_SetBool() with automatic casting
- */
-#define var_SetBool(a,b,c) __var_SetBool( VLC_OBJECT(a),b,c)
-
-/**
- * __var_SetTime() with automatic casting
- */
-#define var_SetTime(a,b,c) __var_SetTime( VLC_OBJECT(a),b,c)
-/**
- * __var_SetFloat() with automatic casting
- */
-#define var_SetFloat(a,b,c) __var_SetFloat( VLC_OBJECT(a),b,c)
-/**
- * __var_SetString() with automatic casting
- */
-#define var_SetString(a,b,c) __var_SetString( VLC_OBJECT(a),b,c)
-
-/**
- * Get an integer value
-*
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int __var_GetInteger( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;val.i_int = 0;
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.i_int;
- else
- return 0;
-}
-
-/**
- * Get a boolean value
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int __var_GetBool( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val; val.b_bool = VLC_FALSE;
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.b_bool;
- else
- return VLC_FALSE;
-}
-
-/**
- * Get a time value
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int64_t __var_GetTime( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val; val.i_time = 0L;
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.i_time;
- else
- return 0;
-}
-
-/**
- * Get a float value
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline float __var_GetFloat( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val; val.f_float = 0.0;
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.f_float;
- else
- return 0.0;
-}
-
-/**
- * Get a string value
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline char *__var_GetString( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val; val.psz_string = NULL;
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.psz_string;
- else
- return strdup( "" );
-}
-
-/**
- * __var_GetInteger() with automatic casting
- */
-#define var_GetInteger(a,b) __var_GetInteger( VLC_OBJECT(a),b)
-/**
- * __var_GetBool() with automatic casting
- */
-#define var_GetBool(a,b) __var_GetBool( VLC_OBJECT(a),b)
-/**
- * __var_GetTime() with automatic casting
- */
-#define var_GetTime(a,b) __var_GetTime( VLC_OBJECT(a),b)
-/**
- * __var_GetFloat() with automatic casting
- */
-#define var_GetFloat(a,b) __var_GetFloat( VLC_OBJECT(a),b)
-/**
- * __var_GetString() with automatic casting
- */
-#define var_GetString(a,b) __var_GetString( VLC_OBJECT(a),b)
-
-
-
-/**
- * Increment an integer variable
- * \param p_obj the object that holds the variable
- * \param psz_name the name of the variable
- */
-static inline void __var_IncInteger( vlc_object_t *p_obj, const char *psz_name )
-{
- int i_val = __var_GetInteger( p_obj, psz_name );
- __var_SetInteger( p_obj, psz_name, ++i_val );
-}
-#define var_IncInteger(a,b) __var_IncInteger( VLC_OBJECT(a), b )
-
-/**
- * Decrement an integer variable
- * \param p_obj the object that holds the variable
- * \param psz_name the name of the variable
- */
-static inline void __var_DecInteger( vlc_object_t *p_obj, const char *psz_name )
-{
- int i_val = __var_GetInteger( p_obj, psz_name );
- __var_SetInteger( p_obj, psz_name, --i_val );
-}
-#define var_DecInteger(a,b) __var_DecInteger( VLC_OBJECT(a), b )
-
-/**
- * Create a integer variable with inherit and get its value.
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int __var_CreateGetInteger( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;
-
- __var_Create( p_obj, psz_name, VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.i_int;
- else
- return 0;
-}
-
-/**
- * Create a boolean variable with inherit and get its value.
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int __var_CreateGetBool( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;
-
- __var_Create( p_obj, psz_name, VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.b_bool;
- else
- return VLC_FALSE;
-}
-
-/**
- * Create a time variable with inherit and get its value.
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline int64_t __var_CreateGetTime( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;
-
- __var_Create( p_obj, psz_name, VLC_VAR_TIME | VLC_VAR_DOINHERIT );
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.i_time;
- else
- return 0;
-}
-
-/**
- * Create a float variable with inherit and get its value.
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline float __var_CreateGetFloat( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;
-
- __var_Create( p_obj, psz_name, VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.f_float;
- else
- return 0.0;
-}
-
-/**
- * Create a string variable with inherit and get its value.
- *
- * \param p_obj The object that holds the variable
- * \param psz_name The name of the variable
- */
-static inline char *__var_CreateGetString( vlc_object_t *p_obj, const char *psz_name )
-{
- vlc_value_t val;
-
- __var_Create( p_obj, psz_name, VLC_VAR_STRING | VLC_VAR_DOINHERIT );
- if( !__var_Get( p_obj, psz_name, &val ) )
- return val.psz_string;
- else
- return strdup( "" );
-}
-
-/**
- * __var_CreateGetInteger() with automatic casting
- */
-#define var_CreateGetInteger(a,b) __var_CreateGetInteger( VLC_OBJECT(a),b)
-/**
- * __var_CreateGetBool() with automatic casting
- */
-#define var_CreateGetBool(a,b) __var_CreateGetBool( VLC_OBJECT(a),b)
-/**
- * __var_CreateGetTime() with automatic casting
- */
-#define var_CreateGetTime(a,b) __var_CreateGetTime( VLC_OBJECT(a),b)
-/**
- * __var_CreateGetFloat() with automatic casting
- */
-#define var_CreateGetFloat(a,b) __var_CreateGetFloat( VLC_OBJECT(a),b)
-/**
- * __var_CreateGetString() with automatic casting
- */
-#define var_CreateGetString(a,b) __var_CreateGetString( VLC_OBJECT(a),b)
-
-/**
- * @}
- */
-
+++ /dev/null
-/*****************************************************************************
- * video_output.h : video output thread
- *****************************************************************************
- * Copyright (C) 1999, 2000 the VideoLAN team
- * $Id$
- *
- * Authors: Vincent Seguin <seguin@via.ecp.fr>
- * Samuel Hocevar <sam@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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/**
- * \defgroup video_output Video Output
- * This module describes the programming interface for video output threads.
- * It includes functions allowing to open a new thread, send pictures to a
- * thread, and destroy a previously opened video output thread.
- * @{
- */
-
-/**
- * Chroma conversion function
- *
- * This is the prototype common to all conversion functions.
- * \param p_vout video output thread
- * \param p_source source picture
- * \param p_dest destination picture
- * Picture width and source dimensions must be multiples of 16.
- */
-typedef void (vout_chroma_convert_t)( vout_thread_t *,
- picture_t *, picture_t * );
-
-typedef struct vout_chroma_t
-{
- /** conversion functions */
- vout_chroma_convert_t *pf_convert;
-
- /** Private module-dependant data */
- chroma_sys_t * p_sys; /* private data */
-
- /** Plugin used and shortcuts to access its capabilities */
- module_t * p_module;
-
-} vout_chroma_t;
-
-/** Maximum numbers of video filters2 that can be attached to a vout */
-#define MAX_VFILTERS 10
-
-/**
- * Video output thread descriptor
- *
- * Any independant video output device, such as an X11 window or a GGI device,
- * is represented by a video output thread, and described using the following
- * structure.
- */
-struct vout_thread_t
-{
- VLC_COMMON_MEMBERS
-
- /** \name Thread properties and locks */
- /**@{*/
- vlc_mutex_t picture_lock; /**< picture heap lock */
- vlc_mutex_t subpicture_lock; /**< subpicture heap lock */
- vlc_mutex_t change_lock; /**< thread change lock */
- vout_sys_t * p_sys; /**< system output method */
- /**@}*/
-
- /** \name Current display properties */
- /**@{*/
- uint16_t i_changes; /**< changes made to the thread.
- \see \ref vout_changes */
- float f_gamma; /**< gamma */
- vlc_bool_t b_grayscale; /**< color or grayscale display */
- vlc_bool_t b_info; /**< print additional information */
- vlc_bool_t b_interface; /**< render interface */
- vlc_bool_t b_scale; /**< allow picture scaling */
- vlc_bool_t b_fullscreen; /**< toogle fullscreen display */
- uint32_t render_time; /**< last picture render time */
- unsigned int i_window_width; /**< video window width */
- unsigned int i_window_height; /**< video window height */
- unsigned int i_alignment; /**< video alignment in window */
- unsigned int i_par_num; /**< monitor pixel aspect-ratio */
- unsigned int i_par_den; /**< monitor pixel aspect-ratio */
-
- intf_thread_t *p_parent_intf; /**< parent interface for embedded
- vout (if any) */
- /**@}*/
-
- /** \name Plugin used and shortcuts to access its capabilities */
- /**@{*/
- module_t * p_module;
- int ( *pf_init ) ( vout_thread_t * );
- void ( *pf_end ) ( vout_thread_t * );
- int ( *pf_manage ) ( vout_thread_t * );
- void ( *pf_render ) ( vout_thread_t *, picture_t * );
- void ( *pf_display ) ( vout_thread_t *, picture_t * );
- void ( *pf_swap ) ( vout_thread_t * ); /* OpenGL only */
- int ( *pf_lock ) ( vout_thread_t * ); /* OpenGL only */
- void ( *pf_unlock ) ( vout_thread_t * ); /* OpenGL only */
- int ( *pf_control ) ( vout_thread_t *, int, va_list );
- /**@}*/
-
- /** \name Statistics
- * These numbers are not supposed to be accurate, but are a
- * good indication of the thread status */
- /**@{*/
- count_t c_fps_samples; /**< picture counts */
- mtime_t p_fps_sample[VOUT_FPS_SAMPLES]; /**< FPS samples dates */
- /**@}*/
-
- /** \name Video heap and translation tables */
- /**@{*/
- int i_heap_size; /**< heap size */
- picture_heap_t render; /**< rendered pictures */
- picture_heap_t output; /**< direct buffers */
- vlc_bool_t b_direct; /**< rendered are like direct ? */
- vout_chroma_t chroma; /**< translation tables */
-
- video_format_t fmt_render; /* render format (from the decoder) */
- video_format_t fmt_in; /* input (modified render) format */
- video_format_t fmt_out; /* output format (for the video output) */
- /**@}*/
-
- /* Picture heap */
- picture_t p_picture[2*VOUT_MAX_PICTURES+1]; /**< pictures */
-
- /* Subpicture unit */
- spu_t *p_spu;
-
- /* Statistics */
- count_t c_loops;
- count_t c_pictures, c_late_pictures;
- mtime_t display_jitter; /**< average deviation from the PTS */
- count_t c_jitter_samples; /**< number of samples used
- for the calculation of the
- jitter */
- /** delay created by internal caching */
- int i_pts_delay;
-
- /* Filter chain */
- char *psz_filter_chain;
- vlc_bool_t b_filter_change;
-
- /* Video filter2 chain
- * these are handled like in transcode.c
- * XXX: we might need to merge the two chains (v1 and v2 filters) */
- char *psz_vfilters[MAX_VFILTERS];
- config_chain_t *p_vfilters_cfg[MAX_VFILTERS];
- int i_vfilters_cfg;
-
- filter_t *pp_vfilters[MAX_VFILTERS];
- int i_vfilters;
-
- vlc_bool_t b_vfilter_change;
-
- /* Misc */
- vlc_bool_t b_snapshot; /**< take one snapshot on the next loop */
-};
-
-#define I_OUTPUTPICTURES p_vout->output.i_pictures
-#define PP_OUTPUTPICTURE p_vout->output.pp_picture
-#define I_RENDERPICTURES p_vout->render.i_pictures
-#define PP_RENDERPICTURE p_vout->render.pp_picture
-
-/** \defgroup vout_changes Flags for changes
- * These flags are set in the vout_thread_t::i_changes field when another
- * thread changed a variable
- * @{
- */
-/** b_info changed */
-#define VOUT_INFO_CHANGE 0x0001
-/** b_grayscale changed */
-#define VOUT_GRAYSCALE_CHANGE 0x0002
-/** b_interface changed */
-#define VOUT_INTF_CHANGE 0x0004
-/** b_scale changed */
-#define VOUT_SCALE_CHANGE 0x0008
-/** gamma changed */
-#define VOUT_GAMMA_CHANGE 0x0010
-/** b_cursor changed */
-#define VOUT_CURSOR_CHANGE 0x0020
-/** b_fullscreen changed */
-#define VOUT_FULLSCREEN_CHANGE 0x0040
-/** size changed */
-#define VOUT_SIZE_CHANGE 0x0200
-/** depth changed */
-#define VOUT_DEPTH_CHANGE 0x0400
-/** change chroma tables */
-#define VOUT_CHROMA_CHANGE 0x0800
-/** cropping parameters changed */
-#define VOUT_CROP_CHANGE 0x1000
-/** aspect ratio changed */
-#define VOUT_ASPECT_CHANGE 0x2000
-/** change/recreate picture buffers */
-#define VOUT_PICTURE_BUFFERS_CHANGE 0x4000
-/**@}*/
-
-/* Alignment flags */
-#define VOUT_ALIGN_LEFT 0x0001
-#define VOUT_ALIGN_RIGHT 0x0002
-#define VOUT_ALIGN_HMASK 0x0003
-#define VOUT_ALIGN_TOP 0x0004
-#define VOUT_ALIGN_BOTTOM 0x0008
-#define VOUT_ALIGN_VMASK 0x000C
-
-#define MAX_JITTER_SAMPLES 20
-
-/*****************************************************************************
- * Prototypes
- *****************************************************************************/
-#define vout_Request(a,b,c) __vout_Request(VLC_OBJECT(a),b,c)
-VLC_EXPORT( vout_thread_t *, __vout_Request, ( vlc_object_t *, vout_thread_t *, video_format_t * ) );
-#define vout_Create(a,b) __vout_Create(VLC_OBJECT(a),b)
-VLC_EXPORT( vout_thread_t *, __vout_Create, ( vlc_object_t *, video_format_t * ) );
-VLC_EXPORT( void, vout_Destroy, ( vout_thread_t * ) );
-VLC_EXPORT( int, vout_VarCallback, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
-
-VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) );
-
-VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, vlc_bool_t, vlc_bool_t, unsigned int ) );
-VLC_EXPORT( void, vout_InitFormat, ( video_frame_format_t *, uint32_t, int, int, int ) );
-VLC_EXPORT( void, vout_DestroyPicture, ( vout_thread_t *, picture_t * ) );
-VLC_EXPORT( void, vout_DisplayPicture, ( vout_thread_t *, picture_t * ) );
-VLC_EXPORT( void, vout_DatePicture, ( vout_thread_t *, picture_t *, mtime_t ) );
-VLC_EXPORT( void, vout_LinkPicture, ( vout_thread_t *, picture_t * ) );
-VLC_EXPORT( void, vout_UnlinkPicture, ( vout_thread_t *, picture_t * ) );
-VLC_EXPORT( void, vout_PlacePicture, ( vout_thread_t *, unsigned int, unsigned int, unsigned int *, unsigned int *, unsigned int *, unsigned int * ) );
-picture_t * vout_RenderPicture ( vout_thread_t *, picture_t *,
- subpicture_t * );
-
-VLC_EXPORT( int, vout_vaControlDefault, ( vout_thread_t *, int, va_list ) );
-VLC_EXPORT( void *, vout_RequestWindow, ( vout_thread_t *, int *, int *, unsigned int *, unsigned int * ) );
-VLC_EXPORT( void, vout_ReleaseWindow, ( vout_thread_t *, void * ) );
-VLC_EXPORT( int, vout_ControlWindow, ( vout_thread_t *, void *, int, va_list ) );
-void vout_IntfInit( vout_thread_t * );
-VLC_EXPORT( int, vout_Snapshot, ( vout_thread_t *p_vout, picture_t *p_pic ) );
-VLC_EXPORT( void, vout_EnableFilter, ( vout_thread_t *, char *,vlc_bool_t , vlc_bool_t ) );
-
-
-static inline int vout_vaControl( vout_thread_t *p_vout, int i_query,
- va_list args )
-{
- if( p_vout->pf_control )
- return p_vout->pf_control( p_vout, i_query, args );
- else
- return VLC_EGENERIC;
-}
-
-static inline int vout_Control( vout_thread_t *p_vout, int i_query, ... )
-{
- va_list args;
- int i_result;
-
- va_start( args, i_query );
- i_result = vout_vaControl( p_vout, i_query, args );
- va_end( args );
- return i_result;
-}
-
-enum output_query_e
-{
- VOUT_GET_SIZE, /* arg1= unsigned int*, arg2= unsigned int*, res= */
- VOUT_SET_SIZE, /* arg1= unsigned int, arg2= unsigned int, res= */
- VOUT_SET_STAY_ON_TOP, /* arg1= vlc_bool_t res= */
- VOUT_REPARENT,
- VOUT_SNAPSHOT,
- VOUT_CLOSE,
- VOUT_SET_FOCUS, /* arg1= vlc_bool_t res= */
- VOUT_SET_VIEWPORT /* arg1= view rect, arg2=clip rect, res= */
-};
-
-/**
- * @}
- */
+++ /dev/null
-/*****************************************************************************
- * aout.h: audio output header for vlc
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_AOUT_H
-#define _VLC_AOUT_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*****************************************************************************
- * Required public headers
- *****************************************************************************/
-#include <vlc/vlc.h>
-
-/*****************************************************************************
- * Required internal headers
- *****************************************************************************/
-#include "audio_output.h"
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/aout.h> */
+++ /dev/null
-/*****************************************************************************
- * decoder.h: header for vlc decoders
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_DECODER_H
-#define _VLC_DECODER_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*****************************************************************************
- * Required public headers
- *****************************************************************************/
-#include <vlc/vlc.h>
-
-/*****************************************************************************
- * Required internal headers
- *****************************************************************************/
-#include "vlc_block.h"
-#include "vlc_video.h"
-#include "audio_output.h"
-#include "vlc_codec.h"
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/decoder.h> */
+++ /dev/null
-/*****************************************************************************
- * input.h: input modules header for vlc
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_INPUT_H
-#define _VLC_INPUT_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*****************************************************************************
- * Required public headers
- *****************************************************************************/
-#include <vlc/vlc.h>
-
-/*****************************************************************************
- * Required internal headers
- *****************************************************************************/
-#include "vlc_block.h"
-#include "vlc_meta.h"
-
-#include "vlc_es.h"
-#include "vlc_es_out.h"
-
-#include "vlc_input.h"
-
-#include "vlc_access.h"
-#include "vlc_stream.h"
-#include "vlc_demux.h"
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/input.h> */
+++ /dev/null
-/*****************************************************************************
- * intf.h: interface header for vlc
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_INTF_H
-#define _VLC_INTF_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*****************************************************************************
- * Required public headers
- *****************************************************************************/
-#include <vlc/vlc.h>
-
-/*****************************************************************************
- * Required internal headers
- *****************************************************************************/
-#include "vlc_interface.h"
-#include "vlc_es.h"
-#include "vlc_input.h"
-#include "intf_eject.h"
-#include "vlc_playlist.h"
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/intf.h> */
+++ /dev/null
-/*****************************************************************************
- * sout.h: video output header for vlc
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, 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 "vlc_block.h"
-#include "stream_output.h"
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/sout.h> */
+++ /dev/null
-/*****************************************************************************
- * vout.h: video output header for vlc
- *****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
- * $Id$
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef _VLC_VOUT_H
-#define _VLC_VOUT_H 1
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*****************************************************************************
- * Required public headers
- *****************************************************************************/
-#include <vlc/vlc.h>
-
-/*****************************************************************************
- * Required internal headers
- *****************************************************************************/
-#include "vlc_video.h"
-#include "video_output.h"
-#include "vlc_spu.h"
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif /* <vlc/vout.h> */
#ifndef _VLC_ACCESS_H
#define _VLC_ACCESS_H 1
+#include <vlc_block.h>
+
/**
* \defgroup access Access
* @{
access_sys_t *p_sys;
};
-#define access2_New( a, b, c, d, e ) __access2_New(VLC_OBJECT(a), b, c, d, e )
-VLC_EXPORT( access_t *, __access2_New, ( vlc_object_t *p_obj, const char *psz_access, const char *psz_demux, const char *psz_path, vlc_bool_t b_quick ) );
-VLC_EXPORT( access_t *, access2_FilterNew, ( access_t *p_source, const char *psz_access_filter ) );
-VLC_EXPORT( void, access2_Delete, ( access_t * ) );
-
static inline int access2_vaControl( access_t *p_access, int i_query, va_list args )
{
if( !p_access ) return VLC_EGENERIC;
return p_access->pf_control( p_access, i_query, args );
}
+
static inline int access2_Control( access_t *p_access, int i_query, ... )
{
va_list args;
--- /dev/null
+/*****************************************************************************
+ * audio_output.h : audio output interface
+ *****************************************************************************
+ * Copyright (C) 2002-2005 the VideoLAN team
+ * $Id$
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+#ifndef _VLC_AOUT_H
+#define _VLC_AOUT_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+#include "vlc_es.h"
+
+#define AOUT_FMTS_IDENTICAL( p_first, p_second ) ( \
+ ((p_first)->i_format == (p_second)->i_format) \
+ && ((p_first)->i_rate == (p_second)->i_rate) \
+ && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
+ && ((p_first)->i_original_channels == (p_second)->i_original_channels) )
+
+/* Check if i_rate == i_rate and i_channels == i_channels */
+#define AOUT_FMTS_SIMILAR( p_first, p_second ) ( \
+ ((p_first)->i_rate == (p_second)->i_rate) \
+ && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
+ && ((p_first)->i_original_channels == (p_second)->i_original_channels) )
+
+#ifdef WORDS_BIGENDIAN
+# define AOUT_FMT_S16_NE VLC_FOURCC('s','1','6','b')
+# define AOUT_FMT_U16_NE VLC_FOURCC('u','1','6','b')
+# define AOUT_FMT_S24_NE VLC_FOURCC('s','2','4','b')
+# define AOUT_FMT_SPDIF_NE VLC_FOURCC('s','p','d','b')
+#else
+# define AOUT_FMT_S16_NE VLC_FOURCC('s','1','6','l')
+# define AOUT_FMT_U16_NE VLC_FOURCC('u','1','6','l')
+# define AOUT_FMT_S24_NE VLC_FOURCC('s','2','4','l')
+# define AOUT_FMT_SPDIF_NE VLC_FOURCC('s','p','d','i')
+#endif
+
+#define AOUT_FMT_NON_LINEAR( p_format ) \
+ ( ((p_format)->i_format == VLC_FOURCC('s','p','d','i')) \
+ || ((p_format)->i_format == VLC_FOURCC('s','p','d','b')) \
+ || ((p_format)->i_format == VLC_FOURCC('a','5','2',' ')) \
+ || ((p_format)->i_format == VLC_FOURCC('d','t','s',' ')) )
+
+/* This is heavily borrowed from libmad, by Robert Leslie <rob@mars.org> */
+/*
+ * Fixed-point format: 0xABBBBBBB
+ * A == whole part (sign + 3 bits)
+ * B == fractional part (28 bits)
+ *
+ * Values are signed two's complement, so the effective range is:
+ * 0x80000000 to 0x7fffffff
+ * -8.0 to +7.9999999962747097015380859375
+ *
+ * The smallest representable value is:
+ * 0x00000001 == 0.0000000037252902984619140625 (i.e. about 3.725e-9)
+ *
+ * 28 bits of fractional accuracy represent about
+ * 8.6 digits of decimal accuracy.
+ *
+ * Fixed-point numbers can be added or subtracted as normal
+ * integers, but multiplication requires shifting the 64-bit result
+ * from 56 fractional bits back to 28 (and rounding.)
+ */
+typedef int32_t vlc_fixed_t;
+#define FIXED32_FRACBITS 28
+#define FIXED32_MIN ((vlc_fixed_t) -0x80000000L)
+#define FIXED32_MAX ((vlc_fixed_t) +0x7fffffffL)
+#define FIXED32_ONE ((vlc_fixed_t) 0x10000000)
+
+
+/*
+ * Channels descriptions
+ */
+
+/* Values available for physical and original channels */
+#define AOUT_CHAN_CENTER 0x1
+#define AOUT_CHAN_LEFT 0x2
+#define AOUT_CHAN_RIGHT 0x4
+#define AOUT_CHAN_REARCENTER 0x10
+#define AOUT_CHAN_REARLEFT 0x20
+#define AOUT_CHAN_REARRIGHT 0x40
+#define AOUT_CHAN_MIDDLELEFT 0x100
+#define AOUT_CHAN_MIDDLERIGHT 0x200
+#define AOUT_CHAN_LFE 0x1000
+
+/* Values available for original channels only */
+#define AOUT_CHAN_DOLBYSTEREO 0x10000
+#define AOUT_CHAN_DUALMONO 0x20000
+#define AOUT_CHAN_REVERSESTEREO 0x40000
+
+#define AOUT_CHAN_PHYSMASK 0xFFFF
+#define AOUT_CHAN_MAX 9
+
+/* Values used for the audio-device and audio-channels object variables */
+#define AOUT_VAR_MONO 1
+#define AOUT_VAR_STEREO 2
+#define AOUT_VAR_2F2R 4
+#define AOUT_VAR_3F2R 5
+#define AOUT_VAR_5_1 6
+#define AOUT_VAR_6_1 7
+#define AOUT_VAR_7_1 8
+#define AOUT_VAR_SPDIF 10
+
+#define AOUT_VAR_CHAN_STEREO 1
+#define AOUT_VAR_CHAN_RSTEREO 2
+#define AOUT_VAR_CHAN_LEFT 3
+#define AOUT_VAR_CHAN_RIGHT 4
+#define AOUT_VAR_CHAN_DOLBYS 5
+
+/*****************************************************************************
+ * Main audio output structures
+ *****************************************************************************/
+
+/** audio output buffer */
+struct aout_buffer_t
+{
+ byte_t * p_buffer;
+ int i_alloc_type;
+ /* i_size is the real size of the buffer (used for debug ONLY), i_nb_bytes
+ * is the number of significative bytes in it. */
+ size_t i_size, i_nb_bytes;
+ unsigned int i_nb_samples;
+ mtime_t start_date, end_date;
+
+ struct aout_buffer_t * p_next;
+
+ /** Private data (aout_buffer_t will disappear soon so no need for an
+ * aout_buffer_sys_t type) */
+ void * p_sys;
+
+ /** This way the release can be overloaded */
+ void (*pf_release)( aout_buffer_t * );
+};
+
+#define aout_BufferFree( p_buffer ) \
+ if( p_buffer != NULL && (p_buffer)->i_alloc_type == AOUT_ALLOC_HEAP ) \
+ { \
+ free( p_buffer ); \
+ } \
+ p_buffer = NULL;
+
+/* Size of a frame for S/PDIF output. */
+#define AOUT_SPDIF_SIZE 6144
+
+/* Number of samples in an A/52 frame. */
+#define A52_FRAME_NB 1536
+
+/** date incrementation helper structure without long-term
+ * rounding errors
+ */
+struct audio_date_t
+{
+ mtime_t date;
+ uint32_t i_divider;
+ uint32_t i_remainder;
+};
+
+/** allocation of memory in the audio output */
+typedef struct aout_alloc_t
+{
+ int i_alloc_type;
+ int i_bytes_per_sec;
+} aout_alloc_t;
+
+#define AOUT_ALLOC_NONE 0
+#define AOUT_ALLOC_STACK 1
+#define AOUT_ALLOC_HEAP 2
+
+/** audio output mixer */
+typedef struct aout_mixer_t
+{
+ audio_sample_format_t mixer;
+ aout_alloc_t output_alloc;
+
+ module_t * p_module;
+ struct aout_mixer_sys_t * p_sys;
+ void (* pf_do_work)( struct aout_instance_t *,
+ struct aout_buffer_t * );
+
+ /** If b_error == 1, there is no mixer. */
+ vlc_bool_t b_error;
+ /** Multiplier used to raise or lower the volume of the sound in
+ * software. Beware, this creates sound distortion and should be avoided
+ * as much as possible. This isn't available for non-float32 mixer. */
+ float f_multiplier;
+} aout_mixer_t;
+
+/** audio output buffer FIFO */
+struct aout_fifo_t
+{
+ aout_buffer_t * p_first;
+ aout_buffer_t ** pp_last;
+ audio_date_t end_date;
+};
+
+/** audio output filter */
+struct aout_filter_t
+{
+ VLC_COMMON_MEMBERS
+
+ audio_sample_format_t input;
+ audio_sample_format_t output;
+ aout_alloc_t output_alloc;
+
+ module_t * p_module;
+ struct aout_filter_sys_t * p_sys;
+ void (* pf_do_work)( struct aout_instance_t *,
+ struct aout_filter_t *,
+ struct aout_buffer_t *,
+ struct aout_buffer_t * );
+ vlc_bool_t b_in_place;
+ vlc_bool_t b_continuity;
+};
+
+#define AOUT_RESAMPLING_NONE 0
+#define AOUT_RESAMPLING_UP 1
+#define AOUT_RESAMPLING_DOWN 2
+/** an input stream for the audio output */
+struct aout_input_t
+{
+ /* When this lock is taken, the pipeline cannot be changed by a
+ * third-party. */
+ vlc_mutex_t lock;
+
+ /* The input thread that spawned this input */
+ input_thread_t *p_input_thread;
+
+ audio_sample_format_t input;
+ aout_alloc_t input_alloc;
+
+ /* pre-filters */
+ aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
+ int i_nb_filters;
+
+ /* resamplers */
+ aout_filter_t * pp_resamplers[AOUT_MAX_FILTERS];
+ int i_nb_resamplers;
+ int i_resampling_type;
+ mtime_t i_resamp_start_date;
+ int i_resamp_start_drift;
+
+ aout_fifo_t fifo;
+
+ /* Mixer information */
+ byte_t * p_first_byte_to_mix;
+
+ /* If b_restart == 1, the input pipeline will be re-created. */
+ vlc_bool_t b_restart;
+
+ /* If b_error == 1, there is no input pipeline. */
+ vlc_bool_t b_error;
+
+ /* Did we just change the output format? (expect buffer inconsistencies) */
+ vlc_bool_t b_changed;
+
+ /* internal caching delay from input */
+ int i_pts_delay;
+ /* desynchronisation delay request by the user */
+ int i_desync;
+
+};
+
+/** an output stream for the audio output */
+typedef struct aout_output_t
+{
+ audio_sample_format_t output;
+ /* Indicates whether the audio output is currently starving, to avoid
+ * printing a 1,000 "output is starving" messages. */
+ vlc_bool_t b_starving;
+
+ /* post-filters */
+ aout_filter_t * pp_filters[AOUT_MAX_FILTERS];
+ int i_nb_filters;
+
+ aout_fifo_t fifo;
+
+ struct module_t * p_module;
+ struct aout_sys_t * p_sys;
+ void (* pf_play)( aout_instance_t * );
+ int (* pf_volume_get )( aout_instance_t *, audio_volume_t * );
+ int (* pf_volume_set )( aout_instance_t *, audio_volume_t );
+ int (* pf_volume_infos )( aout_instance_t *, audio_volume_t * );
+ int i_nb_samples;
+
+ /* Current volume for the output - it's just a placeholder, the plug-in
+ * may or may not use it. */
+ audio_volume_t i_volume;
+
+ /* If b_error == 1, there is no audio output pipeline. */
+ vlc_bool_t b_error;
+} aout_output_t;
+
+/** audio output thread descriptor */
+struct aout_instance_t
+{
+ VLC_COMMON_MEMBERS
+
+ /* Locks : please note that if you need several of these locks, it is
+ * mandatory (to avoid deadlocks) to take them in the following order :
+ * mixer_lock, p_input->lock, output_fifo_lock, input_fifos_lock.
+ * --Meuuh */
+ /* When input_fifos_lock is taken, none of the p_input->fifo structures
+ * can be read or modified by a third-party thread. */
+ vlc_mutex_t input_fifos_lock;
+ /* When mixer_lock is taken, all decoder threads willing to mix a
+ * buffer must wait until it is released. The output pipeline cannot
+ * be modified. No input stream can be added or removed. */
+ vlc_mutex_t mixer_lock;
+ /* When output_fifo_lock is taken, the p_aout->output.fifo structure
+ * cannot be read or written by a third-party thread. */
+ vlc_mutex_t output_fifo_lock;
+
+ /* Input streams & pre-filters */
+ aout_input_t * pp_inputs[AOUT_MAX_INPUTS];
+ int i_nb_inputs;
+
+ /* Mixer */
+ aout_mixer_t mixer;
+
+ /* Output plug-in */
+ aout_output_t output;
+};
+
+/*****************************************************************************
+ * Prototypes
+ *****************************************************************************/
+
+/* From common.c : */
+VLC_EXPORT( void, aout_DateInit, ( audio_date_t *, uint32_t ) );
+VLC_EXPORT( void, aout_DateSet, ( audio_date_t *, mtime_t ) );
+VLC_EXPORT( void, aout_DateMove, ( audio_date_t *, mtime_t ) );
+VLC_EXPORT( mtime_t, aout_DateGet, ( const audio_date_t * ) );
+VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, uint32_t ) );
+
+VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) );
+
+VLC_EXPORT( int, aout_CheckChannelReorder, ( const uint32_t *, const uint32_t *, uint32_t, int, int * ) );
+VLC_EXPORT( void, aout_ChannelReorder, ( uint8_t *, int, int, const int *, int ) );
+
+VLC_EXPORT( unsigned int, aout_FormatNbChannels, ( const audio_sample_format_t * p_format ) );
+VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
+VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) );
+VLC_EXPORT( const char *, aout_FormatPrintChannels, ( const audio_sample_format_t * ) );
+
+VLC_EXPORT( mtime_t, aout_FifoFirstDate, ( aout_instance_t *, aout_fifo_t * ) );
+VLC_EXPORT( aout_buffer_t *, aout_FifoPop, ( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) );
+
+/* From intf.c : */
+VLC_EXPORT( void, aout_VolumeSoftInit, ( aout_instance_t * ) );
+VLC_EXPORT( void, aout_VolumeNoneInit, ( aout_instance_t * ) );
+#define aout_VolumeGet(a, b) __aout_VolumeGet(VLC_OBJECT(a), b)
+VLC_EXPORT( int, __aout_VolumeGet, ( vlc_object_t *, audio_volume_t * ) );
+#define aout_VolumeSet(a, b) __aout_VolumeSet(VLC_OBJECT(a), b)
+VLC_EXPORT( int, __aout_VolumeSet, ( vlc_object_t *, audio_volume_t ) );
+#define aout_VolumeInfos(a, b) __aout_VolumeInfos(VLC_OBJECT(a), b)
+VLC_EXPORT( int, __aout_VolumeInfos, ( vlc_object_t *, audio_volume_t * ) );
+#define aout_VolumeUp(a, b, c) __aout_VolumeUp(VLC_OBJECT(a), b, c)
+VLC_EXPORT( int, __aout_VolumeUp, ( vlc_object_t *, int, audio_volume_t * ) );
+#define aout_VolumeDown(a, b, c) __aout_VolumeDown(VLC_OBJECT(a), b, c)
+VLC_EXPORT( int, __aout_VolumeDown, ( vlc_object_t *, int, audio_volume_t * ) );
+#define aout_VolumeMute(a, b) __aout_VolumeMute(VLC_OBJECT(a), b)
+VLC_EXPORT( int, __aout_VolumeMute, ( vlc_object_t *, audio_volume_t * ) );
+VLC_EXPORT( int, aout_Restart, ( aout_instance_t * p_aout ) );
+VLC_EXPORT( int, aout_FindAndRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
+VLC_EXPORT( int, aout_ChannelsRestart, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) );
+
+VLC_EXPORT( void, aout_EnableFilter, (vlc_object_t *, const char *, vlc_bool_t ));
+
+#define aout_VisualNext(a) aout_VisualChange( VLC_OBJECT(a),1 )
+#define aout_VisualPrev(a) aout_VisualChange( VLC_OBJECT(a),-1 )
+
+VLC_EXPORT( char *, aout_VisualChange, (vlc_object_t *, int ) );
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _VLC_AOUT_H */
VLC_EXPORT( void*, vlc_DictGet, (dict_t *, int, const char * ) );
VLC_EXPORT( int, vlc_DictLookup, (dict_t *, int, const char * ) );
-
/************************************************************************
* Dynamic arrays with progressive allocation
************************************************************************/
int i_size;
};
-
#define block_FifoNew( a ) __block_FifoNew( VLC_OBJECT(a) )
VLC_EXPORT( block_fifo_t *, __block_FifoNew, ( vlc_object_t * ) );
VLC_EXPORT( void, block_FifoRelease, ( block_fifo_t * ) );
#ifndef _VLC_BLOCK_HELPER_H
#define _VLC_BLOCK_HELPER_H 1
+#include <vlc_block.h>
+
typedef struct block_bytestream_t
{
block_t *p_chain;
--- /dev/null
+/*****************************************************************************
+ * charset.h: Unicode UTF-8 wrappers function
+ *****************************************************************************
+ * Copyright (C) 2003-2005 the VideoLAN team
+ * Copyright © 2005-2006 Rémi Denis-Courmont
+ * $Id$
+ *
+ * Author: Rémi Denis-Courmont <rem # videolan,org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef __VLC_CHARSET_H
+#define __VLC_CHARSET_H 1
+
+#include <stdarg.h>
+#include <sys/types.h>
+#include <dirent.h>
+
+VLC_EXPORT( void, LocaleFree, ( const char * ) );
+VLC_EXPORT( char *, FromLocale, ( const char * ) );
+VLC_EXPORT( char *, FromLocaleDup, ( const char * ) );
+VLC_EXPORT( char *, ToLocale, ( const char * ) );
+
+VLC_EXPORT( int, utf8_open, ( const char *filename, int flags, mode_t mode ) );
+VLC_EXPORT( FILE *, utf8_fopen, ( const char *filename, const char *mode ) );
+VLC_EXPORT( DIR *, utf8_opendir, ( const char *dirname ) );
+VLC_EXPORT( char *, utf8_readdir, ( DIR *dir ) );
+VLC_EXPORT( int, utf8_scandir, ( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
+
+#ifdef WIN32
+# define stat _stati64
+#endif
+
+VLC_EXPORT( int, utf8_stat, ( const char *filename, struct stat *buf ) );
+VLC_EXPORT( int, utf8_lstat, ( const char *filename, struct stat *buf ) );
+VLC_EXPORT( int, utf8_mkdir, ( const char *filename ) );
+
+VLC_EXPORT( int, utf8_vfprintf, ( FILE *stream, const char *fmt, va_list ap ) );
+VLC_EXPORT( int, utf8_fprintf, ( FILE *, const char *, ... ) );
+
+VLC_EXPORT( char *, EnsureUTF8, ( char * ) );
+VLC_EXPORT( const char *, IsUTF8, ( const char * ) );
+
+#ifdef WIN32
+static inline char *FromWide (const wchar_t *wide)
+{
+ size_t len = WideCharToMultiByte (CP_UTF8, 0, wide, -1, NULL, 0, NULL, NULL);
+ if (len == 0)
+ return NULL;
+
+ char *out = (char *)malloc (len);
+
+ WideCharToMultiByte (CP_UTF8, 0, wide, -1, out, len, NULL, NULL);
+ return out;
+}
+#endif
+
+VLC_INTERNAL( char *, vlc_fix_readdir, ( const char * ) );
+VLC_INTERNAL( vlc_bool_t, vlc_current_charset, ( char ** ) );
+
+VLC_EXPORT( const char *, GetFallbackEncoding, ( void ) );
+
+VLC_INTERNAL( double, i18n_strtod, ( const char *, char ** ) );
+VLC_INTERNAL( double, i18n_atof, ( const char * ) );
+VLC_EXPORT( double, us_strtod, ( const char *, char ** ) );
+VLC_EXPORT( double, us_atof, ( const char * ) );
+
+#endif
/*****************************************************************************
- * vlc_codec.h: codec related structures
+ * vlc_codec.h: Definition of the decoder and encoder structures
*****************************************************************************
* Copyright (C) 1999-2003 the VideoLAN team
* $Id$
#ifndef _VLC_CODEC_H
#define _VLC_CODEC_H 1
+#include <vlc_block.h>
+#include <vlc_es.h>
+
/**
* \file
* This file defines the structure and types used by decoders and encoders
--- /dev/null
+/*****************************************************************************
+ * codecs.h: codec related structures needed by the demuxers and decoders
+ *****************************************************************************
+ * Copyright (C) 1999-2001 the VideoLAN team
+ * $Id$
+ *
+ * Author: Gildas Bazin <gbazin@videolan.org>
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _VLC_CODECS_H
+#define _VLC_CODECS_H 1
+
+/* Structures exported to the demuxers and decoders */
+
+#if !(defined _GUID_DEFINED || defined GUID_DEFINED)
+#define GUID_DEFINED
+typedef struct _GUID
+{
+ uint32_t Data1;
+ uint16_t Data2;
+ uint16_t Data3;
+ uint8_t Data4[8];
+} GUID, *REFGUID, *LPGUID;
+#endif /* GUID_DEFINED */
+
+#ifndef _WAVEFORMATEX_
+#define _WAVEFORMATEX_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+_WAVEFORMATEX {
+ uint16_t wFormatTag;
+ uint16_t nChannels;
+ uint32_t nSamplesPerSec;
+ uint32_t nAvgBytesPerSec;
+ uint16_t nBlockAlign;
+ uint16_t wBitsPerSample;
+ uint16_t cbSize;
+} WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
+#endif /* _WAVEFORMATEX_ */
+
+#ifndef _WAVEFORMATEXTENSIBLE_
+#define _WAVEFORMATEXTENSIBLE_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+_WAVEFORMATEXTENSIBLE {
+ WAVEFORMATEX Format;
+ union {
+ uint16_t wValidBitsPerSample;
+ uint16_t wSamplesPerBlock;
+ uint16_t wReserved;
+ } Samples;
+ uint32_t dwChannelMask;
+ GUID SubFormat;
+} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
+#endif /* _WAVEFORMATEXTENSIBLE_ */
+
+#ifndef _WAVEHEADER_
+#define _WAVEHEADER_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+_WAVEHEADER {
+ uint32_t MainChunkID;
+ uint32_t Length;
+ uint32_t ChunkTypeID;
+ uint32_t SubChunkID;
+ uint32_t SubChunkLength;
+ uint16_t Format;
+ uint16_t Modus;
+ uint32_t SampleFreq;
+ uint32_t BytesPerSec;
+ uint16_t BytesPerSample;
+ uint16_t BitsPerSample;
+ uint32_t DataChunkID;
+ uint32_t DataLength;
+} WAVEHEADER;
+#endif /* _WAVEHEADER_ */
+
+#if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
+#define _BITMAPINFOHEADER_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ uint32_t biSize;
+ uint32_t biWidth;
+ uint32_t biHeight;
+ uint16_t biPlanes;
+ uint16_t biBitCount;
+ uint32_t biCompression;
+ uint32_t biSizeImage;
+ uint32_t biXPelsPerMeter;
+ uint32_t biYPelsPerMeter;
+ uint32_t biClrUsed;
+ uint32_t biClrImportant;
+} BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
+
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ BITMAPINFOHEADER bmiHeader;
+ int bmiColors[1];
+} BITMAPINFO, *LPBITMAPINFO;
+#endif
+
+#ifndef _RECT32_
+#define _RECT32_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ int left, top, right, bottom;
+} RECT32;
+#endif
+
+#ifndef _REFERENCE_TIME_
+#define _REFERENCE_TIME_
+typedef int64_t REFERENCE_TIME;
+#endif
+
+#ifndef _VIDEOINFOHEADER_
+#define _VIDEOINFOHEADER_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ RECT32 rcSource;
+ RECT32 rcTarget;
+ uint32_t dwBitRate;
+ uint32_t dwBitErrorRate;
+ REFERENCE_TIME AvgTimePerFrame;
+ BITMAPINFOHEADER bmiHeader;
+} VIDEOINFOHEADER;
+#endif
+
+#ifndef _RGBQUAD_
+#define _RGBQUAD_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ uint8_t rgbBlue;
+ uint8_t rgbGreen;
+ uint8_t rgbRed;
+ uint8_t rgbReserved;
+} RGBQUAD1;
+#endif
+
+#ifndef _TRUECOLORINFO_
+#define _TRUECOLORINFO_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ uint32_t dwBitMasks[3];
+ RGBQUAD1 bmiColors[256];
+} TRUECOLORINFO;
+#endif
+
+#ifndef _VIDEOINFO_
+#define _VIDEOINFO_
+typedef struct
+#ifdef HAVE_ATTRIBUTE_PACKED
+ __attribute__((__packed__))
+#endif
+{
+ RECT32 rcSource;
+ RECT32 rcTarget;
+ uint32_t dwBitRate;
+ uint32_t dwBitErrorRate;
+ REFERENCE_TIME AvgTimePerFrame;
+ BITMAPINFOHEADER bmiHeader;
+
+ union
+ {
+ RGBQUAD1 bmiColors[256]; /* Colour palette */
+ uint32_t dwBitMasks[3]; /* True colour masks */
+ TRUECOLORINFO TrueColorInfo; /* Both of the above */
+ };
+
+} VIDEOINFO;
+#endif
+
+/* WAVE format wFormatTag IDs */
+#define WAVE_FORMAT_UNKNOWN 0x0000 /* Microsoft Corporation */
+#define WAVE_FORMAT_PCM 0x0001 /* Microsoft Corporation */
+#define WAVE_FORMAT_ADPCM 0x0002 /* Microsoft Corporation */
+#define WAVE_FORMAT_IEEE_FLOAT 0x0003 /* Microsoft Corporation */
+#define WAVE_FORMAT_ALAW 0x0006 /* Microsoft Corporation */
+#define WAVE_FORMAT_MULAW 0x0007 /* Microsoft Corporation */
+#define WAVE_FORMAT_DTS_MS 0x0008 /* Microsoft Corporation */
+#define WAVE_FORMAT_WMAS 0x000a /* WMA 9 Speech */
+#define WAVE_FORMAT_IMA_ADPCM 0x0011 /* Intel Corporation */
+#define WAVE_FORMAT_GSM610 0x0031 /* Microsoft Corporation */
+#define WAVE_FORMAT_MSNAUDIO 0x0032 /* Microsoft Corporation */
+#define WAVE_FORMAT_G726 0x0045 /* ITU-T standard */
+#define WAVE_FORMAT_MPEG 0x0050 /* Microsoft Corporation */
+#define WAVE_FORMAT_MPEGLAYER3 0x0055 /* ISO/MPEG Layer3 Format Tag */
+#define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092 /* Sonic Foundry */
+
+#define WAVE_FORMAT_A52 0x2000
+#define WAVE_FORMAT_DTS 0x2001
+#define WAVE_FORMAT_WMA1 0x0160 /* WMA version 1 */
+#define WAVE_FORMAT_WMA2 0x0161 /* WMA (v2) 7, 8, 9 Series */
+#define WAVE_FORMAT_WMAP 0x0162 /* WMA 9 Professional */
+#define WAVE_FORMAT_WMAL 0x0163 /* WMA 9 Lossless */
+#define WAVE_FORMAT_DIVIO_AAC 0x4143
+#define WAVE_FORMAT_AAC 0x00FF
+
+/* Need to check these */
+#define WAVE_FORMAT_DK3 0x0061
+#define WAVE_FORMAT_DK4 0x0062
+
+#define WAVE_FORMAT_VORB_1 0x674f
+#define WAVE_FORMAT_VORB_1PLUS 0x676f
+#define WAVE_FORMAT_VORB_2 0x6750
+#define WAVE_FORMAT_VORB_2PLUS 0x6770
+#define WAVE_FORMAT_VORB_3 0x6751
+#define WAVE_FORMAT_VORB_3PLUS 0x6771
+#define WAVE_FORMAT_SPEEX 0xa109 /* Speex audio */
+
+
+#if !defined(WAVE_FORMAT_EXTENSIBLE)
+#define WAVE_FORMAT_EXTENSIBLE 0xFFFE /* Microsoft */
+#endif
+
+/* GUID SubFormat IDs */
+/* We need both b/c const variables are not compile-time constants in C, giving
+ * us an error if we use the const GUID in an enum */
+
+#ifndef _KSDATAFORMAT_SUBTYPE_PCM_
+#define _KSDATAFORMAT_SUBTYPE_PCM_ {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}
+static const GUID VLC_KSDATAFORMAT_SUBTYPE_PCM = {0xE923AABF, 0xCB58, 0x4471, {0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62}};
+#define KSDATAFORMAT_SUBTYPE_PCM VLC_KSDATAFORMAT_SUBTYPE_PCM
+#endif
+
+#ifndef _KSDATAFORMAT_SUBTYPE_UNKNOWN_
+#define _KSDATAFORMAT_SUBTYPE_UNKNOWN_ {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}
+static const GUID VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
+#define KSDATAFORMAT_SUBTYPE_UNKNOWN VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN
+#endif
+
+/* Microsoft speaker definitions */
+#define WAVE_SPEAKER_FRONT_LEFT 0x1
+#define WAVE_SPEAKER_FRONT_RIGHT 0x2
+#define WAVE_SPEAKER_FRONT_CENTER 0x4
+#define WAVE_SPEAKER_LOW_FREQUENCY 0x8
+#define WAVE_SPEAKER_BACK_LEFT 0x10
+#define WAVE_SPEAKER_BACK_RIGHT 0x20
+#define WAVE_SPEAKER_FRONT_LEFT_OF_CENTER 0x40
+#define WAVE_SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
+#define WAVE_SPEAKER_BACK_CENTER 0x100
+#define WAVE_SPEAKER_SIDE_LEFT 0x200
+#define WAVE_SPEAKER_SIDE_RIGHT 0x400
+#define WAVE_SPEAKER_TOP_CENTER 0x800
+#define WAVE_SPEAKER_TOP_FRONT_LEFT 0x1000
+#define WAVE_SPEAKER_TOP_FRONT_CENTER 0x2000
+#define WAVE_SPEAKER_TOP_FRONT_RIGHT 0x4000
+#define WAVE_SPEAKER_TOP_BACK_LEFT 0x8000
+#define WAVE_SPEAKER_TOP_BACK_CENTER 0x10000
+#define WAVE_SPEAKER_TOP_BACK_RIGHT 0x20000
+#define WAVE_SPEAKER_RESERVED 0x80000000
+
+static struct
+{
+ uint16_t i_tag;
+ vlc_fourcc_t i_fourcc;
+ const char *psz_name;
+}
+wave_format_tag_to_fourcc[] =
+{
+ { WAVE_FORMAT_PCM, VLC_FOURCC( 'a', 'r', 'a', 'w' ), "Raw audio" },
+ { WAVE_FORMAT_ADPCM, VLC_FOURCC( 'm', 's', 0x00,0x02), "ADPCM" },
+ { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "IEEE Float audio" },
+ { WAVE_FORMAT_ALAW, VLC_FOURCC( 'a', 'l', 'a', 'w' ), "A-Law" },
+ { WAVE_FORMAT_MULAW, VLC_FOURCC( 'm', 'l', 'a', 'w' ), "Mu-Law" },
+ { WAVE_FORMAT_IMA_ADPCM, VLC_FOURCC( 'm', 's', 0x00,0x11), "Ima-ADPCM" },
+ { WAVE_FORMAT_G726, VLC_FOURCC( 'g', '7', '2', '6' ), "G.726 ADPCM" },
+ { WAVE_FORMAT_MPEGLAYER3, VLC_FOURCC( 'm', 'p', 'g', 'a' ), "Mpeg Audio" },
+ { WAVE_FORMAT_MPEG, VLC_FOURCC( 'm', 'p', 'g', 'a' ), "Mpeg Audio" },
+ { WAVE_FORMAT_A52, VLC_FOURCC( 'a', '5', '2', ' ' ), "A/52" },
+ { WAVE_FORMAT_WMA1, VLC_FOURCC( 'w', 'm', 'a', '1' ), "Window Media Audio v1" },
+ { WAVE_FORMAT_WMA2, VLC_FOURCC( 'w', 'm', 'a', '2' ), "Window Media Audio v2" },
+ { WAVE_FORMAT_WMA2, VLC_FOURCC( 'w', 'm', 'a', ' ' ), "Window Media Audio v2" },
+ { WAVE_FORMAT_WMAP, VLC_FOURCC( 'w', 'm', 'a', 'p' ), "Window Media Audio 9 Professional" },
+ { WAVE_FORMAT_WMAL, VLC_FOURCC( 'w', 'm', 'a', 'l' ), "Window Media Audio 9 Lossless" },
+ { WAVE_FORMAT_WMAS, VLC_FOURCC( 'w', 'm', 'a', 's' ), "Window Media Audio 9 Speech" },
+ { WAVE_FORMAT_DK3, VLC_FOURCC( 'm', 's', 0x00,0x61), "Duck DK3" },
+ { WAVE_FORMAT_DK4, VLC_FOURCC( 'm', 's', 0x00,0x62), "Duck DK4" },
+ { WAVE_FORMAT_DTS, VLC_FOURCC( 'd', 't', 's', ' ' ), "DTS Coherent Acoustics" },
+ { WAVE_FORMAT_DTS_MS, VLC_FOURCC( 'd', 't', 's', ' ' ), "DTS Coherent Acoustics" },
+ { WAVE_FORMAT_DIVIO_AAC, VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio (Divio)" },
+ { WAVE_FORMAT_AAC, VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio" },
+ { WAVE_FORMAT_VORB_1, VLC_FOURCC( 'v', 'o', 'r', '1' ), "Vorbis 1 Audio" },
+ { WAVE_FORMAT_VORB_1PLUS, VLC_FOURCC( 'v', 'o', '1', '+' ), "Vorbis 1+ Audio" },
+ { WAVE_FORMAT_VORB_2, VLC_FOURCC( 'v', 'o', 'r', '2' ), "Vorbis 2 Audio" },
+ { WAVE_FORMAT_VORB_2PLUS, VLC_FOURCC( 'v', 'o', '2', '+' ), "Vorbis 2+ Audio" },
+ { WAVE_FORMAT_VORB_3, VLC_FOURCC( 'v', 'o', 'r', '3' ), "Vorbis 3 Audio" },
+ { WAVE_FORMAT_VORB_3PLUS, VLC_FOURCC( 'v', 'o', '3', '+' ), "Vorbis 3+ Audio" },
+ { WAVE_FORMAT_SPEEX, VLC_FOURCC( 's', 'p', 'x', ' ' ), "Speex Audio" },
+ { WAVE_FORMAT_UNKNOWN, VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
+};
+
+static inline void wf_tag_to_fourcc( uint16_t i_tag, vlc_fourcc_t *fcc,
+ const char **ppsz_name )
+{
+ int i;
+ for( i = 0; wave_format_tag_to_fourcc[i].i_tag != 0; i++ )
+ {
+ if( wave_format_tag_to_fourcc[i].i_tag == i_tag ) break;
+ }
+ if( fcc ) *fcc = wave_format_tag_to_fourcc[i].i_fourcc;
+ if( ppsz_name ) *ppsz_name = wave_format_tag_to_fourcc[i].psz_name;
+}
+
+static inline void fourcc_to_wf_tag( vlc_fourcc_t fcc, uint16_t *pi_tag )
+{
+ int i;
+ for( i = 0; wave_format_tag_to_fourcc[i].i_tag != 0; i++ )
+ {
+ if( wave_format_tag_to_fourcc[i].i_fourcc == fcc ) break;
+ }
+ if( pi_tag ) *pi_tag = wave_format_tag_to_fourcc[i].i_tag;
+}
+
+/* If wFormatTag is WAVEFORMATEXTENSIBLE, we must look at the SubFormat tag
+ * to determine the actual format. Microsoft has stopped giving out wFormatTag
+ * assignments in lieu of letting 3rd parties generate their own GUIDs
+ */
+static struct
+{
+ GUID guid_tag;
+ vlc_fourcc_t i_fourcc;
+ const char *psz_name;
+}
+sub_format_tag_to_fourcc[] =
+{
+ { _KSDATAFORMAT_SUBTYPE_PCM_, VLC_FOURCC( 'p', 'c', 'm', ' ' ), "PCM" },
+ { _KSDATAFORMAT_SUBTYPE_UNKNOWN_, VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
+};
+
+/* compares two GUIDs, returns 1 if identical, 0 otherwise */
+static inline int guidcmp( const GUID *s1, const GUID *s2 )
+{
+ return( s1->Data1 == s2->Data1 && s1->Data2 == s2->Data2 &&
+ s1->Data3 == s2->Data3 && !memcmp( s1->Data4, s2->Data4, 8 ) );
+}
+
+static inline void sf_tag_to_fourcc( GUID *guid_tag,
+ vlc_fourcc_t *fcc, const char **ppsz_name )
+{
+ int i;
+
+ for( i = 0; !guidcmp( &sub_format_tag_to_fourcc[i].guid_tag,
+ &KSDATAFORMAT_SUBTYPE_UNKNOWN ); i++ )
+ {
+ if( guidcmp( &sub_format_tag_to_fourcc[i].guid_tag, guid_tag ) ) break;
+ }
+ if( fcc ) *fcc = sub_format_tag_to_fourcc[i].i_fourcc;
+ if( ppsz_name ) *ppsz_name = sub_format_tag_to_fourcc[i].psz_name;
+}
+
+/**
+ * Structure to hold information concerning subtitles.
+ * Used between demuxers and decoders of subtitles.
+ */
+typedef struct es_sys_t
+{
+ char *psz_header; /* for 'ssa ' and 'subt' */
+
+ /* for spudec */
+ unsigned int i_orig_height;
+ unsigned int i_orig_width;
+ unsigned int i_origin_x;
+ unsigned int i_origin_y;
+ unsigned int i_scale_h;
+ unsigned int i_scale_v;
+ unsigned int i_alpha;
+ vlc_bool_t b_smooth;
+ mtime_t i_fade_in;
+ mtime_t i_fade_out;
+ unsigned int i_align;
+ mtime_t i_time_offset;
+ vlc_bool_t b_forced_subs;
+ &