xine-lib: xine-lib-1.2.12/src/audio_out/audio_file_out.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
audio_file_out.c File Reference
`#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 <sys/stat.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/audio_out.h>`
`#include "bswap.h"`

## Data Structures
struct | ao_file_wavhdr
struct | ao_file_driver_s
struct | ao_file_class_t

## Macros
#define | LOG_MODULE "audio_file_out"
#define | AO_OUT_FILE_IFACE_VERSION 9
#define | AOF_GAP_TOLERANCE INT_MAX
#define | AO_FILE_CATALOG { PLUGIN_AUDIO_OUT, AO_OUT_FILE_IFACE_VERSION, "file", XINE_VERSION_CODE, &ao_info_file, ao_file_init_class }

## Typedefs
typedef struct ao_file_driver_s | ao_file_driver_t

## Functions
static int | ao_file_open (ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
static int | ao_file_num_channels (ao_driver_t *this_gen)
static int | ao_file_bytes_per_frame (ao_driver_t *this_gen)
static int | ao_file_get_gap_tolerance (ao_driver_t *this_gen)
static int | ao_file_write (ao_driver_t *this_gen, int16_t *data, uint32_t num_frames)
static int | ao_file_delay (ao_driver_t *this_gen)
static void | ao_file_close (ao_driver_t *this_gen)
static uint32_t | ao_file_get_capabilities (ao_driver_t *this_gen)
static void | ao_file_exit (ao_driver_t *this_gen)
static int | ao_file_get_property (ao_driver_t *this_gen, int property)
static int | ao_file_set_property (ao_driver_t *this_gen, int property, int value)
static int | ao_file_ctrl (ao_driver_t *this_gen, int cmd,...)
static ao_driver_t * | ao_file_open_plugin (audio_driver_class_t *class_gen, const void *data)
static void * | ao_file_init_class (xine_t *xine, const void *data)

## Variables
static const ao_info_t | ao_info_file
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ AO_FILE_CATALOG

#define AO_FILE_CATALOG { PLUGIN_AUDIO_OUT, AO_OUT_FILE_IFACE_VERSION, "file", XINE_VERSION_CODE, &ao_info_file, ao_file_init_class }

## ◆ AO_OUT_FILE_IFACE_VERSION

#define AO_OUT_FILE_IFACE_VERSION 9

## ◆ AOF_GAP_TOLERANCE

#define AOF_GAP_TOLERANCE INT_MAX

## ◆ LOG_MODULE

#define LOG_MODULE "audio_file_out"

## Typedef Documentation

## ◆ ao_file_driver_t

typedef struct ao_file_driver_s ao_file_driver_t

## Function Documentation

## ◆ ao_file_bytes_per_frame()

static int ao_file_bytes_per_frame | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by ao_file_open_plugin().

## ◆ ao_file_close()

static void ao_file_close | ( | ao_driver_t * | this_gen | ) |
| static

References le2me_32, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by ao_file_exit(), and ao_file_open_plugin().

## ◆ ao_file_ctrl()

static int ao_file_ctrl | ( | ao_driver_t * | this_gen,
|  | int | cmd,
|  |  | ...
| ) |  |
| static

References AO_CTRL_FLUSH_BUFFERS, AO_CTRL_PLAY_PAUSE, and AO_CTRL_PLAY_RESUME.

Referenced by ao_file_open_plugin().

## ◆ ao_file_delay()

static int ao_file_delay | ( | ao_driver_t * | this_gen | ) |
| static

References now(), NULL, xine_monotonic_clock(), and xine_usec_sleep().

Referenced by ao_file_open_plugin().

## ◆ ao_file_exit()

static void ao_file_exit | ( | ao_driver_t * | this_gen | ) |
| static

References ao_file_close().

Referenced by ao_file_open_plugin().

## ◆ ao_file_get_capabilities()

static uint32_t ao_file_get_capabilities | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by ao_file_open_plugin().

## ◆ ao_file_get_gap_tolerance()

static int ao_file_get_gap_tolerance | ( | ao_driver_t * | this_gen | ) |
| static

References AOF_GAP_TOLERANCE.

Referenced by ao_file_open_plugin().

## ◆ ao_file_get_property()

static int ao_file_get_property | ( | ao_driver_t * | this_gen,
|  | int | property
| ) |  |
| static

Referenced by ao_file_open_plugin().

## ◆ ao_file_init_class()

static void * ao_file_init_class | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References ao_file_open_plugin(), default_audio_driver_class_dispose, audio_driver_class_s::description, audio_driver_class_s::dispose, ao_file_class_t::driver_class, audio_driver_class_s::identifier, lprintf, N_, NULL, audio_driver_class_s::open_plugin, and ao_file_class_t::xine.

## ◆ ao_file_num_channels()

static int ao_file_num_channels | ( | ao_driver_t * | this_gen | ) |
| static

Referenced by ao_file_open_plugin().

## ◆ ao_file_open()

static int ao_file_open | ( | ao_driver_t * | this_gen,
|  | uint32_t | bits,
|  | uint32_t | rate,
|  | int | mode
| ) |  |
| static

References AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, ao_file_wavhdr::bData, bits, ao_file_wavhdr::bRiffMagic, ao_file_wavhdr::bWaveMagic, ao_file_wavhdr::dwAvgBytesPerSec, ao_file_wavhdr::dwDataLength, ao_file_wavhdr::dwSamplesPerSecond, le2me_16, le2me_32, mode(), NULL, ao_file_wavhdr::wBitsPerSample, ao_file_wavhdr::wBlockAlign, ao_file_wavhdr::wChannels, ao_file_wavhdr::wFmtSize, ao_file_wavhdr::wFormatTag, ao_file_wavhdr::wRiffLength, xine_create_cloexec(), xine_monotonic_clock(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by ao_file_open_plugin().

## ◆ ao_file_open_plugin()

static ao_driver_t * ao_file_open_plugin | ( | audio_driver_class_t * | class_gen,
|  | const void * | data
| ) |  |
| static

References AO_CAP_MODE_MONO, AO_CAP_MODE_STEREO, ao_file_bytes_per_frame(), ao_file_close(), ao_file_ctrl(), ao_file_delay(), ao_file_exit(), ao_file_get_capabilities(), ao_file_get_gap_tolerance(), ao_file_get_property(), ao_file_num_channels(), ao_file_open(), ao_file_set_property(), ao_file_write(), lprintf, NULL, and ao_file_class_t::xine.

Referenced by ao_file_init_class().

## ◆ ao_file_set_property()

static int ao_file_set_property | ( | ao_driver_t * | this_gen,
|  | int | property,
|  | int | value
| ) |  |
| static

Referenced by ao_file_open_plugin().

## ◆ ao_file_write()

static int ao_file_write | ( | ao_driver_t * | this_gen,
|  | int16_t * | data,
|  | uint32_t | num_frames
| ) |  |
| static

References bswap_16(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by ao_file_open_plugin().

## Variable Documentation

## ◆ ao_info_file

const ao_info_t ao_info_file
| static

Initial value:
= {
.priority = -1,
}

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_AUDIO_OUT, 9 , "file", XINE_VERSION_CODE, &ao_info_file, ao_file_init_class } ,
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
ao_info_file
static const ao_info_t ao_info_file
Definition: audio_file_out.c:407
ao_file_init_class
static void * ao_file_init_class(xine_t *xine, const void *data)
Definition: audio_file_out.c:386
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_AUDIO_OUT
#define PLUGIN_AUDIO_OUT
Definition: xine_plugin.h:35