MythTV master
spdifencoder.h
Go to the documentation of this file.
1#ifndef SPDIFENCODER_H_
2#define SPDIFENCODER_H_
3
4#include <QString>
5
6#include "libmyth/output.h"
8
9extern "C" {
10#include "libavcodec/avcodec.h"
11#include "libavformat/avformat.h"
12}
13
15{
16 public:
17 SPDIFEncoder(const QString& muxer, AVCodecID codec_id);
19 void WriteFrame(unsigned char *data, int size);
20 int GetData(unsigned char *buffer, size_t &dest_size);
21 int GetProcessedSize();
22 unsigned char *GetProcessedBuffer();
23 void Reset();
24 bool Succeeded() const { return m_complete; };
25 bool SetMaxHDRate(int rate);
26
27 private:
28 static int funcIO(void *opaque, const uint8_t *buf, int size);
29 void Destroy();
30
31 private:
32 bool m_complete {false};
33 AVFormatContext *m_oc {nullptr};
34 long m_size {0};
35};
36
37#endif
#define Destroy(a)
bool Succeeded() const
Definition: spdifencoder.h:24
#define MPUBLIC
Definition: mythexp.h:10