Blame gst-libs/gst/gl/gstglsl.h

Packit 971217
/*
Packit 971217
 * GStreamer
Packit 971217
 * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the
Packit 971217
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 971217
 * Boston, MA 02110-1301, USA.
Packit 971217
 */
Packit 971217
Packit 971217
#ifndef __GST_GLSL_H__
Packit 971217
#define __GST_GLSL_H__
Packit 971217
Packit 971217
#include <gst/gl/gstgl_fwd.h>
Packit 971217
Packit 971217
G_BEGIN_DECLS
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
GQuark gst_glsl_error_quark (void);
Packit 971217
Packit 971217
/**
Packit 971217
 * GST_GLSL_ERROR:
Packit 971217
 *
Packit 971217
 * Error domain for GStreamer's GLSL module. Errors in this domain will be
Packit 971217
 * from the #GstGLSLError enumeration
Packit 971217
 */
Packit 971217
#define GST_GLSL_ERROR (gst_glsl_error_quark ())
Packit 971217
Packit 971217
/**
Packit 971217
 * GstGLSLError:
Packit 971217
 * @GST_GLSL_ERROR_COMPILE: Compilation error occured
Packit 971217
 * @GST_GLSL_ERROR_LINK: Link error occured
Packit 971217
 * @GST_GLSL_ERROR_PROGRAM: General program error occured
Packit 971217
 *
Packit 971217
 * Compilation stage that caused an error
Packit 971217
 *
Packit 971217
 * Since: 1.8
Packit 971217
 */
Packit 971217
typedef enum {
Packit 971217
  GST_GLSL_ERROR_COMPILE,
Packit 971217
  GST_GLSL_ERROR_LINK,
Packit 971217
  GST_GLSL_ERROR_PROGRAM,
Packit 971217
} GstGLSLError;
Packit 971217
Packit 971217
/**
Packit 971217
 * GstGLSLVersion:
Packit 971217
 * @GST_GLSL_VERSION_NONE: no version
Packit 971217
 * @GST_GLSL_VERSION_100: version 100 (only valid for ES)
Packit 971217
 * @GST_GLSL_VERSION_110: version 110 (only valid for compatibility desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_120: version 120 (only valid for compatibility desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_130: version 130 (only valid for compatibility desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_140: version 140 (only valid for compatibility desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_150: version 150 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_300: version 300 (only valid for ES)
Packit 971217
 * @GST_GLSL_VERSION_310: version 310 (only valid for ES)
Packit 971217
 * @GST_GLSL_VERSION_320: version 320 (only valid for ES)
Packit 971217
 * @GST_GLSL_VERSION_330: version 330 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_400: version 400 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_410: version 410 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_420: version 420 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_430: version 430 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_440: version 440 (valid for compatibility/core desktop GL)
Packit 971217
 * @GST_GLSL_VERSION_450: version 450 (valid for compatibility/core desktop GL)
Packit 971217
 *
Packit 971217
 * GLSL version list
Packit 971217
 *
Packit 971217
 * Since: 1.8
Packit 971217
 */
Packit 971217
typedef enum
Packit 971217
{
Packit 971217
  GST_GLSL_VERSION_NONE = 0,
Packit 971217
Packit 971217
  GST_GLSL_VERSION_100 = 100, /* ES */
Packit 971217
  GST_GLSL_VERSION_110 = 110, /* GL */
Packit 971217
  GST_GLSL_VERSION_120 = 120, /* GL */
Packit 971217
  GST_GLSL_VERSION_130 = 130, /* GL */
Packit 971217
  GST_GLSL_VERSION_140 = 140, /* GL */
Packit 971217
  GST_GLSL_VERSION_150 = 150, /* GL */
Packit 971217
  GST_GLSL_VERSION_300 = 300, /* ES */
Packit 971217
  GST_GLSL_VERSION_310 = 310, /* ES */
Packit 971217
  GST_GLSL_VERSION_320 = 320, /* ES */
Packit 971217
  GST_GLSL_VERSION_330 = 330, /* GL */
Packit 971217
  GST_GLSL_VERSION_400 = 400, /* GL */
Packit 971217
  GST_GLSL_VERSION_410 = 410, /* GL */
Packit 971217
  GST_GLSL_VERSION_420 = 420, /* GL */
Packit 971217
  GST_GLSL_VERSION_430 = 430, /* GL */
Packit 971217
  GST_GLSL_VERSION_440 = 440, /* GL */
Packit 971217
  GST_GLSL_VERSION_450 = 450, /* GL */
Packit 971217
} GstGLSLVersion;
Packit 971217
Packit 971217
/**
Packit 971217
 * GstGLSLProfile:
Packit 971217
 * @GST_GLSL_PROFILE_NONE: no profile supported/available
Packit 971217
 * @GST_GLSL_PROFILE_ES: OpenGL|ES profile
Packit 971217
 * @GST_GLSL_PROFILE_CORE: OpenGL core profile
Packit 971217
 * @GST_GLSL_PROFILE_COMPATIBILITY: OpenGL compatibility profile
Packit 971217
 * @GST_GLSL_PROFILE_ANY: any OpenGL/OpenGL|ES profile
Packit 971217
 *
Packit 971217
 * GLSL profiles
Packit 971217
 *
Packit 971217
 * Since: 1.8
Packit 971217
 */
Packit 971217
typedef enum
Packit 971217
{
Packit 971217
  /* XXX: maybe make GstGLAPI instead */
Packit 971217
  GST_GLSL_PROFILE_NONE = 0,
Packit 971217
Packit 971217
  GST_GLSL_PROFILE_ES = (1 << 0),
Packit 971217
  GST_GLSL_PROFILE_CORE = (1 << 1),
Packit 971217
  GST_GLSL_PROFILE_COMPATIBILITY = (1 << 2),
Packit 971217
Packit 971217
  GST_GLSL_PROFILE_ANY = -1,
Packit 971217
} GstGLSLProfile;
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
GstGLSLVersion gst_glsl_version_from_string         (const gchar * string);
Packit 971217
GST_GL_API
Packit 971217
const gchar *  gst_glsl_version_to_string           (GstGLSLVersion version);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
GstGLSLProfile gst_glsl_profile_from_string         (const gchar * string);
Packit 971217
GST_GL_API
Packit 971217
const gchar *  gst_glsl_profile_to_string           (GstGLSLProfile profile);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
gchar *        gst_glsl_version_profile_to_string   (GstGLSLVersion version,
Packit 971217
                                                     GstGLSLProfile profile);
Packit 971217
GST_GL_API
Packit 971217
gboolean       gst_glsl_version_profile_from_string (const gchar * string,
Packit 971217
                                                     GstGLSLVersion * version_ret,
Packit 971217
                                                     GstGLSLProfile * profile_ret);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
gboolean       gst_glsl_string_get_version_profile  (const gchar *s,
Packit 971217
                                                     GstGLSLVersion * version,
Packit 971217
                                                     GstGLSLProfile * profile);
Packit 971217
Packit 971217
GST_GL_API
Packit 971217
GstGLSLVersion gst_gl_version_to_glsl_version       (GstGLAPI gl_api, gint maj, gint min);
Packit 971217
GST_GL_API
Packit 971217
gboolean       gst_gl_context_supports_glsl_profile_version (GstGLContext * context,
Packit 971217
                                                             GstGLSLVersion version,
Packit 971217
                                                             GstGLSLProfile profile);
Packit 971217
Packit 971217
G_END_DECLS
Packit 971217
Packit 971217
#endif /* __GST_GLSL_H__ */