Only use graphics card connected to monitor if it's capable of h264 encoding
This commit is contained in:
parent
fdb7754043
commit
d852bb82a3
3 changed files with 185 additions and 8 deletions
|
|
@ -561,6 +561,19 @@ public:
|
|||
|
||||
return capture_e::ok;
|
||||
}
|
||||
|
||||
int init(const std::string &display_name, int framerate) {
|
||||
if(display_t::init(display_name, framerate)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!va::validate(card.fd.el)) {
|
||||
BOOST_LOG(warning) << "Monitor "sv << display_name << " doesn't support hardware encoding. Reverting back to GPU -> RAM -> GPU"sv;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
} // namespace kms
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue