Common interface to use in-built codecs.
More...
#include <r5codec.h>
|
MediaTransform | mDesc |
|
CodecState | mState = CodecState::Undefined |
|
ILoggerPtr | mLogger |
|
std::string | mName |
|
std::string | mFullName |
|
CodecType | mType = CodecType::Undefined |
|
CodecDirection | mDirection = CodecDirection::Undefined |
|
CodecImplType | mCodecImplType = CodecImplType::Software |
|
Common interface to use in-built codecs.
◆ AddData()
virtual int32_t r5::common::Codec::AddData |
( |
std::unique_ptr< uint8_t[]> |
inputBuffer, |
|
|
uint32_t |
inputBufferSize, |
|
|
uint32_t |
inputTimestamp |
|
) |
| |
|
pure virtual |
Add data chunk to process.
- Parameters
-
inputBuffer | Pointer to input data buffer |
inputBufferSize | Size of data buffer in bytes |
inputTimestamp | Timestamp for processing data |
- Returns
- 0 on success, negative on fail
◆ Direction()
const CodecDirection r5::common::Codec::Direction |
( |
| ) |
const |
|
inline |
Get coding direction.
- Returns
- CodecDirection
◆ FullName()
const std::string r5::common::Codec::FullName |
( |
| ) |
const |
|
inline |
Get full name of codec.
- Returns
- String with name of codec
◆ GetCurrentState()
const CodecState r5::common::Codec::GetCurrentState |
( |
| ) |
const |
|
inline |
Get the Current State of codec.
- Returns
- State of codec
◆ GetData()
virtual int32_t r5::common::Codec::GetData |
( |
std::unique_ptr< uint8_t[]> & |
outputBuffer, |
|
|
uint32_t & |
outputBufferSize, |
|
|
uint32_t & |
outputTimestamp |
|
) |
| |
|
pure virtual |
Get processed data.
- Parameters
-
outputBuffer | Pointer to output data buffer |
outputBufferSize | Size of data buffer in bytes |
outputTimestamp | Timestamp of processed data |
- Returns
- 0 on success, negative on fail
◆ GetDataType()
virtual DataType r5::common::Codec::GetDataType |
( |
| ) |
const |
|
pure virtual |
Get the media type (video or audio)
- Returns
- DataType
◆ GetMediaTransform()
Get the Media Transform used for codec initialization.
- Returns
- MediaTransform
◆ InitDecoder()
Initialize codec as decoder.
- Parameters
-
desc | Descritpion of media data to decode |
- Returns
- 0 on success, negative on fail
◆ InitEncoder()
Initialize codec as encoder.
- Parameters
-
desc | Descritpion of media data to encode |
set | Encoder settings |
- Returns
- 0 on success, negative on fail
◆ isHardware()
bool r5::common::Codec::isHardware |
( |
| ) |
const |
|
inline |
Show if codec has hardware acceleration.
- Returns
- true if accelerated
-
false software implemntation
◆ Name()
const std::string r5::common::Codec::Name |
( |
| ) |
const |
|
inline |
Get short name of codec.
- Returns
- String with name of codec
◆ Type()
const CodecType r5::common::Codec::Type |
( |
| ) |
const |
|
inline |
Get codec type.
- Returns
- CodecType
The documentation for this class was generated from the following file: