Telematics SDK - Interface Specification
v1.38.37
|
Data Structures | |
struct | telux::audio::FormatParams |
struct | telux::audio::AmrwbpParams |
struct | telux::audio::StreamConfig |
struct | telux::audio::FormatInfo |
struct | telux::audio::ChannelVolume |
struct | telux::audio::StreamVolume |
struct | telux::audio::StreamMute |
struct | telux::audio::StreamBuffer |
struct | telux::audio::DtmfTone |
class | telux::audio::AudioFactory |
AudioFactory allows creation of audio manager. More... | |
class | telux::audio::IVoiceListener |
Listener class for getting notifications related to DTMF tone detection. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe. More... | |
class | telux::audio::IPlayListener |
class | telux::audio::ITranscodeListener |
class | telux::audio::IAudioListener |
class | telux::audio::IAudioBuffer |
Stream Buffer manages the buffer to be used for read and write operations on Audio Streams. For write operations, applications should request a stream buffer, populate it with the data and then pass it to the write operation and set the dataSize that is to be written to the stream. Similarly for read operations,the application should request a stream buffer and use that in the read operation. At the end of the read, the stream buffer will contain the data read. Once an operation (read/write) has completed, the stream buffer could be reused for a subsequent read/write operation, provided reset() API called on stream buffer between subsequent calls. More... | |
class | telux::audio::IStreamBuffer |
class | telux::audio::IAudioManager |
Audio Manager is a primary interface for audio operations. It provide APIs to manage Streams ( like voice, play, record etc) and sound cards. More... | |
class | telux::audio::IAudioDevice |
Audio device and it's characteristics like Direction (Sink or Source), type. More... | |
class | telux::audio::IAudioStream |
IAudioStream represents single audio stream with base properties. More... | |
class | telux::audio::IAudioVoiceStream |
IAudioVoiceStream represents single voice stream. More... | |
class | telux::audio::IAudioPlayStream |
IAudioPlayStream represents single audio playback stream. More... | |
class | telux::audio::IAudioCaptureStream |
IAudioCaptureStream represents single audio capture stream. More... | |
class | telux::audio::IAudioLoopbackStream |
IAudioLoopbackStream represents audio loopback stream. More... | |
class | telux::audio::IAudioToneGeneratorStream |
IAudioToneGeneratorStream represents tone generator stream. More... | |
class | telux::audio::ITranscoder |
ITranscoder is used to convert one audio format to another audio format using the transcoding operation. More... | |
Typedefs | |
using | telux::audio::ChannelTypeMask = int |
using | telux::audio::GetDevicesResponseCb = std::function< void(std::vector< std::shared_ptr< IAudioDevice >> devices, telux::common::ErrorCode error)> |
using | telux::audio::GetStreamTypesResponseCb = std::function< void(std::vector< StreamType > streamTypes, telux::common::ErrorCode error)> |
using | telux::audio::CreateStreamResponseCb = std::function< void(std::shared_ptr< IAudioStream > &stream, telux::common::ErrorCode error)> |
using | telux::audio::CreateTranscoderResponseCb = std::function< void(std::shared_ptr< ITranscoder > &transcoder, telux::common::ErrorCode error)> |
using | telux::audio::DeleteStreamResponseCb = std::function< void(telux::common::ErrorCode error)> |
using | telux::audio::GetStreamDeviceResponseCb = std::function< void(std::vector< DeviceType > devices, telux::common::ErrorCode error)> |
using | telux::audio::GetStreamVolumeResponseCb = std::function< void(StreamVolume volume, telux::common::ErrorCode error)> |
using | telux::audio::GetStreamMuteResponseCb = std::function< void(StreamMute mute, telux::common::ErrorCode error)> |
using | telux::audio::WriteResponseCb = std::function< void(std::shared_ptr< IStreamBuffer > buffer, uint32_t bytesWritten, telux::common::ErrorCode error)> |
using | telux::audio::ReadResponseCb = std::function< void(std::shared_ptr< IStreamBuffer > buffer, telux::common::ErrorCode error)> |
using | telux::audio::TranscoderReadResponseCb = std::function< void(std::shared_ptr< IAudioBuffer > buffer, uint32_t isLastBuffer, telux::common::ErrorCode error)> |
using | telux::audio::TranscoderWriteResponseCb = std::function< void(std::shared_ptr< IAudioBuffer > buffer, uint32_t bytesWritten, telux::common::ErrorCode error)> |
This section contains APIs related to Audio Stream operation.
struct telux::audio::FormatParams |
Frame format common parameters
struct telux::audio::AmrwbpParams |
Frame format codec specific parameters
Data Fields | |
uint32_t | bitWidth |
AmrwbpFrameFormat | frameFormat |
uint32_t telux::audio::AmrwbpParams::bitWidth |
Bitwidth of Stream, Typical Values <16/24>.
AmrwbpFrameFormat telux::audio::AmrwbpParams::frameFormat |
struct telux::audio::StreamConfig |
Common Stream configuration parameters
Data Fields | ||
---|---|---|
StreamType | type | |
int | modemSubId |
|
SlotId | slotId |
Represents slotId, applicable for voice call only |
uint32_t | sampleRate |
Sample Rate of Stream, Typical Values <8k/16k/32k/48k> |
ChannelTypeMask | channelTypeMask | |
AudioFormat | format | |
vector< DeviceType > | deviceTypes | |
vector< Direction > | voicePaths |
Represent voice path direction for in call audio. TX for Uplink and RX for Downlink.> |
FormatParams * | formatParams |
struct telux::audio::FormatInfo |
Represents information about the audio format.
Data Fields | ||
---|---|---|
uint32_t | sampleRate |
Sample Rate of audio, Typical Values <8k/16k/32k/48k> |
ChannelTypeMask | mask |
parameter for configuration of channel type |
AudioFormat | format |
Represents audio format |
FormatParams * | params |
Represents codec specific parameters, like Frame Format |
struct telux::audio::ChannelVolume |
Stream Channel Volume parameters
Data Fields | ||
---|---|---|
ChannelType | channelType | |
float | vol |
Volume range in float <0 to 1.0>. 0 represents min volume, 1 represents max volume |
struct telux::audio::StreamVolume |
Stream Channel Volume parameters consolidating entire Stream
Data Fields | ||
---|---|---|
vector< ChannelVolume > | volume | |
StreamDirection | dir |
struct telux::audio::StreamMute |
Stream Mute parameters
Data Fields | ||
---|---|---|
bool | enable |
enable or disable mute on stream |
StreamDirection | dir |
struct telux::audio::StreamBuffer |
struct telux::audio::DtmfTone |
DTMF tone parameters
Data Fields | ||
---|---|---|
DtmfLowFreq | lowFreq | |
DtmfHighFreq | highFreq | |
StreamDirection | direction |
class telux::audio::AudioFactory |
AudioFactory allows creation of audio manager.
Public Member Functions | |
std::shared_ptr< IAudioManager > | getAudioManager () |
Static Public Member Functions | |
static AudioFactory & | getInstance () |
|
static |
Get Audio Factory instance.
std::shared_ptr<IAudioManager> telux::audio::AudioFactory::getAudioManager | ( | ) |
Get instance of audio manager.
class telux::audio::IVoiceListener |
Listener class for getting notifications related to DTMF tone detection. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe.
Public Member Functions | |
virtual void | onDtmfToneDetection (DtmfTone dtmfTone) |
virtual | ~IVoiceListener () |
|
virtual |
Destructor of IVoiceListener
|
virtual |
This function is called when a DTMF tone is detected in the voice stream
[in] | dtmfTone | DTMF tone properties |
class telux::audio::IPlayListener |
Public Member Functions | |
virtual void | onReadyForWrite () |
virtual void | onPlayStopped () |
virtual | ~IPlayListener () |
|
virtual |
Destructor of IPlayListener
|
virtual |
This function is called when pipeline is ready to accept new buffer. It is applicable only for compressed audio format type where a client can write and queue buffers for playback.
|
virtual |
This function is called when stopAudio() is called with StopType::STOP_AFTER_PLAY. It indicates that all the buffers that were present in the pipeline have been played.
class telux::audio::ITranscodeListener |
Public Member Functions | |
virtual void | onReadyForWrite () |
virtual | ~ITranscodeListener () |
|
virtual |
Destructor of ITranscodeListener
|
virtual |
This function is called when pipeline is ready to accept new buffer. It is applicable only for compressed audio format type where a client can write and queue buffers for transcoding.
class telux::audio::IAudioListener |
Public Member Functions | |
virtual | ~IAudioListener () |
![]() | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
Destructor of IAudioListener
class telux::audio::IAudioBuffer |
Stream Buffer manages the buffer to be used for read and write operations on Audio Streams. For write operations, applications should request a stream buffer, populate it with the data and then pass it to the write operation and set the dataSize that is to be written to the stream. Similarly for read operations,the application should request a stream buffer and use that in the read operation. At the end of the read, the stream buffer will contain the data read. Once an operation (read/write) has completed, the stream buffer could be reused for a subsequent read/write operation, provided reset() API called on stream buffer between subsequent calls.
Public Member Functions | |
virtual size_t | getMinSize ()=0 |
virtual size_t | getMaxSize ()=0 |
virtual uint8_t * | getRawBuffer ()=0 |
virtual uint32_t | getDataSize ()=0 |
virtual void | setDataSize (uint32_t size)=0 |
virtual telux::common::Status | reset ()=0 |
virtual | ~IAudioBuffer () |
|
virtual |
|
pure virtual |
Returns the minimum size (in bytes) of data that caller needs to read/write before calling a read/write operation on the stream.
|
pure virtual |
Returns the maximum size (in bytes) that the buffer can hold.
|
pure virtual |
Gets the raw buffer that IStreamBuffer manages. Application should write in between(include) of getMinSize() to getMaxSize() number of bytes in this buffer. Application is not responsible to free the raw buffer. It will be free'ed when the IStreamBuffer is destroyed.
|
pure virtual |
Gets the size (in bytes) of valid data present in the buffer.
|
pure virtual |
Sets the size (in bytes) of valid data present in the buffer.
size | size of valid data in the buffer |
|
pure virtual |
Reset all state and data of the buffer. This is to be called when reusing the same buffer for multiple operations.
class telux::audio::IStreamBuffer |
Public Member Functions | |
virtual | ~IStreamBuffer () |
![]() | |
virtual size_t | getMinSize ()=0 |
virtual size_t | getMaxSize ()=0 |
virtual uint8_t * | getRawBuffer ()=0 |
virtual uint32_t | getDataSize ()=0 |
virtual void | setDataSize (uint32_t size)=0 |
virtual telux::common::Status | reset ()=0 |
virtual | ~IAudioBuffer () |
|
virtual |
class telux::audio::IAudioManager |
Audio Manager is a primary interface for audio operations. It provide APIs to manage Streams ( like voice, play, record etc) and sound cards.
Public Member Functions | |
virtual bool | isSubsystemReady ()=0 |
virtual std::future< bool > | onSubsystemReady ()=0 |
virtual telux::common::Status | getDevices (GetDevicesResponseCb callback=nullptr)=0 |
virtual telux::common::Status | getStreamTypes (GetStreamTypesResponseCb callback=nullptr)=0 |
virtual telux::common::Status | createStream (StreamConfig streamConfig, CreateStreamResponseCb callback=nullptr)=0 |
virtual telux::common::Status | createTranscoder (FormatInfo input, FormatInfo output, CreateTranscoderResponseCb callback)=0 |
virtual telux::common::Status | deleteStream (std::shared_ptr< IAudioStream > stream, DeleteStreamResponseCb callback=nullptr)=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< IAudioListener > listener)=0 |
virtual telux::common::Status | deRegisterListener (std::weak_ptr< IAudioListener > listener)=0 |
virtual | ~IAudioManager () |
|
virtual |
|
pure virtual |
Checks the status of audio subsystems and returns the result.
|
pure virtual |
Wait for Audio subsystem to be ready.
|
pure virtual |
Get the list of supported audio devices, which are currently supported in the audio subsystem
[in] | callback | callback pointer to get the response of getDevices. |
|
pure virtual |
Get the list of supported audio streams types, which are currently supported in the audio subsystem
[in] | callback | callback pointer to get the response of getStreamTypes. |
|
pure virtual |
Creates the stream for audio operation
[in] | streamConfig | stream configuration. |
[in] | callback | callback pointer to get the response of createStream. |
|
pure virtual |
Creates an instance of transcoder that can be used for transcoding operations. Each instance returned can be used for single transcoding operation. The instance can not be used for multiple transcoding operation.
[in] | input | configuration of input buffers that needs to be transcoded. |
[in] | output | configuration of transcoded output buffers. |
[in] | callback | callback pointer to get the response of createTranscoder. |
|
pure virtual |
Deletes the specified stream which was created before
[in] | stream | reference to stream to be deleted. |
[in] | callback | callback pointer to get the response of deleteStream. |
|
pure virtual |
Register a listener to get notified when service status changes.
[in] | listener | Pointer of IServiceListener object that processes the notification |
|
pure virtual |
Remove a previously registered listener.
[in] | listener | Previously registered IServiceListener that needs to be removed |
class telux::audio::IAudioDevice |
Audio device and it's characteristics like Direction (Sink or Source), type.
Public Member Functions | |
virtual DeviceType | getType ()=0 |
virtual DeviceDirection | getDirection ()=0 |
virtual | ~IAudioDevice () |
|
virtual |
|
pure virtual |
Get the type of Device (i.e SPEAKER, MIC etc)
|
pure virtual |
Provide direction of device whether is Sink for audio data ( RX i.e. speaker, etc) or Source for audio data ( TX i.e. mic, etc)
class telux::audio::IAudioStream |
IAudioStream represents single audio stream with base properties.
Public Member Functions | |
virtual StreamType | getType ()=0 |
virtual telux::common::Status | setDevice (std::vector< DeviceType > devices, telux::common::ResponseCallback callback=nullptr)=0 |
virtual telux::common::Status | getDevice (GetStreamDeviceResponseCb callback=nullptr)=0 |
virtual telux::common::Status | setVolume (StreamVolume volume, telux::common::ResponseCallback callback=nullptr)=0 |
virtual telux::common::Status | getVolume (StreamDirection dir, GetStreamVolumeResponseCb callback=nullptr)=0 |
virtual telux::common::Status | setMute (StreamMute mute, telux::common::ResponseCallback callback=nullptr)=0 |
virtual telux::common::Status | getMute (StreamDirection dir, GetStreamMuteResponseCb callback=nullptr)=0 |
virtual | ~IAudioStream () |
|
virtual |
|
pure virtual |
Get the stream type like VOICE, PLAY, CAPTURE
|
pure virtual |
Set Device of audio stream
[in] | devices | Devices list. |
[in] | callback | callback to get the response of setDevice. |
|
pure virtual |
Get Device of audio stream
[in] | callback | callback to get the response of getDevice |
|
pure virtual |
Set Volume of audio stream
[in] | volume | volume setting per channel for direction. |
[in] | callback | callback to get the response of setVolume. |
|
pure virtual |
Get Volume of audio stream
[in] | dir | Stream Direction to query volume details. |
[in] | callback | callback to get the response of getVolume. |
|
pure virtual |
Set Mute of audio stream
[in] | mute | mute setting for direction. |
[in] | callback | callback to know the status of the request. |
|
pure virtual |
Get Mute of audio stream
[in] | dir | Stream Direction to query mute details. |
[in] | callback | callback to get the response of getMute. |
class telux::audio::IAudioVoiceStream |
IAudioVoiceStream represents single voice stream.
|
virtual |
|
pure virtual |
Starts audio stream
[in] | callback | callback to get the response of startAudio. |
|
pure virtual |
Stops audio stream
[in] | callback | callback to get the response of stopAudio. |
|
pure virtual |
Plays in-band DTMF tone on the active voice stream
[in] | dtmfTone | DTMF tone properties [in] duration Duration (in milliseconds) for which the tone needs to be played. The constant infiniteDtmfDuration(=0xFFFF) represents infinite duration. [in] gain DTMF tone gain [in] callback callback to get the response of playDtmfTone. |
|
pure virtual |
Stops the DTMF tone which is being played (i.e duration not expired) on the active voice stream
[in] | direction | Direction associated with the DTMF tone @ [in] callback callback to get the response of stopDtmfTone. |
|
pure virtual |
Register a listener to get notified when a DTMF tone is detected in the active voice stream
[in] | listener | Pointer of IVoiceListener object that processes the notification [in] callback callback to get the response of registerListener |
|
pure virtual |
Remove a previously registered listener.
[in] | listener | Previously registered IVoiceListener that needs to be removed |
class telux::audio::IAudioPlayStream |
IAudioPlayStream represents single audio playback stream.
|
virtual |
|
pure virtual |
Get an Audio StreamBuffer to be used for playback operations
|
pure virtual |
Write Samples to audio stream. First write starts playback operation.
Write in case of compressed audio format maintains a pipeline, if the callback returns with same number of bytes written as requested and no error occured, user can send next buffer. If the number of bytes returned are not equal to the requested write size, then need to resend the buffer again from the leftover offset after waiting for the () event.
[in] | buffer | stream buffer for write. |
[in] | callback | callback to get the response of write. |
|
pure virtual |
This API is to be used to stop playback. It is applicable only for compressed audio format playback.
[in] | callback | callback to get the response of stopAudio. |
[in] | stopType | it specifies type of stop for stopping audio playback. |
|
pure virtual |
Register a listener to get notified for events of Play Stream
[in] | listener | Pointer of IPlayListener object that processes the notification [in] callback callback to get the response of registerListener |
|
pure virtual |
Remove a previously registered listener.
[in] | listener | Previously registered IPlayListener that needs to be removed |
class telux::audio::IAudioCaptureStream |
IAudioCaptureStream represents single audio capture stream.
|
virtual |
|
pure virtual |
Get an Audio Stream Buffer to be used for capture operations
|
pure virtual |
Read Samples from audio stream. First read starts capture operation.
[in] | buffer | stream buffer for read. |
[in] | bytesToRead | specifying how many bytes to be read from stream. |
[in] | callback | callback to get the response of read. |
class telux::audio::IAudioLoopbackStream |
IAudioLoopbackStream represents audio loopback stream.
|
virtual |
|
pure virtual |
Start loopback between source and sink devices
[in] | callback | callback to get the response of start loopback. |
|
pure virtual |
Stop loopback between source and sink devices
[in] | callback | callback to get the response of stop loopback. |
class telux::audio::IAudioToneGeneratorStream |
IAudioToneGeneratorStream represents tone generator stream.
|
virtual |
|
pure virtual |
Play a tone on sink devices. As the duartion expires, the generated tone terminates automatically.
[in] | freq | Accepts the composition of frequencies (in Hz) to be played such as single tone or dual tone. Any additional frequencies provided will be ignored. |
[in] | duration | Duration (in milliseconds) for which the tone needs to be played. The constant infiniteToneDuration(=0xFFFF) represents infinte duration. |
[in] | gain | Tone Gain. |
[in] | callback | callback to get the response of play tone. |
|
pure virtual |
Stops the tone which is being played (i.e duration not expired) on the active Tone generator stream.
[in] | callback | callback to get the response of stop tone. |
class telux::audio::ITranscoder |
ITranscoder is used to convert one audio format to another audio format using the transcoding operation.
Public Member Functions | |
virtual std::shared_ptr< IAudioBuffer > | getWriteBuffer ()=0 |
virtual std::shared_ptr< IAudioBuffer > | getReadBuffer ()=0 |
virtual telux::common::Status | write (std::shared_ptr< IAudioBuffer > buffer, uint32_t isLastBuffer, TranscoderWriteResponseCb callback=nullptr)=0 |
virtual telux::common::Status | tearDown (telux::common::ResponseCallback callback=nullptr)=0 |
virtual telux::common::Status | read (std::shared_ptr< IAudioBuffer > buffer, uint32_t bytesToRead, TranscoderReadResponseCb callback=nullptr)=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< ITranscodeListener > listener)=0 |
virtual telux::common::Status | deRegisterListener (std::weak_ptr< ITranscodeListener > listener)=0 |
virtual | ~ITranscoder () |
|
virtual |
|
pure virtual |
Get a buffer to be used for writing samples for transcoding operation.
|
pure virtual |
Get a buffer to be used for reading samples from transcoding operation.
|
pure virtual |
Write Samples/Frames to transcode stream. First write starts transcoding operation.
Write in case of compressed audio format maintains a pipeline, if the callback returns with same number of bytes written as requested and no error occured, user can send next buffer. If the number of bytes returned are not equal to the requested write size, then user needs to resend the buffer again from the leftover offset after waiting for the () event.
[in] | buffer | buffer that needs to be transcoded. |
[in] | isLastBuffer | represents whether this buffer is last buffer or not. Once last buffer is set no more write operations are required. |
[in] | callback | callback to get the response of write. |
|
pure virtual |
It is mandatory to call this API after the end of a transcode operation or to abort a transcode operation. After this API call the ITranscoder object is no longer usable.
[in] | callback | callback to get the response of tearDown. |
|
pure virtual |
Reads samples/Frames from transcoder during transcoding operation.
[in] | buffer | stream buffer for read. |
[in] | bytesToRead | specifying how many bytes to be read from stream. |
[in] | callback | callback to get the response of read. |
|
pure virtual |
Register a listener to get notified for events of Transcoder.
[in] | listener | Pointer of ITranscodeListener object that processes the notification. |
|
pure virtual |
Remove a previously registered listener.
[in] | listener | Previously registered ITranscodeListener that needs to be removed. |
using telux::audio::ChannelTypeMask = typedef int |
Represent Stream's consolidated lists of Channel presence
using telux::audio::GetDevicesResponseCb = typedef std::function<void(std::vector<std::shared_ptr<IAudioDevice>> devices, telux::common::ErrorCode error)> |
This function is called with the response to getDevices API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | devices | Devices list. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::GetStreamTypesResponseCb = typedef std::function<void(std::vector<StreamType> streamTypes, telux::common::ErrorCode error)> |
This function is called with the response to getStreamTypes API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | streamTypes | Stream type list. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::CreateStreamResponseCb = typedef std::function<void(std::shared_ptr<IAudioStream> &stream, telux::common::ErrorCode error)> |
This function is called with the response to createStream API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | stream | Interface pointer of Stream created. VOICE_CALL - Provides IAudioVoiceStream pointer PLAY - Provides IAudioPlayStream pointer CAPTURE - Provides IAudioCaptureStream pointer |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::CreateTranscoderResponseCb = typedef std::function<void( std::shared_ptr<ITranscoder> &transcoder, telux::common::ErrorCode error)> |
This function is called with the response to createTranscoder API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | transcoder | Interface pointer of transcoder. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::DeleteStreamResponseCb = typedef std::function<void(telux::common::ErrorCode error)> |
This function is called with the response to deleteStream API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::GetStreamDeviceResponseCb = typedef std::function<void(std::vector<DeviceType> devices, telux::common::ErrorCode error)> |
This function is called with the response to stream getDevice API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | devices | Devices list. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::GetStreamVolumeResponseCb = typedef std::function<void(StreamVolume volume, telux::common::ErrorCode error)> |
This function is called with the response to stream getVolume API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | volume | stream volume details. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::GetStreamMuteResponseCb = typedef std::function<void(StreamMute mute, telux::common::ErrorCode error)> |
This function is called with the response to stream getMute API.
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | mute | stream mute details. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::WriteResponseCb = typedef std::function<void(std::shared_ptr<IStreamBuffer> buffer, uint32_t bytesWritten, telux::common::ErrorCode error)> |
This function is called with the response to IAudioPlayStream::write().
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | buffer | Buffer that was used for the write operation. Application could call IStreamBuffer::reset() and reuse this buffer for subsequent write operations on the same stream. |
[in] | bytesWritten | Return how many bytes are written to the stream. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::ReadResponseCb = typedef std::function<void(std::shared_ptr<IStreamBuffer> buffer, telux::common::ErrorCode error)> |
This function is called with the response to IAudioCaptureStream::read().
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | buffer | Buffer that was used to capture the data from the read operation. Applications could call IStreamBuffer::reset() and reuse this buffer for subsequent read operations on the same stream. Also buffer.getDataSize() will represent the number of bytes read. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::TranscoderReadResponseCb = typedef std::function<void(std::shared_ptr<IAudioBuffer> buffer, uint32_t isLastBuffer, telux::common::ErrorCode error)> |
This function is called with the response to ITranscoder::read().
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | buffer | Buffer that was used to capture the data from the transcode read operation. Applications could call IAudioBuffer::reset() and reuse this buffer for subsequent read operations on the same transcoder instance. Also buffer.getDataSize() will represent the number of bytes contained in a buffer. |
[in] | isLastBuffer | represents whether the transcoded buffer is last buffer or not. Once the last buffer is received no more further read operations are required. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::audio::TranscoderWriteResponseCb = typedef std::function<void(std::shared_ptr<IAudioBuffer> buffer, uint32_t bytesWritten, telux::common::ErrorCode error)> |
This function is called with the response to ITranscoder::write().
The callback can be invoked from multiple different threads. The implementation should be thread safe.
[in] | buffer | Buffer that was used for the write operation for transcoding. Application could call IAudioBuffer::reset() and reuse this buffer for subsequent write operations on the same transcoder instance. |
[in] | bytesWritten | Return how many bytes are sent for transcoding. |
[in] | error | Return code which indicates whether the operation succeeded or not. ErrorCode |
|
strong |
|
strong |
|
strong |
Represent Stream Type
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Represents type of stop for compressed audio format playback. Audio playback can be stopped in two ways force stop and after playing all buffers in the pipeline.
Enumerator | |
---|---|
FORCE_STOP |
Stop Playing Immediately and clear buffer pipeline |
STOP_AFTER_PLAY |
Stop Play once after all buffers in pipeline are played |