client: remove some buffer copies

This commit is contained in:
Patrick Nicolas
2022-11-26 23:03:15 +01:00
parent fdc7d80aa8
commit 841e68ee28
5 changed files with 49 additions and 56 deletions
+3 -2
View File
@@ -183,9 +183,10 @@ void decoder::blit(VkCommandBuffer command_buffer, blit_handle & handle, std::sp
}
}
void decoder::push_data(std::span<uint8_t> data, uint64_t frame_index, bool partial)
void decoder::push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial)
{
packet.insert(packet.end(), data.begin(), data.end());
for (const auto& d: data)
packet.insert(packet.end(), d.begin(), d.end());
this->frame_index = frame_index;
}
+1 -1
View File
@@ -92,7 +92,7 @@ public:
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
void push_data(std::span<uint8_t> data, uint64_t frame_index, bool partial);
void push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial);
void frame_completed(const xrt::drivers::wivrn::from_headset::feedback &, const xrt::drivers::wivrn::to_headset::video_stream_data_shard::view_info_t & view_info);