<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>204669</bug_id>
          
          <creation_ts>2019-11-28 02:03:29 -0800</creation_ts>
          <short_desc>[GStreamer] Simplify GL display/context ref handling</short_desc>
          <delta_ts>2021-04-14 09:23:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>204624</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe Normand">pnormand</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annulen</cc>
    
    <cc>calvaris</cc>
    
    <cc>cgarcia</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>glenn</cc>
    
    <cc>gustavo</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jbedard</cc>
    
    <cc>jer.noble</cc>
    
    <cc>menard</cc>
    
    <cc>philipj</cc>
    
    <cc>ryuan.choi</cc>
    
    <cc>sergio</cc>
    
    <cc>vjaquez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1593979</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-11-28 02:03:29 -0800</bug_when>
    <thetext>+++ This bug was initially created as a clone of Bug #204624 +++


&gt; Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:151
&gt; +    // The floating ref removal support was added in https://bugzilla.gnome.org/show_bug.cgi?id=743062.
&gt; +    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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1593981</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-11-28 02:04:10 -0800</bug_when>
    <thetext>
&gt; Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:252
&gt; +#if GST_CHECK_VERSION(1, 12, 0)
&gt; +        gst_structure_set(structure, &quot;context&quot;, GST_TYPE_GL_CONTEXT, priv-&gt;glContext.get(), nullptr);
&gt; +#else
&gt; +        gst_structure_set(structure, &quot;context&quot;, GST_GL_TYPE_CONTEXT, priv-&gt;glContext.get(), nullptr);
&gt; +#endif


Follow up or not, I think we could #define this above and have just one line here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1750156</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-04-14 09:23:25 -0700</bug_when>
    <thetext>Since we now require at least gst 1.14 this is no longer a concern.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>