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

tugouxp 13824125580 at 163.com
Tue Jun 5 02:28:45 PDT 2018

hi normand:

 my platform is based on  allwinner R18 , four cores A72, with GPU Mali400mp2, OpenGLES2 driver support, the library we use are follows:
 after deep investigate, all the library is just a symble link except libMali.so,   so actually  libMali.so behaves the key role, 
 hope have some help.

-rwxrwxr-x 1 caozilong      19  5月 15 19:08 aw_version
lrwxrwxrwx 1 caozilong       11  5月 15 19:08 libEGL.so -> libEGL.so.1
lrwxrwxrwx 1 caozilong       13  5月 15 19:08 libEGL.so.1 -> libEGL.so.1.4
lrwxrwxrwx 1 caozilong       10  5月 15 19:08 libEGL.so.1.4 -> libMali.so
lrwxrwxrwx 1 caozilong       11  5月 15 19:08 libgbm.so -> libgbm.so.1
lrwxrwxrwx 1 caozilong       10  5月 15 19:08 libgbm.so.1 -> libMali.so
lrwxrwxrwx 1 caozilong       17  5月 15 19:08 libGLESv1_CM.so -> libGLESv1_CM.so.1
lrwxrwxrwx 1 caozilong       19  5月 15 19:08 libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1
lrwxrwxrwx 1 caozilong       10  5月 15 19:08 libGLESv1_CM.so.1.1 -> libMali.so
lrwxrwxrwx 1 caozilong       14  5月 15 19:08 libGLESv2.so -> libGLESv2.so.2
lrwxrwxrwx 1 caozilong       16  5月 15 19:08 libGLESv2.so.2 -> libGLESv2.so.2.0
lrwxrwxrwx 1 caozilong       10  5月 15 19:08 libGLESv2.so.2.0 -> libMali.so
-rwxrwxr-x 1 caozilong  1786848  5月 15 19:08 libMali.so
lrwxrwxrwx 1 caozilong       10  5月 15 19:08 libwayland-egl.so -> libMali.s

 and the two commands with waylandsink and glimagesink works fine . 

 gst-launch-1.0 playbin uri=file:///tmp/test.mp4 video-sink="waylandsink x=0 y=0 width=400 height=400"

 gst-launch-1.0 playbin uri=file:///mnt/UDISK/movie.mp4 video-sink="glimagesink x=0 y=0 width=400 height=400"


At 2018-06-05 16:49:17, "Philippe Normand" <philn at igalia.com> wrote:
I don’t see outstanding errors, playback seems to work, there’s a video decoder error but I’m not sure it’s relevant…
Did you really enable OpenGL in packageconfig? 
What is your platform exactly? which GPU? which GL driver?

On 5 Jun 2018, at 04:19, tugouxp <13824125580 at 163.com> wrote:

hi brothers:

   thanks for your advice.
   and i do the test as you said, got the logfile.
   the attachment is the log file ,please notice.
   thanks for your good advice again!

At 2018-06-04 21:23:56, "Philippe Normand" <philn at igalia.com> wrote:
Ah ok, if you have waylandsink working too, I think you can try with WebKit now, set these env vars:

export GST_DEBUG=“3,webkit*:6”
export GST_DEBUG_FILE=gst.log

then run the browser and try to play a video and send the gst.log file.


On 4 Jun 2018, at 14:14, 13824125580 <13824125580 at 163.com> wrote:

so the appsink cannt be changed,right?my project is based on wayland display backend,i found  the waylandsink works fine with gst_play,so,the appsink also take wayland as its display backend,is it?

在 Philippe Normand <philn at igalia.com>,2018年6月4日 下午8:41写道:

I asked you to test gst-play with glimagesink first so as to discard GStreamer issues. If that works well on your platform, move on to WebKit testing.
The appsink we use in WebKit behaves similarly to glimagesink.


On 4 Jun 2018, at 13:25, tugouxp <13824125580 at 163.com> wrote:

hi brother:

   thanks for your suggestions and i do the updating at once.

by the way, the webkit select "appsink" higher precedence than "webkit video sink", in the last mail, you suggest me "glimagesink" too,

but which sinker should be select in webkit framework for my problem ? did any relationsbetween appsink and glimagesink,  did the appsink is just a wrapper of glimagesink,
so we can know  whether the appsink works right by testing the glimagesink directly?

thanks for your kindly supoort.

At 2018-06-04 19:21:27, "Philippe Normand" <philn at igalia.com> wrote:
gst-gl is part of gst-plugins-base in that version of GStreamer. You’re using a pre-release though, I advise to upgrade to 1.14.


On 4 Jun 2018, at 12:13, tugouxp <13824125580 at 163.com> wrote:

Hi brother:

sorry for fogotten the cc thing.
my gst version is  "1.13.90",  from the official webkit ,i only found the "gst-plugins-gl-0.10.3.tar.gz" seems like  "gstreamer_gl" you said , but the version seems did not match with the gstrreamer, and the latest update day is 2012,.
is this the gl package you said?

much appreciate your help.

At 2018-06-04 18:51:07, "Philippe Normand" <philn at igalia.com> wrote:
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.
54 #PACKAGECONFIG ??= "wayland opengl gles2 webcrypto gst_gl"
55 PACKAGECONFIG ??= "wayland gles2 webcrypto"
62 PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
68 PACKAGECONFIG[gst_gl] = "-DUSE_GSTREAMER_GL=ON,-DUSE_GSTREAMER_GL=OFF,gstreamer1.0-plugins-bad"
69 # Source is at https://github.com/google/woff2

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:

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


On 1 Jun 2018, at 08:43, tugouxp <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!


1108 GstElement* MediaPlayerPrivateGStreamerBase::createVideoSink()                                                                                                        
1109 {                                                                                                                                                                     
1110     acceleratedRenderingStateChanged();                                                                                                                                                                        
1112 #if USE(GSTREAMER_GL)                                                                                                                                                 
1113     if (m_renderingCanBeAccelerated)                                                                                                                                  
1114     ¦   m_videoSink = createVideoSinkGL();                                                                                                                            
1115 #endif                                                                                                                                                                
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     }                                                                                                                                                                 
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);                                                                                                      
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                                                                                                                                                
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     }                                                                                                                                                                 
1144     if (!m_fpsSink)                                                                                                                                                   
1145     ¦   videoSink = m_videoSink.get();                                                                                                                                
1147     ASSERT(videoSink);                                                                                                                                                
1149     return videoSink;


webkit-gtk mailing list
webkit-gtk at lists.webkit.org






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

More information about the webkit-gtk mailing list