mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-28 08:26:16 +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
|
@ -5,13 +5,14 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
|
||||
typedef std::shared_ptr<PcmStream> PcmStreamPtr;
|
||||
|
||||
class StreamManager
|
||||
{
|
||||
public:
|
||||
StreamManager(PcmListener* pcmListener, const std::string& defaultSampleFormat, const std::string& defaultCodec, size_t defaultReadBufferMs = 20);
|
||||
StreamManager(PcmListener* pcmListener, boost::asio::io_context& ioc, const std::string& defaultSampleFormat, const std::string& defaultCodec, size_t defaultReadBufferMs = 20);
|
||||
|
||||
PcmStreamPtr addStream(const std::string& uri);
|
||||
void removeStream(const std::string& name);
|
||||
|
@ -28,6 +29,7 @@ private:
|
|||
std::string sampleFormat_;
|
||||
std::string codec_;
|
||||
size_t readBufferMs_;
|
||||
boost::asio::io_context& ioc_;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue