[webkit-gtk] Video tag cant display rightly with 'createVideoSinkGL' sink on 2.20.2 package?

Philippe Normand philn at igalia.com
Mon Jun 4 03:51:07 PDT 2018


When replying please keep the mailing list in CC to To: fields...

> On 4 Jun 2018, at 10:04, tugouxp <13824125580 at 163.com> wrote:
> 
> hi folks :
> 
>  My project is  based on yoccto 2.5 project, with the  kernel version is  4.9 and webkit is 2.20.2.
> 
> a part of my bb file is as follows, so you can see , the display window show normal only if the opengl and gst_gl must be deleted.
> 53 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l53>
> 54 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l54> #PACKAGECONFIG ??= "wayland opengl gles2 webcrypto gst_gl"
> 55 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l55> PACKAGECONFIG ??= "wayland gles2 webcrypto"
> 56 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l56>
> 57 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l57> PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland wayland-native"
> 58 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l58> PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
> 59 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l59> PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
> 60 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l60> PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
> 61 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l61> PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
> 62 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l62> PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
> 63 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l63> PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
> 64 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l64> PACKAGECONFIG[opengl] = "-DENABLE_OPENGL=ON,-DENABLE_OPENGL=OFF,virtual/libgl"
> 65 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l65> PACKAGECONFIG[libsecret] = "-DUSE_LIBSECRET=ON,-DUSE_LIBSECRET=OFF,libsecret"
> 66 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l66> PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen"
> 67 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l67> PACKAGECONFIG[webcrypto] = "-DENABLE_WEB_CRYPTO=ON,-DENABLE_WEB_CRYPTO=OFF,libgcrypt libtasn1"
> 68 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l68> PACKAGECONFIG[gst_gl] = "-DUSE_GSTREAMER_GL=ON,-DUSE_GSTREAMER_GL=OFF,gstreamer1.0-plugins-bad"
> 69 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l69> # Source is at https://github.com/google/woff2
> 70 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l70> PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2"
> 71 <http://gerrit.allwinnertech.com:8081/gitweb?p=product/tina-yocto/meta-tina.git;a=blob;f=recipes-webkit/webkitgtk-2.20.2/webkitgtk_2.20.2.bb;h=bb12762c0d9f6f41a5dab294eaeca57e3675fda1;hb=refs/heads/tina-dev#l71>
> 

You need to make sure gst-play-1.0 —videosink=glimagesink works on your platform before starting to debug webkit.
After you have validated that works, make sure you enabled gst_gl in that packageconfig thing. Which GStreamer version do you use?


