audio_output_plugin Struct Reference

A plugin which controls an audio output device. More...

#include <output_plugin.h>

Data Fields

const char * name
 the plugin's name
bool(* test_default_device )(void)
 Test if this plugin can provide a default output, in case none has been configured.
void *(* init )(const struct audio_format *audio_format, const struct config_param *param, GError **error)
 Configure and initialize the device, but do not open it yet.
void(* finish )(void *data)
 Free resources allocated by this device.
bool(* open )(void *data, struct audio_format *audio_format, GError **error)
 Really open the device.
void(* close )(void *data)
 Close the device.
void(* send_tag )(void *data, const struct tag *tag)
 Display metadata for the next chunk.
size_t(* play )(void *data, const void *chunk, size_t size, GError **error)
 Play a chunk of audio data.
void(* cancel )(void *data)
 Try to cancel data which may still be in the device's buffers.
bool(* pause )(void *data)
 Pause the device.
struct mixer_pluginmixer_plugin
 The mixer plugin associated with this output plugin.

Detailed Description

A plugin which controls an audio output device.

Definition at line 35 of file output_plugin.h.


Field Documentation

void(* audio_output_plugin::cancel)(void *data)

Try to cancel data which may still be in the device's buffers.

Definition at line 105 of file output_plugin.h.

void(* audio_output_plugin::close)(void *data)

Close the device.

Definition at line 83 of file output_plugin.h.

void(* audio_output_plugin::finish)(void *data)

Free resources allocated by this device.

Definition at line 67 of file output_plugin.h.

void*(* audio_output_plugin::init)(const struct audio_format *audio_format, const struct config_param *param, GError **error)

Configure and initialize the device, but do not open it yet.

Parameters:
audio_format the configured audio format, or NULL if none is configured
param the configuration section, or NULL if there is no configuration
error location to store the error occuring, or NULL to ignore errors
Returns:
NULL on error, or an opaque pointer to the plugin's data

Definition at line 60 of file output_plugin.h.

The mixer plugin associated with this output plugin.

This may be NULL if no mixer plugin is implemented. When created, this mixer plugin gets the same config_param as this audio output device.

Definition at line 126 of file output_plugin.h.

the plugin's name

Definition at line 39 of file output_plugin.h.

bool(* audio_output_plugin::open)(void *data, struct audio_format *audio_format, GError **error)

Really open the device.

Parameters:
audio_format the audio format in which data is going to be delivered; may be modified by the plugin
error location to store the error occuring, or NULL to ignore errors

Definition at line 77 of file output_plugin.h.

bool(* audio_output_plugin::pause)(void *data)

Pause the device.

If supported, it may perform a special action, which keeps the device open, but does not play anything. Output plugins like "shout" might want to play silence during pause, so their clients won't be disconnected. Plugins which do not support pausing will simply be closed, and have to be reopened when unpaused.

Returns:
false on error (output will be closed then), true for continue to pause

Definition at line 118 of file output_plugin.h.

size_t(* audio_output_plugin::play)(void *data, const void *chunk, size_t size, GError **error)

Play a chunk of audio data.

Parameters:
error location to store the error occuring, or NULL to ignore errors
Returns:
the number of bytes played, or 0 on error

Definition at line 98 of file output_plugin.h.

void(* audio_output_plugin::send_tag)(void *data, const struct tag *tag)

Display metadata for the next chunk.

Optional method, because not all devices can display metadata.

Definition at line 89 of file output_plugin.h.

Test if this plugin can provide a default output, in case none has been configured.

This method is optional.

Definition at line 45 of file output_plugin.h.


The documentation for this struct was generated from the following file:
Generated on Sun May 2 21:28:32 2010 for MPD by  doxygen 1.6.3