diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2013-10-21 09:08:18 +0200 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2013-10-21 09:08:18 +0200 |
commit | e1464c2a6e2e0217bd334f57b0d82ec6a04a78ce (patch) | |
tree | f320d7b123acd36bd1309f8a0d6b8568554e313f | |
parent | 09600c8fb20a90f8c959284cd1515095d61e0375 (diff) |
mi-info: start handling missing plugin messages
We only print them to the debug log for now.
-rw-r--r-- | mediainfo/src/mi-info.vala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala index 74ec668..0a9207d 100644 --- a/mediainfo/src/mi-info.vala +++ b/mediainfo/src/mi-info.vala @@ -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); |