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
Encoder::m_quality
int m_quality
Definition: mythplugins/mythmusic/mythmusic/encoder.h:25
Encoder::isValid
virtual bool isValid()
Definition: mythplugins/mythmusic/mythmusic/encoder.h:20
Encoder
Definition: mythplugins/mythmusic/mythmusic/encoder.h:14
MusicMetadata
Definition: musicmetadata.h:81
mythburn.FILE
int FILE
Definition: mythburn.py:139
Encoder::Encoder
Encoder(QString outfile, int qualitylevel, MusicMetadata *metadata)
Definition: encoder.cpp:11
Encoder::m_metadata
MusicMetadata * m_metadata
Definition: mythplugins/mythmusic/mythmusic/encoder.h:26
musicbrainzngs.compat.bytes
bytes
Definition: compat.py:49
Encoder::m_outfile
const QString m_outfile
Definition: mythplugins/mythmusic/mythmusic/encoder.h:23
Encoder::~Encoder
virtual ~Encoder()
Definition: encoder.cpp:27
Encoder::addSamples
virtual int addSamples(int16_t *bytes, unsigned int len)=0
Encoder::m_out
FILE * m_out
Definition: mythplugins/mythmusic/mythmusic/encoder.h:24