• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer
3  * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
4  * Copyright (C) 2005,2006,2007 David A. Schleef <ds@schleef.org>
5  * Copyright (C) 2008 Julien Isorce <julien.isorce@gmail.com>
6  * Copyright (C) 2008 Filippo Argiolas <filippo.argiolas@gmail.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 /**
25  * SECTION:plugin-opengl
26  * @title: GstOpengl
27  *
28  * Cross-platform OpenGL plugin.
29  *
30  * ## Debugging
31  *
32  * ## Examples
33  * |[
34  * gst-launch-1.0 --gst-debug=gldisplay:3 videotestsrc ! glimagesink
35  * ]| A debugging pipeline.
36   |[
37  * GST_DEBUG=gl*:6 gst-launch-1.0 videotestsrc ! glimagesink
38  * ]| A debugging pipelines related to shaders.
39  *
40  */
41 
42 #ifdef HAVE_CONFIG_H
43 #include "config.h"
44 #endif
45 
46 #include "gstglelements.h"
47 
48 #include "gstglmixerbin.h"
49 #include "gstglvideomixer.h"
50 #include "gstglstereomix.h"
51 
52 /* Register filters that make up the gstgl plugin */
53 static gboolean
plugin_init(GstPlugin * plugin)54 plugin_init (GstPlugin * plugin)
55 {
56   gboolean ret = FALSE;
57 
58   ret |= GST_ELEMENT_REGISTER (glimagesink, plugin);
59   ret |= GST_ELEMENT_REGISTER (glimagesinkelement, plugin);
60   ret |= GST_ELEMENT_REGISTER (glupload, plugin);
61   ret |= GST_ELEMENT_REGISTER (gldownload, plugin);
62   ret |= GST_ELEMENT_REGISTER (glcolorconvert, plugin);
63   ret |= GST_ELEMENT_REGISTER (glcolorbalance, plugin);
64   ret |= GST_ELEMENT_REGISTER (glfilterbin, plugin);
65   ret |= GST_ELEMENT_REGISTER (glsinkbin, plugin);
66   ret |= GST_ELEMENT_REGISTER (glsrcbin, plugin);
67   ret |= GST_ELEMENT_REGISTER (glmixerbin, plugin);
68   ret |= GST_ELEMENT_REGISTER (glfiltercube, plugin);
69 #ifdef HAVE_GRAPHENE
70   ret |= GST_ELEMENT_REGISTER (gltransformation, plugin);
71   ret |= GST_ELEMENT_REGISTER (glvideoflip, plugin);
72 #endif
73   ret |= GST_ELEMENT_REGISTER (gleffects, plugin);
74   ret |= GST_ELEMENT_REGISTER (glcolorscale, plugin);
75   ret |= GST_ELEMENT_REGISTER (glvideomixer, plugin);
76   ret |= GST_ELEMENT_REGISTER (glvideomixerelement, plugin);
77   ret |= GST_ELEMENT_REGISTER (glshader, plugin);
78   ret |= GST_ELEMENT_REGISTER (glfilterapp, plugin);
79   ret |= GST_ELEMENT_REGISTER (glviewconvert, plugin);
80   ret |= GST_ELEMENT_REGISTER (glstereosplit, plugin);
81   ret |= GST_ELEMENT_REGISTER (glstereomix, plugin);
82   ret |= GST_ELEMENT_REGISTER (gltestsrc, plugin);
83   ret |= GST_ELEMENT_REGISTER (gldeinterlace, plugin);
84   ret |= GST_ELEMENT_REGISTER (glalpha, plugin);
85   ret |= GST_ELEMENT_REGISTER (gloverlaycompositor, plugin);
86 #if defined(HAVE_JPEG) && defined(HAVE_PNG)
87   ret |= GST_ELEMENT_REGISTER (gloverlay, plugin);
88 #endif
89 #if GST_GL_HAVE_OPENGL
90   ret |= GST_ELEMENT_REGISTER (glfilterglass, plugin);
91 #if 0
92   ret |= GST_ELEMENT_REGISTER (glfilterreflectedscreen, plugin);
93 #endif
94   ret |= GST_ELEMENT_REGISTER (glmosaic, plugin);
95 #ifdef HAVE_PNG
96   ret |= GST_ELEMENT_REGISTER (gldifferencematte, plugin);
97 #if 0
98   ret |= GST_ELEMENT_REGISTER (glbumper, plugin);
99 #endif
100 #endif /* HAVE_PNG */
101 #endif /* GST_GL_HAVE_OPENGL */
102 #if GST_GL_HAVE_WINDOW_COCOA
103   ret |= GST_ELEMENT_REGISTER (caopengllayersink, plugin);
104 #endif
105 
106   return ret;
107 }
108 
109 GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
110     GST_VERSION_MINOR,
111     opengl,
112     "OpenGL plugin",
113     plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
114