gstreamer 0.90.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/ChangeLog +1157 -0
  2. data/README +33 -0
  3. data/Rakefile +15 -0
  4. data/ext/gstreamer/Makefile +162 -0
  5. data/ext/gstreamer/depend +5 -0
  6. data/ext/gstreamer/extconf.rb +63 -0
  7. data/ext/gstreamer/gst.so +0 -0
  8. data/ext/gstreamer/misc.c +62 -0
  9. data/ext/gstreamer/misc.o +0 -0
  10. data/ext/gstreamer/rbgst-bin.c +466 -0
  11. data/ext/gstreamer/rbgst-bin.o +0 -0
  12. data/ext/gstreamer/rbgst-buffer.c +365 -0
  13. data/ext/gstreamer/rbgst-buffer.o +0 -0
  14. data/ext/gstreamer/rbgst-bus.c +92 -0
  15. data/ext/gstreamer/rbgst-bus.o +0 -0
  16. data/ext/gstreamer/rbgst-caps.c +441 -0
  17. data/ext/gstreamer/rbgst-caps.o +0 -0
  18. data/ext/gstreamer/rbgst-child-proxy.c +33 -0
  19. data/ext/gstreamer/rbgst-child-proxy.o +0 -0
  20. data/ext/gstreamer/rbgst-clock.c +108 -0
  21. data/ext/gstreamer/rbgst-clock.o +0 -0
  22. data/ext/gstreamer/rbgst-element-factory.c +255 -0
  23. data/ext/gstreamer/rbgst-element-factory.o +0 -0
  24. data/ext/gstreamer/rbgst-element.c +1053 -0
  25. data/ext/gstreamer/rbgst-element.o +0 -0
  26. data/ext/gstreamer/rbgst-event.c +351 -0
  27. data/ext/gstreamer/rbgst-event.o +0 -0
  28. data/ext/gstreamer/rbgst-ghost-pad.c +42 -0
  29. data/ext/gstreamer/rbgst-ghost-pad.o +0 -0
  30. data/ext/gstreamer/rbgst-index-factory.c +67 -0
  31. data/ext/gstreamer/rbgst-index-factory.o +0 -0
  32. data/ext/gstreamer/rbgst-message.c +784 -0
  33. data/ext/gstreamer/rbgst-message.o +0 -0
  34. data/ext/gstreamer/rbgst-mini-object.c +220 -0
  35. data/ext/gstreamer/rbgst-mini-object.o +0 -0
  36. data/ext/gstreamer/rbgst-object.c +81 -0
  37. data/ext/gstreamer/rbgst-object.o +0 -0
  38. data/ext/gstreamer/rbgst-pad-template.c +124 -0
  39. data/ext/gstreamer/rbgst-pad-template.o +0 -0
  40. data/ext/gstreamer/rbgst-pad.c +338 -0
  41. data/ext/gstreamer/rbgst-pad.o +0 -0
  42. data/ext/gstreamer/rbgst-pipeline.c +90 -0
  43. data/ext/gstreamer/rbgst-pipeline.o +0 -0
  44. data/ext/gstreamer/rbgst-plugin-feature.c +134 -0
  45. data/ext/gstreamer/rbgst-plugin-feature.o +0 -0
  46. data/ext/gstreamer/rbgst-plugin.c +164 -0
  47. data/ext/gstreamer/rbgst-plugin.o +0 -0
  48. data/ext/gstreamer/rbgst-private.c +89 -0
  49. data/ext/gstreamer/rbgst-private.h +37 -0
  50. data/ext/gstreamer/rbgst-private.o +0 -0
  51. data/ext/gstreamer/rbgst-query.c +289 -0
  52. data/ext/gstreamer/rbgst-query.o +0 -0
  53. data/ext/gstreamer/rbgst-seek.c +36 -0
  54. data/ext/gstreamer/rbgst-seek.o +0 -0
  55. data/ext/gstreamer/rbgst-static-caps.c +49 -0
  56. data/ext/gstreamer/rbgst-static-caps.o +0 -0
  57. data/ext/gstreamer/rbgst-static-pad-template.c +64 -0
  58. data/ext/gstreamer/rbgst-static-pad-template.o +0 -0
  59. data/ext/gstreamer/rbgst-structure.c +300 -0
  60. data/ext/gstreamer/rbgst-structure.o +0 -0
  61. data/ext/gstreamer/rbgst-system-clock.c +45 -0
  62. data/ext/gstreamer/rbgst-system-clock.o +0 -0
  63. data/ext/gstreamer/rbgst-type-find-factory.c +124 -0
  64. data/ext/gstreamer/rbgst-type-find-factory.o +0 -0
  65. data/ext/gstreamer/rbgst-value.c +517 -0
  66. data/ext/gstreamer/rbgst-value.o +0 -0
  67. data/ext/gstreamer/rbgst-x-overlay.c +132 -0
  68. data/ext/gstreamer/rbgst-x-overlay.o +0 -0
  69. data/ext/gstreamer/rbgst.c +279 -0
  70. data/ext/gstreamer/rbgst.h +197 -0
  71. data/ext/gstreamer/rbgst.o +0 -0
  72. data/ext/gstreamer/rbgstclockentry.c +268 -0
  73. data/ext/gstreamer/rbgstclockentry.o +0 -0
  74. data/ext/gstreamer/rbgstformat.c +159 -0
  75. data/ext/gstreamer/rbgstformat.o +0 -0
  76. data/ext/gstreamer/rbgstindex.c +314 -0
  77. data/ext/gstreamer/rbgstindex.o +0 -0
  78. data/ext/gstreamer/rbgstindexentry.c +96 -0
  79. data/ext/gstreamer/rbgstindexentry.o +0 -0
  80. data/ext/gstreamer/rbgstparse.c +66 -0
  81. data/ext/gstreamer/rbgstparse.o +0 -0
  82. data/ext/gstreamer/rbgstquerytype.c +159 -0
  83. data/ext/gstreamer/rbgstquerytype.o +0 -0
  84. data/ext/gstreamer/rbgstregistry.c +278 -0
  85. data/ext/gstreamer/rbgstregistry.o +0 -0
  86. data/ext/gstreamer/rbgsttag.c +111 -0
  87. data/ext/gstreamer/rbgsttag.o +0 -0
  88. data/ext/gstreamer/rbgsttagsetter.c +50 -0
  89. data/ext/gstreamer/rbgsttagsetter.o +0 -0
  90. data/ext/gstreamer/rbgstxml.c +189 -0
  91. data/ext/gstreamer/rbgstxml.o +0 -0
  92. data/ext/gstreamer/ruby-gstreamer.pc +3 -0
  93. data/extconf.rb +49 -0
  94. data/lib/gst.rb +19 -0
  95. data/sample/audio-player.rb +54 -0
  96. data/sample/gst-inspect.rb +417 -0
  97. data/sample/media-type.rb +55 -0
  98. data/sample/media-type2.rb +268 -0
  99. data/sample/ogg-audio-player.rb +54 -0
  100. data/sample/type-find.rb +46 -0
  101. data/sample/video-player.rb +57 -0
  102. data/sample/xml-player.rb +60 -0
  103. data/test/gst-test-utils.rb +18 -0
  104. data/test/run-test.rb +25 -0
  105. data/test/test_bin.rb +167 -0
  106. data/test/test_buffer.rb +174 -0
  107. data/test/test_caps.rb +24 -0
  108. data/test/test_clock.rb +7 -0
  109. data/test/test_element.rb +87 -0
  110. data/test/test_element_factory.rb +28 -0
  111. data/test/test_event.rb +10 -0
  112. data/test/test_index_factory.rb +7 -0
  113. data/test/test_message.rb +191 -0
  114. data/test/test_mini_object.rb +38 -0
  115. data/test/test_object.rb +10 -0
  116. data/test/test_pad.rb +68 -0
  117. data/test/test_plugin.rb +6 -0
  118. data/test/test_plugin_feature.rb +20 -0
  119. data/test/test_seek.rb +17 -0
  120. data/test/test_static_caps.rb +18 -0
  121. data/test/test_static_pad_template.rb +16 -0
  122. data/test/test_structure.rb +159 -0
  123. data/test/test_thread_handling.rb +58 -0
  124. data/test/test_type_find_factory.rb +8 -0
  125. data/test/test_value.rb +69 -0
  126. metadata +208 -0
