snapcast/server/encoder.h
(no author) c40bfda64c refactoring
git-svn-id: svn://elaine/murooma/trunk@328 d8a302eb-03bc-478d-80e4-98257eca68ef
2014-12-29 12:34:33 +00:00

36 lines
521 B
C++

#ifndef ENCODER_H
#define ENCODER_H
#include "message/pcmChunk.h"
#include "message/header.h"
#include "message/sampleFormat.h"
class Encoder
{
public:
Encoder(const msg::SampleFormat& format) : sampleFormat(format), headerChunk(NULL)
{
}
virtual ~Encoder()
{
if (headerChunk != NULL)
delete headerChunk;
}
virtual double encode(msg::PcmChunk* chunk) = 0;
virtual msg::Header* getHeader()
{
return headerChunk;
}
protected:
msg::SampleFormat sampleFormat;
msg::Header* headerChunk;
};
#endif