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
jack.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <poll.h>
#include <strings.h>
#include <jack/types.h>
#include <jack/jack.h>
#include <jack/ringbuffer.h>
#include <gpac/modules/audio_out.h>
#include <unistd.h>
+ Include dependency graph for jack.c:

Data Structures

struct  JackContext
 

Macros

#define MAX_JACK_CLIENT_NAME_SZ   128
 
#define TRUE   1
 
#define FALSE   0
 
#define JACK_PORT_NAME_MAX_SZ   128
 

Functions

int getPid ()
 
static void Jack_cleanup (JackContext *ctx)
 
static int process_callback (jack_nframes_t nframes, void *arg)
 
static int onBufferSizeChanged (jack_nframes_t nframes, void *arg)
 
static char optionIsTrue (const char *optionValue)
 
static GF_Err Jack_Setup (GF_AudioOutput *dr, void *os_handle, u32 num_buffers, u32 total_duration)
 
static void Jack_Shutdown (GF_AudioOutput *dr)
 
static GF_Err Jack_ConfigureOutput (GF_AudioOutput *dr, u32 *SampleRate, u32 *NbChannels, u32 *nbBitsPerSample, u32 channel_cfg)
 
static void Jack_SetVolume (GF_AudioOutput *dr, u32 Volume)
 
static void Jack_SetPan (GF_AudioOutput *dr, u32 Pan)
 
static void Jack_SetPriority (GF_AudioOutput *dr, u32 Priority)
 
static u32 Jack_GetAudioDelay (GF_AudioOutput *dr)
 
static GF_Err Jack_QueryOutputSampleRate (GF_AudioOutput *dr, u32 *desired_sr, u32 *NbChannels, u32 *nbBitsPerSample)
 
void * NewJackOutput ()
 
void DeleteJackOutput (void *ifce)
 
const u32QueryInterfaces ()
 
GF_BaseInterfaceLoadInterface (u32 InterfaceType)
 
void ShutdownInterface (GF_BaseInterface *ifce)
 

Variables

static const char * MODULE_NAME = "Jack"
 
static const char * AUTO_CONNECT_OPTION = "AutoConnect"
 
static const char * AUTO_START_JACKD_OPTION = "AutoStartJackd"
 
static const char * TRUE_OPTION = "true"
 
static const char * YES_OPTION = "yes"
 

Data Structure Documentation

struct JackContext
+ Collaboration diagram for JackContext:
Data Fields
char jackClientName[128]
jack_client_t * jack
jack_port_t ** jackPorts
jack_nframes_t currentBlockSize
u32 numChannels
char * buffer
u32 bufferSz
u32 bytesPerSample
char isActive
char autoConnect
char autoStartJackd
jack_default_audio_sample_t ** channels
float volume

Macro Definition Documentation

#define MAX_JACK_CLIENT_NAME_SZ   128
#define TRUE   1
#define FALSE   0
#define JACK_PORT_NAME_MAX_SZ   128

Function Documentation

int getPid ( )

+ Here is the caller graph for this function:

static void Jack_cleanup ( JackContext ctx)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int process_callback ( jack_nframes_t  nframes,
void *  arg 
)
static

The callback called by the jack thread

+ Here is the caller graph for this function:

static int onBufferSizeChanged ( jack_nframes_t  nframes,
void *  arg 
)
static

Called when jackbuffer size change

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char optionIsTrue ( const char *  optionValue)
static

+ Here is the caller graph for this function:

static GF_Err Jack_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 Jack_Shutdown ( GF_AudioOutput dr)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void Jack_SetVolume ( GF_AudioOutput dr,
u32  Volume 
)
static

+ Here is the caller graph for this function:

static void Jack_SetPan ( GF_AudioOutput dr,
u32  Pan 
)
static

+ Here is the caller graph for this function:

static void Jack_SetPriority ( GF_AudioOutput dr,
u32  Priority 
)
static

Jack manages the priority itself, we don't need to interfere here...

+ Here is the caller graph for this function:

static u32 Jack_GetAudioDelay ( GF_AudioOutput dr)
static

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

void* NewJackOutput ( )

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void DeleteJackOutput ( void *  ifce)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const u32* QueryInterfaces ( )
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 = "Jack"
static
const char* AUTO_CONNECT_OPTION = "AutoConnect"
static
const char* AUTO_START_JACKD_OPTION = "AutoStartJackd"
static
const char* TRUE_OPTION = "true"
static
const char* YES_OPTION = "yes"
static