2008-08-13 14:01:21 +00:00
|
|
|
/*
|
2008-05-19 16:57:39 +00:00
|
|
|
* GStreamer
|
2008-09-20 13:44:24 +00:00
|
|
|
* Copyright (C) 2007 David Schleef <ds@schleef.org>
|
2008-05-19 16:57:39 +00:00
|
|
|
* Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2008-09-29 21:45:10 +00:00
|
|
|
/**
|
|
|
|
* SECTION:element-gldownload
|
|
|
|
*
|
|
|
|
* download opengl textures into video frames.
|
|
|
|
*
|
|
|
|
* <refsect2>
|
|
|
|
* <title>Color space conversion</title>
|
|
|
|
* <para>
|
2011-12-15 15:18:36 +00:00
|
|
|
* When needed, the color space conversion is made in a fragment shader using
|
2008-09-29 21:45:10 +00:00
|
|
|
* one frame buffer object instance.
|
|
|
|
* </para>
|
2008-10-04 19:34:07 +00:00
|
|
|
* </refsect2>
|
2008-09-29 21:45:10 +00:00
|
|
|
* <refsect2>
|
|
|
|
* <title>Examples</title>
|
|
|
|
* |[
|
|
|
|
* gst-launch -v videotestsrc ! "video/x-raw-rgb" ! glupload ! gldownload ! \
|
|
|
|
* "video/x-raw-rgb" ! ximagesink
|
|
|
|
* ]| A pipeline to test downloading.
|
|
|
|
* No special opengl extension is used in this pipeline, that's why it should work
|
|
|
|
* with OpenGL >= 1.1. That's the case if you are using the MESA3D driver v1.3.
|
|
|
|
|[
|
|
|
|
* gst-launch -v videotestsrc ! "video/x-raw-rgb, width=640, height=480" ! glupload ! gldownload ! \
|
|
|
|
* "video/x-raw-rgb, width=320, height=240" ! ximagesink
|
|
|
|
* ]| A pipeline to test hardware scaling.
|
|
|
|
* Frame buffer extension is required. Inded one FBO is used bettween glupload and gldownload,
|
|
|
|
* because the texture needs to be resized.
|
|
|
|
* |[
|
|
|
|
* gst-launch -v gltestsrc ! gldownload ! xvimagesink
|
|
|
|
* ]| A pipeline to test hardware colorspace conversion.
|
2011-12-15 15:18:36 +00:00
|
|
|
* Your driver must support GLSL (OpenGL Shading Language needs OpenGL >= 2.1).
|
2009-01-15 17:39:48 +00:00
|
|
|
* Texture RGB32 is converted to one of the 4 following format YUY2, UYVY, I420, YV12 and AYUV,
|
2008-09-29 21:45:10 +00:00
|
|
|
* through some fragment shaders and using one framebuffer (FBO extension OpenGL >= 1.4).
|
|
|
|
* MESA >= 7.1 supports GLSL but it's made in software.
|
|
|
|
* |[
|
|
|
|
* gst-launch -v videotestsrc ! glupload ! gldownload ! "video/x-raw-yuv, format=(fourcc)YUY2" ! glimagesink
|
|
|
|
* ]| A pipeline to test hardware colorspace conversion
|
2011-12-15 15:18:36 +00:00
|
|
|
* FBO and GLSL are required.
|
2008-09-29 21:45:10 +00:00
|
|
|
* </refsect2>
|
|
|
|
*/
|
|
|
|
|
2008-05-18 11:12:46 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2008-06-12 21:40:17 +00:00
|
|
|
#include "gstgldownload.h"
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2008-06-12 21:40:17 +00:00
|
|
|
#define GST_CAT_DEFAULT gst_gl_download_debug
|
2009-02-11 06:39:14 +00:00
|
|
|
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2008-06-12 21:40:17 +00:00
|
|
|
static GstStaticPadTemplate gst_gl_download_src_pad_template =
|
2012-06-05 08:53:38 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("src",
|
2008-05-18 11:12:46 +00:00
|
|
|
GST_PAD_SRC,
|
|
|
|
GST_PAD_ALWAYS,
|
2012-06-05 08:53:38 +00:00
|
|
|
GST_STATIC_CAPS (GST_GL_VIDEO_CAPS)
|
2009-03-15 13:48:19 +00:00
|
|
|
);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2008-06-12 21:40:17 +00:00
|
|
|
static GstStaticPadTemplate gst_gl_download_sink_pad_template =
|
2008-05-18 11:12:46 +00:00
|
|
|
GST_STATIC_PAD_TEMPLATE ("sink",
|
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_ALWAYS,
|
|
|
|
GST_STATIC_CAPS (GST_GL_VIDEO_CAPS)
|
|
|
|
);
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
PROP_0
|
2008-05-18 11:12:46 +00:00
|
|
|
};
|
|
|
|
|
2012-05-30 03:46:21 +00:00
|
|
|
#define DEBUG_INIT \
|
2008-06-12 21:40:17 +00:00
|
|
|
GST_DEBUG_CATEGORY_INIT (gst_gl_download_debug, "gldownload", 0, "gldownload element");
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2012-05-30 03:46:21 +00:00
|
|
|
G_DEFINE_TYPE_WITH_CODE (GstGLDownload, gst_gl_download,
|
2008-05-18 11:12:46 +00:00
|
|
|
GST_TYPE_BASE_TRANSFORM, DEBUG_INIT);
|
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
static void gst_gl_download_set_property (GObject * object, guint prop_id,
|
2008-05-18 11:12:46 +00:00
|
|
|
const GValue * value, GParamSpec * pspec);
|
2009-02-11 06:39:14 +00:00
|
|
|
static void gst_gl_download_get_property (GObject * object, guint prop_id,
|
2008-05-18 11:12:46 +00:00
|
|
|
GValue * value, GParamSpec * pspec);
|
|
|
|
|
2012-06-05 08:53:38 +00:00
|
|
|
static gboolean gst_gl_download_src_query (GstPad * pad, GstObject * object,
|
|
|
|
GstQuery * query);
|
2009-10-04 00:23:45 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
static void gst_gl_download_reset (GstGLDownload * download);
|
|
|
|
static gboolean gst_gl_download_set_caps (GstBaseTransform * bt,
|
|
|
|
GstCaps * incaps, GstCaps * outcaps);
|
|
|
|
static GstCaps *gst_gl_download_transform_caps (GstBaseTransform * bt,
|
2012-06-05 08:53:38 +00:00
|
|
|
GstPadDirection direction, GstCaps * caps, GstCaps * filter);
|
2009-02-11 06:39:14 +00:00
|
|
|
static gboolean gst_gl_download_start (GstBaseTransform * bt);
|
|
|
|
static gboolean gst_gl_download_stop (GstBaseTransform * bt);
|
|
|
|
static GstFlowReturn gst_gl_download_transform (GstBaseTransform * trans,
|
|
|
|
GstBuffer * inbuf, GstBuffer * outbuf);
|
|
|
|
static gboolean gst_gl_download_get_unit_size (GstBaseTransform * trans,
|
2012-06-05 08:53:38 +00:00
|
|
|
GstCaps * caps, gsize * size);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
2012-05-30 03:46:21 +00:00
|
|
|
gst_gl_download_class_init (GstGLDownloadClass * klass)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2012-05-30 03:46:21 +00:00
|
|
|
GObjectClass *gobject_class;
|
|
|
|
GstElementClass *element_class;
|
|
|
|
|
|
|
|
gobject_class = (GObjectClass *) klass;
|
|
|
|
element_class = GST_ELEMENT_CLASS (klass);
|
|
|
|
|
|
|
|
gobject_class->set_property = gst_gl_download_set_property;
|
|
|
|
gobject_class->get_property = gst_gl_download_get_property;
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2010-03-24 11:10:21 +00:00
|
|
|
gst_element_class_set_details_simple (element_class, "OpenGL video maker",
|
|
|
|
"Filter/Effect", "A from GL to video flow filter",
|
|
|
|
"Julien Isorce <julien.isorce@gmail.com>");
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_element_class_add_pad_template (element_class,
|
|
|
|
gst_static_pad_template_get (&gst_gl_download_src_pad_template));
|
|
|
|
gst_element_class_add_pad_template (element_class,
|
|
|
|
gst_static_pad_template_get (&gst_gl_download_sink_pad_template));
|
|
|
|
|
|
|
|
GST_BASE_TRANSFORM_CLASS (klass)->transform_caps =
|
|
|
|
gst_gl_download_transform_caps;
|
|
|
|
GST_BASE_TRANSFORM_CLASS (klass)->transform = gst_gl_download_transform;
|
|
|
|
GST_BASE_TRANSFORM_CLASS (klass)->start = gst_gl_download_start;
|
|
|
|
GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_download_stop;
|
|
|
|
GST_BASE_TRANSFORM_CLASS (klass)->set_caps = gst_gl_download_set_caps;
|
|
|
|
GST_BASE_TRANSFORM_CLASS (klass)->get_unit_size =
|
|
|
|
gst_gl_download_get_unit_size;
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2012-05-30 03:46:21 +00:00
|
|
|
gst_gl_download_init (GstGLDownload * download)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-10-04 00:23:45 +00:00
|
|
|
GstBaseTransform *base_trans = GST_BASE_TRANSFORM (download);
|
2011-08-03 07:07:49 +00:00
|
|
|
|
2009-10-04 00:23:45 +00:00
|
|
|
gst_pad_set_query_function (base_trans->srcpad,
|
|
|
|
GST_DEBUG_FUNCPTR (gst_gl_download_src_query));
|
2011-08-03 07:07:49 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_reset (download);
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
//GstGLDownload *download = GST_GL_DOWNLOAD (object);
|
|
|
|
|
|
|
|
switch (prop_id) {
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_get_property (GObject * object, guint prop_id,
|
|
|
|
GValue * value, GParamSpec * pspec)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
//GstGLDownload *download = GST_GL_DOWNLOAD (object);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
switch (prop_id) {
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
2009-10-04 00:23:45 +00:00
|
|
|
static gboolean
|
2012-06-05 08:53:38 +00:00
|
|
|
gst_gl_download_src_query (GstPad * pad, GstObject * object, GstQuery * query)
|
2009-10-04 00:23:45 +00:00
|
|
|
{
|
2012-06-05 08:53:38 +00:00
|
|
|
GstGLDownload *download;
|
|
|
|
gboolean res;
|
|
|
|
|
|
|
|
download = GST_GL_DOWNLOAD (object);
|
2009-10-04 00:23:45 +00:00
|
|
|
|
|
|
|
switch (GST_QUERY_TYPE (query)) {
|
|
|
|
case GST_QUERY_CUSTOM:
|
|
|
|
{
|
2012-06-05 08:53:38 +00:00
|
|
|
GstStructure *structure = gst_query_writable_structure (query);
|
2011-08-03 07:07:49 +00:00
|
|
|
gst_structure_set (structure, "gstgldisplay", G_TYPE_POINTER,
|
|
|
|
download->display, NULL);
|
2012-06-05 08:53:38 +00:00
|
|
|
res = gst_pad_query_default (pad, object, query);
|
2009-10-04 00:23:45 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
2012-06-05 08:53:38 +00:00
|
|
|
res = gst_pad_query_default (pad, object, query);
|
2009-10-04 00:23:45 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
2008-05-18 11:12:46 +00:00
|
|
|
|
|
|
|
static void
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_reset (GstGLDownload * download)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
if (download->display) {
|
|
|
|
g_object_unref (download->display);
|
|
|
|
download->display = NULL;
|
|
|
|
}
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static gboolean
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_start (GstBaseTransform * bt)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2011-08-03 07:07:49 +00:00
|
|
|
GstGLDownload *download = GST_GL_DOWNLOAD (bt);
|
2009-10-04 00:23:45 +00:00
|
|
|
|
|
|
|
download->display = gst_gl_display_new ();
|
2011-11-24 15:02:32 +00:00
|
|
|
if (!gst_gl_display_create_context (download->display, 0)) {
|
|
|
|
GST_ELEMENT_ERROR (download, RESOURCE, NOT_FOUND,
|
2012-04-20 08:41:51 +00:00
|
|
|
GST_GL_DISPLAY_ERR_MSG (download->display), (NULL));
|
2011-11-24 15:02:32 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
return TRUE;
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_stop (GstBaseTransform * bt)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
GstGLDownload *download = GST_GL_DOWNLOAD (bt);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_reset (download);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
return TRUE;
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
2012-06-05 08:53:38 +00:00
|
|
|
/* from videoconvert code */
|
|
|
|
/* copies the given caps */
|
|
|
|
static GstCaps *
|
|
|
|
gst_gl_download_caps_remove_format_info (GstCaps * caps)
|
|
|
|
{
|
|
|
|
GstStructure *st;
|
|
|
|
gint i, n;
|
|
|
|
GstCaps *res;
|
|
|
|
|
|
|
|
res = gst_caps_new_empty ();
|
|
|
|
|
|
|
|
n = gst_caps_get_size (caps);
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
st = gst_caps_get_structure (caps, i);
|
|
|
|
|
|
|
|
/* If this is already expressed by the existing caps
|
|
|
|
* skip this structure */
|
|
|
|
if (i > 0 && gst_caps_is_subset_structure (res, st))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
st = gst_structure_copy (st);
|
|
|
|
gst_structure_remove_fields (st, "format", "palette_data",
|
|
|
|
"colorimetry", "chroma-site", NULL);
|
|
|
|
|
|
|
|
gst_caps_append_structure (res, st);
|
|
|
|
}
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* from videoconvert code */
|
2009-02-11 06:39:14 +00:00
|
|
|
static GstCaps *
|
2008-06-12 21:40:17 +00:00
|
|
|
gst_gl_download_transform_caps (GstBaseTransform * bt,
|
2012-06-05 08:53:38 +00:00
|
|
|
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2012-06-05 08:53:38 +00:00
|
|
|
GstCaps *tmp, *tmp2;
|
|
|
|
GstCaps *result;
|
|
|
|
|
|
|
|
/* Get all possible caps that we can transform to */
|
|
|
|
tmp = gst_gl_download_caps_remove_format_info (caps);
|
|
|
|
|
|
|
|
if (filter) {
|
|
|
|
tmp2 = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
|
|
|
|
gst_caps_unref (tmp);
|
|
|
|
tmp = tmp2;
|
|
|
|
}
|
|
|
|
|
|
|
|
result = tmp;
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (bt, "transformed %" GST_PTR_FORMAT " into %"
|
|
|
|
GST_PTR_FORMAT, caps, result);
|
|
|
|
|
|
|
|
return result;
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_set_caps (GstBaseTransform * bt, GstCaps * incaps,
|
|
|
|
GstCaps * outcaps)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
GstGLDownload *download;
|
2012-06-05 08:53:38 +00:00
|
|
|
GstVideoInfo vinfo;
|
2009-02-11 06:39:14 +00:00
|
|
|
gboolean ret;
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
download = GST_GL_DOWNLOAD (bt);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
GST_DEBUG ("called with %" GST_PTR_FORMAT, incaps);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2012-06-05 08:53:38 +00:00
|
|
|
ret = gst_video_info_from_caps (&vinfo, outcaps);
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
if (!ret) {
|
|
|
|
GST_ERROR ("bad caps");
|
|
|
|
return FALSE;
|
|
|
|
}
|
2008-05-18 11:12:46 +00:00
|
|
|
|
2012-06-05 08:53:38 +00:00
|
|
|
download->video_format = GST_VIDEO_INFO_FORMAT (&vinfo);
|
|
|
|
download->width = GST_VIDEO_INFO_WIDTH (&vinfo);
|
|
|
|
download->height = GST_VIDEO_INFO_HEIGHT (&vinfo);
|
|
|
|
|
2009-10-04 00:23:45 +00:00
|
|
|
if (!download->display) {
|
|
|
|
GST_ERROR ("display is null");
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
//blocking call, init color space conversion if needed
|
2011-11-24 15:02:32 +00:00
|
|
|
ret = gst_gl_display_init_download (download->display, download->video_format,
|
2009-10-04 00:23:45 +00:00
|
|
|
download->width, download->height);
|
2011-11-24 15:02:32 +00:00
|
|
|
if (!ret)
|
|
|
|
GST_ELEMENT_ERROR (download, RESOURCE, NOT_FOUND,
|
2012-04-20 08:41:51 +00:00
|
|
|
GST_GL_DISPLAY_ERR_MSG (download->display), (NULL));
|
2009-10-04 00:23:45 +00:00
|
|
|
|
2009-02-11 06:39:14 +00:00
|
|
|
return ret;
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
|
2012-06-05 08:53:38 +00:00
|
|
|
gsize * size)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2009-02-11 06:39:14 +00:00
|
|
|
gboolean ret;
|
2012-06-05 08:53:38 +00:00
|
|
|
GstVideoInfo vinfo;
|
|
|
|
|
|
|
|
ret = gst_video_info_from_caps (&vinfo, caps);
|
|
|
|
if (ret)
|
|
|
|
*size = GST_VIDEO_INFO_SIZE (&vinfo);
|
2009-02-11 06:39:14 +00:00
|
|
|
|
|
|
|
return ret;
|
2008-05-18 11:12:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GstFlowReturn
|
2009-02-11 06:39:14 +00:00
|
|
|
gst_gl_download_transform (GstBaseTransform * trans, GstBuffer * inbuf,
|
|
|
|
GstBuffer * outbuf)
|
2008-05-18 11:12:46 +00:00
|
|
|
{
|
2012-06-05 08:53:38 +00:00
|
|
|
/*GstGLDownload *download;
|
2009-02-11 06:39:14 +00:00
|
|
|
|
2012-06-05 08:53:38 +00:00
|
|
|
download = GST_GL_DOWNLOAD (trans); */
|
2009-02-11 06:39:14 +00:00
|
|
|
|
|
|
|
//blocking call
|
2012-06-05 08:53:38 +00:00
|
|
|
/*FIXME: Use GstGLMeta
|
|
|
|
if (gst_gl_display_do_download (download->display, gl_inbuf->texture,
|
|
|
|
gl_inbuf->width, gl_inbuf->height, GST_BUFFER_DATA (outbuf)))
|
|
|
|
return GST_FLOW_OK;
|
|
|
|
else */
|
|
|
|
return GST_FLOW_EOS;
|
2008-05-18 11:12:46 +00:00
|
|
|
|
|
|
|
}
|