[Bug 739992] h264parse: expose compatible profiles to downstream
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Dec 1 03:31:30 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=739992
GStreamer | gst-plugins-bad | git
--- Comment #24 from sreerenj <bsreerenj at gmail.com> 2014-12-01 11:31:26 UTC ---
(In reply to comment #23)
> Review of attachment 291871 [details]:
>
> ::: 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 :)
k,,
>
> @@ +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.
peer_caps will be the subset of filter_caps..
eg: vaapidecode returns mulitple codes and profiles in a single caps, and we
only need the h264 details here. so doing an intersect to get the preferred
caps which will extract the caps having name video/x-h264.
>
> @@ +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?
no, we can't !
the caps might have other properties set by the update_src_caps(). we should
change profile field 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