RESOLVED FIXED204669
[GStreamer] Simplify GL display/context ref handling
https://bugs.webkit.org/show_bug.cgi?id=204669
Summary [GStreamer] Simplify GL display/context ref handling
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.