From c98fe5b7f95212d277a1c99507e41f3145c564e8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 18 May 2021 17:49:23 -0400 Subject: wpe: Update doc cache Part-of: --- ext/wpe/gstwpe.cpp | 40 ----------------------------- ext/wpe/gstwpesrcbin.cpp | 66 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 51 insertions(+), 55 deletions(-) (limited to 'ext') diff --git a/ext/wpe/gstwpe.cpp b/ext/wpe/gstwpe.cpp index 80be4242b..ceca61e6f 100644 --- a/ext/wpe/gstwpe.cpp +++ b/ext/wpe/gstwpe.cpp @@ -17,46 +17,6 @@ * Boston, MA 02110-1301, USA. */ -/** - * SECTION:element-wpesrc - * @title: 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. - */ #ifdef HAVE_CONFIG_H diff --git a/ext/wpe/gstwpesrcbin.cpp b/ext/wpe/gstwpesrcbin.cpp index b080b1f43..3ea006967 100644 --- a/ext/wpe/gstwpesrcbin.cpp +++ b/ext/wpe/gstwpesrcbin.cpp @@ -24,11 +24,45 @@ * 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. + * 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 + * + * ### Show the GStreamer website homepage + * + * ``` + * gst-launch-1.0 -v wpesrc location="https://gstreamer.freedesktop.org" ! queue ! glimagesink + * ``` + * + * ### Save the first 50 video frames generated for the GStreamer website as PNG files in /tmp + * + * ``` + * 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 + * ``` + * + * + * ### Show the GStreamer website homepage as played with GstPlayer in a GTK+ window + * + * ``` + * gst-play-1.0 --videosink gtkglsink wpe://https://gstreamer.freedesktop.org + * ``` + * + * ### Composite WPE with a video stream in a single OpenGL scene + * + * ``` + * 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, sink_0 pad properties have to match the video dimensions + * + * ``` + * 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. + * ``` * * Additionally, any audio stream created by WPE is exposed as "sometimes" audio * source pads. @@ -38,20 +72,22 @@ * with the addition of the following fields into the GstMessage details (See * gst_message_parse_error_details(), gst_message_parse_warning_details() and * gst_message_parse_info_details()): - * * `wpesrc_original_src_path`: [Path](gst_object_get_path_string) of the - * original element posting the message + * + * * `wpesrc_original_src_path`: [Path](gst_object_get_path_string) of the + * original element posting the message * * Other message types are posted as [element custom](gst_message_new_custom) * messages reusing the same GstStructure as the one from the message from the * message posted in the web page with the addition of the following fields: - * * `wpesrc_original_message_type`: Type of the original message from - * gst_message_type_get_name(). - * * `wpesrc_original_src_name`: Name of the original element posting the - * message - * * `wpesrc_original_src_type`: Name of the GType of the original element - * posting the message - * * `wpesrc_original_src_path`: [Path](gst_object_get_path_string) of the - * original element positing the message + * + * * `wpesrc_original_message_type`: Type of the original message from + * gst_message_type_get_name(). + * * `wpesrc_original_src_name`: Name of the original element posting the + * message + * * `wpesrc_original_src_type`: Name of the GType of the original element + * posting the message + * * `wpesrc_original_src_path`: [Path](gst_object_get_path_string) of the + * original element positing the message */ #include "gstwpesrcbin.h" -- cgit v1.2.1