mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-28 00:16:17 +02:00
Add RPC "Stream.Control" command
This commit is contained in:
parent
09cde776b1
commit
91ea368121
5 changed files with 163 additions and 90 deletions
|
@ -114,7 +114,7 @@ public:
|
|||
CtrlScript(boost::asio::io_context& ioc, const std::string& script);
|
||||
virtual ~CtrlScript();
|
||||
|
||||
void start(const std::string& stream_id, const ServerSettings& server_setttings);
|
||||
void start(const std::string& stream_id, const ServerSettings& server_setttings, const std::string& command = "", const std::string& param = "");
|
||||
void stop();
|
||||
|
||||
private:
|
||||
|
@ -162,6 +162,8 @@ public:
|
|||
std::shared_ptr<msg::StreamTags> getMeta() const;
|
||||
void setMeta(const json& j);
|
||||
|
||||
void control(const std::string& command, const std::string& param);
|
||||
|
||||
virtual ReaderState getState() const;
|
||||
virtual json toJson() const;
|
||||
|
||||
|
@ -187,6 +189,7 @@ protected:
|
|||
boost::asio::io_context& ioc_;
|
||||
ServerSettings server_settings_;
|
||||
std::unique_ptr<CtrlScript> ctrl_script_;
|
||||
std::unique_ptr<CtrlScript> command_script_;
|
||||
};
|
||||
|
||||
} // namespace streamreader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue