summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2013-09-30 15:39:54 +0200
committerStefan Sauer <ensonic@users.sf.net>2013-09-30 18:20:23 +0200
commit185b4bc3357383f9b4f7136a5ccfd34c420dc9d4 (patch)
treeb89701388797e17fea39d92235e42ad695ef8f31
parent287f6f774034b23a169c8c84e46a82a750231ef0 (diff)
mi-info: filter buffer entries from caps
Filter buffer entries from caps before showing them as string.
-rw-r--r--mediainfo/src/mi-info.vala12
1 files changed, 11 insertions, 1 deletions
diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala
index 8f6c82d..2b9374f 100644
--- a/mediainfo/src/mi-info.vala
+++ b/mediainfo/src/mi-info.vala
@@ -730,7 +730,17 @@ public class MediaInfo.Info : Box
AttachOptions fill = AttachOptions.FILL;
AttachOptions fill_exp = AttachOptions.EXPAND|AttachOptions.FILL;
- string str = caps.to_string( );
+ // filter buffer entries from caps
+ // TODO(ensonic): add filtering api to gstreamer
+ Structure structure = caps.get_structure (0).copy();
+ while (structure.foreach ( (id, val) => {
+ if (val.holds(typeof (Gst.Buffer))) {
+ structure.remove_field (id.to_string ());
+ return false;
+ }
+ return true;
+ }) == false) {}
+ string str = structure.to_string( );
Label label = new Label (str);
label.set_ellipsize (Pango.EllipsizeMode.END);
label.set_alignment (0.0f, 0.5f);