mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-03 16:48:52 +02:00
replaced MapMessage with JsonMessage
This commit is contained in:
parent
8a69a9c971
commit
efb592d495
31 changed files with 200 additions and 244 deletions
|
@ -23,8 +23,8 @@
|
|||
#include <memory>
|
||||
|
||||
#include "message/pcmChunk.h"
|
||||
#include "message/header.h"
|
||||
#include "message/sampleFormat.h"
|
||||
#include "message/codecHeader.h"
|
||||
#include "common/sampleFormat.h"
|
||||
|
||||
|
||||
class Encoder;
|
||||
|
@ -84,7 +84,7 @@ public:
|
|||
}
|
||||
|
||||
/// Header information needed to decode the data
|
||||
virtual std::shared_ptr<msg::Header> getHeader() const
|
||||
virtual std::shared_ptr<msg::CodecHeader> getHeader() const
|
||||
{
|
||||
return headerChunk_;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ protected:
|
|||
virtual void initEncoder() = 0;
|
||||
|
||||
SampleFormat sampleFormat_;
|
||||
std::shared_ptr<msg::Header> headerChunk_;
|
||||
std::shared_ptr<msg::CodecHeader> headerChunk_;
|
||||
EncoderListener* listener_;
|
||||
std::string codecOptions_;
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ using namespace std;
|
|||
FlacEncoder::FlacEncoder(const std::string& codecOptions) : Encoder(codecOptions), encoder_(NULL), pcmBufferSize_(0), encodedSamples_(0)
|
||||
{
|
||||
flacChunk_ = new msg::PcmChunk();
|
||||
headerChunk_.reset(new msg::Header("flac"));
|
||||
headerChunk_.reset(new msg::CodecHeader("flac"));
|
||||
pcmBuffer_ = (FLAC__int32*)malloc(pcmBufferSize_ * sizeof(FLAC__int32));
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ void OggEncoder::initEncoder()
|
|||
* audio data will start on a new page, as per spec
|
||||
*/
|
||||
size_t pos(0);
|
||||
headerChunk_.reset(new msg::Header("ogg"));
|
||||
headerChunk_.reset(new msg::CodecHeader("ogg"));
|
||||
while (true)
|
||||
{
|
||||
int result = ogg_stream_flush(&os,&og);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
PcmEncoder::PcmEncoder(const std::string& codecOptions) : Encoder(codecOptions)
|
||||
{
|
||||
headerChunk_.reset(new msg::Header("pcm"));
|
||||
headerChunk_.reset(new msg::CodecHeader("pcm"));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue