.
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 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 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);
Committed r206866: <http://trac.webkit.org/changeset/206866>
(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: