wpesrc
The wpesrc element is used to produce a video texture representing a web page rendered off-screen by WPE.
Starting from WPEBackend-FDO 1.6.x, software rendering support is available. This
features allows wpesrc to be used on machines without GPU, and/or for testing
purpose. To enable it, set the LIBGL_ALWAYS_SOFTWARE=true
environment
variable and make sure video/x-raw, format=BGRA
caps are negotiated by the
wpesrc element.
Example launch lines
gst-launch-1.0 -v wpesrc location="https://gstreamer.freedesktop.org" ! queue ! glimagesink
Shows the GStreamer website homepage
LIBGL_ALWAYS_SOFTWARE=true gst-launch-1.0 -v wpesrc num-buffers=50 location="https://gstreamer.freedesktop.org" ! videoconvert ! pngenc ! multifilesink location=/tmp/snapshot-%05d.png
Saves the first 50 video frames generated for the GStreamer website as PNG files in /tmp.
gst-play-1.0 --videosink gtkglsink wpe://https://gstreamer.freedesktop.org
Shows the GStreamer website homepage as played with GstPlayer in a GTK+ window.
gst-launch-1.0 glvideomixer name=m sink_1::zorder=0 ! glimagesink wpesrc location="file:///home/phil/Downloads/plunk/index.html" draw-background=0 ! m. videotestsrc ! queue ! glupload ! glcolorconvert ! m.
Composite WPE with a video stream in a single OpenGL scene.
gst-launch-1.0 glvideomixer name=m sink_1::zorder=0 sink_0::height=818 sink_0::width=1920 ! gtkglsink wpesrc location="file:///home/phil/Downloads/plunk/index.html" draw-background=0 ! m. uridecodebin uri="http://192.168.1.44/Sintel.2010.1080p.mkv" name=d d. ! queue ! glupload ! glcolorconvert ! m.
Composite WPE with a video stream, sink_0 pad properties have to match the video dimensions.
Hierarchy
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstElement ╰──GstBaseSrc ╰──GstPushSrc ╰──GstGLBaseSrc ╰──wpesrc
Factory details
Authors: – Philippe Normand
Classification: – Source/Video
Rank – none
Plugin – gstwpe
Package – gst-plugins-bad
Pad Templates
src
video/x-raw(memory:GLMemory):
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
pixel-aspect-ratio: 1/1
texture-target: 2D
Signals
configure-web-view
configure_web_view_callback (GstElement * src, GObject * webview, gpointer udata)
def configure_web_view_callback (src, webview, udata):
#python callback for the 'configure-web-view' signal
function configure_web_view_callback(src: GstElement * src, webview: GObject * webview, udata: gpointer udata): {
// javascript callback for the 'configure-web-view' signal
}
Allow application to configure the webView settings.
Parameters:
src
–
the object which received the signal
webview
–
the webView
udata
–
Flags: Run Last
load-bytes
load_bytes_callback (GstElement * src, GBytes * bytes, gpointer udata)
def load_bytes_callback (src, bytes, udata):
#python callback for the 'load-bytes' signal
function load_bytes_callback(src: GstElement * src, bytes: GBytes * bytes, udata: gpointer udata): {
// javascript callback for the 'load-bytes' signal
}
Load the specified bytes into the internal webView.
Parameters:
src
–
the object which received the signal
bytes
–
the GBytes data to load
udata
–
Properties
blocksize
“blocksize” guint
Size in bytes to read per buffer (-1 = default)
Flags : Read / Write
Default value : 4096
do-timestamp
“do-timestamp” gboolean
Apply current stream time to buffers
Flags : Read / Write
Default value : false
draw-background
“draw-background” gboolean
Whether to draw the WebView background
Flags : Read / Write
Default value : true
num-buffers
“num-buffers” gint
Number of buffers to output before sending EOS (-1 = unlimited)
Flags : Read / Write
Default value : -1
timestamp-offset
“timestamp-offset” gint64
An offset added to timestamps set on buffers (in ns)
Flags : Read / Write
Default value : 0
typefind
“typefind” gboolean
Run typefind before negotiating (deprecated, non-functional)
Flags : Read / Write
Default value : false
The results of the search are