[Bug 739992] h264parse: expose compatible profiles to downstream
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Dec 1 02:21:17 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=739992
GStreamer | gst-plugins-bad | git
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #291871|none |needs-work
status| |
--- Comment #23 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-12-01 10:21:14 UTC ---
Review of attachment 291871:
--> (https://bugzilla.gnome.org/review?bug=739992&attachment=291871)
::: gst/videoparsers/gsth264parse.c
@@ +1274,3 @@
+
+ if (compat_caps_str)
+ caps = gst_caps_from_string (compat_caps_str);
Instead of string magic I would just set a static const NULL-terminated array
of string profiles in each of the cases... and then here create empty
"video/x-h264" caps that are then filled by using the gst_value_array*() API.
Let's not do more string programming than necessary :)
@@ +1286,3 @@
+ GstCaps *filter_caps, *peer_caps, *pref_caps, *compat_caps;
+
+ filter_caps = gst_caps_from_string ("video/x-h264");
gst_caps_new_empty_simple()
@@ +1293,3 @@
+ GstStructure *structure;
+
+ pref_caps = gst_caps_intersect (peer_caps, filter_caps);
Maybe check for empty caps here already? Note that you could also just put the
compat profiles into the filter_caps directly
Also the peer_caps must already be intersected with filter_caps here as you
used the same filter to get the peer caps.
@@ +1300,3 @@
+
+ res_caps = gst_caps_intersect (pref_caps, compat_caps);
+ if (res_caps) {
res_caps can be empty here, but not NULL
@@ +1308,3 @@
+ if (profile_str) {
+ gst_caps_set_simple (caps, "profile", G_TYPE_STRING, profile_str,
+ NULL);
Why not just caps = res_caps here?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list