Added basics for maintaining metadata by stream on server and pushing to clients.

Modified Spotify stream handler to get the track name from Libreelec's stderr.
Note, to support artist/album (or album art) we need to modify Libreelec
to print these.
This commit is contained in:
frafall 2017-11-20 20:44:54 +01:00
parent 034c7f5f98
commit d444052233
11 changed files with 166 additions and 2 deletions

View file

@ -30,6 +30,7 @@
#include "externals/json.hpp"
#include "common/sampleFormat.h"
#include "message/codecHeader.h"
#include "message/streamTags.h"
class PcmStream;
@ -84,6 +85,12 @@ public:
virtual ReaderState getState() const;
virtual json toJson() const;
//const msg::StreamTags *getMeta()
std::shared_ptr<msg::StreamTags> getMeta()
{
return meta_;
}
protected:
std::condition_variable cv_;
@ -104,6 +111,9 @@ protected:
std::unique_ptr<Encoder> encoder_;
std::string name_;
ReaderState state_;
// Stream metadata
std::shared_ptr<msg::StreamTags> meta_;
};