[Webkit-unassigned] [Bug 54627] [GStreamer] URI queries support in webkitwebsrc
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 18 08:44:36 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54627
Martin Robinson <mrobinson at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #82964|review? |review+
Flag| |
--- Comment #8 from Martin Robinson <mrobinson at webkit.org> 2011-02-18 08:44:36 PST ---
(From update of attachment 82964)
View in context: https://bugs.webkit.org/attachment.cgi?id=82964&action=review
Great stuff. Philippe do you mind landing this with the corrected ChangeLog?
> WebCore/ChangeLog:11
> + No new tests. (OOPS!)
Just need to replace this with an explanation of why there are no tests.
> WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:511
> + WebKitWebSrc* src = WEBKIT_WEB_SRC(gst_pad_get_parent_element(pad));
> + gboolean success;
> +
> + switch (GST_QUERY_TYPE(query)) {
> + case GST_QUERY_URI:
> + gst_query_set_uri(query, src->priv->uri);
> + success = TRUE;
> + break;
> + default:
> + success = FALSE;
> + break;
> + }
> +
> + if (!success)
> + success = gst_element_query(GST_ELEMENT(src->priv->appsrc), query);
> +
> + gst_object_unref(src);
> + return success;
This looks fine, but adding a GRefPtr specialization for GstObjects would make it even cleaner:
{
GRefPtr<GstObject*> src = adoptGRef(WEBKIT_WEB_SRC(gst_pad_get_parent_element(pad)));
if (GST_QUERY_TYPE(query) == GST_QUERY_URI) {
gst_query_set_uri(query, src->priv->uri)
return TRUE;
}
return gst_element_query(GST_ELEMENT(src->priv->appsrc), query);
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list