Add null encoder for use with meta streams

This commit is contained in:
badaix 2020-09-27 12:55:32 +02:00
parent 7c1c257501
commit 876f424bae
12 changed files with 137 additions and 22 deletions

View file

@ -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;
}