10#include "libavcodec/avcodec.h"
11#include "libavformat/avformat.h"
19 void WriteFrame(
unsigned char *data,
int size);
20 int GetData(
unsigned char *buffer,
size_t &dest_size);
28 static int funcIO(
void *opaque,
const uint8_t *buf,
int size);
33 AVFormatContext *
m_oc {
nullptr};
SPDIFEncoder(const QString &muxer, AVCodecID codec_id)
SPDIFEncoder constructor Args: QString muxer : name of the muxer.
static int funcIO(void *opaque, const uint8_t *buf, int size)
funcIO: Internal callback function that will receive encoded frames
void Destroy()
Destroy and free all allocated memory.
unsigned char * GetProcessedBuffer()
void Reset()
Reset the internal encoder buffer.
void WriteFrame(unsigned char *data, int size)
Encode data through created muxer unsigned char data: pointer to data to encode int size: size of dat...
bool SetMaxHDRate(int rate)
Set the maximum HD rate.
int GetData(unsigned char *buffer, size_t &dest_size)
Retrieve encoded data and copy it in the provided buffer.