Bug 162972 - [GStreamer][OWR] GL rendering support
Summary: [GStreamer][OWR] GL rendering support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-05 08:56 PDT by Philippe Normand
Modified: 2016-10-07 06:18 PDT (History)
6 users (show)

See Also:


Attachments
[OpenWebRTC][GStreamerGL] Fix video rendering (8.92 KB, patch)
2016-10-05 09:06 PDT, Philippe Normand
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2016-10-05 08:56:34 PDT
.
Comment 1 Philippe Normand 2016-10-05 09:06:57 PDT
Created attachment 290711 [details]
[OpenWebRTC][GStreamerGL] Fix video rendering

When GStreamer-GL is enabled the GL context needs to be properly passed
to the GStreamer pipeline running within the OpenWebRTC video renderer.
This is now supported using a new OpenWebRTC API that allows the
renderer to request the context from the application using a callback
registered within the renderer.
Comment 2 Zan Dobersek 2016-10-06 01:57:21 PDT
Comment on attachment 290711 [details]
[OpenWebRTC][GStreamerGL] Fix video rendering

View in context: https://bugs.webkit.org/attachment.cgi?id=290711&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:227
> +    GstContext* context = requestGLContext(contextType, this);

Immediate adopt should be done here.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:361
> +    owr_video_renderer_set_request_context_callback(OWR_VIDEO_RENDERER(m_videoRenderer.get()), (OwrVideoRendererRequestContextCallback) MediaPlayerPrivateGStreamerBase::requestGLContext, this, nullptr);

This should use a static_cast<>.
Comment 3 Philippe Normand 2016-10-06 09:33:24 PDT
Comment on attachment 290711 [details]
[OpenWebRTC][GStreamerGL] Fix video rendering

View in context: https://bugs.webkit.org/attachment.cgi?id=290711&action=review

>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:361
>> +    owr_video_renderer_set_request_context_callback(OWR_VIDEO_RENDERER(m_videoRenderer.get()), (OwrVideoRendererRequestContextCallback) MediaPlayerPrivateGStreamerBase::requestGLContext, this, nullptr);
> 
> This should use a static_cast<>.

Doesn't build:

MediaPlayerPrivateGStreamerOwr.cpp:361:196: error: invalid static_cast from type ‘GstContext*(const gchar*, WebCore::MediaPlayerPrivateGStreamerBase*) {aka _GstContext*(const char*, WebCore::MediaPlayerPrivateGStreamerBase*)}’ to type ‘OwrVideoRendererRequestContextCallback {aka _GstContext* (*)(const char*, void*)}’
     owr_video_renderer_set_request_context_callback(OWR_VIDEO_RENDERER(m_videoRenderer.get()), static_cast<OwrVideoRendererRequestContextCallback>(MediaPlayerPrivateGStreamerBase::requestGLContext), this, nullptr);
Comment 4 Philippe Normand 2016-10-06 09:41:43 PDT
Committed r206866: <http://trac.webkit.org/changeset/206866>
Comment 5 Zan Dobersek 2016-10-07 06:18:18 PDT
(In reply to comment #3)
> Comment on attachment 290711 [details]
> [OpenWebRTC][GStreamerGL] Fix video rendering
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=290711&action=review
> 
> >> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:361
> >> +    owr_video_renderer_set_request_context_callback(OWR_VIDEO_RENDERER(m_videoRenderer.get()), (OwrVideoRendererRequestContextCallback) MediaPlayerPrivateGStreamerBase::requestGLContext, this, nullptr);
> > 
> > This should use a static_cast<>.
> 
> Doesn't build:
> 
> MediaPlayerPrivateGStreamerOwr.cpp:361:196: error: invalid static_cast from
> type ‘GstContext*(const gchar*, WebCore::MediaPlayerPrivateGStreamerBase*)
> {aka _GstContext*(const char*, WebCore::MediaPlayerPrivateGStreamerBase*)}’
> to type ‘OwrVideoRendererRequestContextCallback {aka _GstContext* (*)(const
> char*, void*)}’
>     
> owr_video_renderer_set_request_context_callback(OWR_VIDEO_RENDERER(m_videoRen
> derer.get()),
> static_cast<OwrVideoRendererRequestContextCallback>(MediaPlayerPrivateGStream
> erBase::requestGLContext), this, nullptr);

:shrugemoji: