[Webkit-unassigned] [Bug 132671] [GStreamer] A video element isn't drawn onto the canvas.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 1 07:03:27 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=132671
--- Comment #26 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 249918
--> https://bugs.webkit.org/attachment.cgi?id=249918
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=249918&action=review
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:83
> +#if USE(CAIRO)
> +#include <cairo-gl.h>
> +#endif
We can compile with cairo, but without cairo gl. We should expose those to the build somehow, or use ENABLE(ACCELERATED_2D_CANVAS) && USE(CAIRO)
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:579
> +PassNativeImagePtr MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime()
> +{
> +#if !USE(GSTREAMER_GL)
> + return nullptr;
> +#endif
This function is called inside a #if USE(GSTREAMER_GL) block, right? I think we could just defined it only in such case
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:595
> + if (!GST_IS_SAMPLE(m_sample.get()))
> + return nullptr;
> +
> + GstCaps* caps = gst_sample_get_caps(m_sample.get());
> + if (!caps)
> + return nullptr;
> +
> + GstVideoInfo videoInfo;
> + gst_video_info_init(&videoInfo);
> + if (!gst_video_info_from_caps(&videoInfo, caps))
> + return nullptr;
It seems to me this code is duplicated in several places already, maybe we could move it to a helper function, something like bool getSampleVideoInfo(GstSmaple* sample, GstVideoInfo& videoInfo);
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:602
> +#if USE(CAIRO)
Do we need previous stuff (gst_video_frame_map) when not using cairo?
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:604
> + GLContext::sharingContext()->makeContextCurrent();
> + GLContext* context = GLContext::sharingContext();
Why getting the sharing context twice? Can we get the context first and then calling context->makeContextCurrent() ?
> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:611
> + FloatSize size = FloatSize(GST_VIDEO_INFO_WIDTH(&videoInfo), GST_VIDEO_INFO_HEIGHT(&videoInfo));
Why FloatSize? cairo expects integers
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150401/d31e4d7e/attachment.html>
More information about the webkit-unassigned
mailing list