Print encoder details on start
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "video_encoder.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <magic_enum.hpp>
|
||||
#include <string>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
@@ -67,6 +68,27 @@ static void split_bitrate(std::vector<xrt::drivers::wivrn::encoder_settings> & e
|
||||
}
|
||||
}
|
||||
|
||||
void print_encoders(const std::vector<xrt::drivers::wivrn::encoder_settings> & encoders)
|
||||
{
|
||||
int group = -1;
|
||||
for (auto & encoder: encoders)
|
||||
{
|
||||
if (encoder.group != group)
|
||||
{
|
||||
group = encoder.group;
|
||||
U_LOG_I("Group %d", group);
|
||||
}
|
||||
std::string codec(magic_enum::enum_name(encoder.codec));
|
||||
U_LOG_I("\t%s (%s)", encoder.encoder_name.c_str(), codec.c_str());
|
||||
U_LOG_I("\tsize:%dx%d offset:%dx%d",
|
||||
encoder.width,
|
||||
encoder.height,
|
||||
encoder.offset_x,
|
||||
encoder.offset_y);
|
||||
U_LOG_I("\tbitrate: %ldMbit/s", encoder.bitrate / 1'000'000);
|
||||
}
|
||||
}
|
||||
|
||||
static std::vector<xrt::drivers::wivrn::encoder_settings> get_encoder_default_settings(vk::PhysicalDevice physical_device, uint16_t width, uint16_t height, uint64_t bitrate)
|
||||
{
|
||||
xrt::drivers::wivrn::encoder_settings settings{};
|
||||
|
||||
Reference in New Issue
Block a user