]> git.sesse.net Git - vlc/blobdiff - include/vlc_aout.h
Remove object type field
[vlc] / include / vlc_aout.h
index 55f0d257683ef321335abd69dd4a4c0a9d619cc5..d2d04170e66fd76cf0c16faf3a6575ef2730f8c9 100644 (file)
@@ -134,13 +134,6 @@ typedef int32_t vlc_fixed_t;
 /* Max input rate factor (1/4 -> 4) */
 #define AOUT_MAX_INPUT_RATE (4)
 
-/** allocation of memory in the audio output */
-typedef struct aout_alloc_t
-{
-    bool                    b_alloc;
-    int                     i_bytes_per_sec;
-} aout_alloc_t;
-
 /** audio output buffer FIFO */
 struct aout_fifo_t
 {
@@ -150,33 +143,8 @@ struct aout_fifo_t
 };
 
 /* FIXME to remove once aout.h is cleaned a bit more */
-#include <vlc_aout_mixer.h>
 #include <vlc_block.h>
 
-/** audio output filter */
-typedef struct aout_filter_owner_sys_t aout_filter_owner_sys_t;
-typedef struct aout_filter_sys_t aout_filter_sys_t;
-struct aout_filter_t
-{
-    VLC_COMMON_MEMBERS
-
-    module_t *              p_module;
-    aout_filter_sys_t       *p_sys;
-
-    es_format_t             fmt_in;
-    es_format_t             fmt_out;
-
-    aout_alloc_t            output_alloc;
-
-    bool                    b_in_place;
-
-    void                    (*pf_do_work)( aout_instance_t *, aout_filter_t *,
-                                           aout_buffer_t *, aout_buffer_t * );
-
-    /* Private structure for the owner of the filter */
-    aout_filter_owner_sys_t *p_owner;
-};
-
 #define AOUT_RESAMPLING_NONE     0
 #define AOUT_RESAMPLING_UP       1
 #define AOUT_RESAMPLING_DOWN     2
@@ -197,45 +165,30 @@ typedef struct aout_output_t
 
     struct module_t *       p_module;
     struct aout_sys_t *     p_sys;
-    void                 (* pf_play)( aout_instance_t * );
-    int                  (* pf_volume_set )( aout_instance_t *, audio_volume_t, bool );
+    void (*pf_play)( aout_instance_t * );
+    void (* pf_pause)( aout_instance_t *, bool, mtime_t );
+    int (* pf_volume_set )( aout_instance_t *, audio_volume_t, bool );
     int                     i_nb_samples;
-
-    /* If b_error == 1, there is no audio output pipeline. */
-    bool              b_error;
 } aout_output_t;
 
+struct aout_mixer_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;
-    /* volume_vars_lock is taken */
-    vlc_mutex_t             volume_vars_lock;
+    /* Lock for volume variables (FIXME: should be in input manager) */
+    vlc_mutex_t             volume_lock;
+    vlc_mutex_t             lock;
 
     /* Input streams & pre-filters */
-    aout_input_t *          pp_inputs[1];
-    int                     i_nb_inputs;
+    aout_input_t *          p_input;
 
     /* Mixer */
     audio_sample_format_t   mixer_format;
-    aout_alloc_t            mixer_allocation;
     float                   mixer_multiplier;
-    aout_mixer_t            *p_mixer;
+    struct aout_mixer_t    *p_mixer;
 
     /* Output plug-in */
     aout_output_t           output;
@@ -256,7 +209,7 @@ static const uint32_t pi_vlc_chan_order_wg4[] =
  * Prototypes
  *****************************************************************************/
 
-VLC_API aout_buffer_t * aout_OutputNextBuffer( aout_instance_t *, mtime_t, bool ) LIBVLC_USED;
+VLC_API aout_buffer_t * aout_OutputNextBuffer( aout_instance_t *, mtime_t, bool ) VLC_USED;
 
 /**
  * This function computes the reordering needed to go from pi_chan_order_in to
@@ -300,13 +253,13 @@ static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
     return popcount(fmt->i_physical_channels & AOUT_CHAN_PHYSMASK);
 }
 
-VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) LIBVLC_USED;
+VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) VLC_USED;
 VLC_API void aout_FormatPrepare( audio_sample_format_t * p_format );
 VLC_API void aout_FormatPrint( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format );
-VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) LIBVLC_USED;
+VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED;
 
-VLC_API mtime_t aout_FifoFirstDate( aout_instance_t *, aout_fifo_t * ) LIBVLC_USED;
-VLC_API aout_buffer_t * aout_FifoPop( aout_instance_t * p_aout, aout_fifo_t * p_fifo ) LIBVLC_USED;
+VLC_API mtime_t aout_FifoFirstDate( const aout_fifo_t * ) VLC_USED;
+VLC_API aout_buffer_t *aout_FifoPop( aout_fifo_t * p_fifo ) VLC_USED;
 
 /* From intf.c : */
 VLC_API void aout_VolumeSoftInit( aout_instance_t * );
@@ -330,7 +283,7 @@ VLC_API void aout_EnableFilter(vlc_object_t *, const char *, bool );
         aout_EnableFilter( VLC_OBJECT(o), n, b )
 
 /* */
-VLC_API vout_thread_t * aout_filter_RequestVout( filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt ) LIBVLC_USED;
+VLC_API vout_thread_t * aout_filter_RequestVout( filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt ) VLC_USED;
 
 # ifdef __cplusplus
 }