mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-06 07:50:00 +01:00
Improved logs and Settings for hardware gstreamer plugins
This commit is contained in:
@@ -354,16 +354,19 @@ bool Rendering::init()
|
||||
|
||||
// increase selection rank for GPU decoding plugins
|
||||
std::list<std::string> gpuplugins = GstToolkit::enable_gpu_decoding_plugins(Settings::application.render.gpu_decoding);
|
||||
if (Settings::application.render.gpu_decoding) {
|
||||
if (gpuplugins.size() > 0) {
|
||||
Log::Info("Found the following GPU decoding plugin(s):");
|
||||
int i = 1;
|
||||
for(auto it = gpuplugins.rbegin(); it != gpuplugins.rend(); it++, ++i)
|
||||
Log::Info("%d. %s", i, (*it).c_str());
|
||||
}
|
||||
else {
|
||||
Log::Info("No GPU decoding plugin found.");
|
||||
}
|
||||
if (gpuplugins.size() > 0) {
|
||||
Settings::application.render.gpu_decoding_available = true;
|
||||
Log::Info("Found the following hardware decoding gstreamer plugin(s):");
|
||||
int i = 1;
|
||||
for(auto it = gpuplugins.begin(); it != gpuplugins.end(); it++, ++i)
|
||||
Log::Info("%d. %s", i, (*it).c_str());
|
||||
if (Settings::application.render.gpu_decoding)
|
||||
Log::Info("Hardware decoding enabled.");
|
||||
else
|
||||
Log::Info("Hardware decoding disabled.");
|
||||
}
|
||||
else {
|
||||
Log::Info("No hardware decoding plugin found.");
|
||||
}
|
||||
#ifdef SYNC_GSTREAMER_OPENGL_CONTEXT
|
||||
#if GST_GL_HAVE_PLATFORM_WGL
|
||||
|
||||
@@ -163,6 +163,7 @@ struct RenderConfig
|
||||
int custom_width, custom_height;
|
||||
float fading;
|
||||
bool gpu_decoding;
|
||||
bool gpu_decoding_available;
|
||||
|
||||
RenderConfig() {
|
||||
disabled = false;
|
||||
@@ -175,6 +176,7 @@ struct RenderConfig
|
||||
custom_height = 600;
|
||||
fading = 0.0;
|
||||
gpu_decoding = true;
|
||||
gpu_decoding_available = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8329,7 +8329,10 @@ void Navigator::RenderMainPannelSettings()
|
||||
ImGuiToolkit::Indication("If enabled, tries to find a platform adapted hardware-accelerated "
|
||||
"driver to decode (read) or encode (record) videos.", ICON_FA_MICROCHIP);
|
||||
ImGui::SameLine(0);
|
||||
change |= ImGuiToolkit::ButtonSwitch( "Hardware video en/decoding", &gpu);
|
||||
if (Settings::application.render.gpu_decoding_available)
|
||||
change |= ImGuiToolkit::ButtonSwitch( "Hardware en/decoding", &gpu);
|
||||
else
|
||||
ImGui::TextDisabled("Hardware en/decoding unavailable");
|
||||
|
||||
if (change) {
|
||||
need_restart = ( vsync != (Settings::application.render.vsync > 0) ||
|
||||
|
||||
Reference in New Issue
Block a user