clang-format
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
#include "encoder_settings.h"
|
||||
#include "configuration.h"
|
||||
#include "video_encoder.h"
|
||||
#include "vk/vk_helpers.h"
|
||||
#include "configuration.h"
|
||||
|
||||
#include <string>
|
||||
#include <vulkan/vulkan.h>
|
||||
@@ -90,7 +90,7 @@ std::vector<encoder_settings> xrt::drivers::wivrn::get_encoder_settings(vk_bundl
|
||||
return get_encoder_default_settings(vk, width, height);
|
||||
std::vector<xrt::drivers::wivrn::encoder_settings> res;
|
||||
int next_group = 0;
|
||||
for (const auto& encoder: config.encoders)
|
||||
for (const auto & encoder: config.encoders)
|
||||
{
|
||||
xrt::drivers::wivrn::encoder_settings settings{};
|
||||
settings.encoder_name = encoder.name;
|
||||
|
||||
@@ -126,8 +126,7 @@ VideoEncoderVA::VideoEncoderVA(vk_bundle * vk, const encoder_settings & settings
|
||||
int err = av_hwdevice_ctx_create(&tmp, AV_HWDEVICE_TYPE_VAAPI, device ? device->c_str() : NULL, NULL, 0);
|
||||
if (err < 0)
|
||||
{
|
||||
throw std::system_error(err, av_error_category(), "Failed create VAAPI device" +
|
||||
(device ? (" " + device->string()) : std::string()));
|
||||
throw std::system_error(err, av_error_category(), "Failed create VAAPI device" + (device ? (" " + device->string()) : std::string()));
|
||||
}
|
||||
hw_ctx_vaapi.reset(tmp);
|
||||
|
||||
|
||||
@@ -192,7 +192,9 @@ void VideoEncoder::PushShard(std::vector<uint8_t> && payload, uint8_t flags)
|
||||
if (not shards.empty())
|
||||
{
|
||||
cnx->send_stream(shards.back());
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
cnx->dump_time("send_start", frame_idx, os_monotonic_get_ns(), stream_idx);
|
||||
}
|
||||
to_headset::video_stream_data_shard shard;
|
||||
|
||||
@@ -46,7 +46,8 @@ xrt_system_devices * xrt::drivers::wivrn::wivrn_session::create_session(xrt::dri
|
||||
try
|
||||
{
|
||||
self = std::shared_ptr<wivrn_session>(new wivrn_session(std::move(tcp), address.sin6_addr));
|
||||
while (not (control = self->connection.poll_control(-1))) {}
|
||||
while (not(control = self->connection.poll_control(-1)))
|
||||
{}
|
||||
}
|
||||
catch (std::exception & e)
|
||||
{
|
||||
@@ -131,7 +132,6 @@ void wivrn_session::operator()(from_headset::timesync_response && timesync)
|
||||
|
||||
void wivrn_session::operator()(from_headset::feedback && feedback)
|
||||
{
|
||||
|
||||
clock_offset o;
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
@@ -207,7 +207,7 @@ std::array<to_headset::video_stream_description::foveation_parameter, 2> wivrn_s
|
||||
return hmd->get_foveation_parameters();
|
||||
}
|
||||
|
||||
void wivrn_session::dump_time(const std::string &event, uint64_t frame, uint64_t time, uint8_t stream)
|
||||
void wivrn_session::dump_time(const std::string & event, uint64_t frame, uint64_t time, uint8_t stream)
|
||||
{
|
||||
if (feedback_csv)
|
||||
{
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
std::array<to_headset::video_stream_description::foveation_parameter, 2> get_foveation_parameters();
|
||||
|
||||
void dump_time(const std::string& event, uint64_t frame, uint64_t time, uint8_t stream = -1);
|
||||
void dump_time(const std::string & event, uint64_t frame, uint64_t time, uint8_t stream = -1);
|
||||
|
||||
private:
|
||||
static void run(std::weak_ptr<wivrn_session>);
|
||||
|
||||
Reference in New Issue
Block a user