MythTV  master
mythplugins/mythmusic/mythmusic/encoder.h
Go to the documentation of this file.
1 #ifndef ENCODER_H_
2 #define ENCODER_H_
3 
4 #include <cstdio>
5 #include <sys/types.h>
6 
7 #define EENCODEERROR (-1)
8 #define EPARTIALSAMPLE (-2)
9 #define ENOTIMPL (-3)
10 
11 class MusicMetadata;
12 
13 class Encoder
14 {
15  public:
16  Encoder(QString outfile, int qualitylevel, MusicMetadata *metadata);
17  virtual ~Encoder();
18  virtual int addSamples(int16_t * bytes, unsigned int len) = 0;
19 
20  virtual bool isValid() { return (m_out != nullptr); }
21 
22  protected:
23  const QString m_outfile;
24  FILE *m_out {nullptr};
25  int m_quality;
27 };
28 
29 #endif
virtual ~Encoder()
Definition: encoder.cpp:27
int FILE
Definition: mythburn.py:139
virtual int addSamples(int16_t *bytes, unsigned int len)=0
Encoder(QString outfile, int qualitylevel, MusicMetadata *metadata)
Definition: encoder.cpp:11