1/*
2 * GStreamer
3 * Copyright (C) 2013 Matthew Waters <ystreet00@gmail.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef __GST_GL_UTILS_H__
22#define __GST_GL_UTILS_H__
23
24#include <gst/video/video.h>
25#include <gst/video/gstvideoaffinetransformationmeta.h>
26
27#include <gst/gl/gstgl_fwd.h>
28
29G_BEGIN_DECLS
30
31GST_GL_API
32gboolean gst_gl_ensure_element_data (gpointer element,
33 GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
34GST_GL_API
35gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context,
36 GstGLDisplay ** display, GstGLContext ** other_context);
37GST_GL_API
38gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query,
39 GstGLDisplay * display, GstGLContext * context, GstGLContext * other_context);
40GST_GL_API
41gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
42 GstGLContext ** context_ptr);
43
44GST_GL_API
45void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
46
47GST_GL_API
48gsize gst_gl_get_plane_data_size (const GstVideoInfo * info, const GstVideoAlignment * align,
49 guint plane);
50GST_GL_API
51gsize gst_gl_get_plane_start (const GstVideoInfo * info, const GstVideoAlignment * valign,
52 guint plane);
53
54GST_GL_API
55gboolean gst_gl_value_set_texture_target_from_mask (GValue * value,
56 GstGLTextureTarget target_mask);
57GST_GL_API
58gboolean gst_gl_value_set_texture_target (GValue * value, GstGLTextureTarget target);
59GST_GL_API
60GstGLTextureTarget gst_gl_value_get_texture_target_mask (const GValue * value);
61
62GST_GL_API
63void gst_gl_get_affine_transformation_meta_as_ndc (GstVideoAffineTransformationMeta * meta, gfloat * matrix);
64GST_GL_API
65void gst_gl_set_affine_transformation_meta_from_ndc (GstVideoAffineTransformationMeta * meta, const gfloat * matrix);
66
67GST_GL_API
68void gst_gl_multiply_matrix4 (const gfloat * a, const gfloat * b, gfloat * result);
69
70
71G_END_DECLS
72
73#endif /* __GST_GL_UTILS_H__ */
74

source code of include/gstreamer-1.0/gst/gl/gstglutils.h