2013-06-11 15:04:55 +00:00
|
|
|
/*
|
|
|
|
* GStreamer
|
|
|
|
* Copyright (C) 2013 Matthew Waters <ystreet00@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., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_GL_UTILS_H__
|
|
|
|
#define __GST_GL_UTILS_H__
|
|
|
|
|
2013-06-13 07:57:35 +00:00
|
|
|
#include <gst/video/video.h>
|
2016-05-14 13:27:26 +00:00
|
|
|
#include <gst/video/gstvideoaffinetransformationmeta.h>
|
2013-06-11 15:04:55 +00:00
|
|
|
|
2013-07-11 09:03:31 +00:00
|
|
|
#include <gst/gl/gstgl_fwd.h>
|
2013-06-11 15:04:55 +00:00
|
|
|
|
2014-04-29 18:24:08 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2014-08-14 13:29:00 +00:00
|
|
|
gboolean gst_gl_ensure_element_data (gpointer element,
|
|
|
|
GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2021-01-04 22:25:10 +00:00
|
|
|
gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context,
|
2014-08-14 13:29:00 +00:00
|
|
|
GstGLDisplay ** display, GstGLContext ** other_context);
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2021-01-04 22:25:10 +00:00
|
|
|
gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query,
|
2017-01-12 10:35:25 +00:00
|
|
|
GstGLDisplay * display, GstGLContext * context, GstGLContext * other_context);
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2017-01-12 10:35:25 +00:00
|
|
|
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
|
|
|
|
GstGLContext ** context_ptr);
|
|
|
|
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2017-09-01 05:00:12 +00:00
|
|
|
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);
|
|
|
|
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2021-01-04 22:25:10 +00:00
|
|
|
gsize gst_gl_get_plane_data_size (const GstVideoInfo * info, const GstVideoAlignment * align,
|
2014-12-19 17:11:08 +00:00
|
|
|
guint plane);
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2021-01-04 22:25:10 +00:00
|
|
|
gsize gst_gl_get_plane_start (const GstVideoInfo * info, const GstVideoAlignment * valign,
|
2015-12-14 01:26:01 +00:00
|
|
|
guint plane);
|
2014-12-19 17:11:08 +00:00
|
|
|
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2016-01-04 09:26:09 +00:00
|
|
|
gboolean gst_gl_value_set_texture_target_from_mask (GValue * value,
|
|
|
|
GstGLTextureTarget target_mask);
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2016-01-04 09:26:09 +00:00
|
|
|
gboolean gst_gl_value_set_texture_target (GValue * value, GstGLTextureTarget target);
|
2018-03-13 10:57:15 +00:00
|
|
|
GST_GL_API
|
2016-01-04 09:26:09 +00:00
|
|
|
GstGLTextureTarget gst_gl_value_get_texture_target_mask (const GValue * value);
|
|
|
|
|
2017-08-29 21:21:05 +00:00
|
|
|
GST_GL_API
|
|
|
|
void gst_gl_get_affine_transformation_meta_as_ndc (GstVideoAffineTransformationMeta * meta, gfloat * matrix);
|
|
|
|
GST_GL_API
|
|
|
|
void gst_gl_set_affine_transformation_meta_from_ndc (GstVideoAffineTransformationMeta * meta, const gfloat * matrix);
|
|
|
|
|
|
|
|
GST_GL_API
|
|
|
|
void gst_gl_multiply_matrix4 (const gfloat * a, const gfloat * b, gfloat * result);
|
|
|
|
|
|
|
|
|
2014-04-29 18:24:08 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2013-06-11 15:04:55 +00:00
|
|
|
#endif /* __GST_GL_UTILS_H__ */
|