mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-17 05:09:58 +01:00
Improved report of Media Player error
This commit is contained in:
@@ -642,10 +642,16 @@ void ImGuiVisitor::visit (MediaSource& s)
|
||||
info.reset();
|
||||
|
||||
ImGui::SetCursorPos(top);
|
||||
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_FOLDER_OPEN, "Show in finder"))
|
||||
SystemToolkit::open(SystemToolkit::path_filename(s.path()));
|
||||
|
||||
if ( info.str().size() > 150 ) {
|
||||
top.y += 2.f * ImGui::GetFrameHeight();
|
||||
ImGui::SetCursorPos(top);
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_COPY, "Copy"))
|
||||
ImGui::SetClipboardText(info.str().c_str());
|
||||
}
|
||||
|
||||
ImGui::SetCursorPos(botom);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,22 +136,22 @@ MediaInfo MediaPlayer::UriDiscoverer(const std::string &uri)
|
||||
GstDiscovererResult result = gst_discoverer_info_get_result (info);
|
||||
switch (result) {
|
||||
case GST_DISCOVERER_URI_INVALID:
|
||||
video_stream_info.log = "Invalid URI";
|
||||
video_stream_info.log = "\nInvalid URI";
|
||||
break;
|
||||
case GST_DISCOVERER_ERROR:
|
||||
video_stream_info.log = err->message;
|
||||
video_stream_info.log = std::string( "\nError; " ) + err->message;
|
||||
break;
|
||||
case GST_DISCOVERER_TIMEOUT:
|
||||
video_stream_info.log = "Timeout loading";
|
||||
video_stream_info.log = "\nTimeout loading";
|
||||
break;
|
||||
case GST_DISCOVERER_BUSY:
|
||||
video_stream_info.log = "Busy";
|
||||
video_stream_info.log = "\nBusy";
|
||||
break;
|
||||
case GST_DISCOVERER_MISSING_PLUGINS:
|
||||
{
|
||||
const GstStructure *s = gst_discoverer_info_get_misc (info);
|
||||
gchar *str = gst_structure_to_string (s);
|
||||
video_stream_info.log = "Unknown format " + std::string(str);
|
||||
video_stream_info.log = std::string( "\nUnknown format; " ) + std::string(str);
|
||||
g_free (str);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user