#define JITTER_BUFFER_BAD_ARGUMENT -2 |
Invalid argument
#define JITTER_BUFFER_GET_AVALIABLE_COUNT 3 |
Get the amount of avaliable packets currently buffered
#define JITTER_BUFFER_GET_MARGIN 1 |
Get minimum amount of extra buffering required (margin)
#define JITTER_BUFFER_INCOMPLETE 2 |
Packet is incomplete (does not cover the entive tick
#define JITTER_BUFFER_INTERNAL_ERROR -1 |
There was an error in the jitter buffer
#define JITTER_BUFFER_MISSING 1 |
Packet is missing
#define JITTER_BUFFER_OK 0 |
Packet has been retrieved
#define JITTER_BUFFER_SET_MARGIN 0 |
Set minimum amount of extra buffering required (margin)
typedef struct JitterBuffer_ JitterBuffer |
Generic adaptive jitter buffer state
typedef struct _JitterBufferPacket JitterBufferPacket |
Definition of an incoming packet
int jitter_buffer_ctl | ( | JitterBuffer * | jitter, | |
int | request, | |||
void * | ptr | |||
) |
Used like the ioctl function to control the jitter buffer parameters
jitter | Jitter buffer state | |
request | ioctl-type request (one of the JITTER_BUFFER_* macros) | |
ptr | Data exchanged to-from function |
void jitter_buffer_destroy | ( | JitterBuffer * | jitter | ) |
Destroys jitter buffer
jitter | Jitter buffer state |
int jitter_buffer_get | ( | JitterBuffer * | jitter, | |
JitterBufferPacket * | packet, | |||
spx_int32_t * | start_offset | |||
) |
Get one packet from the jitter buffer
jitter | Jitter buffer state | |
packet | Returned packet | |
current_timestamp | Timestamp for the returned packet |
int jitter_buffer_get_pointer_timestamp | ( | JitterBuffer * | jitter | ) |
Get pointer timestamp of jitter buffer
jitter | Jitter buffer state |
JitterBuffer* jitter_buffer_init | ( | int | tick | ) |
Initialises jitter buffer
tick | Number of samples per "tick", i.e. the time period of the elements that will be retrieved |
void jitter_buffer_put | ( | JitterBuffer * | jitter, | |
const JitterBufferPacket * | packet | |||
) |
Put one packet into the jitter buffer
jitter | Jitter buffer state | |
packet | Incoming packet |
void jitter_buffer_reset | ( | JitterBuffer * | jitter | ) |
Restores jitter buffer to its original state
jitter | Jitter buffer state |
void jitter_buffer_tick | ( | JitterBuffer * | jitter | ) |
Advance by one tick
jitter | Jitter buffer state |