Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"
This reverts commit6212dccc2b, reversing changes made to80e31b642a.
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
#include "shard_accumulator.h"
|
||||
#include "scenes/stream.h" // IWYU pragma: keep
|
||||
#include "application.h"
|
||||
#include "scenes/stream.h"
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "xr/instance.h"
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
@@ -63,10 +63,10 @@ static bool is_complete(const shard_set & shards)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::optional<uint16_t> shard_set::insert(data_shard && shard, xr::instance & instance)
|
||||
std::optional<uint16_t> shard_set::insert(data_shard && shard)
|
||||
{
|
||||
if (empty())
|
||||
feedback.received_first_packet = instance.now();
|
||||
feedback.received_first_packet = application::now();
|
||||
|
||||
auto idx = shard.shard_idx;
|
||||
if (idx >= data.size())
|
||||
@@ -121,12 +121,12 @@ void shard_accumulator::push_shard(video_stream_data_shard && shard)
|
||||
}
|
||||
else if (frame_diff == 0)
|
||||
{
|
||||
auto shard_idx = current.insert(std::move(shard), instance);
|
||||
auto shard_idx = current.insert(std::move(shard));
|
||||
try_submit_frame(shard_idx);
|
||||
}
|
||||
else if (frame_diff == 1)
|
||||
{
|
||||
next.insert(std::move(shard), instance);
|
||||
next.insert(std::move(shard));
|
||||
if (is_complete(next))
|
||||
{
|
||||
debug_why_not_sent(current);
|
||||
@@ -191,7 +191,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
|
||||
if (not frame_complete)
|
||||
return;
|
||||
|
||||
current.feedback.received_last_packet = instance.now();
|
||||
current.feedback.received_last_packet = application::now();
|
||||
current.feedback.sent_to_decoder = current.feedback.received_last_packet;
|
||||
data_shard::timing_info_t timing_info = data_shards.back()->timing_info.value_or(data_shard::timing_info_t{});
|
||||
current.feedback.encode_begin = timing_info.encode_begin;
|
||||
@@ -216,7 +216,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
|
||||
void shard_accumulator::send_feedback(wivrn::from_headset::feedback & feedback)
|
||||
{
|
||||
if (not feedback.received_last_packet)
|
||||
feedback.received_first_packet = instance.now();
|
||||
feedback.received_first_packet = application::now();
|
||||
auto scene = weak_scene.lock();
|
||||
if (scene)
|
||||
scene->send_feedback(feedback);
|
||||
|
||||
@@ -34,11 +34,6 @@ using decoder_impl = ::wivrn::ffmpeg::decoder;
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
namespace xr
|
||||
{
|
||||
class instance;
|
||||
}
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
@@ -55,7 +50,7 @@ public:
|
||||
void reset(uint64_t frame_index);
|
||||
bool empty() const;
|
||||
|
||||
std::optional<uint16_t> insert(data_shard &&, xr::instance & instance);
|
||||
std::optional<uint16_t> insert(data_shard &&);
|
||||
|
||||
wivrn::from_headset::feedback feedback{};
|
||||
|
||||
@@ -75,13 +70,11 @@ private:
|
||||
shard_set current;
|
||||
shard_set next;
|
||||
std::weak_ptr<scenes::stream> weak_scene;
|
||||
xr::instance & instance;
|
||||
|
||||
public:
|
||||
explicit shard_accumulator(
|
||||
vk::raii::Device & device,
|
||||
vk::raii::PhysicalDevice & physical_device,
|
||||
xr::instance & instance,
|
||||
const wivrn::to_headset::video_stream_description::item & description,
|
||||
float fps,
|
||||
std::weak_ptr<scenes::stream> scene,
|
||||
@@ -89,8 +82,7 @@ public:
|
||||
decoder(std::make_shared<decoder_impl>(device, physical_device, description, fps, stream_index, scene, this)),
|
||||
current(stream_index),
|
||||
next(stream_index),
|
||||
weak_scene(scene),
|
||||
instance(instance)
|
||||
weak_scene(scene)
|
||||
{
|
||||
next.reset(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user