mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 04:45:36 +00:00
mi-info: start handling missing plugin messages
We only print them to the debug log for now.
This commit is contained in:
parent
09600c8fb2
commit
e1464c2a6e
1 changed files with 11 additions and 0 deletions
|
@ -289,6 +289,8 @@ public class MediaInfo.Info : Box
|
|||
//bus.set_sync_handler ((Gst.BusSyncHandler)bus.sync_signal_handler);
|
||||
bus.enable_sync_message_emission();
|
||||
bus.sync_message["element"].connect (on_element_sync_message);
|
||||
bus.add_signal_watch();
|
||||
bus.message["elemnt"].connect (on_element_message);
|
||||
}
|
||||
|
||||
~Info () {
|
||||
|
@ -322,6 +324,7 @@ public class MediaInfo.Info : Box
|
|||
try {
|
||||
process_new_uri (dc.discover_uri (uri));
|
||||
} catch (Error e) {
|
||||
// we're failing here when there are missing container plugins
|
||||
debug ("Failed to extract metadata from %s: %s: %s", uri, e.domain.to_string (), e.message);
|
||||
}
|
||||
} else {
|
||||
|
@ -515,6 +518,14 @@ public class MediaInfo.Info : Box
|
|||
}
|
||||
}
|
||||
|
||||
private void on_element_message (Gst.Bus bus, Message message) {
|
||||
if (PbUtils.is_missing_plugin_message (message)) {
|
||||
string details = PbUtils.missing_plugin_message_get_description(message);
|
||||
debug ("Missing plugin: %s", details);
|
||||
// TODO(ensonic): use this in addition to e.. container/codec names
|
||||
}
|
||||
}
|
||||
|
||||
private void on_video_stream_switched (Notebook nb, Widget page, uint page_num) {
|
||||
if (pb.current_state > State.PAUSED) {
|
||||
debug ("Switching video to: %u", page_num);
|
||||
|
|
Loading…
Reference in a new issue