mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-21 09:31:33 -08:00
Update encoder configuration printing
This commit is contained in:
1 parent
e4acf2401e
commit
cb7e6dabfc
1 file changed
+10
-11
@@ -87,24 +87,23 @@ static void split_bitrate(std::vector<wivrn::encoder_settings> & encoders, uint6
|
||||
void print_encoders(const std::vector<wivrn::encoder_settings> & encoders)
|
||||
{
|
||||
int group = -1;
|
||||
std::stringstream str;
|
||||
str << "Encoder configuration:";
|
||||
for (auto & encoder: encoders)
|
||||
{
|
||||
if (encoder.group != group)
|
||||
{
|
||||
group = encoder.group;
|
||||
U_LOG_I("Group %d", group);
|
||||
str << "\n\t* Group " << group << ":";
|
||||
}
|
||||
|
||||
std::string codec(magic_enum::enum_name(encoder.codec));
|
||||
U_LOG_I("\t%s (%s %d-bit)", encoder.encoder_name.c_str(), codec.c_str(), encoder.bit_depth);
|
||||
U_LOG_I("\tchannels: %s", std::string(magic_enum::enum_name(encoder.channels)).c_str());
|
||||
U_LOG_I("\tsize:%" PRIu16 "x%" PRIu16 " offset:%" PRIu16 "x%" PRIu16,
|
||||
encoder.width,
|
||||
encoder.height,
|
||||
encoder.offset_x,
|
||||
encoder.offset_y);
|
||||
U_LOG_I("\tbitrate: %" PRIu64 "Mbit/s", encoder.bitrate / 1'000'000);
|
||||
else
|
||||
str << "\n";
|
||||
str << "\n\t\t" << encoder.encoder_name << " (" << magic_enum::enum_name(encoder.codec) << " " << encoder.bit_depth << "-bit)"
|
||||
<< "\n\t\tchannels: " << magic_enum::enum_name(encoder.channels)
|
||||
<< "\n\t\tsize: " << encoder.width << "x" << encoder.height << " offset: " << encoder.offset_x << "x" << encoder.offset_y
|
||||
<< "\n\t\tbitrate: " << encoder.bitrate / 1'000'000 << "Mbit/s";
|
||||
}
|
||||
U_LOG_I("%s", str.str().c_str());
|
||||
}
|
||||
|
||||
static void check_scale(std::string_view encoder_name, video_codec codec, uint16_t width, uint16_t height, std::array<double, 2> & scale)
|
||||
|
||||
Reference in new issue
Block a user