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 "output.h"
7 #include "audiooutput.h"
8 
9 extern "C" {
10 #include "libavcodec/avcodec.h"
11 #include "libavformat/avformat.h"
12 }
13 
15 {
16  public:
17  SPDIFEncoder(const QString& muxer, AVCodecID codec_id);
18  ~SPDIFEncoder();
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, unsigned char *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
Destroy
#define Destroy(a)
Definition: audiooutputopensles.cpp:38
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
SPDIFEncoder::Succeeded
bool Succeeded() const
Definition: spdifencoder.h:24
audiooutput.h
SPDIFEncoder
Definition: spdifencoder.h:14
output.h