Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logging): add additional logging messages #2295

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/platform/windows/display_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ namespace platf::dxgi {
// If we're not resyncing the thread desktop and we don't have permission to
// capture the current desktop, just bail immediately. Retrying won't help.
if (enumeration_only && status == E_ACCESSDENIED) {
BOOST_LOG(warning) << "Access denied to capture the current desktop"sv;
break;
}
else {
Expand Down Expand Up @@ -1056,21 +1057,32 @@ namespace platf::dxgi {
namespace platf {
std::shared_ptr<display_t>
display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config) {
BOOST_LOG(debug) << "Creating display: "sv << display_name;
if (hwdevice_type == mem_type_e::dxgi) {
BOOST_LOG(debug) << "Creating dxgi::display_t dxgi display";
auto disp = std::make_shared<dxgi::display_vram_t>();
BOOST_LOG(debug) << "Created dxgi::display_vram_t display";

if (!disp->init(config, display_name)) {
BOOST_LOG(debug) << "Initialized dxgi::display_vram_t display successfully";
return disp;
} else {
BOOST_LOG(error) << "Failed to initialize dxgi::display_vram_t display";
}
}
else if (hwdevice_type == mem_type_e::system) {
auto disp = std::make_shared<dxgi::display_ram_t>();
BOOST_LOG(debug) << "Created dxgi::display_ram_t system display";

if (!disp->init(config, display_name)) {
BOOST_LOG(debug) << "Initialized dxgi::display_ram_t display successfully";
return disp;
} else {
BOOST_LOG(error) << "Failed to initialize dxgi::display_ram_t display";
}
}

BOOST_LOG(error) << "Failed to create display. Returning nullptr";
return nullptr;
}

Expand Down
1 change: 1 addition & 0 deletions src/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,7 @@ namespace video {
// If the encoder isn't supported at all (not even H.264), bail early
reset_display(disp, encoder.platform_formats->dev_type, config::video.output_name, config_autoselect);
if (!disp) {
BOOST_LOG(info) << "No display found for encoder ["sv << encoder.name << "]"sv;
return false;
}
if (!disp->is_codec_supported(encoder.h264.name, config_autoselect)) {
Expand Down
Loading