mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-22 12:37:04 +02:00
Modified metadata interface to be tag independent, added JSON api.
This commit is contained in:
parent
67083975b0
commit
ce17b0010a
7 changed files with 116 additions and 33 deletions
|
@ -83,15 +83,12 @@ public:
|
|||
virtual const std::string& getId() const;
|
||||
virtual const SampleFormat& getSampleFormat() const;
|
||||
|
||||
std::shared_ptr<msg::StreamTags> getMeta() const;
|
||||
void setMeta(json j);
|
||||
|
||||
virtual ReaderState getState() const;
|
||||
virtual json toJson() const;
|
||||
|
||||
//const msg::StreamTags *getMeta()
|
||||
std::shared_ptr<msg::StreamTags> getMeta() const
|
||||
{
|
||||
return meta_;
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
std::condition_variable cv_;
|
||||
|
@ -99,6 +96,7 @@ protected:
|
|||
std::thread thread_;
|
||||
std::atomic<bool> active_;
|
||||
|
||||
|
||||
virtual void worker() = 0;
|
||||
virtual bool sleep(int32_t ms);
|
||||
void setState(const ReaderState& newState);
|
||||
|
@ -112,8 +110,6 @@ protected:
|
|||
std::unique_ptr<Encoder> encoder_;
|
||||
std::string name_;
|
||||
ReaderState state_;
|
||||
|
||||
// Stream metadata
|
||||
std::shared_ptr<msg::StreamTags> meta_;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue