mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
mi-info: filter buffer entries from caps
Filter buffer entries from caps before showing them as string.
This commit is contained in:
parent
287f6f7740
commit
185b4bc335
1 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue