libgpac
Documentation of the core library of GPAC
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_Configure (GF_AudioOutput *dr, u32 *SampleRate, u32 *NbChannels, u32 *audioFormat, u64 channel_cfg)
 
static void PulseAudio_WriteAudio (GF_AudioOutput *dr)
 
static u32 PulseAudio_GetAudioDelay (GF_AudioOutput *dr)
 
void * NewPulseAudioOutput ()
 
void DeletePulseAudioOutput (void *ifce)
 
GPAC_MODULE_EXPORT const u32QueryInterfaces (u32 InterfaceType)
 
GPAC_MODULE_EXPORT GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
GPAC_MODULE_EXPORT void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static GF_GPACArg PulseAudioArgs []
 

Data Structure Documentation

◆ PulseAudioContext

struct 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
char data[BUFF_SIZE]

Macro Definition Documentation

◆ BUFF_SIZE

#define BUFF_SIZE   8192

Function Documentation

◆ free_pulseaudio_resources()

static void free_pulseaudio_resources ( GF_AudioOutput dr)
static
+ Here is the caller graph for this function:

◆ PulseAudio_Setup()

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:

◆ PulseAudio_Shutdown()

static void PulseAudio_Shutdown ( GF_AudioOutput dr)
static
+ Here is the caller graph for this function:

◆ PulseAudio_Configure()

static GF_Err PulseAudio_Configure ( GF_AudioOutput dr,
u32 SampleRate,
u32 NbChannels,
u32 audioFormat,
u64  channel_cfg 
)
static
+ Here is the caller graph for this function:

◆ PulseAudio_WriteAudio()

static void PulseAudio_WriteAudio ( GF_AudioOutput dr)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PulseAudio_GetAudioDelay()

static u32 PulseAudio_GetAudioDelay ( GF_AudioOutput dr)
static
+ Here is the caller graph for this function:

◆ NewPulseAudioOutput()

void* NewPulseAudioOutput ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeletePulseAudioOutput()

void DeletePulseAudioOutput ( void *  ifce)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QueryInterfaces()

GPAC_MODULE_EXPORT const u32* QueryInterfaces ( u32  InterfaceType)

◆ LoadInterface()

GPAC_MODULE_EXPORT GF_BaseInterface* LoadInterface ( u32  InterfaceType)
+ Here is the call graph for this function:

◆ ShutdownInterface()

GPAC_MODULE_EXPORT void ShutdownInterface ( GF_BaseInterface ifce)
+ Here is the call graph for this function:

Variable Documentation

◆ PulseAudioArgs

GF_GPACArg PulseAudioArgs[]
static
Initial value:
= {
GF_DEF_ARG("name", NULL, "name for PulseAudio", "GPAC", NULL, GF_ARG_STRING, 0),
GF_DEF_ARG("description", NULL, "description for PulseAudio", "GPAC output", NULL, GF_ARG_STRING, 0),
{0},
}
#define GF_ARG_STRING
Definition: main.h:155
#define GF_DEF_ARG(_a, _b, _c, _d, _e, _f, _g)
Definition: main.h:166