Drop "video" thread

Process all incoming packets in "network" thread.
This commit is contained in:
Patrick Nicolas
2024-05-20 16:47:52 +02:00
parent 0ce74f5e80
commit 061101f738
3 changed files with 12 additions and 50 deletions
+8 -1
View File
@@ -44,7 +44,14 @@ void scenes::stream::process_packets()
void scenes::stream::operator()(to_headset::video_stream_data_shard && shard)
{
shard_queue.push(std::move(shard));
std::shared_lock lock(decoder_mutex);
if (shard.stream_item_idx >= decoders.size())
{
// We don't know (yet?) about this stream, ignore packet
return;
}
auto idx = shard.stream_item_idx;
decoders[idx].decoder->push_shard(std::move(shard));
}
void scenes::stream::operator()(to_headset::audio_stream_description && desc)