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