Bug 204669

Summary: [GStreamer] Simplify GL display/context ref handling
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, gyuyoung.kim, jbedard, jer.noble, menard, philipj, ryuan.choi, sergio, vjaquez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 204624    
Bug Blocks:    

Philippe Normand
Reported 2019-11-28 02:03:29 PST
+++ This bug was initially created as a clone of Bug #204624 +++ > Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:151 > + // The floating ref removal support was added in https://bugzilla.gnome.org/show_bug.cgi?id=743062. > + bool shouldAdoptRef = webkitGstCheckVersion(1, 14, 0); I think we could simplify the code by adding adoptGLRef() or something like that, similar to ensureGRef, that only accepts GstGLDisplay org GstGLContext and adopts the returned ref or not depending on the GST version.
Attachments
Philippe Normand
Comment 1 2019-11-28 02:04:10 PST
> Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:252 > +#if GST_CHECK_VERSION(1, 12, 0) > + gst_structure_set(structure, "context", GST_TYPE_GL_CONTEXT, priv->glContext.get(), nullptr); > +#else > + gst_structure_set(structure, "context", GST_GL_TYPE_CONTEXT, priv->glContext.get(), nullptr); > +#endif Follow up or not, I think we could #define this above and have just one line here.
Philippe Normand
Comment 2 2021-04-14 09:23:25 PDT
Since we now require at least gst 1.14 this is no longer a concern.
Note You need to log in before you can comment on or make changes to this bug.