mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-25 12:28:56 +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())
|
||||
continue;
|
||||
|
||||
if (stream.getName() == component)
|
||||
if (component == WILDCARD || stream.getName() == component)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -99,6 +99,8 @@ void MetaStream::updateActiveStream()
|
|||
return true;
|
||||
if (component == second->getName())
|
||||
return false;
|
||||
if (component == WILDCARD)
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
|
|
@ -40,6 +40,9 @@ namespace streamreader
|
|||
*/
|
||||
class MetaStream : public PcmStream, public PcmStream::Listener
|
||||
{
|
||||
public:
|
||||
static inline const std::string WILDCARD = "*";
|
||||
|
||||
public:
|
||||
/// 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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue