[Bug 741263] videodecoder: implement caps query
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Dec 15 08:29:36 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=741263
GStreamer | gst-plugins-base | unspecified
--- Comment #9 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-12-15 16:29:30 UTC ---
(In reply to comment #8)
> Review of attachment 292408 [details]:
>
> You probably want to do all the same for audio btw :)
>
> ::: gst-libs/gst/video/gstvideoutilsprivate.c
> @@ +37,3 @@
> + gint i, j;
> +
> + for (i = 0; i < gst_caps_get_size (templ_caps); i++) {
>
> Put gst_caps_get_size() out of the loop
>
> @@ +41,3 @@
> + gst_structure_get_name_id (gst_caps_get_structure (templ_caps, i));
> +
> + for (j = 0; j < gst_caps_get_size (caps); j++) {
>
> And here
>
> @@ +91,3 @@
> gst_pad_get_pad_template_caps (sinkpad);
> + if (filter) {
> + GstCaps *our_src_caps = gst_pad_query_caps (srcpad, NULL);
>
> This potentially reverses the query direction. E.g. querying the srcpad can
> cause a query on the peer of the sinkpad... while a few lines below you also
> query the peer of the srcpad. If you're unlucky this can lead to an infinite
> loop of queries.
>
> Do you mean gst_pad_get_current_caps() here? Or just use the template caps as
> below? Why do you need to intersect with the srcpad caps at all? :)
I guess I'll just default to using template caps. I added the query because I
got get_allowed_caps and modified it to use a filter. So I guess using the
get_allowed_caps a bit below is also a bad idea as it will query the source pad
caps, too.
Will update both branches. Thanks for the review.
>
> @@ +100,3 @@
> + allowed =
> + gst_caps_intersect_full (peer_caps, our_src_caps,
> + GST_CAPS_INTERSECT_FIRST);
>
> peer_query_caps() can return GST_CAPS_ANY if there is no peer and filter, so
> you need to intersect with the template caps here at least.
--
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