[Webkit-unassigned] [Bug 30308] [GStreamer] Add direct support for ARGB videos

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 13 00:36:20 PDT 2009


--- Comment #4 from Sebastian Dröge <slomo at circular-chaos.org>  2009-10-13 00:36:20 PDT ---
Ok, small update after looking into it a bit more:

The problem is, that we have to change the buffer content in the ARGB case.
There are two possible solutions for this:

a) do it in GstBaseSink::render(), the timeout callback, or in
MediaPlayerPrivate::paint(). Because GstBaseSink::render() doesn't have
reference/write-ownership of the buffer content (because of a GStreamer API bug
IMHO), everything else after it doesn't have this either. This means, that in
the ARGB case there always needs to be a malloc/memcpy of the buffer content
which is not nice.
In the normal RGB case this is no problem because we only need to get an
additional reference to the buffer and we only need to read from it.

b) Invent a new "webkitvideotransform" element, that would be plugged into the
GStreamer pipeline before the video sink, which then does the conversion. This
wouldn't have the problem from a) but has a new problem. First of all, the
output caps of this element can't be video/x-raw-rgb anymore because in the
ARGB case it's simply something different... this would mean that we need
video/x-raw-rgb-webkit or something like that. On this the
gst_video_format_parse_caps_*() functions don't work anymore and everything
becomes a bit inconvenient.
This solution introduces a lot more complexity just for ARGB.

Which one do you prefer? :) I prefer a), we need to touch every bit of the
video buffer anyway in the ARGB case and the additional malloc doesn't hurt
that much I guess.

Oh and one sidenote: ARGB is *not* supported by any video codec I know. Only
things like MNG, animated GIFs, "motion" PNG support it. But Dirac for example
supports AYUV, which would be converted to ARGB by GStreamer. So I think it
makes sense to support ARGB, even if it's a bit annoying :)

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