[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-cvs
Subject:    gst-plugins-bad: glfilter: Don't remove size fields from caps
From:       thaytan () kemper ! freedesktop ! org (Jan Schmidt)
Date:       2015-05-29 16:44:42
Message-ID: 20150529164442.CFFBB76345 () kemper ! freedesktop ! org
[Download RAW message or body]

Module: gst-plugins-bad
Branch: master
Commit: b6002141ab0fd03542ff4a417ff6d6a7c5c12398
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=b6002141ab0fd03542ff4a417ff6d6a7c5c12398


Author: Jan Schmidt <jan@centricular.com>
Date:   Sat May 30 02:23:44 2015 +1000

glfilter: Don't remove size fields from caps

Instead of removing size fields, set them to the full range
like videoscale does, so the caps are clearly unfixed in
all cases.

---

 gst-libs/gst/gl/gstglfilter.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c
index 6df9c1b..9734107 100644
--- a/gst-libs/gst/gl/gstglfilter.c
+++ b/gst-libs/gst/gl/gstglfilter.c
@@ -601,7 +601,14 @@ gst_gl_filter_caps_remove_size (GstCaps * caps)
       continue;
 
     st = gst_structure_copy (st);
-    gst_structure_remove_fields (st, "width", "height", NULL);
+    gst_structure_set (st, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
+        "height", GST_TYPE_INT_RANGE, 1, G_MAXINT, NULL);
+
+    /* if pixel aspect ratio, make a range of it */
+    if (gst_structure_has_field (st, "pixel-aspect-ratio")) {
+      gst_structure_set (st, "pixel-aspect-ratio",
+          GST_TYPE_FRACTION_RANGE, 1, G_MAXINT, G_MAXINT, 1, NULL);
+    }
 
     gst_caps_append_structure_full (res, st, gst_caps_features_copy (f));
   }

_______________________________________________
gstreamer-commits mailing list
gstreamer-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic