Bug 39206 - [GStreamer] video painting support on mac port
Summary: [GStreamer] video painting support on mac port
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 39202
  Show dependency treegraph
 
Reported: 2010-05-17 01:36 PDT by Philippe Normand
Modified: 2010-05-21 06:20 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch (4.19 KB, patch)
2010-05-17 01:41 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
proposed patch (4.20 KB, patch)
2010-05-17 02:27 PDT, Philippe Normand
eric.carlson: review+
eric.carlson: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2010-05-17 01:36:27 PDT
an ImageGStreamerMac implementation is needed. It would take a GstBuffer as input and create a CG Image object with the buffer data.
Comment 1 Philippe Normand 2010-05-17 01:41:43 PDT
Created attachment 56224 [details]
proposed patch
Comment 2 WebKit Review Bot 2010-05-17 01:43:06 PDT
Attachment 56224 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/platform/graphics/gstreamer/ImageGStreamer.h:58:  Tab found; better to use spaces  [whitespace/tab] [1]
Total errors found: 1 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Philippe Normand 2010-05-17 02:27:05 PDT
Created attachment 56227 [details]
proposed patch
Comment 4 Eric Carlson 2010-05-20 09:45:21 PDT
Comment on attachment 56227 [details]
proposed patch

> + *
> + * You should have received a copy of the GNU Library General Public License
> + * aint with this library; see the file COPYING.LIB.  If not, write to
>
This typo is back, "aint" should be "along" (see https://bugs.webkit.org/show_bug.cgi?id=36442).

> +    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
> +    CGImageRef frameImage = CGImageCreate(size.width(), size.height(), 8, 32, size.width()*4, colorSpace,
> +        kCGBitmapByteOrder32Little | kCGImageAlphaFirst, provider.get(), 0, false, kCGRenderingIntentDefault);
> +    m_image = BitmapImage::create(frameImage);
> +}
> 
You are leaking the CGColorSpaceRef. Since your frames are always in the same color space, you could use a static.

r=me with these changes
Comment 5 Eric Carlson 2010-05-20 09:49:19 PDT
Actually, one more thing - I don't think "ImageGStreamerMac.mm" is the best name for this file because it is really about using CoreGraphics images. The alternate version is "ImageGStreamerCairo", so how about "ImageGStreamerCG" instead?
Comment 6 Philippe Normand 2010-05-20 09:55:29 PDT
(In reply to comment #5)
> Actually, one more thing - I don't think "ImageGStreamerMac.mm" is the best name for this file because it is really about using CoreGraphics images. The alternate version is "ImageGStreamerCairo", so how about "ImageGStreamerCG" instead?

Ok I will rename and apply the changes you suggested.
Thanks!
Comment 7 Philippe Normand 2010-05-21 06:20:40 PDT
Landed in http://trac.webkit.org/changeset/59929
Thanks!