summaryrefslogtreecommitdiff
path: root/gst-libs/gst/gl/gstglutils.h
blob: d39f68306b37924965fa01daf8d90fd2d5a18d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * 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__

#include <gst/video/video.h>
#include <gst/video/gstvideoaffinetransformationmeta.h>

#include <gst/gl/gstgl_fwd.h>

G_BEGIN_DECLS

GST_EXPORT
gboolean gst_gl_ensure_element_data (gpointer element,
    GstGLDisplay **display_ptr, GstGLContext ** other_context_ptr);
GST_EXPORT
gboolean gst_gl_handle_set_context (GstElement * element, GstContext * context, 
    GstGLDisplay ** display, GstGLContext ** other_context);
GST_EXPORT
gboolean gst_gl_handle_context_query (GstElement * element, GstQuery * query, 
    GstGLDisplay * display, GstGLContext * context, GstGLContext * other_context);
GST_EXPORT
gboolean gst_gl_query_local_gl_context (GstElement * element, GstPadDirection direction,
    GstGLContext ** context_ptr);

GST_EXPORT
void gst_gl_element_propagate_display_context (GstElement * element, GstGLDisplay * display);

GST_EXPORT
gsize gst_gl_get_plane_data_size (GstVideoInfo * info, GstVideoAlignment * align,
    guint plane);
GST_EXPORT
gsize gst_gl_get_plane_start (GstVideoInfo * info, GstVideoAlignment * valign,
    guint plane);

GST_EXPORT
gboolean gst_gl_value_set_texture_target_from_mask (GValue * value,
    GstGLTextureTarget target_mask);
GST_EXPORT
gboolean gst_gl_value_set_texture_target (GValue * value, GstGLTextureTarget target);
GST_EXPORT
GstGLTextureTarget gst_gl_value_get_texture_target_mask (const GValue * value);

G_END_DECLS

#endif /* __GST_GL_UTILS_H__ */