From fb0f015dfe6eca6f3cb0d9397a41cd19c97ead94 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 26 Aug 2016 02:06:00 +1000 Subject: [PATCH] gl: Add/update docs for glviewconvert, glstereomix Add some example pipelines for glstereomix, and fix up the example pipelines for glviewconvert --- ext/gl/gstglstereomix.c | 36 ++++++++++++++++++++++++++++++++++++ ext/gl/gstglviewconvert.c | 10 ++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/ext/gl/gstglstereomix.c b/ext/gl/gstglstereomix.c index 1c214d8..18e7111a 100644 --- a/ext/gl/gstglstereomix.c +++ b/ext/gl/gstglstereomix.c @@ -21,6 +21,42 @@ * Boston, MA 02110-1301, USA. */ +/** + * SECTION:element-glstereomix + * + * Combine 2 input streams to produce a stereoscopic output + * stream. Input views are taken from the left pad and right pad + * respectively, and mixed according to their timelines. + * + * If either input stream is stereoscopic, the approproriate view + * (left or right) is taken from each stream and placed into the output. + * + * The multiview representation on the output is chosen according to + * the downstream caps. + * + * + * Examples + * |[ + * gst-launch-1.0 -v videotestsrc pattern=ball name=left \ + * videotestsrc name=right glstereomix name=mix \ + * left. ! vid/x-raw,width=640,height=480! glupload ! mix. \ + * right. ! video/x-raw,width=640,height=480! glupload ! mix. \ + * mix. ! video/x-raw'(memory:GLMemory)',multiview-mode=side-by-side ! \ + * queue ! glimagesink output-multiview-mode=side-by-side + * ]| Mix 2 different videotestsrc patterns into a side-by-side stereo image and display it. + * |[ + * gst-launch-1.0 -ev v4l2src name=left \ + * videotestsrc name=right \ + * glstereomix name=mix \ + * left. ! video/x-raw,width=640,height=480 ! glupload ! glcolorconvert ! mix. \ + * right. ! video/x-raw,width=640,height=480 ! glupload ! mix. \ + * mix. ! video/x-raw'(memory:GLMemory)',multiview-mode=top-bottom ! \ + * glcolorconvert ! gldownload ! queue ! x264enc ! h264parse ! \ + * mp4mux ! progressreport ! filesink location=output.mp4 + * ]| Mix the input from a camera to the left view, and videotestsrc to the right view, + * and encode as a top-bottom frame packed H.264 video. + * + */ #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/gl/gstglviewconvert.c b/ext/gl/gstglviewconvert.c index 5a3c9fe..ba05a11 100644 --- a/ext/gl/gstglviewconvert.c +++ b/ext/gl/gstglviewconvert.c @@ -31,11 +31,13 @@ * * Examples * |[ - * gst-launch-1.0 videotestsrc ! glviewconvert ! glimagesink - * ]| + * gst-launch-1.0 videotestsrc ! glupload ! glviewconvert ! glimagesink + * ]| Simple placebo example demonstrating identity passthrough of mono video * |[ - * gst-launch-1.0 videotestsrc pattern=checkers-1 ! glviewconvert input-mode-override=side-by-side ! glimagesink -v - * ]| + * gst-launch-1.0 videotestsrc pattern=checkers-1 ! glupload ! \ + * glviewconvert input-mode-override=side-by-side ! glimagesink -v + * ]| Force re-interpretation of the input checkers pattern as a side-by-side stereoscopic + * image and display in glimagesink. * FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required. * */ -- 2.7.4