Binary file
@@ -0,0 +1,441 @@
1
+ /*
2
+ * Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
3
+ * Copyright (C) 2008 Ruby-GNOME2 Project Team
4
+ *
5
+ * This file is part of Ruby/GStreamer.
6
+ *
7
+ * Ruby/GStreamer is free software; you can redistribute it and/or
8
+ * modify it under the terms of the GNU Lesser General Public
9
+ * License as published by the Free Software Foundation; either
10
+ * version 2.1 of the License, or (at your option) any later version.
11
+ *
12
+ * Ruby/GStreamer is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ * Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public
18
+ * License along with Ruby/GStreamer; if not, write to the Free Software
19
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
+ */
21
+
22
+ #include "rbgst.h"
23
+
24
+ #define SELF(self) (RVAL2GST_CAPS(self))
25
+
26
+ /* Class: Gst::Caps
27
+ * Capabilities of pads.
28
+ */
29
+
30
+ VALUE
31
+ rbgst_ruby_object_from_gst_caps_with_unref(GstCaps *caps)
32
+ {
33
+ VALUE rb_caps;
34
+
35
+ rb_caps = GST_CAPS2RVAL(caps);
36
+ if (caps)
37
+ gst_caps_unref(caps);
38
+ return rb_caps;
39
+ }
40
+
41
+ /*
42
+ * Method: new(*structures)
43
+ * structures: a list of Hash objects.
44
+ *
45
+ * Creates a new Gst::Caps object and adds all given structures to it. If no
46
+ * structures are given, the caps will be empty. If you want a caps that is
47
+ * compatible with any media format, just create an empty caps, then call
48
+ * Gst::Caps#set_any.
49
+ *
50
+ * Returns: a newly allocated Gst::Caps object.
51
+ */
52
+ static VALUE
53
+ rb_gst_caps_new (int argc, VALUE * argv, VALUE self)
54
+ {
55
+ GstCaps *caps;
56
+ int i;
57
+
58
+ caps = gst_caps_new_any ();
59
+ if (caps != NULL) {
60
+ for (i = 0; i < argc; i++)
61
+ gst_caps_append_structure (caps, RVAL2GST_STRUCT(argv[i]));
62
+ G_INITIALIZE (self, caps);
63
+ }
64
+ return Qnil;
65
+ }
66
+
67
+ /*
68
+ * Method: set_any(state)
69
+ * state: true or false.
70
+ *
71
+ * Sets whether the caps should be compatible with any media format.
72
+ *
73
+ * Returns: self.
74
+ */
75
+ static VALUE
76
+ rb_gst_caps_set_any (VALUE self, VALUE state)
77
+ {
78
+ RGST_CAPS (self)->flags = GST_CAPS_FLAGS_ANY;
79
+ return self;
80
+ }
81
+
82
+ /*
83
+ * Method: append(caps)
84
+ * caps: a Gst::Caps to append.
85
+ *
86
+ * Appends the structures contained in caps to self.
87
+ *
88
+ * Returns: self.
89
+ */
90
+ static VALUE
91
+ rb_gst_caps_append (VALUE self, VALUE caps)
92
+ {
93
+ gst_caps_append (RGST_CAPS (self), RGST_CAPS (caps));
94
+ return self;
95
+ }
96
+
97
+ /*
98
+ * Method: append_structure(structure)
99
+ * structure: the Hash object to append.
100
+ *
101
+ * Append the given structure to self.
102
+ *
103
+ * Returns: self.
104
+ */
105
+ static VALUE
106
+ rb_gst_caps_append_structure (VALUE self, VALUE structure)
107
+ {
108
+ gst_caps_append_structure (RGST_CAPS (self), RVAL2GST_STRUCT(structure));
109
+ return self;
110
+ }
111
+
112
+ /* Method: size
113
+ * Returns: the number of structures contained in the caps.
114
+ */
115
+ static VALUE
116
+ rb_gst_caps_get_size (VALUE self)
117
+ {
118
+ return INT2FIX (gst_caps_get_size (RGST_CAPS (self)));
119
+ }
120
+
121
+ /*
122
+ * Method: get_structure(index)
123
+ * index: the index of a structure.
124
+ *
125
+ * Finds the structure in the caps that has the given index, and
126
+ returns it.
127
+ *
128
+ * Returns: a Hash object corresponding to index, or nil if not found.
129
+ */
130
+ static VALUE
131
+ rb_gst_caps_get_structure (VALUE self, VALUE index)
132
+ {
133
+ GstStructure *structure = gst_caps_get_structure (RGST_CAPS (self),
134
+ FIX2INT (index));
135
+
136
+ return GST_STRUCT2RVAL(structure);
137
+ }
138
+
139
+ static VALUE
140
+ rb_gst_caps_set_simple (VALUE self, VALUE field, VALUE value)
141
+ {
142
+ /*
143
+ * TODO
144
+ */
145
+ return self;
146
+ }
147
+
148
+ /* Method: any?
149
+ * Returns: whether the caps represents any media format.
150
+ */
151
+ static VALUE
152
+ rb_gst_caps_is_any (VALUE self)
153
+ {
154
+ return CBOOL2RVAL (gst_caps_is_any (RGST_CAPS (self)));
155
+ }
156
+
157
+ /* Method: empty?
158
+ * Returns: whether the caps represents no media formats.
159
+ */
160
+ static VALUE
161
+ rb_gst_caps_is_empty (VALUE self)
162
+ {
163
+ return CBOOL2RVAL (gst_caps_is_empty (RGST_CAPS (self)));
164
+ }
165
+
166
+ /* Method: simple?
167
+ * Returns: whether the caps contains multiple structure.
168
+ */
169
+ static VALUE
170
+ rb_gst_caps_is_simple (VALUE self)
171
+ {
172
+ return CBOOL2RVAL(GST_CAPS_IS_SIMPLE(RGST_CAPS (self)));
173
+ }
174
+
175
+ /*
176
+ * Method: fixed?
177
+ *
178
+ * Fixed caps describes exactly one format, that is, they have exactly one
179
+ * structure, and each field in the structure describes a fixed type.
180
+ * Examples of non-fixed types are ranges and lists.
181
+ *
182
+ * Returns: whether the caps is fixed.
183
+ */
184
+ static VALUE
185
+ rb_gst_caps_is_fixed (VALUE self)
186
+ {
187
+ return CBOOL2RVAL (gst_caps_is_fixed (RGST_CAPS (self)));
188
+ }
189
+
190
+ /*
191
+ * Method: equal?(caps)
192
+ * caps: another Gst::Caps.
193
+ *
194
+ * Returns: whether the given caps represent the same set of caps than
195
+ self.
196
+ */
197
+ static VALUE
198
+ rb_gst_caps_is_equal (VALUE self, VALUE caps)
199
+ {
200
+ return CBOOL2RVAL (gst_caps_is_equal (RGST_CAPS (self), RGST_CAPS (caps)));
201
+ }
202
+
203
+ /*
204
+ * Method: equal_fixed?(caps)
205
+ * caps: another Gst::Caps.
206
+ *
207
+ * Returns: whether the given fixed caps represent the same set of caps
208
+ than self
209
+ * (self must be fixed as well).
210
+ */
211
+ static VALUE
212
+ rb_gst_caps_is_equal_fixed (VALUE self, VALUE caps)
213
+ {
214
+ return CBOOL2RVAL (gst_caps_is_equal_fixed (RGST_CAPS (self), RGST_CAPS
215
+ (caps)));
216
+ }
217
+
218
+ /*
219
+ * Method: always_compatible?(caps)
220
+ * caps: another Gst::Caps.
221
+ *
222
+ * A given caps structure is always compatible with another if every
223
+ media format that is
224
+ * in the first is also contained in the second.
225
+ *
226
+ * Returns: whether self is compatible with the given caps.
227
+ */
228
+ static VALUE
229
+ rb_gst_caps_is_always_compatible (VALUE self, VALUE caps)
230
+ {
231
+ return CBOOL2RVAL (gst_caps_is_always_compatible (RGST_CAPS (self),
232
+ RGST_CAPS (caps)));
233
+ }
234
+
235
+ /*
236
+ * Method: subset?(caps)
237
+ * caps: another Gst::Caps.
238
+ *
239
+ * Checks if all caps represented by self are also represented by the
240
+ given caps.
241
+ * This method does not work reliably if optional properties for caps
242
+ are included
243
+ * on one caps and omitted on the other.
244
+ *
245
+ * Returns: whether self is a subset of the given caps.
246
+ */
247
+ static VALUE
248
+ rb_gst_caps_is_subset (VALUE self, VALUE caps)
249
+ {
250
+ return CBOOL2RVAL (gst_caps_is_subset (RGST_CAPS (self), RGST_CAPS (caps)));
251
+ }
252
+
253
+ /*
254
+ * Method: intersect(caps)
255
+ * caps: another Gst::Caps.
256
+ *
257
+ * Creates a new Gst::Caps that contains all the formats that are
258
+ common to both
259
+ * self and the given caps.
260
+ *
261
+ * Returns: a new Gst::Caps object.
262
+ */
263
+ static VALUE
264
+ rb_gst_caps_intersect (VALUE self, VALUE caps)
265
+ {
266
+ return RGST_CAPS_NEW (gst_caps_intersect (RGST_CAPS (self), RGST_CAPS
267
+ (caps)));
268
+ }
269
+
270
+ /*
271
+ * Method: union(caps)
272
+ * caps: another Gst::Caps.
273
+ *
274
+ * Creates a new Gst::Caps that contains all the formats that are in
275
+ either
276
+ * self and the given caps.
277
+ *
278
+ * Returns: a new Gst::Caps object.
279
+ */
280
+ static VALUE
281
+ rb_gst_caps_union (VALUE self, VALUE caps)
282
+ {
283
+ return RGST_CAPS_NEW (gst_caps_union (RGST_CAPS (self), RGST_CAPS (caps)));
284
+ }
285
+
286
+ /*
287
+ * Method: normalize
288
+ *
289
+ * Creates a new Gst::Caps that represents the same set of formats as self,
290
+ * but contains no lists. Each list is expanded into separate structures
291
+ * (as Hash objects).
292
+ *
293
+ * Returns: a new Gst::Caps object.
294
+ */
295
+ static VALUE
296
+ rb_gst_caps_normalize (VALUE self)
297
+ {
298
+ return RGST_CAPS_NEW (gst_caps_normalize (RGST_CAPS (self)));
299
+ }
300
+
301
+ /*
302
+ * Method: simplify!
303
+ *
304
+ * Modifies the current caps inplace into a representation that represents
305
+ * the same set of formats as self, but in a simpler form.
306
+ * Component structures that are indentical are merged. Component
307
+ structures
308
+ * that have ranges or lists that can be merged are also merged.
309
+ *
310
+ * Returns: whether the caps could be simplified.
311
+ */
312
+ static VALUE
313
+ rb_gst_caps_do_simplify (VALUE self)
314
+ {
315
+ return CBOOL2RVAL (gst_caps_do_simplify (RGST_CAPS (self)));
316
+ }
317
+
318
+ /*
319
+ * Method: replace(caps)
320
+ * caps: another Gst::Caps.
321
+ *
322
+ * Replaces the current caps inplace with the given caps.
323
+ *
324
+ * Returns: self.
325
+ */
326
+ static VALUE
327
+ rb_gst_caps_replace (VALUE self, VALUE caps)
328
+ {
329
+ GstCaps *current = RGST_CAPS (self);
330
+
331
+ gst_caps_replace (&current, RGST_CAPS (caps));
332
+ return self;
333
+ }
334
+
335
+ /* Method: to_string
336
+ * Returns: a string representation of the current caps.
337
+ */
338
+ static VALUE
339
+ rb_gst_caps_to_string (VALUE self)
340
+ {
341
+ return CSTR2RVAL (gst_caps_to_string (RGST_CAPS (self)));
342
+ }
343
+
344
+ /*
345
+ * Class method: from_string(string)
346
+ * string: a string to convert to a Gst::Caps.
347
+ *
348
+ * Converts a caps from a string representation.
349
+ *
350
+ * Returns: a newly allocated Gst::Caps.
351
+ */
352
+ static VALUE
353
+ rb_gst_caps_from_string (VALUE self, VALUE string)
354
+ {
355
+ return RGST_CAPS_NEW (gst_caps_from_string (RVAL2CSTR (string)));
356
+ }
357
+
358
+ /*
359
+ * Method: subtract(caps)
360
+ * caps: another Gst::Caps.
361
+ *
362
+ * Subtracts the given subtrahend caps from the minuend (self).
363
+ * This method does not work reliably if optional properties for caps
364
+ are included
365
+ * on one caps and omitted on the other.
366
+ *
367
+ * Returns: the resulting caps, as a new Gst::Caps object.
368
+ */
369
+ static VALUE
370
+ rb_gst_caps_subtract (VALUE self, VALUE caps)
371
+ {
372
+ return RGST_CAPS_NEW (gst_caps_subtract (RGST_CAPS (self), RGST_CAPS
373
+ (caps)));
374
+ }
375
+
376
+ static VALUE
377
+ each(VALUE self)
378
+ {
379
+ int i, size;
380
+ GstCaps *caps;
381
+
382
+ caps = SELF(self);
383
+ size = gst_caps_get_size(caps);
384
+
385
+ for (i = 0; i < size; i++) {
386
+ rb_yield(GST_STRUCT2RVAL(gst_caps_get_structure(caps, i)));
387
+ }
388
+
389
+ return Qnil;
390
+ }
391
+
392
+ void
393
+ Init_gst_caps (void)
394
+ {
395
+ VALUE cGstCaps;
396
+
397
+ cGstCaps = G_DEF_CLASS (GST_TYPE_CAPS, "Caps", mGst);
398
+
399
+ rb_include_module(cGstCaps, rb_mEnumerable);
400
+
401
+ rb_define_singleton_method(cGstCaps, "parse",
402
+ rb_gst_caps_from_string, 1);
403
+
404
+ rb_define_method(cGstCaps, "initialize", rb_gst_caps_new, -1);
405
+ rb_define_method(cGstCaps, "set_any", rb_gst_caps_set_any, 1);
406
+ rb_define_method(cGstCaps, "append", rb_gst_caps_append, 1);
407
+ rb_define_method(cGstCaps, "append_structure",
408
+ rb_gst_caps_append_structure, 1);
409
+ rb_define_method(cGstCaps, "size", rb_gst_caps_get_size, 0);
410
+ rb_define_alias(cGstCaps, "length", "size");
411
+ rb_define_method(cGstCaps, "get_structure", rb_gst_caps_get_structure, 1);
412
+ rb_define_alias(cGstCaps, "[]", "get_structure");
413
+ rb_define_method(cGstCaps, "set_simple", rb_gst_caps_set_simple, 2);
414
+ rb_define_method(cGstCaps, "any?", rb_gst_caps_is_any, 0);
415
+ rb_define_method(cGstCaps, "empty?", rb_gst_caps_is_empty, 0);
416
+ rb_define_method(cGstCaps, "simple?", rb_gst_caps_is_simple, 0);
417
+ rb_define_alias(cGstCaps, "chained?", "simple?");
418
+ rb_define_method(cGstCaps, "fixed?", rb_gst_caps_is_fixed, 0);
419
+ rb_define_method(cGstCaps, "equal?", rb_gst_caps_is_equal, 1);
420
+ rb_define_alias(cGstCaps, "==", "equal?");
421
+ rb_define_method(cGstCaps, "equal_fixed?", rb_gst_caps_is_equal_fixed, 1);
422
+ rb_define_method(cGstCaps, "always_compatible?",
423
+ rb_gst_caps_is_always_compatible, 1);
424
+ rb_define_method(cGstCaps, "subset?", rb_gst_caps_is_subset, 1);
425
+ rb_define_method(cGstCaps, "intersect", rb_gst_caps_intersect, 1);
426
+ rb_define_method(cGstCaps, "union", rb_gst_caps_union, 1);
427
+ rb_define_method(cGstCaps, "normalize", rb_gst_caps_normalize, 0);
428
+ rb_define_method(cGstCaps, "simplify!", rb_gst_caps_do_simplify, 0);
429
+ rb_define_method(cGstCaps, "replace!", rb_gst_caps_replace, 1);
430
+ rb_define_method(cGstCaps, "to_s", rb_gst_caps_to_string, 0);
431
+ rb_define_method(cGstCaps, "subtract", rb_gst_caps_subtract, 1);
432
+
433
+ rb_define_method(cGstCaps, "each", each, 0);
434
+
435
+ G_DEF_SETTERS(cGstCaps);
436
+
437
+ /* TODO:
438
+ gst_caps_structure_fixate_field_nearest_int ()
439
+ gst_caps_structure_fixate_field_nearest_double () */
440
+
441
+ }
Binary file
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright (C) 2008 Ruby-GNOME2 Project Team
3
+ *
4
+ * This file is part of Ruby/GStreamer.
5
+ *
6
+ * Ruby/GStreamer is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * Ruby/GStreamer is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with Ruby/GStreamer; if not, write to the Free Software
18
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
+ */
20
+
21
+ #include "rbgst.h"
22
+ #include "rbgst-private.h"
23
+
24
+ /* need to implement */
25
+ #define SELF(self) RVAL2GST_CHILD_PROXY(self)
26
+
27
+ void
28
+ Init_gst_child_proxy(void)
29
+ {
30
+ VALUE rb_mGstChildProxy;
31
+
32
+ rb_mGstChildProxy = G_DEF_CLASS(GST_TYPE_CHILD_PROXY, "ChildProxy", mGst);
33
+ }