diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-31 21:10:45 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-31 21:10:45 +0200 |
commit | d17ba74fdc2867e5c1e5c15a3f5dc6fa22bba67d (patch) | |
tree | 09cf5d8cee60267d74fe2280ff701058f63dd8d0 | |
parent | 49607d317ab73b485565c8672ad3207b7413279e (diff) |
Add libgstcontroller bindings
-rw-r--r-- | gstreamer-sharp/Application.cs | 6 | ||||
-rw-r--r-- | gstreamer-sharp/ControlSource.custom | 338 | ||||
-rw-r--r-- | gstreamer-sharp/Controller.custom | 187 | ||||
-rw-r--r-- | gstreamer-sharp/Gstreamer.metadata | 53 | ||||
-rw-r--r-- | gstreamer-sharp/Makefile.am | 4 | ||||
-rw-r--r-- | gstreamer-sharp/glue/Makefile.am | 4 | ||||
-rw-r--r-- | gstreamer-sharp/glue/controller.c | 14 | ||||
-rw-r--r-- | gstreamer-sharp/glue/controlsource.c | 41 | ||||
-rw-r--r-- | gstreamer-sharp/gstreamer-api.raw | 304 | ||||
-rw-r--r-- | gstreamer-sharp/gstreamer-sharp.dll.config.in | 1 | ||||
-rw-r--r-- | source/gstreamer-sharp-source.xml | 9 |
11 files changed, 959 insertions, 2 deletions
diff --git a/gstreamer-sharp/Application.cs b/gstreamer-sharp/Application.cs index 1bd1408..80da1fc 100644 --- a/gstreamer-sharp/Application.cs +++ b/gstreamer-sharp/Application.cs | |||
@@ -41,6 +41,7 @@ namespace Gst { | |||
41 | int argc = 0; | 41 | int argc = 0; |
42 | 42 | ||
43 | gst_init (ref argc, ref argv); | 43 | gst_init (ref argc, ref argv); |
44 | gst_controller_init (ref argc, ref argv); | ||
44 | RegisterManagedTypes (); | 45 | RegisterManagedTypes (); |
45 | } | 46 | } |
46 | 47 | ||
@@ -147,6 +148,8 @@ namespace Gst { | |||
147 | throw new ApplicationException (init_call + " returned a new argv handle"); | 148 | throw new ApplicationException (init_call + " returned a new argv handle"); |
148 | } | 149 | } |
149 | 150 | ||
151 | gst_controller_init (ref argc, ref argv_ptr); | ||
152 | |||
150 | if (argc <= 1) { | 153 | if (argc <= 1) { |
151 | args = new string[0]; | 154 | args = new string[0]; |
152 | } else { | 155 | } else { |
@@ -163,6 +166,9 @@ namespace Gst { | |||
163 | [DllImport("libgstreamer-0.10.dll") ] | 166 | [DllImport("libgstreamer-0.10.dll") ] |
164 | private static extern bool gst_init_check (ref int argc, ref IntPtr argv, out IntPtr error); | 167 | private static extern bool gst_init_check (ref int argc, ref IntPtr argv, out IntPtr error); |
165 | 168 | ||
169 | [DllImport("libgstcontroller-0.10.dll") ] | ||
170 | private static extern void gst_controller_init (ref int argc, ref IntPtr argv); | ||
171 | |||
166 | [DllImport("libgstreamer-0.10.dll") ] | 172 | [DllImport("libgstreamer-0.10.dll") ] |
167 | private static extern void gst_deinit(); | 173 | private static extern void gst_deinit(); |
168 | } | 174 | } |
diff --git a/gstreamer-sharp/ControlSource.custom b/gstreamer-sharp/ControlSource.custom new file mode 100644 index 0000000..d3cdc9a --- /dev/null +++ b/gstreamer-sharp/ControlSource.custom | |||
@@ -0,0 +1,338 @@ | |||
1 | |||
2 | [DllImport ("gstreamersharpglue-0.10.dll") ] | ||
3 | static extern uint gst__controllersharp_gst__controller_controlsource_get_get_value_offset (); | ||
4 | |||
5 | static uint get_value_offset = gst__controllersharp_gst__controller_controlsource_get_get_value_offset (); | ||
6 | |||
7 | [StructLayout (LayoutKind.Sequential) ] | ||
8 | struct GstValueArray { | ||
9 | public IntPtr property_name; | ||
10 | public int nbsamples; | ||
11 | public ulong sample_interval; | ||
12 | public IntPtr values; | ||
13 | } | ||
14 | |||
15 | [StructLayout (LayoutKind.Sequential) ] | ||
16 | struct GstControlSourceCallbacks { | ||
17 | public GetValueCallbackNative get_value; | ||
18 | public GetValueArrayCallbackNative get_value_array; | ||
19 | } | ||
20 | |||
21 | delegate bool GetValueCallbackNative (IntPtr raw, ulong timestamp, ref GLib.Value val); | ||
22 | delegate bool GetValueArrayCallbackNative (IntPtr raw, ulong timestamp, ref GstValueArray va); | ||
23 | |||
24 | public delegate bool GetValueCallback (ulong timestamp, ref GLib.Value value); | ||
25 | public delegate System.Array GetValueArrayCallback (ulong timestamp, int nsamples, ulong interval); | ||
26 | |||
27 | private GetValueCallbackWrapper GetValue_cb_wrapper; | ||
28 | private GetValueArrayCallbackWrapper GetValueArray_cb_wrapper; | ||
29 | |||
30 | private class GetValueCallbackWrapper { | ||
31 | public bool NativeCallback (IntPtr raw, ulong timestamp, ref GLib.Value val) { | ||
32 | try { | ||
33 | bool __ret = managed (timestamp, ref val); | ||
34 | |||
35 | return __ret; | ||
36 | } catch (Exception e) { | ||
37 | GLib.ExceptionManager.RaiseUnhandledException (e, true); | ||
38 | // NOTREACHED: Above call does not return. | ||
39 | throw e; | ||
40 | } | ||
41 | } | ||
42 | |||
43 | internal GetValueCallbackNative NativeDelegate; | ||
44 | GetValueCallback managed; | ||
45 | |||
46 | public GetValueCallbackWrapper (GetValueCallback managed) { | ||
47 | this.managed = managed; | ||
48 | if (managed != null) | ||
49 | NativeDelegate = new GetValueCallbackNative (NativeCallback); | ||
50 | } | ||
51 | |||
52 | public static GetValueCallback GetManagedDelegate (GetValueCallbackNative native) { | ||
53 | if (native == null) | ||
54 | return null; | ||
55 | GetValueCallbackWrapper wrapper = (GetValueCallbackWrapper) native.Target; | ||
56 | if (wrapper == null) | ||
57 | return null; | ||
58 | return wrapper.managed; | ||
59 | } | ||
60 | } | ||
61 | |||
62 | private class GetValueArrayCallbackWrapper { | ||
63 | public bool NativeCallback (IntPtr raw, ulong timestamp, ref GstValueArray va) { | ||
64 | try { | ||
65 | System.Array values = managed (timestamp, va.nbsamples, va.sample_interval); | ||
66 | if (values == null) | ||
67 | return false; | ||
68 | |||
69 | System.Type t = values.GetType (); | ||
70 | if (t == typeof (string[])) { | ||
71 | string[] ret = (string[]) values; | ||
72 | |||
73 | for (int i = 0; i < va.nbsamples; i++) { | ||
74 | Marshal.WriteIntPtr (va.values, i * IntPtr.Size, GLib.Marshaller.StringToPtrGStrdup (ret[i])); | ||
75 | } | ||
76 | } else if (t == typeof (short[])) { | ||
77 | short[] ret = (short[]) values; | ||
78 | |||
79 | for (int i = 0; i < va.nbsamples; i++) { | ||
80 | Marshal.WriteInt16 (va.values, i * 2, ret[i]); | ||
81 | } | ||
82 | } else if (t == typeof (ushort[])) { | ||
83 | ushort[] ret = (ushort[]) values; | ||
84 | |||
85 | for (int i = 0; i < va.nbsamples; i++) { | ||
86 | Marshal.WriteInt16 (va.values, i * 2, (short) ret[i]); | ||
87 | } | ||
88 | } else if (t == typeof (int[])) { | ||
89 | int[] ret = (int[]) values; | ||
90 | |||
91 | for (int i = 0; i < va.nbsamples; i++) { | ||
92 | Marshal.WriteInt32 (va.values, i * 4, ret[i]); | ||
93 | } | ||
94 | } else if (t == typeof (uint[])) { | ||
95 | uint[] ret = (uint[]) values; | ||
96 | |||
97 | for (int i = 0; i < va.nbsamples; i++) { | ||
98 | Marshal.WriteInt32 (va.values, i * 4, (int) ret[i]); | ||
99 | } | ||
100 | } else if (t == typeof (long[])) { | ||
101 | long[] ret = (long[]) values; | ||
102 | |||
103 | for (int i = 0; i < va.nbsamples; i++) { | ||
104 | Marshal.WriteInt64 (va.values, i * 8, ret[i]); | ||
105 | } | ||
106 | } else if (t == typeof (ulong[])) { | ||
107 | ulong[] ret = (ulong[]) values; | ||
108 | |||
109 | for (int i = 0; i < va.nbsamples; i++) { | ||
110 | Marshal.WriteInt64 (va.values, i * 8, (long) ret[i]); | ||
111 | } | ||
112 | } else if (t == typeof (float[])) { | ||
113 | float[] ret = (float[]) values; | ||
114 | Marshal.Copy (ret, 0, va.values, va.nbsamples); | ||
115 | } else if (t == typeof (double[])) { | ||
116 | double[] ret = (double[]) values; | ||
117 | Marshal.Copy (ret, 0, va.values, va.nbsamples); | ||
118 | } else if (t == typeof (bool[])) { | ||
119 | bool[] ret = (bool[]) values; | ||
120 | |||
121 | for (int i = 0; i < va.nbsamples; i++) { | ||
122 | Marshal.WriteInt32 (va.values, i * 4, ret[i] == false ? 0 : 1); | ||
123 | } | ||
124 | } | ||
125 | |||
126 | return true; | ||
127 | } catch (Exception e) { | ||
128 | GLib.ExceptionManager.RaiseUnhandledException (e, true); | ||
129 | // NOTREACHED: Above call does not return. | ||
130 | throw e; | ||
131 | } | ||
132 | } | ||
133 | |||
134 | internal GetValueArrayCallbackNative NativeDelegate; | ||
135 | GetValueArrayCallback managed; | ||
136 | |||
137 | public GetValueArrayCallbackWrapper (GetValueArrayCallback managed) { | ||
138 | this.managed = managed; | ||
139 | if (managed != null) | ||
140 | NativeDelegate = new GetValueArrayCallbackNative (NativeCallback); | ||
141 | } | ||
142 | |||
143 | public static GetValueArrayCallback GetManagedDelegate (GetValueArrayCallbackNative native) { | ||
144 | if (native == null) | ||
145 | return null; | ||
146 | GetValueArrayCallbackWrapper wrapper = (GetValueArrayCallbackWrapper) native.Target; | ||
147 | if (wrapper == null) | ||
148 | return null; | ||
149 | return wrapper.managed; | ||
150 | } | ||
151 | } | ||
152 | |||
153 | public void SetCallbacks (GetValueCallback get_value, GetValueArrayCallback get_value_array) { | ||
154 | IntPtr off = new IntPtr (Handle.ToInt64 () + get_value_offset); | ||
155 | |||
156 | GstControlSourceCallbacks cbs = (GstControlSourceCallbacks) Marshal.PtrToStructure (new IntPtr (Handle.ToInt64 () + get_value_offset), typeof (GstControlSourceCallbacks)); | ||
157 | |||
158 | GetValueCallbackWrapper gv_wr = new GetValueCallbackWrapper (get_value); | ||
159 | GetValueArrayCallbackWrapper gva_wr = new GetValueArrayCallbackWrapper (get_value_array); | ||
160 | |||
161 | GetValue_cb_wrapper = gv_wr; | ||
162 | GetValueArray_cb_wrapper = gva_wr; | ||
163 | |||
164 | cbs.get_value = gv_wr.NativeCallback; | ||
165 | cbs.get_value_array = gva_wr.NativeCallback; | ||
166 | |||
167 | Marshal.StructureToPtr (cbs, off, false); | ||
168 | } | ||
169 | |||
170 | [DllImport ("gstreamersharpglue-0.10.dll") ] | ||
171 | static extern bool gst__controllersharp_gst__controller_controlsource_base_bind (IntPtr handle, IntPtr pspec); | ||
172 | |||
173 | [DllImport ("gstreamersharpglue-0.10.dll") ] | ||
174 | static extern void gst__controllersharp_gst__controller_controlsource_override_bind (IntPtr gtype, BindNativeDelegate cb); | ||
175 | |||
176 | [GLib.CDeclCallback] | ||
177 | delegate bool BindNativeDelegate (IntPtr handler, IntPtr pspec); | ||
178 | |||
179 | static BindNativeDelegate Bind_cb_delegate; | ||
180 | |||
181 | static BindNativeDelegate BindVMCallback { | ||
182 | get { | ||
183 | if (Bind_cb_delegate == null) | ||
184 | Bind_cb_delegate = new BindNativeDelegate (Bind_cb); | ||
185 | return Bind_cb_delegate; | ||
186 | } | ||
187 | } | ||
188 | |||
189 | static void OverrideBind (GLib.GType gtype) { | ||
190 | OverrideBind (gtype, BindVMCallback); | ||
191 | } | ||
192 | |||
193 | static void OverrideBind (GLib.GType gtype, BindNativeDelegate callback) { | ||
194 | gst__controllersharp_gst__controller_controlsource_override_bind (gtype.Val, callback); | ||
195 | } | ||
196 | |||
197 | static bool Bind_cb (IntPtr inst, IntPtr pspec) { | ||
198 | try { | ||
199 | ControlSource __obj = GLib.Object.GetObject (inst, false) as ControlSource; | ||
200 | Gst.PropertyInfo pinfo = new Gst.PropertyInfo (pspec); | ||
201 | return __obj.OnBind (pinfo); | ||
202 | } catch (Exception e) { | ||
203 | GLib.ExceptionManager.RaiseUnhandledException (e, false); | ||
204 | return false; | ||
205 | } | ||
206 | } | ||
207 | |||
208 | [DllImport ("libgobject-2.0-0.dll") ] | ||
209 | static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr property); | ||
210 | |||
211 | [GLib.DefaultSignalHandler (Type=typeof (Gst.Controller.ControlSource), ConnectionMethod="OverrideBind") ] | ||
212 | protected virtual bool OnBind (Gst.PropertyInfo pinfo) { | ||
213 | IntPtr klass = Marshal.ReadIntPtr (Handle); | ||
214 | IntPtr native_property = GLib.Marshaller.StringToPtrGStrdup (pinfo.Name); | ||
215 | IntPtr pspec = g_object_class_find_property (klass, native_property); | ||
216 | GLib.Marshaller.Free (native_property); | ||
217 | |||
218 | if (pspec == IntPtr.Zero) | ||
219 | return false; | ||
220 | |||
221 | return gst__controllersharp_gst__controller_controlsource_base_bind (this.Handle, pspec); | ||
222 | } | ||
223 | |||
224 | [DllImport ("libgstcontroller-0.10.dll") ] | ||
225 | static extern bool gst_control_source_get_value_array (IntPtr raw, ulong timestamp, ref GstValueArray value_array); | ||
226 | |||
227 | [DllImport ("libglib-2.0-0.dll") ] | ||
228 | static extern IntPtr g_try_malloc (int size); | ||
229 | |||
230 | static readonly Type[] supported_types = new Type[] { | ||
231 | typeof (string), | ||
232 | typeof (short), | ||
233 | typeof (ushort), | ||
234 | typeof (int), | ||
235 | typeof (uint), | ||
236 | typeof (long), | ||
237 | typeof (ulong), | ||
238 | typeof (float), | ||
239 | typeof (double), | ||
240 | typeof (bool) | ||
241 | }; | ||
242 | |||
243 | public System.Array GetValueArray (ulong timestamp, int nsamples, ulong interval) { | ||
244 | GstValueArray va = new GstValueArray (); | ||
245 | GLib.Value v = GLib.Value.Empty; | ||
246 | |||
247 | if (!GetValue (0, ref v)) | ||
248 | return null; | ||
249 | |||
250 | System.Type t = v.Val.GetType (); | ||
251 | v.Dispose (); | ||
252 | |||
253 | bool supported = false; | ||
254 | foreach (System.Type tmp in supported_types) | ||
255 | if (tmp == t) | ||
256 | supported = true; | ||
257 | if (!supported) | ||
258 | throw new Exception ("Unsupported type '" + t + "'"); | ||
259 | |||
260 | int eltsize = Marshal.SizeOf (t); | ||
261 | va.values = g_try_malloc (eltsize * nsamples); | ||
262 | if (va.values == IntPtr.Zero) | ||
263 | throw new OutOfMemoryException (); | ||
264 | |||
265 | va.nbsamples = nsamples; | ||
266 | va.sample_interval = interval; | ||
267 | |||
268 | bool raw_ret = gst_control_source_get_value_array (Handle, timestamp, ref va); | ||
269 | |||
270 | if (!raw_ret) { | ||
271 | GLib.Marshaller.Free (va.values); | ||
272 | return null; | ||
273 | } | ||
274 | |||
275 | System.Array values = Array.CreateInstance (t, nsamples); | ||
276 | |||
277 | if (t == typeof (string)) { | ||
278 | string[] ret = (string[]) values; | ||
279 | |||
280 | for (int i = 0; i < nsamples; i++) { | ||
281 | IntPtr str = Marshal.ReadIntPtr (va.values, i * IntPtr.Size); | ||
282 | ret[i] = GLib.Marshaller.PtrToStringGFree (str); | ||
283 | } | ||
284 | } else if (t == typeof (short)) { | ||
285 | short[] ret = (short[]) values; | ||
286 | |||
287 | for (int i = 0; i < nsamples; i++) { | ||
288 | ret[i] = Marshal.ReadInt16 (va.values, i * 2); | ||
289 | } | ||
290 | } else if (t == typeof (ushort)) { | ||
291 | ushort[] ret = (ushort[]) values; | ||
292 | |||
293 | for (int i = 0; i < nsamples; i++) { | ||
294 | ret[i] = (ushort) Marshal.ReadInt16 (va.values, i * 2); | ||
295 | } | ||
296 | } else if (t == typeof (int)) { | ||
297 | int[] ret = (int[]) values; | ||
298 | |||
299 | for (int i = 0; i < nsamples; i++) { | ||
300 | ret[i] = Marshal.ReadInt32 (va.values, i * 4); | ||
301 | } | ||
302 | } else if (t == typeof (uint)) { | ||
303 | uint[] ret = (uint[]) values; | ||
304 | |||
305 | for (int i = 0; i < nsamples; i++) { | ||
306 | ret[i] = (uint) Marshal.ReadInt32 (va.values, i * 4); | ||
307 | } | ||
308 | } else if (t == typeof (long)) { | ||
309 | long[] ret = (long[]) values; | ||
310 | |||
311 | for (int i = 0; i < nsamples; i++) { | ||
312 | ret[i] = Marshal.ReadInt64 (va.values, i * 8); | ||
313 | } | ||
314 | } else if (t == typeof (ulong)) { | ||
315 | ulong[] ret = (ulong[]) values; | ||
316 | |||
317 | for (int i = 0; i < nsamples; i++) { | ||
318 | ret[i] = (ulong) Marshal.ReadInt64 (va.values, i * 8); | ||
319 | } | ||
320 | } else if (t == typeof (float)) { | ||
321 | float[] ret = (float[]) values; | ||
322 | Marshal.Copy (va.values, ret, 0, nsamples); | ||
323 | } else if (t == typeof (double)) { | ||
324 | double[] ret = (double[]) values; | ||
325 | Marshal.Copy (va.values, ret, 0, nsamples); | ||
326 | } else if (t == typeof (bool)) { | ||
327 | bool[] ret = (bool[]) values; | ||
328 | |||
329 | for (int i = 0; i < nsamples; i++) { | ||
330 | ret[i] = Marshal.ReadInt32 (va.values, i * 4) != 0; | ||
331 | } | ||
332 | } | ||
333 | |||
334 | GLib.Marshaller.Free (va.values); | ||
335 | |||
336 | return values; | ||
337 | } | ||
338 | |||
diff --git a/gstreamer-sharp/Controller.custom b/gstreamer-sharp/Controller.custom new file mode 100644 index 0000000..3613b1e --- /dev/null +++ b/gstreamer-sharp/Controller.custom | |||
@@ -0,0 +1,187 @@ | |||
1 | [DllImport ("libgstcontroller-0.10.dll") ] | ||
2 | static extern IntPtr gst_controller_new_list (IntPtr objekt, IntPtr list); | ||
3 | |||
4 | public Controller (GLib.Object objekt, string[] properties) : base (IntPtr.Zero) { | ||
5 | if (GetType () != typeof (Controller)) { | ||
6 | throw new InvalidOperationException ("Can't override this constructor."); | ||
7 | } | ||
8 | GLib.List list = new GLib.List (properties, typeof (string), true, true); | ||
9 | |||
10 | Raw = gst_controller_new_list (objekt == null ? IntPtr.Zero : objekt.Handle, list == null ? IntPtr.Zero : list.Handle); | ||
11 | } | ||
12 | |||
13 | public Controller (GLib.Object objekt, string property) : this (objekt, new string[] {property}) { } | ||
14 | |||
15 | [DllImport ("libgstcontroller-0.10.dll") ] | ||
16 | static extern bool gst_controller_remove_properties_list (IntPtr raw, IntPtr list); | ||
17 | |||
18 | public bool RemoveProperties (string[] properties) { | ||
19 | GLib.List list = new GLib.List (properties, typeof (string), true, true); | ||
20 | |||
21 | bool raw_ret = gst_controller_remove_properties_list (Handle, list == null ? IntPtr.Zero : list.Handle); | ||
22 | bool ret = raw_ret; | ||
23 | return ret; | ||
24 | } | ||
25 | |||
26 | public bool RemoveProperty (string property) { | ||
27 | return RemoveProperties (new string[] {property}); | ||
28 | } | ||
29 | |||
30 | |||
31 | [DllImport ("gstreamersharpglue-0.10.dll") ] | ||
32 | extern static uint gst__controllersharp_gst__controller_controller_get_properties_offset (); | ||
33 | |||
34 | static uint properties_offset = gst__controllersharp_gst__controller_controller_get_properties_offset (); | ||
35 | public string[] Properties { | ||
36 | get { | ||
37 | GLib.List properties_list; | ||
38 | |||
39 | unsafe { | ||
40 | IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + properties_offset); | ||
41 | properties_list = new GLib.List ( (*raw_ptr), typeof (string)); | ||
42 | } | ||
43 | |||
44 | string[] properties = new string[properties_list.Count]; | ||
45 | for (int i = 0; i < properties_list.Count; i++) | ||
46 | properties[i] = (string) properties_list[i]; | ||
47 | |||
48 | return properties; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | [DllImport ("gstreamersharpglue-0.10.dll") ] | ||
53 | extern static uint gst__controllersharp_gst__controller_controller_get_object_offset (); | ||
54 | |||
55 | static uint object_offset = gst__controllersharp_gst__controller_controller_get_object_offset (); | ||
56 | public GLib.Object Object { | ||
57 | get { | ||
58 | unsafe { | ||
59 | IntPtr* raw_ptr = (IntPtr*) ( ( (byte*) Handle) + object_offset); | ||
60 | return GLib.Object.GetObject ( (*raw_ptr)); | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | |||
65 | [StructLayout (LayoutKind.Sequential) ] | ||
66 | struct GstValueArray { | ||
67 | public IntPtr property_name; | ||
68 | public int nbsamples; | ||
69 | public ulong sample_interval; | ||
70 | public IntPtr values; | ||
71 | } | ||
72 | |||
73 | [DllImport ("libgstcontroller-0.10.dll") ] | ||
74 | static extern bool gst_controller_get_value_array (IntPtr raw, ulong timestamp, ref GstValueArray value_array); | ||
75 | |||
76 | [DllImport ("libglib-2.0-0.dll") ] | ||
77 | static extern IntPtr g_try_malloc (int size); | ||
78 | |||
79 | static readonly Type[] supported_types = new Type[] { | ||
80 | typeof (string), | ||
81 | typeof (short), | ||
82 | typeof (ushort), | ||
83 | typeof (int), | ||
84 | typeof (uint), | ||
85 | typeof (long), | ||
86 | typeof (ulong), | ||
87 | typeof (float), | ||
88 | typeof (double), | ||
89 | typeof (bool) | ||
90 | }; | ||
91 | |||
92 | public System.Array GetValueArray (string property, ulong timestamp, int nsamples, ulong interval) { | ||
93 | GstValueArray va = new GstValueArray (); | ||
94 | |||
95 | Gst.Object ob = (Gst.Object) this.Object; | ||
96 | Gst.PropertyInfo pi = ob.GetPropertyInfo (property); | ||
97 | System.Type t = (System.Type) pi.GType; | ||
98 | |||
99 | bool supported = false; | ||
100 | foreach (System.Type tmp in supported_types) | ||
101 | if (tmp == t) | ||
102 | supported = true; | ||
103 | if (!supported) | ||
104 | throw new Exception ("Unsupported type '" + t + "'"); | ||
105 | |||
106 | int eltsize = Marshal.SizeOf (t); | ||
107 | va.values = g_try_malloc (eltsize * nsamples); | ||
108 | if (va.values == IntPtr.Zero) | ||
109 | throw new OutOfMemoryException (); | ||
110 | |||
111 | va.property_name = GLib.Marshaller.StringToPtrGStrdup (property); | ||
112 | va.nbsamples = nsamples; | ||
113 | va.sample_interval = interval; | ||
114 | |||
115 | bool raw_ret = gst_controller_get_value_array (Handle, timestamp, ref va); | ||
116 | |||
117 | if (!raw_ret) { | ||
118 | GLib.Marshaller.Free (va.property_name); | ||
119 | GLib.Marshaller.Free (va.values); | ||
120 | return null; | ||
121 | } | ||
122 | |||
123 | System.Array values = Array.CreateInstance (t, nsamples); | ||
124 | |||
125 | if (t == typeof (string)) { | ||
126 | string[] ret = (string[]) values; | ||
127 | |||
128 | for (int i = 0; i < nsamples; i++) { | ||
129 | IntPtr str = Marshal.ReadIntPtr (va.values, i * IntPtr.Size); | ||
130 | ret[i] = GLib.Marshaller.PtrToStringGFree (str); | ||
131 | } | ||
132 | } else if (t == typeof (short)) { | ||
133 | short[] ret = (short[]) values; | ||
134 | |||
135 | for (int i = 0; i < nsamples; i++) { | ||
136 | ret[i] = Marshal.ReadInt16 (va.values, i * 2); | ||
137 | } | ||
138 | } else if (t == typeof (ushort)) { | ||
139 | ushort[] ret = (ushort[]) values; | ||
140 | |||
141 | for (int i = 0; i < nsamples; i++) { | ||
142 | ret[i] = (ushort) Marshal.ReadInt16 (va.values, i * 2); | ||
143 | } | ||
144 | } else if (t == typeof (int)) { | ||
145 | int[] ret = (int[]) values; | ||
146 | |||
147 | for (int i = 0; i < nsamples; i++) { | ||
148 | ret[i] = Marshal.ReadInt32 (va.values, i * 4); | ||
149 | } | ||
150 | } else if (t == typeof (uint)) { | ||
151 | uint[] ret = (uint[]) values; | ||
152 | |||
153 | for (int i = 0; i < nsamples; i++) { | ||
154 | ret[i] = (uint) Marshal.ReadInt32 (va.values, i * 4); | ||
155 | } | ||
156 | } else if (t == typeof (long)) { | ||
157 | long[] ret = (long[]) values; | ||
158 | |||
159 | for (int i = 0; i < nsamples; i++) { | ||
160 | ret[i] = Marshal.ReadInt64 (va.values, i * 8); | ||
161 | } | ||
162 | } else if (t == typeof (ulong)) { | ||
163 | ulong[] ret = (ulong[]) values; | ||
164 | |||
165 | for (int i = 0; i < nsamples; i++) { | ||
166 | ret[i] = (ulong) Marshal.ReadInt64 (va.values, i * 8); | ||
167 | } | ||
168 | } else if (t == typeof (float)) { | ||
169 | float[] ret = (float[]) values; | ||
170 | Marshal.Copy (va.values, ret, 0, nsamples); | ||
171 | } else if (t == typeof (double)) { | ||
172 | double[] ret = (double[]) values; | ||
173 | Marshal.Copy (va.values, ret, 0, nsamples); | ||
174 | } else if (t == typeof (bool)) { | ||
175 | bool[] ret = (bool[]) values; | ||
176 | |||
177 | for (int i = 0; i < nsamples; i++) { | ||
178 | ret[i] = Marshal.ReadInt32 (va.values, i * 4) != 0; | ||
179 | } | ||
180 | } | ||
181 | |||
182 | GLib.Marshaller.Free (va.property_name); | ||
183 | GLib.Marshaller.Free (va.values); | ||
184 | |||
185 | return values; | ||
186 | } | ||
187 | |||
diff --git a/gstreamer-sharp/Gstreamer.metadata b/gstreamer-sharp/Gstreamer.metadata index 0e051f6..2595784 100644 --- a/gstreamer-sharp/Gstreamer.metadata +++ b/gstreamer-sharp/Gstreamer.metadata | |||
@@ -1057,6 +1057,59 @@ | |||
1057 | </class> | 1057 | </class> |
1058 | </add-node> | 1058 | </add-node> |
1059 | 1059 | ||
1060 | <!-- GStreamer Controller library --> | ||
1061 | <attr path="/api/namespace/enum[@cname='GstInterpolateMode']" name="name">InterpolateMode</attr> | ||
1062 | <attr path="/api/namespace/enum[@cname='GstLFOWaveform']" name="name">LFOWaveform</attr> | ||
1063 | <attr path="/api/namespace/callback[@cname='GstControlSourceBind']" name="hidden">1</attr> | ||
1064 | <attr path="/api/namespace/callback[@cname='GstControlSourceGetValue']" name="hidden">1</attr> | ||
1065 | <attr path="/api/namespace/callback[@cname='GstControlSourceGetValueArray']" name="hidden">1</attr> | ||
1066 | |||
1067 | <attr path="/api/namespace/object[@cname='GstController']" name="name">Controller</attr> | ||
1068 | <attr path="/api/namespace/object[@cname='GstController']/property" name="hidden">1</attr> | ||
1069 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_get_all']" name="hidden">1</attr> | ||
1070 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_get_control_source']/return-type" name="owned">true</attr> | ||
1071 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_get_value_array']" name="hidden">1</attr> | ||
1072 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_get_value_arrays']" name="hidden">1</attr> | ||
1073 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_init']" name="hidden">1</attr> | ||
1074 | <attr path="/api/namespace/object[@cname='GstController']/constructor[@cname='gst_controller_new']" name="hidden">1</attr> | ||
1075 | <attr path="/api/namespace/object[@cname='GstController']/constructor[@cname='gst_controller_new_valist']" name="hidden">1</attr> | ||
1076 | <attr path="/api/namespace/object[@cname='GstController']/constructor[@cname='gst_controller_new_list']" name="hidden">1</attr> | ||
1077 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_remove_properties']" name="hidden">1</attr> | ||
1078 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_remove_properties_list']" name="hidden">1</attr> | ||
1079 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_remove_properties_valist']" name="hidden">1</attr> | ||
1080 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_set']" name="hidden">1</attr> | ||
1081 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_set_from_list']" name="hidden">1</attr> | ||
1082 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_set_interpolation_mode']" name="hidden">1</attr> | ||
1083 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_unset']" name="hidden">1</attr> | ||
1084 | <attr path="/api/namespace/object[@cname='GstController']/method[@cname='gst_controller_unset_all']" name="hidden">1</attr> | ||
1085 | |||
1086 | <attr path="/api/namespace/object[@cname='GstControlSource']" name="name">ControlSource</attr> | ||
1087 | <remove-node path="/api/namespace/object[@cname='GstControlSource']/class_struct" /> | ||
1088 | <add-node path="/api/namespace/object[@cname='GstControlSource']"> | ||
1089 | <class_struct cname="GstControlSourceClass"> | ||
1090 | <field name="ParentClass" cname="parent_class" type="GObjectClass" /> | ||
1091 | <method vm="bind" /> | ||
1092 | <field name="GstReserved" cname="_gst_reserved" type="gpointer" array_len="4" /> | ||
1093 | </class_struct> | ||
1094 | <virtual_method name="Bind" cname="bind" hidden="1"> | ||
1095 | <return-type type="gboolean" /> | ||
1096 | <parameters> | ||
1097 | <parameter type="GstControlSource*" name="self" /> | ||
1098 | <parameter type="GParamSpec*" name="pspec" /> | ||
1099 | </parameters> | ||
1100 | </virtual_method> | ||
1101 | </add-node> | ||
1102 | <attr path="/api/namespace/object[@cname='GstControlSource']/method[@cname='gst_control_source_get_value']/parameters/parameter[@name='value']" name="pass_as">ref</attr> | ||
1103 | |||
1104 | <attr path="/api/namespace/object[@cname='GstInterpolationControlSource']" name="name">InterpolationControlSource</attr> | ||
1105 | <attr path="/api/namespace/object[@cname='GstInterpolationControlSource']/method[@cname='gst_interpolation_control_source_set']/parameters/parameter[@name='value']" name="pass_as">ref</attr> | ||
1106 | <attr path="/api/namespace/object[@cname='GstInterpolationControlSource']/method[@cname='gst_interpolation_control_source_set_from_list']" name="hidden">1</attr> | ||
1107 | <attr path="/api/namespace/object[@cname='GstInterpolationControlSource']/method[@cname='gst_interpolation_control_source_get_all']" name="hidden">1</attr> | ||
1108 | <attr path="/api/namespace/object[@cname='GstLFOControlSource']" name="name">LFOControlSource</attr> | ||
1109 | <attr path="/api/namespace/struct[@cname='GstTimedValue']" name="hidden">1</attr> | ||
1110 | <attr path="/api/namespace/struct[@cname='GstValueArray']" name="hidden">1</attr> | ||
1111 | |||
1112 | |||
1060 | <!-- GStreamer Interfaces library --> | 1113 | <!-- GStreamer Interfaces library --> |
1061 | <attr path="/api/namespace/enum[@cname='GstColorBalanceType']" name="name">ColorBalanceType</attr> | 1114 | <attr path="/api/namespace/enum[@cname='GstColorBalanceType']" name="name">ColorBalanceType</attr> |
1062 | <attr path="/api/namespace/enum[@cname='GstMixerFlags']" name="name">MixerFlags</attr> | 1115 | <attr path="/api/namespace/enum[@cname='GstMixerFlags']" name="name">MixerFlags</attr> |
diff --git a/gstreamer-sharp/Makefile.am b/gstreamer-sharp/Makefile.am index 57632ea..e363df6 100644 --- a/gstreamer-sharp/Makefile.am +++ b/gstreamer-sharp/Makefile.am | |||
@@ -109,7 +109,9 @@ customs = \ | |||
109 | MixerTrack.custom \ | 109 | MixerTrack.custom \ |
110 | TunerNorm.custom \ | 110 | TunerNorm.custom \ |
111 | TunerChannel.custom \ | 111 | TunerChannel.custom \ |
112 | Adapter.custom | 112 | Adapter.custom \ |
113 | Controller.custom \ | ||
114 | ControlSource.custom | ||
113 | 115 | ||
114 | build_customs = $(addprefix $(srcdir)/, $(customs)) | 116 | build_customs = $(addprefix $(srcdir)/, $(customs)) |
115 | 117 | ||
diff --git a/gstreamer-sharp/glue/Makefile.am b/gstreamer-sharp/glue/Makefile.am index d7963eb..d35bf82 100644 --- a/gstreamer-sharp/glue/Makefile.am +++ b/gstreamer-sharp/glue/Makefile.am | |||
@@ -18,7 +18,9 @@ libgstreamersharpglue_0_10_la_SOURCES = \ | |||
18 | indexfactory.c \ | 18 | indexfactory.c \ |
19 | mixertrack.c \ | 19 | mixertrack.c \ |
20 | tunernorm.c \ | 20 | tunernorm.c \ |
21 | adapter.c | 21 | adapter.c \ |
22 | controller.c \ | ||
23 | controlsource.c | ||
22 | 24 | ||
23 | nodist_libgstreamersharpglue_0_10_la_SOURCES = generated.c | 25 | nodist_libgstreamersharpglue_0_10_la_SOURCES = generated.c |
24 | 26 | ||
diff --git a/gstreamer-sharp/glue/controller.c b/gstreamer-sharp/glue/controller.c new file mode 100644 index 0000000..a540871 --- /dev/null +++ b/gstreamer-sharp/glue/controller.c | |||
@@ -0,0 +1,14 @@ | |||
1 | #include <gst/controller/gstcontroller.h> | ||
2 | |||
3 | guint | ||
4 | gst__controllersharp_gst__controller_controller_get_properties_offset (void) | ||
5 | { | ||
6 | return (guint)G_STRUCT_OFFSET (GstController, properties); | ||
7 | } | ||
8 | |||
9 | guint | ||
10 | gst__controllersharp_gst__controller_controller_get_object_offset (void) | ||
11 | { | ||
12 | return (guint)G_STRUCT_OFFSET (GstController, object); | ||
13 | } | ||
14 | |||
diff --git a/gstreamer-sharp/glue/controlsource.c b/gstreamer-sharp/glue/controlsource.c new file mode 100644 index 0000000..173a09e --- /dev/null +++ b/gstreamer-sharp/glue/controlsource.c | |||
@@ -0,0 +1,41 @@ | |||
1 | #include <gst/gst.h> | ||
2 | #include <gst/controller/gstcontrolsource.h> | ||
3 | |||
4 | guint | ||
5 | gst__controllersharp_gst__controller_controlsource_get_get_value_offset (void) | ||
6 | { | ||
7 | return (guint)G_STRUCT_OFFSET (GstControlSource, get_value); | ||
8 | } | ||
9 | |||
10 | const gchar *__gtype_prefix = "__gtksharp_"; | ||
11 | #define HAS_PREFIX(a) (*((guint64 *)(a)) == *((guint64 *) __gtype_prefix)) | ||
12 | |||
13 | static GObjectClass * | ||
14 | get_threshold_class (GObject *obj) | ||
15 | { | ||
16 | GType gtype = G_TYPE_FROM_INSTANCE (obj); | ||
17 | while (HAS_PREFIX (g_type_name (gtype))) | ||
18 | gtype = g_type_parent (gtype); | ||
19 | GObjectClass *klass = g_type_class_peek (gtype); | ||
20 | if (klass == NULL) klass = g_type_class_ref (gtype); | ||
21 | return klass; | ||
22 | } | ||
23 | |||
24 | gboolean | ||
25 | gst__controllersharp_gst__controller_controlsource_base_bind (GstControlSource *csource, GParamSpec *pspec) | ||
26 | { | ||
27 | GstControlSourceClass *parent = (GstControlSourceClass *) get_threshold_class (G_OBJECT (csource)); | ||
28 | if (parent->bind) | ||
29 | return parent->bind (csource, pspec); | ||
30 | return FALSE; | ||
31 | } | ||
32 | |||
33 | void | ||
34 | gst__controllersharp_gst__controller_controlsource_override_bind (GType gtype, gpointer cb) | ||
35 | { | ||
36 | GstControlSourceClass *klass = g_type_class_peek (gtype); | ||
37 | if (!klass) | ||
38 | klass = g_type_class_ref (gtype); | ||
39 | ((GstControlSourceClass *) klass)->bind = cb; | ||
40 | } | ||
41 | |||
diff --git a/gstreamer-sharp/gstreamer-api.raw b/gstreamer-sharp/gstreamer-api.raw index e938735..fbf4af3 100644 --- a/gstreamer-sharp/gstreamer-api.raw +++ b/gstreamer-sharp/gstreamer-api.raw | |||
@@ -6873,6 +6873,310 @@ | |||
6873 | </method> | 6873 | </method> |
6874 | </object> | 6874 | </object> |
6875 | </namespace> | 6875 | </namespace> |
6876 | <namespace name="Gst.Controller" library="libgstcontroller-0.10.dll"> | ||
6877 | <enum name="GstInterpolateMode" cname="GstInterpolateMode" type="enum"> | ||
6878 | <member cname="GST_INTERPOLATE_NONE" name="None" /> | ||
6879 | <member cname="GST_INTERPOLATE_TRIGGER" name="Trigger" /> | ||
6880 | <member cname="GST_INTERPOLATE_LINEAR" name="Linear" /> | ||
6881 | <member cname="GST_INTERPOLATE_QUADRATIC" name="Quadratic" /> | ||
6882 | <member cname="GST_INTERPOLATE_CUBIC" name="Cubic" /> | ||
6883 | <member cname="GST_INTERPOLATE_USER" name="User" /> | ||
6884 | </enum> | ||
6885 | <enum name="GstLFOWaveform" cname="GstLFOWaveform" type="enum"> | ||
6886 | <member cname="GST_LFO_WAVEFORM_SINE" name="Sine" /> | ||
6887 | <member cname="GST_LFO_WAVEFORM_SQUARE" name="Square" /> | ||
6888 | <member cname="GST_LFO_WAVEFORM_SAW" name="Saw" /> | ||
6889 | <member cname="GST_LFO_WAVEFORM_REVERSE_SAW" name="ReverseSaw" /> | ||
6890 | <member cname="GST_LFO_WAVEFORM_TRIANGLE" name="Triangle" /> | ||
6891 | </enum> | ||
6892 | <callback name="GstControlSourceBind" cname="GstControlSourceBind"> | ||
6893 | <return-type type="gboolean" /> | ||
6894 | <parameters> | ||
6895 | <parameter type="GstControlSource*" name="self" /> | ||
6896 | <parameter type="GParamSpec*" name="pspec" /> | ||
6897 | </parameters> | ||
6898 | </callback> | ||
6899 | <callback name="GstControlSourceGetValue" cname="GstControlSourceGetValue"> | ||
6900 | <return-type type="gboolean" /> | ||
6901 | <parameters> | ||
6902 | <parameter type="GstControlSource*" name="self" /> | ||
6903 | <parameter type="GstClockTime" name="timestamp" /> | ||
6904 | <parameter type="GValue*" name="value" /> | ||
6905 | </parameters> | ||
6906 | </callback> | ||
6907 | <callback name="GstControlSourceGetValueArray" cname="GstControlSourceGetValueArray"> | ||
6908 | <return-type type="gboolean" /> | ||
6909 | <parameters> | ||
6910 | <parameter type="GstControlSource*" name="self" /> | ||
6911 | <parameter type="GstClockTime" name="timestamp" /> | ||
6912 | <parameter type="GstValueArray*" name="value_array" /> | ||
6913 | </parameters> | ||
6914 | </callback> | ||
6915 | <object name="GstController" cname="GstController" parent="GObject"> | ||
6916 | <class_struct cname="GstControllerClass"> | ||
6917 | <field name="ParentClass" cname="parent_class" type="GObjectClass" /> | ||
6918 | <field name="GstReserved" cname="_gst_reserved" type="gpointer" array_len="GST_PADDING" /> | ||
6919 | </class_struct> | ||
6920 | <field name="Properties" cname="properties" type="GList*" /> | ||
6921 | <field name="Lock" cname="lock" type="GMutex*" /> | ||
6922 | <field name="Object" cname="object" type="GObject*" /> | ||
6923 | <field name="Priv" cname="priv" type="GstControllerPrivate*" /> | ||
6924 | <field name="GstReserved" cname="_gst_reserved" array_len="GST_PADDING - 1" type="gpointer" /> | ||
6925 | <property name="ControlRate" cname="control-rate" type="guint64" readable="true" writeable="true" /> | ||
6926 | <method name="Get" cname="gst_controller_get"> | ||
6927 | <return-type type="GValue*" /> | ||
6928 | <parameters> | ||
6929 | <parameter type="gchar*" name="property_name" /> | ||
6930 | <parameter type="GstClockTime" name="timestamp" /> | ||
6931 | </parameters> | ||
6932 | </method> | ||
6933 | <method name="GetAll" cname="gst_controller_get_all" deprecated="1"> | ||
6934 | <return-type type="const-GList*" /> | ||
6935 | <parameters> | ||
6936 | <parameter type="gchar*" name="property_name" /> | ||
6937 | </parameters> | ||
6938 | </method> | ||
6939 | <method name="GetControlSource" cname="gst_controller_get_control_source"> | ||
6940 | <return-type type="GstControlSource*" /> | ||
6941 | <parameters> | ||
6942 | <parameter type="gchar*" name="property_name" /> | ||
6943 | </parameters> | ||
6944 | </method> | ||
6945 | <method name="GetType" cname="gst_controller_get_type" shared="true"> | ||
6946 | <return-type type="GType" /> | ||
6947 | </method> | ||
6948 | <method name="GetValueArray" cname="gst_controller_get_value_array"> | ||
6949 | <return-type type="gboolean" /> | ||
6950 | <parameters> | ||
6951 | <parameter type="GstClockTime" name="timestamp" /> | ||
6952 | <parameter type="GstValueArray*" name="value_array" /> | ||
6953 | </parameters> | ||
6954 | </method> | ||
6955 | <method name="GetValueArrays" cname="gst_controller_get_value_arrays"> | ||
6956 | <return-type type="gboolean" /> | ||
6957 | <parameters> | ||
6958 | <parameter type="GstClockTime" name="timestamp" /> | ||
6959 | <parameter type="GSList*" name="value_arrays" /> | ||
6960 | </parameters> | ||
6961 | </method> | ||
6962 | <method name="Init" cname="gst_controller_init" shared="true"> | ||
6963 | <return-type type="gboolean" /> | ||
6964 | <parameters> | ||
6965 | <parameter type="int*" name="argc" /> | ||
6966 | <parameter type="char***" name="argv" /> | ||
6967 | </parameters> | ||
6968 | </method> | ||
6969 | <constructor cname="gst_controller_new"> | ||
6970 | <parameters> | ||
6971 | <parameter type="GObject*" name="object" /> | ||
6972 | <parameter ellipsis="true" /> | ||
6973 | </parameters> | ||
6974 | </constructor> | ||
6975 | <constructor cname="gst_controller_new_list"> | ||
6976 | <parameters> | ||
6977 | <parameter type="GObject*" name="object" /> | ||
6978 | <parameter type="GList*" name="list" /> | ||
6979 | </parameters> | ||
6980 | </constructor> | ||
6981 | <constructor cname="gst_controller_new_valist"> | ||
6982 | <parameters> | ||
6983 | <parameter type="GObject*" name="object" /> | ||
6984 | <parameter type="va_list" name="var_args" /> | ||
6985 | </parameters> | ||
6986 | </constructor> | ||
6987 | <method name="RemoveProperties" cname="gst_controller_remove_properties"> | ||
6988 | <return-type type="gboolean" /> | ||
6989 | <parameters> | ||
6990 | <parameter ellipsis="true" /> | ||
6991 | </parameters> | ||
6992 | </method> | ||
6993 | <method name="RemovePropertiesList" cname="gst_controller_remove_properties_list"> | ||
6994 | <return-type type="gboolean" /> | ||
6995 | <parameters> | ||
6996 | <parameter type="GList*" name="list" /> | ||
6997 | </parameters> | ||
6998 | </method> | ||
6999 | <method name="RemovePropertiesValist" cname="gst_controller_remove_properties_valist"> | ||
7000 | <return-type type="gboolean" /> | ||
7001 | <parameters> | ||
7002 | <parameter type="va_list" name="var_args" /> | ||
7003 | </parameters> | ||
7004 | </method> | ||
7005 | <method name="Set" cname="gst_controller_set" deprecated="1"> | ||
7006 | <return-type type="gboolean" /> | ||
7007 | <parameters> | ||
7008 | <parameter type="gchar*" name="property_name" /> | ||
7009 | <parameter type="GstClockTime" name="timestamp" /> | ||
7010 | <parameter type="GValue*" name="value" /> | ||
7011 | </parameters> | ||
7012 | </method> | ||
7013 | <method name="SetControlSource" cname="gst_controller_set_control_source"> | ||
7014 | <return-type type="gboolean" /> | ||
7015 | <parameters> | ||
7016 | <parameter type="gchar*" name="property_name" /> | ||
7017 | <parameter type="GstControlSource*" name="csource" /> | ||
7018 | </parameters> | ||
7019 | </method> | ||
7020 | <method name="SetDisabled" cname="gst_controller_set_disabled"> | ||
7021 | <return-type type="void" /> | ||
7022 | <parameters> | ||
7023 | <parameter type="gboolean" name="disabled" /> | ||
7024 | </parameters> | ||
7025 | </method> | ||
7026 | <method name="SetFromList" cname="gst_controller_set_from_list" deprecated="1"> | ||
7027 | <return-type type="gboolean" /> | ||
7028 | <parameters> | ||
7029 | <parameter type="gchar*" name="property_name" /> | ||
7030 | <parameter type="GSList*" name="timedvalues" /> | ||
7031 | </parameters> | ||
7032 | </method> | ||
7033 | <method name="SetInterpolationMode" cname="gst_controller_set_interpolation_mode" deprecated="1"> | ||
7034 | <return-type type="gboolean" /> | ||
7035 | <parameters> | ||
7036 | <parameter type="gchar*" name="property_name" /> | ||
7037 | <parameter type="GstInterpolateMode" name="mode" /> | ||
7038 | </parameters> | ||
7039 | </method> | ||
7040 | <method name="SetPropertyDisabled" cname="gst_controller_set_property_disabled"> | ||
7041 | <return-type type="void" /> | ||
7042 | <parameters> | ||
7043 | <parameter type="gchar*" name="property_name" /> | ||
7044 | <parameter type="gboolean" name="disabled" /> | ||
7045 | </parameters> | ||
7046 | </method> | ||
7047 | <method name="SuggestNextSync" cname="gst_controller_suggest_next_sync"> | ||
7048 | <return-type type="GstClockTime" /> | ||
7049 | </method> | ||
7050 | <method name="SyncValues" cname="gst_controller_sync_values"> | ||
7051 | <return-type type="gboolean" /> | ||
7052 | <parameters> | ||
7053 | <parameter type="GstClockTime" name="timestamp" /> | ||
7054 | </parameters> | ||
7055 | </method> | ||
7056 | <method name="Unset" cname="gst_controller_unset" deprecated="1"> | ||
7057 | <return-type type="gboolean" /> | ||
7058 | <parameters> | ||
7059 | <parameter type="gchar*" name="property_name" /> | ||
7060 | <parameter type="GstClockTime" name="timestamp" /> | ||
7061 | </parameters> | ||
7062 | </method> | ||
7063 | <method name="UnsetAll" cname="gst_controller_unset_all" deprecated="1"> | ||
7064 | <return-type type="gboolean" /> | ||
7065 | <parameters> | ||
7066 | <parameter type="gchar*" name="property_name" /> | ||
7067 | </parameters> | ||
7068 | </method> | ||
7069 | </object> | ||
7070 | <object name="GstControlSource" cname="GstControlSource" parent="GObject"> | ||
7071 | <class_struct cname="GstControlSourceClass"> | ||
7072 | <field name="ParentClass" cname="parent_class" type="GObjectClass" /> | ||
7073 | <field name="Bind" cname="bind" type="GstControlSourceBind" /> | ||
7074 | <field name="GstReserved" cname="_gst_reserved" type="gpointer" array_len="GST_PADDING" /> | ||
7075 | </class_struct> | ||
7076 | <field name="GetValue" cname="get_value" type="GstControlSourceGetValue" access="public" /> | ||
7077 | <field name="GetValueArray" cname="get_value_array" type="GstControlSourceGetValueArray" access="public" /> | ||
7078 | <field name="Bound" cname="bound" type="gboolean" /> | ||
7079 | <field name="GstReserved" cname="_gst_reserved" array_len="GST_PADDING" type="gpointer" /> | ||
7080 | <method name="Bind" cname="gst_control_source_bind"> | ||
7081 | <return-type type="gboolean" /> | ||
7082 | <parameters> | ||
7083 | <parameter type="GParamSpec*" name="pspec" /> | ||
7084 | </parameters> | ||
7085 | </method> | ||
7086 | <method name="GetType" cname="gst_control_source_get_type" shared="true"> | ||
7087 | <return-type type="GType" /> | ||
7088 | </method> | ||
7089 | <method name="GetValue" cname="gst_control_source_get_value"> | ||
7090 | <return-type type="gboolean" /> | ||
7091 | <parameters> | ||
7092 | <parameter type="GstClockTime" name="timestamp" /> | ||
7093 | <parameter type="GValue*" name="value" /> | ||
7094 | </parameters> | ||
7095 | </method> | ||
7096 | <method name="GetValueArray" cname="gst_control_source_get_value_array"> | ||
7097 | <return-type type="gboolean" /> | ||
7098 | <parameters> | ||
7099 | <parameter type="GstClockTime" name="timestamp" /> | ||
7100 | <parameter type="GstValueArray*" name="value_array" /> | ||
7101 | </parameters> | ||
7102 | </method> | ||
7103 | </object> | ||
7104 | <object name="GstInterpolationControlSource" cname="GstInterpolationControlSource" parent="GstControlSource"> | ||
7105 | <class_struct cname="GstInterpolationControlSourceClass"> | ||
7106 | <field name="ParentClass" cname="parent_class" type="GstControlSourceClass" /> | ||
7107 | <field name="GstReserved" cname="_gst_reserved" type="gpointer" array_len="GST_PADDING" /> | ||
7108 | </class_struct> | ||
7109 | <field name="Lock" cname="lock" type="GMutex*" /> | ||
7110 | <field name="Priv" cname="priv" type="GstInterpolationControlSourcePrivate*" /> | ||
7111 | <field name="GstReserved" cname="_gst_reserved" array_len="GST_PADDING" type="gpointer" /> | ||
7112 | <method name="GetAll" cname="gst_interpolation_control_source_get_all"> | ||
7113 | <return-type type="GList*" /> | ||
7114 | </method> | ||
7115 | <method name="GetCount" cname="gst_interpolation_control_source_get_count"> | ||
7116 | <return-type type="gint" /> | ||
7117 | </method> | ||
7118 | <method name="GetType" cname="gst_interpolation_control_source_get_type" shared="true"> | ||
7119 | <return-type type="GType" /> | ||
7120 | </method> | ||
7121 | <constructor cname="gst_interpolation_control_source_new" /> | ||
7122 | <method name="Set" cname="gst_interpolation_control_source_set"> | ||
7123 | <return-type type="gboolean" /> | ||
7124 | <parameters> | ||
7125 | <parameter type="GstClockTime" name="timestamp" /> | ||
7126 | <parameter type="GValue*" name="value" /> | ||
7127 | </parameters> | ||
7128 | </method> | ||
7129 | <method name="SetFromList" cname="gst_interpolation_control_source_set_from_list"> | ||
7130 | <return-type type="gboolean" /> | ||
7131 | <parameters> | ||
7132 | <parameter type="GSList*" name="timedvalues" /> | ||
7133 | </parameters> | ||
7134 | </method> | ||
7135 | <method name="SetInterpolationMode" cname="gst_interpolation_control_source_set_interpolation_mode"> | ||
7136 | <return-type type="gboolean" /> | ||
7137 | <parameters> | ||
7138 | <parameter type="GstInterpolateMode" name="mode" /> | ||
7139 | </parameters> | ||
7140 | </method> | ||
7141 | <method name="Unset" cname="gst_interpolation_control_source_unset"> | ||
7142 | <return-type type="gboolean" /> | ||
7143 | <parameters> | ||
7144 | <parameter type="GstClockTime" name="timestamp" /> | ||
7145 | </parameters> | ||
7146 | </method> | ||
7147 | <method name="UnsetAll" cname="gst_interpolation_control_source_unset_all"> | ||
7148 | <return-type type="void" /> | ||
7149 | </method> | ||
7150 | </object> | ||
7151 | <object name="GstLFOControlSource" cname="GstLFOControlSource" parent="GstControlSource"> | ||
7152 | <class_struct cname="GstLFOControlSourceClass"> | ||
7153 | <field name="ParentClass" cname="parent_class" type="GstControlSourceClass" /> | ||
7154 | <field name="GstReserved" cname="_gst_reserved" type="gpointer" array_len="GST_PADDING" /> | ||
7155 | </class_struct> | ||
7156 | <field name="Priv" cname="priv" type="GstLFOControlSourcePrivate*" /> | ||
7157 | <field name="Lock" cname="lock" type="GMutex*" /> | ||
7158 | <field name="GstReserved" cname="_gst_reserved" array_len="GST_PADDING" type="gpointer" /> | ||
7159 | <property name="Waveform" cname="waveform" type="GstLfoWaveform" readable="true" writeable="true" /> | ||
7160 | <property name="Frequency" cname="frequency" type="gdouble" readable="true" writeable="true" /> | ||
7161 | <property name="Timeshift" cname="timeshift" type="guint64" readable="true" writeable="true" /> | ||
7162 | <property name="Amplitude" cname="amplitude" type="GValue" readable="true" writeable="true" /> | ||
7163 | <property name="Offset" cname="offset" type="GValue" readable="true" writeable="true" /> | ||
7164 | <method name="GetType" cname="gst_lfo_control_source_get_type" shared="true"> | ||
7165 | <return-type type="GType" /> | ||
7166 | </method> | ||
7167 | <constructor cname="gst_lfo_control_source_new" /> | ||
7168 | </object> | ||
7169 | <struct name="GstTimedValue" cname="GstTimedValue"> | ||
7170 | <field name="Timestamp" cname="timestamp" type="GstClockTime" /> | ||
7171 | <field name="Value" cname="value" type="GValue" /> | ||
7172 | </struct> | ||
7173 | <struct name="GstValueArray" cname="GstValueArray"> | ||
7174 | <field name="PropertyName" cname="property_name" type="gchar*" /> | ||
7175 | <field name="Nbsamples" cname="nbsamples" type="gint" /> | ||
7176 | <field name="SampleInterval" cname="sample_interval" type="GstClockTime" /> | ||
7177 | <field name="Values" cname="values" type="gpointer*" /> | ||
7178 | </struct> | ||
7179 | </namespace> | ||
6876 | <namespace name="Gst.Interfaces" library="libgstinterfaces-0.10.dll"> | 7180 | <namespace name="Gst.Interfaces" library="libgstinterfaces-0.10.dll"> |
6877 | <enum name="GstColorBalanceType" cname="GstColorBalanceType" gtype="gst_color_balance_type_get_type" type="enum"> | 7181 | <enum name="GstColorBalanceType" cname="GstColorBalanceType" gtype="gst_color_balance_type_get_type" type="enum"> |
6878 | <member cname="GST_COLOR_BALANCE_HARDWARE" name="Hardware" /> | 7182 | <member cname="GST_COLOR_BALANCE_HARDWARE" name="Hardware" /> |
diff --git a/gstreamer-sharp/gstreamer-sharp.dll.config.in b/gstreamer-sharp/gstreamer-sharp.dll.config.in index 4a168ed..f4e440f 100644 --- a/gstreamer-sharp/gstreamer-sharp.dll.config.in +++ b/gstreamer-sharp/gstreamer-sharp.dll.config.in | |||
@@ -3,5 +3,6 @@ | |||
3 | <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/> | 3 | <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/> |
4 | <dllmap dll="libgstreamer-0.10.dll" target="libgstreamer-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> | 4 | <dllmap dll="libgstreamer-0.10.dll" target="libgstreamer-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> |
5 | <dllmap dll="libgstbase-0.10.dll" target="libgstbase-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> | 5 | <dllmap dll="libgstbase-0.10.dll" target="libgstbase-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> |
6 | <dllmap dll="libgstcontroller-0.10.dll" target="libgstcontroller-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> | ||
6 | <dllmap dll="libgstinterfaces-0.10.dll" target="libgstinterfaces-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> | 7 | <dllmap dll="libgstinterfaces-0.10.dll" target="libgstinterfaces-0.10@LIB_PREFIX@.0@LIB_SUFFIX@/> |
7 | </configuration> | 8 | </configuration> |
diff --git a/source/gstreamer-sharp-source.xml b/source/gstreamer-sharp-source.xml index 0ba19d1..34891f2 100644 --- a/source/gstreamer-sharp-source.xml +++ b/source/gstreamer-sharp-source.xml | |||
@@ -39,6 +39,15 @@ | |||
39 | <exclude>../../gstreamer/libs/gst/base/gstbytereader.h</exclude> | 39 | <exclude>../../gstreamer/libs/gst/base/gstbytereader.h</exclude> |
40 | </namespace> | 40 | </namespace> |
41 | </library> | 41 | </library> |
42 | <library name="libgstcontroller-0.10.dll"> | ||
43 | <namespace name="Gst.Controller"> | ||
44 | <dir>../../gstreamer/libs/gst/controller</dir> | ||
45 | <!-- Needs to be bound --> | ||
46 | <exclude>../../gstreamer/libs/gst/controller/gstcontrollerprivate.h</exclude> | ||
47 | <exclude>../../gstreamer/libs/gst/controller/gstinterpolationcontrolsourceprivate.h</exclude> | ||
48 | <exclude>../../gstreamer/libs/gst/controller/gstlfocontrolsourceprivate.h</exclude> | ||
49 | </namespace> | ||
50 | </library> | ||
42 | <library name="libgstinterfaces-0.10.dll"> | 51 | <library name="libgstinterfaces-0.10.dll"> |
43 | <namespace name="Gst.Interfaces"> | 52 | <namespace name="Gst.Interfaces"> |
44 | <dir>../../gst-plugins-base/gst-libs/gst/interfaces</dir> | 53 | <dir>../../gst-plugins-base/gst-libs/gst/interfaces</dir> |