AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <DecoderInterface.h>
Public Types | |
enum | Status { Status::OK, Status::DONE, Status::ERROR } |
Represent the decoder read status. More... | |
using | Byte = uint8_t |
Represents one byte of data. More... | |
Public Member Functions | |
virtual std::pair< Status, size_t > | read (Byte *buffer, size_t size)=0 |
virtual void | abort ()=0 |
virtual | ~DecoderInterface ()=default |
A provides a method to fill up buffers with raw audio. The read method shall respect the audio frame boundaries, i.e., one frame shall not be split into more than one buffer.
The output should always be:
using alexaClientSDK::mediaPlayer::android::DecoderInterface::Byte = uint8_t |
Represents one byte of data.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Abort the decoding process.
This method can be called in parallel with read
. The read
will fail in this case. Future reads will also fail.
Implemented in alexaClientSDK::mediaPlayer::android::FFmpegDecoder.
|
pure virtual |
Fill buffer with decoded audio data.
[out] | Buffer | where the data will be copied to. |
size | The buffer size in number of bytes. |
Implemented in alexaClientSDK::mediaPlayer::android::FFmpegDecoder.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0