ITranscoder is used to convert one audio format to another audio format using the transcoding operation.
More...
ITranscoder is used to convert one audio format to another audio format using the transcoding operation.
virtual std::shared_ptr<IAudioBuffer> telux::audio::ITranscoder::getWriteBuffer |
( |
| ) |
|
|
pure virtual |
Get a buffer to be used for writing samples for transcoding operation.
- Returns
- a buffer or nullptr in case of failure.
- Note
- Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
virtual std::shared_ptr<IAudioBuffer> telux::audio::ITranscoder::getReadBuffer |
( |
| ) |
|
|
pure virtual |
Get a buffer to be used for reading samples from transcoding operation.
- Returns
- a buffer or nullptr in case of failure.
- Note
- Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
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.
- Parameters
-
[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. |
- Returns
- Status of the request i.e. success or suitable status code.
- Note
- Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
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.
- Parameters
-
[in] | callback | callback to get the response of tearDown. |
- Returns
- Status of the request i.e. success or suitable status code.
- Note
- Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
Reads samples/Frames from transcoder during transcoding operation.
- Parameters
-
[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. |
- Returns
- Status of the request i.e. success or suitable status code.
- Note
- Eval: This is a new API and is being evaluated. It is subject to change and could break backwards compatibility.
Register a listener to get notified for events of Transcoder.
- Parameters
-
- Returns
- Status of registerListener i.e success or suitable status code.
- Note
- Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.
Remove a previously registered listener.
- Parameters
-
- Returns
- Status of deRegisterListener, success or suitable status code.
- Note
- Eval: This is a new API and is being evaluated.It is subject to change and could break backwards compatibility.