mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-12 16:46:42 +02:00
Pass io_context to stream readers
This commit is contained in:
parent
7a58526736
commit
6e138ff49f
15 changed files with 30 additions and 22 deletions
|
@ -31,7 +31,8 @@ using namespace std;
|
|||
|
||||
|
||||
|
||||
PcmStream::PcmStream(PcmListener* pcmListener, const StreamUri& uri) : active_(false), pcmListener_(pcmListener), uri_(uri), pcmReadMs_(20), state_(kIdle)
|
||||
PcmStream::PcmStream(PcmListener* pcmListener, boost::asio::io_context& ioc, const StreamUri& uri)
|
||||
: active_(false), pcmListener_(pcmListener), uri_(uri), pcmReadMs_(20), state_(kIdle), ioc_(ioc)
|
||||
{
|
||||
encoder::EncoderFactory encoderFactory;
|
||||
if (uri_.query.find("codec") == uri_.query.end())
|
||||
|
@ -169,7 +170,9 @@ json PcmStream::toJson() const
|
|||
state = "disabled";
|
||||
|
||||
json j = {
|
||||
{"uri", uri_.toJson()}, {"id", getId()}, {"status", state},
|
||||
{"uri", uri_.toJson()},
|
||||
{"id", getId()},
|
||||
{"status", state},
|
||||
};
|
||||
|
||||
if (meta_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue