Class SpeexDSPJitterBuffer
Speexdsp jitter buffer.
Implements
Inherited Members
Namespace: SpeexDSPSharp.Core
Assembly: SpeexDSPSharp.Core.dll
Syntax
public class SpeexDSPJitterBuffer : IDisposable
Constructors
| Edit this page View SourceSpeexDSPJitterBuffer(int)
Creates a new speexdsp jitter buffer.
Declaration
public SpeexDSPJitterBuffer(int step_size)
Parameters
Type | Name | Description |
---|---|---|
int | step_size | Starting value for the size of concealment packets and delay adjustment steps. Can be changed at any time using JITTER_BUFFER_SET_DELAY_STEP and JITTER_BUFFER_GET_CONCEALMENT_SIZE. |
Fields
| Edit this page View Source_handler
Direct safe handle for the SpeexDSPJitterBuffer. IT IS NOT RECOMMENDED TO CLOSE THE HANDLE DIRECTLY! Instead use Dispose(bool) to dispose the handle and object safely.
Declaration
protected readonly SpeexDSPJitterBufferSafeHandler _handler
Field Value
Type | Description |
---|---|
SpeexDSPJitterBufferSafeHandler |
Methods
| Edit this page View SourceCheckError(int)
Checks if there is an opus error and throws if the error is a negative value.
Declaration
protected static void CheckError(int error)
Parameters
Type | Name | Description |
---|---|---|
int | error | The error code to input. |
Exceptions
Type | Condition |
---|---|
SpeexDSPException |
Ctl<T>(JitterBufferCtl, ref T)
Performs a ctl request.
Declaration
public int Ctl<T>(JitterBufferCtl request, ref T value) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
JitterBufferCtl | request | The request you want to specify. |
T | value | The input/output value. |
Returns
Type | Description |
---|---|
int | 0 if no error, -1 if request is unknown. |
Type Parameters
Name | Description |
---|---|
T | The type you want to input/output. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Dispose logic.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Set to true if fully disposing. |
~SpeexDSPJitterBuffer()
Speexdsp jitter buffer destructor.
Declaration
protected ~SpeexDSPJitterBuffer()
Get(ref SpeexDSPJitterBufferPacket, int, ref int)
Get one packet from the jitter buffer.
Declaration
public JitterBufferState Get(ref SpeexDSPJitterBufferPacket packet, int desired_span, ref int start_offset)
Parameters
Type | Name | Description |
---|---|---|
SpeexDSPJitterBufferPacket | packet | Returned packet. |
int | desired_span | Number of samples (or units) we wish to get from the buffer (no guarantee). |
int | start_offset | Timestamp for the returned packet. |
Returns
Type | Description |
---|---|
JitterBufferState |
GetAnother(ref SpeexDSPJitterBufferPacket)
Used right after jitter_buffer_get() to obtain another packet that would have the same timestamp. This is mainly useful for media where a single "frame" can be split into several packets.
Declaration
public int GetAnother(ref SpeexDSPJitterBufferPacket packet)
Parameters
Type | Name | Description |
---|---|---|
SpeexDSPJitterBufferPacket | packet | Returned packet. |
Returns
Type | Description |
---|---|
int |
GetPointerTimestamp()
Get pointer timestamp of jitter buffer.
Declaration
public int GetPointerTimestamp()
Returns
Type | Description |
---|---|
int | I have no clue what this returns. |
Put(ref SpeexDSPJitterBufferPacket)
Put one packet into the jitter buffer.
Declaration
public void Put(ref SpeexDSPJitterBufferPacket packet)
Parameters
Type | Name | Description |
---|---|---|
SpeexDSPJitterBufferPacket | packet | Incoming packet. |
RemainingSpan(int)
Telling the jitter buffer about the remaining data in the application buffer.
Declaration
public void RemainingSpan(int remaining_span)
Parameters
Type | Name | Description |
---|---|---|
int | remaining_span | Amount of data buffered by the application (timestamp units). |
Reset()
Reset the jitter buffer to its original state.
Declaration
public void Reset()
ThrowIfDisposed()
Throws an exception if this object is disposed or the handler is closed.
Declaration
protected virtual void ThrowIfDisposed()
Exceptions
Type | Condition |
---|---|
ObjectDisposedException |
Tick()
Advance by one tick.
Declaration
public void Tick()
UpdateDelay(ref SpeexDSPJitterBufferPacket, ref int)
N.A.
Declaration
public int UpdateDelay(ref SpeexDSPJitterBufferPacket packet, ref int start_offset)
Parameters
Type | Name | Description |
---|---|---|
SpeexDSPJitterBufferPacket | packet | |
int | start_offset |
Returns
Type | Description |
---|---|
int |