GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
pulseaudio.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <poll.h>
#include <pulse/pulseaudio.h>
#include <pulse/simple.h>
#include <gpac/modules/audio_out.h>
+ Include dependency graph for pulseaudio.c:

Data Structures

struct  PulseAudioContext
 

Macros

#define BUFF_SIZE   8192
 

Functions

static void free_pulseaudio_resources (GF_AudioOutput *dr)
 
static GF_Err PulseAudio_Setup (GF_AudioOutput *dr, void *os_handle, u32 num_buffers, u32 total_duration)
 
static void PulseAudio_Shutdown (GF_AudioOutput *dr)
 
static GF_Err PulseAudio_ConfigureOutput (GF_AudioOutput *dr, u32 *SampleRate, u32 *NbChannels, u32 *nbBitsPerSample, u32 channel_cfg)
 
static void PulseAudio_WriteAudio (GF_AudioOutput *dr)
 
static void PulseAudio_SetVolume (GF_AudioOutput *dr, u32 Volume)
 
static void PulseAudio_SetPan (GF_AudioOutput *dr, u32 Pan)
 
static void PulseAudio_SetPriority (GF_AudioOutput *dr, u32 Priority)
 
static u32 PulseAudio_GetAudioDelay (GF_AudioOutput *dr)
 
static GF_Err PulseAudio_QueryOutputSampleRate (GF_AudioOutput *dr, u32 *desired_sr, u32 *NbChannels, u32 *nbBitsPerSample)
 
void * NewPulseAudioOutput ()
 
void DeletePulseAudioOutput (void *ifce)
 
const u32QueryInterfaces (u32 InterfaceType)
 
GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static const char * MODULE_NAME = "PulseAudio"
 
static const char * OUTPUT_NAME = "OutputName"
 
static const char * OUTPUT_DESCRIPTION = "OutputDescription"
 
static const char * DEFAULT_OUTPUT_NAME = "GPAC"
 
static const char * DEFAULT_OUTPUT_DESCRIPTION = "GPAC Output"
 

Data Structure Documentation

struct PulseAudioContext
+ Collaboration diagram for PulseAudioContext:
Data Fields
pa_simple * playback_handle
pa_sample_spec sample_spec
const char * output_name
const char * output_description
u32 errors
u32 consecutive_zero_reads

Macro Definition Documentation

#define BUFF_SIZE   8192

Function Documentation

static void free_pulseaudio_resources ( GF_AudioOutput dr)
static

+ Here is the caller graph for this function:

static GF_Err PulseAudio_Setup ( GF_AudioOutput dr,
void *  os_handle,
u32  num_buffers,
u32  total_duration 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void PulseAudio_Shutdown ( GF_AudioOutput dr)
static

+ Here is the caller graph for this function:

static GF_Err PulseAudio_ConfigureOutput ( GF_AudioOutput dr,
u32 SampleRate,
u32 NbChannels,
u32 nbBitsPerSample,
u32  channel_cfg 
)
static

+ Here is the caller graph for this function:

static void PulseAudio_WriteAudio ( GF_AudioOutput dr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void PulseAudio_SetVolume ( GF_AudioOutput dr,
u32  Volume 
)
static

+ Here is the caller graph for this function:

static void PulseAudio_SetPan ( GF_AudioOutput dr,
u32  Pan 
)
static

+ Here is the caller graph for this function:

static void PulseAudio_SetPriority ( GF_AudioOutput dr,
u32  Priority 
)
static

+ Here is the caller graph for this function:

static u32 PulseAudio_GetAudioDelay ( GF_AudioOutput dr)
static

+ Here is the caller graph for this function:

static GF_Err PulseAudio_QueryOutputSampleRate ( GF_AudioOutput dr,
u32 desired_sr,
u32 NbChannels,
u32 nbBitsPerSample 
)
static

PulseAudio can do the resampling by itself and play any number of channels

+ Here is the caller graph for this function:

void* NewPulseAudioOutput ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DeletePulseAudioOutput ( void *  ifce)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const u32* QueryInterfaces ( u32  InterfaceType)
GF_BaseInterface* LoadInterface ( u32  InterfaceType)

+ Here is the call graph for this function:

void ShutdownInterface ( GF_BaseInterface ifce)

+ Here is the call graph for this function:

Variable Documentation

const char* MODULE_NAME = "PulseAudio"
static
const char* OUTPUT_NAME = "OutputName"
static
const char* OUTPUT_DESCRIPTION = "OutputDescription"
static
const char* DEFAULT_OUTPUT_NAME = "GPAC"
static
const char* DEFAULT_OUTPUT_DESCRIPTION = "GPAC Output"
static