mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 08:06:41 +02:00
Add null encoder for use with meta streams
This commit is contained in:
parent
7c1c257501
commit
876f424bae
12 changed files with 137 additions and 22 deletions
|
@ -153,7 +153,12 @@ const PcmStreamPtr StreamManager::getDefaultStream()
|
|||
if (streams_.empty())
|
||||
return nullptr;
|
||||
|
||||
return streams_.front();
|
||||
for (const auto stream: streams_)
|
||||
{
|
||||
if (stream->getCodec() != "null")
|
||||
return stream;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -198,7 +203,8 @@ json StreamManager::toJson() const
|
|||
{
|
||||
json result = json::array();
|
||||
for (auto stream : streams_)
|
||||
result.push_back(stream->toJson());
|
||||
if (stream->getCodec() != "null")
|
||||
result.push_back(stream->toJson());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue