xine-lib 1.2.12
Data Structures | Macros | Typedefs | Functions | Variables
audio_opensles_out.c File Reference
#include <string.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <math.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/audio_out.h>
#include <SLES/OpenSLES.h>

Data Structures

struct  opensles_driver_s
 
struct  opensles_class_t
 

Macros

#define LOG_MODULE   "audio_opensles_out"
 
#define AO_OUT_OPENSLES_IFACE_VERSION   9
 
#define OPENSLES_BUFFERS   250 /* max buffers, 10 ms each -> 2.5 seconds */
 
#define CHECK_OPENSL_RESULT(errmsg, erraction)
 

Typedefs

typedef struct opensles_driver_s opensles_driver_t
 

Functions

static int _opensles_open (ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
 
static int _opensles_num_channels (ao_driver_t *this_gen)
 
static int _opensles_bytes_per_frame (ao_driver_t *this_gen)
 
static int _opensles_get_gap_tolerance (ao_driver_t *this_gen)
 
static int _opensles_write (ao_driver_t *this_gen, int16_t *data, uint32_t num_frames)
 
static int _opensles_delay (ao_driver_t *this_gen)
 
static void _opensles_close (ao_driver_t *this_gen)
 
static uint32_t _opensles_get_capabilities (ao_driver_t *this_gen)
 
static void _opensles_exit (ao_driver_t *this_gen)
 
static int _opensles_get_property (ao_driver_t *this_gen, int property)
 
static int _opensles_set_property (ao_driver_t *this_gen, int property, int value)
 
static int _opensles_ctrl (ao_driver_t *this_gen, int cmd,...)
 
static int _dlsym_iid (opensles_driver_t *this, const char *name, SLInterfaceID *iid)
 
static ao_driver_t_opensles_open_plugin (audio_driver_class_t *class_gen, const void *data)
 
static void * _opensles_init_class (xine_t *xine, const void *data)
 

Variables

static const ao_info_t ao_info_opensles
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ AO_OUT_OPENSLES_IFACE_VERSION

#define AO_OUT_OPENSLES_IFACE_VERSION   9

◆ CHECK_OPENSL_RESULT

#define CHECK_OPENSL_RESULT (   errmsg,
  erraction 
)
Value:
do { \
if (result != SL_RESULT_SUCCESS) { \
xprintf (this->xine, XINE_VERBOSITY_LOG, LOG_MODULE ": " \
errmsg ": %" PRIu32 "\n", result); \
erraction ; \
} \
} while (0)
#define LOG_MODULE
Definition: audio_opensles_out.c:33
#define XINE_VERBOSITY_LOG
Definition: xine.h:429

◆ LOG_MODULE

#define LOG_MODULE   "audio_opensles_out"

◆ OPENSLES_BUFFERS

#define OPENSLES_BUFFERS   250 /* max buffers, 10 ms each -> 2.5 seconds */

Typedef Documentation

◆ opensles_driver_t

Function Documentation

◆ _dlsym_iid()

static int _dlsym_iid ( opensles_driver_t this,
const char *  name,
SLInterfaceID *  iid 
)
static

◆ _opensles_bytes_per_frame()

static int _opensles_bytes_per_frame ( ao_driver_t this_gen)
static

Referenced by _opensles_open_plugin().

◆ _opensles_close()

static void _opensles_close ( ao_driver_t this_gen)
static

References _x_freep(), and NULL.

Referenced by _opensles_exit(), and _opensles_open_plugin().

◆ _opensles_ctrl()

static int _opensles_ctrl ( ao_driver_t this_gen,
int  cmd,
  ... 
)
static

◆ _opensles_delay()

static int _opensles_delay ( ao_driver_t this_gen)
static

References CHECK_OPENSL_RESULT, and lprintf.

Referenced by _opensles_open_plugin().

◆ _opensles_exit()

static void _opensles_exit ( ao_driver_t this_gen)
static

References _opensles_close(), and NULL.

Referenced by _opensles_open_plugin().

◆ _opensles_get_capabilities()

static uint32_t _opensles_get_capabilities ( ao_driver_t this_gen)
static

◆ _opensles_get_gap_tolerance()

static int _opensles_get_gap_tolerance ( ao_driver_t this_gen)
static

References AO_MAX_GAP.

Referenced by _opensles_open_plugin().

◆ _opensles_get_property()

static int _opensles_get_property ( ao_driver_t this_gen,
int  property 
)
static

◆ _opensles_init_class()

static void * _opensles_init_class ( xine_t xine,
const void *  data 
)
static

◆ _opensles_num_channels()

static int _opensles_num_channels ( ao_driver_t this_gen)
static

Referenced by _opensles_open_plugin().

◆ _opensles_open()

static int _opensles_open ( ao_driver_t this_gen,
uint32_t  bits,
uint32_t  rate,
int  mode 
)
static

◆ _opensles_open_plugin()

static ao_driver_t * _opensles_open_plugin ( audio_driver_class_t class_gen,
const void *  data 
)
static

◆ _opensles_set_property()

static int _opensles_set_property ( ao_driver_t this_gen,
int  property,
int  value 
)
static

◆ _opensles_write()

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

Variable Documentation

◆ ao_info_opensles

const ao_info_t ao_info_opensles
static
Initial value:
= {
.priority = 5,
}

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static const ao_info_t ao_info_opensles
Definition: audio_opensles_out.c:568
static void * _opensles_init_class(xine_t *xine, const void *data)
Definition: audio_opensles_out.c:541
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
Definition: xine_plugin.c:78
#define PLUGIN_NONE
Definition: xine_plugin.h:29
#define PLUGIN_AUDIO_OUT
Definition: xine_plugin.h:35