xine-lib 1.2.11
|
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <math.h>
#include <unistd.h>
#include <inttypes.h>
#include <pthread.h>
#include <pulse/pulseaudio.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/audio_out.h>
#include "bswap.h"
Data Structures | |
struct | pulse_class_t |
struct | pulse_driver_s |
Macros | |
#define | GAP_TOLERANCE AO_MAX_GAP |
Typedefs | |
typedef struct pulse_driver_s | pulse_driver_t |
Functions | |
static void | __xine_pa_context_state_callback (pa_context *c, void *this_gen) |
Callback function called when the state of the context is changed. More... | |
static void | __xine_pa_stream_state_callback (pa_stream *s, void *this_gen) |
Callback function called when the state of the stream is changed. More... | |
static void | __xine_pa_stream_request_callback (pa_stream *s, size_t nbytes, void *this_gen) |
Callback function called when PA asks for more audio data. More... | |
static void | __xine_pa_stream_notify_callback (pa_stream *s, void *this_gen) |
Callback function called when PA notifies about something. More... | |
static void | __xine_pa_stream_success_callback (pa_stream *s, int success, void *this_gen) |
Callback function called when PA completed an operation. More... | |
static void | __xine_pa_context_success_callback (pa_context *c, int success, void *this_gen) |
Callback function called when PA completed an operation. More... | |
static void | __xine_pa_sink_info_callback (pa_context *c, const pa_sink_input_info *info, int is_last, void *userdata) |
Callback function called when the information on the context's sink is retrieved. More... | |
static void | __xine_pa_context_subscribe_callback (pa_context *c, pa_subscription_event_type_t t, uint32_t idx, void *this_gen) |
Callback function called when the state of the daemon changes. More... | |
static int | connect_context (pulse_driver_t *this) |
static int | ao_pulse_open (ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode) |
static int | ao_pulse_num_channels (ao_driver_t *this_gen) |
static int | ao_pulse_bytes_per_frame (ao_driver_t *this_gen) |
static int | ao_pulse_get_gap_tolerance (ao_driver_t *this_gen) |
static int | ao_pulse_write (ao_driver_t *this_gen, int16_t *data, uint32_t num_frames) |
static int | ao_pulse_delay (ao_driver_t *this_gen) |
static void | ao_pulse_close (ao_driver_t *this_gen) |
static uint32_t | ao_pulse_get_capabilities (ao_driver_t *this_gen) |
static void | ao_pulse_exit (ao_driver_t *this_gen) |
static int | wait_for_operation (pulse_driver_t *this, pa_operation *o) |
static int | ao_pulse_get_property (ao_driver_t *this_gen, int property) |
static int | ao_pulse_set_property (ao_driver_t *this_gen, int property, int value) |
static int | ao_pulse_ctrl (ao_driver_t *this_gen, int cmd,...) |
static ao_driver_t * | open_plugin (audio_driver_class_t *class_gen, const void *data) |
static void | dispose_class (audio_driver_class_t *this_gen) |
static void * | init_class (xine_t *xine, const void *data) |
Variables | |
static const ao_info_t | ao_info_pulse |
const plugin_info_t xine_plugin_info[] | EXPORTED |
#define GAP_TOLERANCE AO_MAX_GAP |
typedef struct pulse_driver_s pulse_driver_t |
|
static |
Callback function called when the state of the context is changed.
c | Context which changed status |
this_gen | pulse_class_t pointer for the PulseAudio output class |
Referenced by connect_context().
|
static |
Callback function called when the state of the daemon changes.
c | Context in which the state of the daemon changes |
t | Subscription event type |
idx | Index of the sink |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
References __xine_pa_sink_info_callback(), NULL, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by connect_context().
|
static |
Callback function called when PA completed an operation.
c | Context on which operation has succeeded |
nbytes | the number of bytes PA requested |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
References XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ao_pulse_set_property(), and connect_context().
|
static |
Callback function called when the information on the context's sink is retrieved.
ctx | Context which operation has succeeded |
info | Structure containing the sink's information |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
This function saves the volume field of the passed structure to the cvolume
variable of the output instance and send an update volume event to the frontend.
References xine_audio_level_data_t::left, xine_audio_level_data_t::mute, NULL, xine_audio_level_data_t::right, XINE_EVENT_AUDIO_LEVEL, xine_event_send(), xine_list_next_value(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by __xine_pa_context_subscribe_callback(), ao_pulse_get_property(), ao_pulse_open(), and ao_pulse_set_property().
|
static |
Callback function called when PA notifies about something.
s | Stream on which the notification happened |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
Referenced by ao_pulse_open().
|
static |
Callback function called when PA asks for more audio data.
s | Stream on which data is requested |
nbytes | the number of bytes PA requested |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
Referenced by ao_pulse_open().
|
static |
Callback function called when the state of the stream is changed.
s | Stream that changed status |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
Referenced by ao_pulse_open().
|
static |
Callback function called when PA completed an operation.
ctx | Context which operation has succeeded |
nbytes | the number of bytes PA requested |
this_gen | pulse_driver_t pointer for the PulseAudio output instance. |
References XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ao_pulse_ctrl().
|
static |
Referenced by open_plugin().
|
static |
References NULL.
Referenced by ao_pulse_exit(), and open_plugin().
|
static |
References __xine_pa_stream_success_callback(), AO_CTRL_FLUSH_BUFFERS, AO_CTRL_PLAY_PAUSE, AO_CTRL_PLAY_RESUME, NULL, and wait_for_operation().
Referenced by open_plugin().
|
static |
References NULL, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by open_plugin().
|
static |
References ao_pulse_close().
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
|
static |
References GAP_TOLERANCE.
Referenced by open_plugin().
|
static |
References __xine_pa_sink_info_callback(), AO_PROP_MIXER_VOL, AO_PROP_MUTE_VOL, AO_PROP_PCM_VOL, NULL, and wait_for_operation().
Referenced by open_plugin().
|
static |
Referenced by open_plugin().
|
static |
References __xine_pa_sink_info_callback(), __xine_pa_stream_notify_callback(), __xine_pa_stream_request_callback(), __xine_pa_stream_state_callback(), _x_ao_mode2channels(), _x_assert, AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_A52, AO_CAP_MODE_AC5, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, AO_PROP_MIXER_VOL, bits, ao_driver_s::close, connect_context(), config_values_s::lookup_entry, mode(), NULL, cfg_entry_s::num_value, ss, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by open_plugin().
|
static |
References __xine_pa_context_success_callback(), __xine_pa_sink_info_callback(), AO_PROP_MIXER_VOL, AO_PROP_MUTE_VOL, AO_PROP_PCM_VOL, NULL, and wait_for_operation().
Referenced by open_plugin().
|
static |
References NULL.
Referenced by open_plugin().
|
static |
References __xine_pa_context_state_callback(), __xine_pa_context_subscribe_callback(), __xine_pa_context_success_callback(), NULL, XINE_PATH_MAX, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ao_pulse_open(), and open_plugin().
|
static |
Referenced by init_class().
|
static |
|
static |
References _, _x_assert, AO_CAP_16BITS, AO_CAP_8BITS, AO_CAP_FLOAT32, AO_CAP_MIXER_VOL, AO_CAP_MODE_4_1CHANNEL, AO_CAP_MODE_4CHANNEL, AO_CAP_MODE_5_1CHANNEL, AO_CAP_MODE_5CHANNEL, AO_CAP_MODE_A52, AO_CAP_MODE_AC5, AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, AO_CAP_MUTE_VOL, AO_CAP_PCM_VOL, ao_pulse_bytes_per_frame(), ao_pulse_close(), ao_pulse_ctrl(), ao_pulse_delay(), ao_pulse_exit(), ao_pulse_get_capabilities(), ao_pulse_get_gap_tolerance(), ao_pulse_get_property(), ao_pulse_num_channels(), ao_pulse_open(), ao_pulse_set_property(), ao_pulse_write(), connect_context(), lprintf, NULL, pulse_class_t::xine, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by init_class().
|
static |
Referenced by ao_pulse_ctrl(), ao_pulse_get_property(), and ao_pulse_set_property().
|
static |
const plugin_info_t xine_plugin_info [] EXPORTED |