> 
> 
> At 2018-06-04 16:43:26, "Philippe Normand" <philn at igalia.com> wrote:
> Hi!
> 
> Which linux distribution do you use? If you are using the latest Ubuntu (17.04 is the version I think) or Debian then you need to install gstreamer1.0-gl. See also https://bugs.webkit.org/show_bug.cgi?id=184925 <https://bugs.webkit.org/show_bug.cgi?id=184925>
> 
> Philippe
> 
> 
> 
>> On 1 Jun 2018, at 08:43, tugouxp <13824125580 at 163.com <mailto:13824125580 at 163.com>> wrote:
>> 
>> hi folks:
>>     i make a test about video player with video tag based on midori and webkit2.22.2, but seems only when i disable "GSTREAMER_GL", the display window can be displayed normally.
>> if the GSTREAMER_GL was enabled, the decoder process working fine but the browser cant show the player window, just a blank window.
>> so,from the code, it seems the difference between the two test is the display sinker of gstreamer pipe was different.
>> 1.if GSTRREAMER_GL enabled, it would be use the display sinker "createVideoSinkGL" returned
>> 2.if GSTRREAMER_GL disabled, the default display sinker would be webkit video sink.
>> 
>> seems only method 2 can use, but i found another problem when using the way 2(webkit videw sinker), that is  when playing high quality streamer with browser, the cpu occupancy rate was very high (about 50 percent) of process 'webkitwebprocess'. 
>> 
>> so i dont know how to choice, which is the better way to deal with this problem, much appreciate your help!
>> 
>> codes:
>> 
>> 1108 GstElement* MediaPlayerPrivateGStreamerBase::createVideoSink()                                                                                                       
>> 1109 {                                                                                                                                                                     
>> 1110     acceleratedRenderingStateChanged();                                                                                                                                                                        
>> 1111                                                                                                                                                                       
>> 1112 #if USE(GSTREAMER_GL)                                                                                                                                                 
>> 1113     if (m_renderingCanBeAccelerated)                                                                                                                                 
>> 1114     ¦   m_videoSink = createVideoSinkGL();                                                                                                                           
>> 1115 #endif                                                                                                                                                               
>> 1116                                                                                                                                                                       
>> 1117     if (!m_videoSink) {                                                                                                                                               
>> 1118     ¦   m_usingFallbackVideoSink = true;                                                                                                                             
>> 1119     ¦   m_videoSink = webkitVideoSinkNew();                                                                                                                           
>> 1120     ¦   g_signal_connect_swapped(m_videoSink.get(), "repaint-requested", G_CALLBACK(repaintCallback), this);                                                          
>> 1121     ¦   g_signal_connect_swapped(m_videoSink.get(), "repaint-cancelled", G_CALLBACK(repaintCancelledCallback), this);                                                 
>> 1122     }                                                                                                                                                                 
>> 1123                                                                                                                                                                       
>> 1124     GstElement* videoSink = nullptr;                                                                                                                                 
>> 1125     m_fpsSink = gst_element_factory_make("fpsdisplaysink", "sink");                                                                                                   
>> 1126     if (m_fpsSink) {                                                                                                                                                 
>> 1127     ¦   g_object_set(m_fpsSink.get(), "silent", TRUE , nullptr);                                                                                                     
>> 1128                                                                                                                                                                       
>> 1129     ¦   // Turn off text overlay unless logging is enabled.                                                                                                           
>> 1130 #if LOG_DISABLED                                                                                                                                                     
>> 1131     ¦   g_object_set(m_fpsSink.get(), "text-overlay", FALSE , nullptr);                                                                                               
>> 1132 #else                                                                                                                                                                 
>> 1133     ¦   if (!isLogChannelEnabled("Media"))                                                                                                                           
>> 1134     ¦   ¦   g_object_set(m_fpsSink.get(), "text-overlay", FALSE , nullptr);                                                                                           
>> 1135 #endif // LOG_DISABLED                                                                                                                                               
>> 1136                                                                                                                                                                       
>> 1137     ¦   if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_fpsSink.get()), "video-sink")) {                                                                       
>> 1138     ¦   ¦   g_object_set(m_fpsSink.get(), "video-sink", m_videoSink.get(), nullptr);                                                                                 
>> 1139     ¦   ¦   videoSink = m_fpsSink.get();                                                                                                                             
>> 1140     ¦   } else                                                                                                                                                       
>> 1141     ¦   ¦   m_fpsSink = nullptr;                                                                                                                                     
>> 1142     }                                                                                                                                                                 
>> 1143                                                                                                                                                                       
>> 1144     if (!m_fpsSink)                                                                                                                                                   
>> 1145     ¦   videoSink = m_videoSink.get();                                                                                                                               
>> 1146                                                                                                                                                                       
>> 1147     ASSERT(videoSink);                                                                                                                                               
>> 1148                                                                                                                                                                       
>> 1149     return videoSink;
>> 
>> 
>> 
>>  
>> 
>> _______________________________________________
>> webkit-gtk mailing list
>> webkit-gtk at lists.webkit.org <mailto:webkit-gtk at lists.webkit.org>
>> https://lists.webkit.org/mailman/listinfo/webkit-gtk
> 
> 
> 
> 
>  
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20180604/f72e62f5/attachment-0001.html>


More information about the webkit-gtk mailing list