mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
BugFix Detect and display hardware decoder name
This commit is contained in:
@@ -701,7 +701,7 @@ void ImGuiVisitor::visit (MediaSource& s)
|
|||||||
top = _top;
|
top = _top;
|
||||||
top.y += ImGui::GetFrameHeight();
|
top.y += ImGui::GetFrameHeight();
|
||||||
ImGui::SetCursorPos(top);
|
ImGui::SetCursorPos(top);
|
||||||
decoder = "Using hardware decoder\n" + decoder;
|
decoder = "Hardware decoder\n" + decoder;
|
||||||
ImGuiToolkit::Indication(decoder.c_str(), ICON_FA_MICROCHIP);
|
ImGuiToolkit::Indication(decoder.c_str(), ICON_FA_MICROCHIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -585,19 +585,14 @@ bool MediaPlayer::isImage() const
|
|||||||
|
|
||||||
std::string MediaPlayer::decoderName()
|
std::string MediaPlayer::decoderName()
|
||||||
{
|
{
|
||||||
if (pipeline_) {
|
if (decoder_name_.empty()) {
|
||||||
if (force_software_decoding_) {
|
|
||||||
decoder_name_ = "software";
|
|
||||||
}
|
|
||||||
// decoder_name_ not initialized
|
|
||||||
else if (decoder_name_.empty()) {
|
|
||||||
// try to know if it is a hardware decoder
|
// try to know if it is a hardware decoder
|
||||||
|
if (pipeline_)
|
||||||
decoder_name_ = GstToolkit::used_gpu_decoding_plugins(pipeline_);
|
decoder_name_ = GstToolkit::used_gpu_decoding_plugins(pipeline_);
|
||||||
// nope, then it is a sofware decoder
|
// nope, then it is a sofware decoder
|
||||||
if (decoder_name_.empty())
|
if (decoder_name_.empty())
|
||||||
decoder_name_ = "software";
|
decoder_name_ = "software";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return decoder_name_;
|
return decoder_name_;
|
||||||
}
|
}
|
||||||
@@ -876,7 +871,8 @@ void MediaPlayer::init_texture(guint index)
|
|||||||
pbo_index_ = 0;
|
pbo_index_ = 0;
|
||||||
pbo_next_index_ = 1;
|
pbo_next_index_ = 1;
|
||||||
|
|
||||||
// initialize decoderName once
|
// initialize decoderName once (forced update)
|
||||||
|
decoder_name_ = "";
|
||||||
Log::Info("MediaPlayer %s Uses %s decoding and OpenGL PBO texturing.", std::to_string(id_).c_str(), decoderName().c_str());
|
Log::Info("MediaPlayer %s Uses %s decoding and OpenGL PBO texturing.", std::to_string(id_).c_str(), decoderName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user