hi folks:
  
    From the codes of webkitgtk, during the scenaric of playing streams , the 
'glcolorconvert' would be linked to the pipeline unconditionally, which would 
do the YUV to RGB convert by software algo, it seems only support one diplay 
layer, the yuv picture must be mixed with GUI on one layer,  it is a waste of 
cpu time.


why the webkitgtk suppports  the mediaplayer function in the way like this? and 
if the display engine of the target platform has a seperate video layer which 
can directly show YUV format  besides OSD layer, can the  webkitgtk  utilize 
the hardware advantage for supporting two layers?


thanks for your kindly support.!


 1054 GstElement* MediaPlayerPrivateGStreamerBase::createVideoSinkGL()
  1055 {
  1056     if (!webkitGstCheckVersion(1, 8, 0))
  1057     ¦   return nullptr;
  1058  
  1059     gboolean result = TRUE;
  1060     GstElement* videoSink = gst_bin_new(nullptr);
  1061     GstElement* upload = gst_element_factory_make("glupload", nullptr);
  1062     GstElement* colorconvert = 
gst_element_factory_make("glcolorconvert", nullptr);
  1063     GstElement* appsink = createGLAppSink();
  1064  
  1065     if (!appsink || !upload || !colorconvert) {
  1066     ¦   GST_WARNING("Failed to create GstGL elements");
  1067     ¦   gst_object_unref(videoSink);
  1068  
  1069     ¦   if (upload)
  1070     ¦   ¦   gst_object_unref(upload);
  1071     ¦   if (colorconvert)
  1072     ¦   ¦   gst_object_unref(colorconvert);
  1073     ¦   if (appsink)
  1074     ¦   ¦   gst_object_unref(appsink);
  1075  
  1076     ¦   return nullptr;
  1077     }
  1078  
  1079     gst_bin_add_many(GST_BIN(videoSink), upload, colorconvert, appsink, 
nullptr);
  1080  
  1081     GRefPtr<GstCaps> caps = 
adoptGRef(gst_caps_from_string("video/x-raw(" GST_CAPS_FEATURE_MEMORY_GL_MEMORY 
"), format = (string) " GST_GL_CAPS_FORMAT));
  1082  
  1083     result &= gst_element_link_pads(upload, "src", colorconvert, "sink");
  1084     result &= gst_element_link_pads_filtered(colorconvert, "src", 
appsink, "sink", caps.get());
  1085  
  1086     GRefPtr<GstPad> pad = adoptGRef(gst_element_get_static_pad(upload, 
"sink"));
  1087     gst_element_add_pad(videoSink, gst_ghost_pad_new("sink", pad.get()));


_______________________________________________
webkit-gtk mailing list
webkit-gtk@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-gtk

Reply via email to