|
MythTV master
|
#include <libmythtv/audio/spdifencoder.h>
Public Member Functions | |
| SPDIFEncoder (const QString &muxer, AVCodecID codec_id) | |
| SPDIFEncoder constructor Args: QString muxer : name of the muxer. More... | |
| ~SPDIFEncoder () | |
| void | WriteFrame (unsigned char *data, int size) |
| Encode data through created muxer unsigned char data: pointer to data to encode int size: size of data to encode. More... | |
| int | GetData (unsigned char *buffer, size_t &dest_size) |
| Retrieve encoded data and copy it in the provided buffer. More... | |
| int | GetProcessedSize () |
| unsigned char * | GetProcessedBuffer () |
| void | Reset () |
| Reset the internal encoder buffer. More... | |
| bool | Succeeded () const |
| bool | SetMaxHDRate (int rate) |
| Set the maximum HD rate. More... | |
Private Member Functions | |
| void | Destroy () |
| Destroy and free all allocated memory. More... | |
Static Private Member Functions | |
| static int | funcIO (void *opaque, const uint8_t *buf, int size) |
| funcIO: Internal callback function that will receive encoded frames More... | |
Private Attributes | |
| bool | m_complete {false} |
| AVFormatContext * | m_oc {nullptr} |
| long | m_size {0} |
Definition at line 14 of file spdifencoder.h.
| SPDIFEncoder::SPDIFEncoder | ( | const QString & | muxer, |
| AVCodecID | codec_id | ||
| ) |
SPDIFEncoder constructor Args: QString muxer : name of the muxer.
Use "spdif" for IEC 958 or IEC 61937 encapsulation (AC3, DTS, E-AC3, TrueHD, DTS-HD-MA) Use "adts" for ADTS encpsulation (AAC) AVCodecContext *ctx : CodecContext to be encaspulated
Definition at line 25 of file spdifencoder.cpp.
| SPDIFEncoder::~SPDIFEncoder | ( | void | ) |
Definition at line 91 of file spdifencoder.cpp.
|
private |
Destroy and free all allocated memory.
Definition at line 206 of file spdifencoder.cpp.
Referenced by SPDIFEncoder(), and ~SPDIFEncoder().
|
staticprivate |
funcIO: Internal callback function that will receive encoded frames
Definition at line 188 of file spdifencoder.cpp.
Referenced by SPDIFEncoder().
| int SPDIFEncoder::GetData | ( | unsigned char * | buffer, |
| size_t & | dest_size | ||
| ) |
Retrieve encoded data and copy it in the provided buffer.
Return -1 if there is no data to retrieve. On return, dest_size will contain the length of the data copied Upon completion, the internal encoder buffer is emptied.
Definition at line 129 of file spdifencoder.cpp.
Referenced by AudioOutputDigitalEncoder::Encode().
| unsigned char * SPDIFEncoder::GetProcessedBuffer | ( | ) |
Definition at line 154 of file spdifencoder.cpp.
Referenced by AudioOutputBase::AddData().
| int SPDIFEncoder::GetProcessedSize | ( | ) |
Definition at line 147 of file spdifencoder.cpp.
Referenced by AudioOutputBase::AddData(), and AudioOutputDigitalEncoder::Encode().
| void SPDIFEncoder::Reset | ( | void | ) |
Reset the internal encoder buffer.
Definition at line 164 of file spdifencoder.cpp.
Referenced by AudioOutputBase::AddData(), and Destroy().
| bool SPDIFEncoder::SetMaxHDRate | ( | int | rate | ) |
Set the maximum HD rate.
If playing DTS-HD content, setting a HD rate of 0 will only use the DTS-Core and the HD stream be stripped out before encoding Input: rate = maximum HD rate in Hz
Definition at line 175 of file spdifencoder.cpp.
Referenced by AudioOutputBase::SetupPassthrough().
|
inline |
Definition at line 24 of file spdifencoder.h.
Referenced by AudioOutputDigitalEncoder::Init(), and AudioOutputBase::SetupPassthrough().
| void SPDIFEncoder::WriteFrame | ( | unsigned char * | data, |
| int | size | ||
| ) |
Encode data through created muxer unsigned char data: pointer to data to encode int size: size of data to encode.
Definition at line 101 of file spdifencoder.cpp.
Referenced by AudioOutputBase::AddData(), and AudioOutputDigitalEncoder::Encode().
|
private |
Definition at line 32 of file spdifencoder.h.
Referenced by Destroy(), SPDIFEncoder(), and Succeeded().
|
private |
Definition at line 33 of file spdifencoder.h.
Referenced by Destroy(), GetData(), GetProcessedBuffer(), GetProcessedSize(), SetMaxHDRate(), SPDIFEncoder(), and WriteFrame().
|
private |
Definition at line 34 of file spdifencoder.h.
Referenced by GetData(), GetProcessedSize(), and Reset().