• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>gltransformation: GStreamer Base Plugins 1.0 Plugins Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual">
8<link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9<link rel="prev" href="gst-plugins-base-plugins-gltestsrc.html" title="gltestsrc">
10<link rel="next" href="gst-plugins-base-plugins-glupload.html" title="glupload">
11<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
12<link rel="stylesheet" href="style.css" type="text/css">
13</head>
14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16<td width="100%" align="left" class="shortcuts">
17<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span18                  <a href="#gst-plugins-base-plugins-gltransformation.description" class="shortcut">Description</a></span>
19</td>
20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22<td><a accesskey="p" href="gst-plugins-base-plugins-gltestsrc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23<td><a accesskey="n" href="gst-plugins-base-plugins-glupload.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24</tr></table>
25<div class="refentry">
26<a name="gst-plugins-base-plugins-gltransformation"></a><div class="titlepage"></div>
27<div class="refnamediv"><table width="100%"><tr>
28<td valign="top">
29<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-gltransformation.top_of_page"></a>gltransformation</span></h2>
30<p>gltransformation</p>
31</td>
32<td class="gallery_image" valign="top" align="right"></td>
33</tr></table></div>
34<div class="refsect1">
35<a name="gst-plugins-base-plugins-gltransformation.other"></a><h2>Types and Values</h2>
36<div class="informaltable"><table class="informaltable" width="100%" border="0">
37<colgroup>
38<col width="150px" class="name">
39<col class="description">
40</colgroup>
41<tbody><tr>
42<td class="datatype_keyword">struct</td>
43<td class="function_name"><a class="link" href="gst-plugins-base-plugins-gltransformation.html#GstGLTransformation" title="struct GstGLTransformation">GstGLTransformation</a></td>
44</tr></tbody>
45</table></div>
46</div>
47<div class="refsect1">
48<a name="gst-plugins-base-plugins-gltransformation.description"></a><h2>Description</h2>
49<p>Transforms video on the GPU.</p>
50<div class="refsect3">
51<a name="id-1.2.65.4.3"></a><h4>Examples</h4>
52<div class="informalexample">
53  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
54    <tbody>
55      <tr>
56        <td class="listing_lines" align="right"><pre>1</pre></td>
57        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> gltestsrc <span class="gtkdoc opt">!</span> gltransformation rotation<span class="gtkdoc opt">-</span>z<span class="gtkdoc opt">=</span><span class="number">45</span> <span class="gtkdoc opt">!</span> glimagesink</pre></td>
58      </tr>
59    </tbody>
60  </table>
61</div>
62
63<p> A pipeline to rotate by 45 degrees</p>
64<div class="informalexample">
65  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
66    <tbody>
67      <tr>
68        <td class="listing_lines" align="right"><pre>1</pre></td>
69        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> gltestsrc <span class="gtkdoc opt">!</span> gltransformation translation<span class="gtkdoc opt">-</span>x<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> glimagesink</pre></td>
70      </tr>
71    </tbody>
72  </table>
73</div>
74
75<p> Translate the video by 0.5</p>
76<div class="informalexample">
77  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
78    <tbody>
79      <tr>
80        <td class="listing_lines" align="right"><pre>1</pre></td>
81        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> gltestsrc <span class="gtkdoc opt">!</span> gltransformation scale<span class="gtkdoc opt">-</span>y<span class="gtkdoc opt">=</span><span class="number">0.5</span> scale<span class="gtkdoc opt">-</span>x<span class="gtkdoc opt">=</span><span class="number">0.5</span> <span class="gtkdoc opt">!</span> glimagesink</pre></td>
82      </tr>
83    </tbody>
84  </table>
85</div>
86
87<p> Resize the video by 0.5</p>
88<div class="informalexample">
89  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
90    <tbody>
91      <tr>
92        <td class="listing_lines" align="right"><pre>1</pre></td>
93        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> gltestsrc <span class="gtkdoc opt">!</span> gltransformation rotation<span class="gtkdoc opt">-</span>x<span class="gtkdoc opt">=-</span><span class="number">45</span> ortho<span class="gtkdoc opt">=</span>True <span class="gtkdoc opt">!</span> glimagesink</pre></td>
94      </tr>
95    </tbody>
96  </table>
97</div>
98
99<p> Rotate the video around the X-Axis by -45° with an orthographic projection</p>
100</div>
101</div>
102<div class="refsect1">
103<a name="gst-plugins-base-plugins-gltransformation.functions_details"></a><h2>Functions</h2>
104<p></p>
105</div>
106<div class="refsect1">
107<a name="gst-plugins-base-plugins-gltransformation.other_details"></a><h2>Types and Values</h2>
108<div class="refsect2">
109<a name="GstGLTransformation"></a><h3>struct GstGLTransformation</h3>
110<pre class="programlisting">struct GstGLTransformation {
111    GstGLFilter filter;
112
113    GstGLShader *shader;
114    GLuint       vao;
115    GLuint       vbo_indices;
116    GLuint       vertex_buffer;
117    GLint        attr_position;
118    GLint        attr_texture;
119
120    GstGLMemory *in_tex;
121    GstGLMemory *out_tex;
122
123    gfloat xrotation;
124    gfloat yrotation;
125    gfloat zrotation;
126
127    gfloat xscale;
128    gfloat yscale;
129
130    gfloat xtranslation;
131    gfloat ytranslation;
132    gfloat ztranslation;
133
134    gfloat xpivot;
135    gfloat ypivot;
136    gfloat zpivot;
137
138    /* perspective */
139    gfloat fov;
140    gfloat aspect;
141    gfloat znear;
142    gfloat zfar;
143    gboolean ortho;
144
145    graphene_matrix_t model_matrix;
146    graphene_matrix_t view_matrix;
147    graphene_matrix_t projection_matrix;
148    graphene_matrix_t inv_model_matrix;
149    graphene_matrix_t inv_view_matrix;
150    graphene_matrix_t inv_projection_matrix;
151    graphene_matrix_t mvp_matrix;
152
153    graphene_vec3_t camera_position;
154
155    gboolean downstream_supports_affine_meta;
156    gboolean caps_change;
157};
158</pre>
159</div>
160</div>
161</div>
162<div class="footer">
163<hr>Generated by GTK-Doc V1.28</div>
164</body>
165</html>