mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-26 04:47:37 +02:00
Add wildcard (*) support to metastreams
This commit is contained in:
parent
b638d81b66
commit
cbdaeb3ea9
2 changed files with 6 additions and 1 deletions
|
@ -56,7 +56,7 @@ bool MetaStream::isAllowed(const PcmStream& stream) const
|
||||||
if (component.empty())
|
if (component.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (stream.getName() == component)
|
if (component == WILDCARD || stream.getName() == component)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -99,6 +99,8 @@ void MetaStream::updateActiveStream()
|
||||||
return true;
|
return true;
|
||||||
if (component == second->getName())
|
if (component == second->getName())
|
||||||
return false;
|
return false;
|
||||||
|
if (component == WILDCARD)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -40,6 +40,9 @@ namespace streamreader
|
||||||
*/
|
*/
|
||||||
class MetaStream : public PcmStream, public PcmStream::Listener
|
class MetaStream : public PcmStream, public PcmStream::Listener
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
static inline const std::string WILDCARD = "*";
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// ctor. Encoded PCM data is passed to the PcmStream::Listener
|
/// ctor. Encoded PCM data is passed to the PcmStream::Listener
|
||||||
MetaStream(PcmStream::Listener* pcmListener, const std::vector<std::shared_ptr<PcmStream>>& streams, boost::asio::io_context& ioc,
|
MetaStream(PcmStream::Listener* pcmListener, const std::vector<std::shared_ptr<PcmStream>>& streams, boost::asio::io_context& ioc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue