Bug 204669
| Summary: | [GStreamer] Simplify GL display/context ref handling | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Philippe Normand <pnormand> |
| Component: | Platform | Assignee: | 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
+++ 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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Philippe Normand
> 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
Since we now require at least gst 1.14 this is no longer a concern.