gstreamer 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +201 -3
- data/ext/gstreamer/extconf.rb +10 -10
- data/ext/gstreamer/misc.c +16 -15
- data/ext/gstreamer/rbgst-bin.c +75 -83
- data/ext/gstreamer/rbgst-buffer.c +91 -91
- data/ext/gstreamer/rbgst-bus.c +21 -21
- data/ext/gstreamer/rbgst-caps.c +98 -91
- data/ext/gstreamer/rbgst-child-proxy.c +19 -18
- data/ext/gstreamer/rbgst-clock.c +34 -32
- data/ext/gstreamer/rbgst-element-factory.c +79 -85
- data/ext/gstreamer/rbgst-element.c +245 -210
- data/ext/gstreamer/rbgst-event.c +18 -18
- data/ext/gstreamer/rbgst-ghost-pad.c +24 -21
- data/ext/gstreamer/rbgst-index-factory.c +31 -29
- data/ext/gstreamer/rbgst-install-plugins-context.c +86 -0
- data/ext/gstreamer/rbgst-install-plugins-return.c +45 -0
- data/ext/gstreamer/rbgst-install-plugins.c +45 -111
- data/ext/gstreamer/rbgst-message.c +15 -16
- data/ext/gstreamer/rbgst-mini-object.c +37 -37
- data/ext/gstreamer/rbgst-object.c +29 -26
- data/ext/gstreamer/rbgst-pad-template.c +36 -35
- data/ext/gstreamer/rbgst-pad.c +96 -96
- data/ext/gstreamer/rbgst-pipeline.c +32 -31
- data/ext/gstreamer/rbgst-plugin-feature.c +47 -48
- data/ext/gstreamer/rbgst-plugin.c +62 -64
- data/ext/gstreamer/rbgst-private.c +14 -15
- data/ext/gstreamer/rbgst-private.h +76 -16
- data/ext/gstreamer/rbgst-query.c +22 -20
- data/ext/gstreamer/rbgst-seek.c +22 -19
- data/ext/gstreamer/rbgst-static-caps.c +26 -24
- data/ext/gstreamer/rbgst-static-pad-template.c +27 -26
- data/ext/gstreamer/rbgst-structure.c +61 -59
- data/ext/gstreamer/rbgst-system-clock.c +23 -20
- data/ext/gstreamer/rbgst-type-find-factory.c +44 -43
- data/ext/gstreamer/rbgst-value.c +40 -28
- data/ext/gstreamer/rbgst-x-overlay.c +32 -31
- data/ext/gstreamer/rbgst.c +78 -128
- data/ext/gstreamer/rbgst.h +16 -16
- data/ext/gstreamer/rbgstclockentry.c +46 -43
- data/ext/gstreamer/rbgstformat.c +64 -61
- data/ext/gstreamer/rbgstindex.c +67 -64
- data/ext/gstreamer/rbgstindexentry.c +31 -28
- data/ext/gstreamer/rbgstparse.c +32 -29
- data/ext/gstreamer/rbgstquerytype.c +64 -61
- data/ext/gstreamer/rbgstregistry.c +79 -76
- data/ext/gstreamer/rbgsttag.c +34 -32
- data/ext/gstreamer/rbgsttagsetter.c +22 -19
- data/ext/gstreamer/rbgstxml.c +78 -75
- data/lib/gst.rb +15 -1
- data/test/test_buffer.rb +5 -2
- data/test/test_element.rb +7 -9
- data/test/test_value.rb +2 -2
- metadata +11 -11
- data/ChangeLog +0 -1202
- data/test/test_clock.rb +0 -7
@@ -1,24 +1,27 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
1
2
|
/*
|
2
|
-
*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
|
3
5
|
*
|
4
|
-
*
|
6
|
+
* This library 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.
|
5
10
|
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
11
|
+
* This library 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.
|
10
15
|
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
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
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
19
20
|
*/
|
20
21
|
|
21
|
-
#include "rbgst.h"
|
22
|
+
#include "rbgst-private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cSystemClock
|
22
25
|
|
23
26
|
/* Class: Gst::SystemClock
|
24
27
|
* The Gst::SystemClock class is an implementation of Gst::Clock
|
@@ -32,14 +35,14 @@
|
|
32
35
|
* to a Gst::SystemClock object.
|
33
36
|
*/
|
34
37
|
static VALUE
|
35
|
-
|
38
|
+
rg_s_obtain (self)
|
36
39
|
{
|
37
|
-
|
40
|
+
return RGST_SYSTEM_CLOCK_NEW (gst_system_clock_obtain ());
|
38
41
|
}
|
39
42
|
|
40
43
|
void
|
41
|
-
Init_gst_systemclock (
|
44
|
+
Init_gst_systemclock (VALUE mGst)
|
42
45
|
{
|
43
|
-
|
44
|
-
|
46
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GST_TYPE_SYSTEM_CLOCK, "SystemClock", mGst);
|
47
|
+
RG_DEF_SMETHOD(obtain, 0);
|
45
48
|
}
|
@@ -1,27 +1,28 @@
|
|
1
1
|
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
*
|
4
|
-
*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2007 Ruby-GNOME2 Project Team
|
5
|
+
* Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
|
5
6
|
*
|
6
|
-
*
|
7
|
+
* This library 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.
|
7
11
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
+
* This library 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.
|
12
16
|
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
* You should have received a copy of the GNU Lesser General Public
|
19
|
-
* License along with Ruby/GStreamer; if not, write to the Free Software
|
20
|
-
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
|
+
* You should have received a copy of the GNU Lesser General Public
|
18
|
+
* License along with this library; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20
|
+
* MA 02110-1301 USA
|
21
21
|
*/
|
22
22
|
|
23
|
-
#include "rbgst.h"
|
23
|
+
#include "rbgst-private.h"
|
24
24
|
|
25
|
+
#define RG_TARGET_NAMESPACE cTypeFindFactory
|
25
26
|
#define SELF(self) RVAL2GST_TYPE_FIND_FACTORY(self)
|
26
27
|
|
27
28
|
/* Class: Gst::TypeFindFactory
|
@@ -36,22 +37,22 @@
|
|
36
37
|
* Returns: an Array of Gst::TypeFindFactory objects.
|
37
38
|
*/
|
38
39
|
static VALUE
|
39
|
-
|
40
|
+
rg_s_list (void)
|
40
41
|
{
|
41
|
-
|
42
|
-
|
43
|
-
|
42
|
+
GList *list;
|
43
|
+
GList *orig;
|
44
|
+
VALUE arr;
|
44
45
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
arr = rb_ary_new ();
|
47
|
+
orig = gst_type_find_factory_get_list();
|
48
|
+
for (list = orig; list != NULL; list = g_list_next (list)) {
|
49
|
+
GstTypeFindFactory *tff = GST_TYPE_FIND_FACTORY (list->data);
|
50
|
+
rb_ary_push (arr, RGST_TYPE_FIND_FACTORY_NEW (tff));
|
51
|
+
}
|
52
|
+
if (orig != NULL) {
|
53
|
+
g_list_free (orig);
|
54
|
+
}
|
55
|
+
return arr;
|
55
56
|
}
|
56
57
|
|
57
58
|
/*
|
@@ -63,7 +64,7 @@ rb_gst_type_find_factory_get_list (void)
|
|
63
64
|
* associated with the type find factory.
|
64
65
|
*/
|
65
66
|
static VALUE
|
66
|
-
|
67
|
+
rg_extensions(VALUE self)
|
67
68
|
{
|
68
69
|
VALUE ary;
|
69
70
|
gchar **extensions;
|
@@ -90,9 +91,9 @@ rb_gst_type_find_factory_get_extensions(VALUE self)
|
|
90
91
|
* Returns: the Gst::Caps object associated with this factory.
|
91
92
|
*/
|
92
93
|
static VALUE
|
93
|
-
|
94
|
+
rg_caps (VALUE self)
|
94
95
|
{
|
95
|
-
|
96
|
+
return RGST_CAPS_NEW (gst_type_find_factory_get_caps (RGST_TYPE_FIND_FACTORY (self)));
|
96
97
|
}
|
97
98
|
|
98
99
|
#if 0 /* requires Gst::TypeFind */
|
@@ -105,20 +106,20 @@ rb_gst_type_find_factory_call_function (VALUE self, VALUE find)
|
|
105
106
|
#endif
|
106
107
|
|
107
108
|
static VALUE
|
108
|
-
|
109
|
+
rg_to_s (VALUE self)
|
109
110
|
{
|
110
|
-
|
111
|
-
|
111
|
+
GstTypeFindFactory *factory = RGST_TYPE_FIND_FACTORY (self);
|
112
|
+
return rb_str_new_with_format ("TypeFind: %s", GST_PLUGIN_FEATURE_NAME (factory));
|
112
113
|
}
|
113
114
|
|
114
115
|
void
|
115
|
-
Init_gst_typefindfactory (
|
116
|
+
Init_gst_typefindfactory (VALUE mGst)
|
116
117
|
{
|
117
|
-
|
118
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GST_TYPE_TYPE_FIND_FACTORY, "TypeFindFactory", mGst);
|
118
119
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
120
|
+
RG_DEF_SMETHOD(list, 0);
|
121
|
+
RG_DEF_METHOD(extensions, 0);
|
122
|
+
RG_DEF_METHOD(caps, 0);
|
123
|
+
/*rb_define_method(RG_TARGET_NAMESPACE, "call_function", rb_gst_type_find_factory_call_function, 1);*/
|
124
|
+
RG_DEF_METHOD(to_s, 0);
|
124
125
|
}
|
data/ext/gstreamer/rbgst-value.c
CHANGED
@@ -1,33 +1,34 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
1
2
|
/*
|
2
|
-
*
|
3
|
+
* Copyright (C) 2011-2012 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008 Ruby-GNOME2 Project Team
|
3
5
|
*
|
4
|
-
*
|
6
|
+
* This library 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.
|
5
10
|
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
11
|
+
* This library 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.
|
10
15
|
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
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
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
19
20
|
*/
|
20
21
|
|
21
|
-
#include "rbgst.h"
|
22
|
+
#include "rbgst-private.h"
|
22
23
|
|
23
24
|
static VALUE cIntRange, cFourcc, cFractionRange;
|
24
25
|
|
25
|
-
static RGConvertTable value_list_table
|
26
|
-
static RGConvertTable value_array_table
|
27
|
-
static RGConvertTable int_range_table
|
28
|
-
static RGConvertTable fourcc_table
|
29
|
-
static RGConvertTable fraction_table
|
30
|
-
static RGConvertTable fraction_range_table
|
26
|
+
static RGConvertTable value_list_table;
|
27
|
+
static RGConvertTable value_array_table;
|
28
|
+
static RGConvertTable int_range_table;
|
29
|
+
static RGConvertTable fourcc_table;
|
30
|
+
static RGConvertTable fraction_table;
|
31
|
+
static RGConvertTable fraction_range_table;
|
31
32
|
|
32
33
|
|
33
34
|
static void
|
@@ -37,7 +38,7 @@ value_list_rvalue2gvalue(VALUE value, GValue *result)
|
|
37
38
|
|
38
39
|
len = RARRAY_LEN(value);
|
39
40
|
for (i = 0; i < len; i++) {
|
40
|
-
GValue val =
|
41
|
+
GValue val = G_VALUE_INIT;
|
41
42
|
rbgobj_initialize_gvalue(&val, RARRAY_PTR(value)[i]);
|
42
43
|
gst_value_list_append_value(result, &val);
|
43
44
|
g_value_unset(&val);
|
@@ -67,7 +68,7 @@ value_array_rvalue2gvalue(VALUE value, GValue *result)
|
|
67
68
|
|
68
69
|
len = RARRAY_LEN(value);
|
69
70
|
for (i = 0; i < len; i++) {
|
70
|
-
GValue val =
|
71
|
+
GValue val = G_VALUE_INIT;
|
71
72
|
rbgobj_initialize_gvalue(&val, RARRAY_PTR(value)[i]);
|
72
73
|
gst_value_array_append_value(result, &val);
|
73
74
|
g_value_unset(&val);
|
@@ -313,7 +314,7 @@ fraction_gvalue2rvalue(const GValue *value)
|
|
313
314
|
static VALUE
|
314
315
|
fraction_range_initialize(VALUE self, VALUE min, VALUE max)
|
315
316
|
{
|
316
|
-
GValue min_value =
|
317
|
+
GValue min_value = G_VALUE_INIT, max_value = G_VALUE_INIT;
|
317
318
|
|
318
319
|
rbgobj_initialize_gvalue(&min_value, min);
|
319
320
|
rbgobj_initialize_gvalue(&max_value, max);
|
@@ -331,7 +332,7 @@ static VALUE
|
|
331
332
|
fraction_range_set_min(VALUE self, VALUE min)
|
332
333
|
{
|
333
334
|
GValue *value;
|
334
|
-
GValue min_value =
|
335
|
+
GValue min_value = G_VALUE_INIT;
|
335
336
|
|
336
337
|
value = RVAL2GOBJ(self);
|
337
338
|
rbgobj_initialize_gvalue(&min_value, min);
|
@@ -351,7 +352,7 @@ static VALUE
|
|
351
352
|
fraction_range_set_max(VALUE self, VALUE max)
|
352
353
|
{
|
353
354
|
GValue *value;
|
354
|
-
GValue max_value =
|
355
|
+
GValue max_value = G_VALUE_INIT;
|
355
356
|
|
356
357
|
value = RVAL2GOBJ(self);
|
357
358
|
rbgobj_initialize_gvalue(&max_value, max);
|
@@ -364,7 +365,7 @@ fraction_range_set_max(VALUE self, VALUE max)
|
|
364
365
|
static VALUE
|
365
366
|
fraction_range_set(VALUE self, VALUE min, VALUE max)
|
366
367
|
{
|
367
|
-
GValue min_value =
|
368
|
+
GValue min_value = G_VALUE_INIT, max_value = G_VALUE_INIT;
|
368
369
|
|
369
370
|
rbgobj_initialize_gvalue(&min_value, min);
|
370
371
|
rbgobj_initialize_gvalue(&max_value, max);
|
@@ -404,23 +405,29 @@ DEF_G_VALUE_CONVERTERS(fraction_range, GST_TYPE_FRACTION_RANGE, FractionRange)
|
|
404
405
|
|
405
406
|
|
406
407
|
void
|
407
|
-
Init_gst_value(
|
408
|
+
Init_gst_value(VALUE mGst)
|
408
409
|
{
|
410
|
+
memset(&value_list_table, 0, sizeof(value_list_table));
|
409
411
|
value_list_table.type = GST_TYPE_LIST;
|
412
|
+
value_list_table.klass = Qnil;
|
410
413
|
value_list_table.rvalue2gvalue = value_list_rvalue2gvalue;
|
411
414
|
value_list_table.gvalue2rvalue = value_list_gvalue2rvalue;
|
412
415
|
|
413
416
|
RG_DEF_CONVERSION(&value_list_table);
|
414
417
|
|
415
418
|
|
419
|
+
memset(&value_array_table, 0, sizeof(value_array_table));
|
416
420
|
value_array_table.type = GST_TYPE_ARRAY;
|
421
|
+
value_array_table.klass = Qnil;
|
417
422
|
value_array_table.rvalue2gvalue = value_array_rvalue2gvalue;
|
418
423
|
value_array_table.gvalue2rvalue = value_array_gvalue2rvalue;
|
419
424
|
|
420
425
|
RG_DEF_CONVERSION(&value_array_table);
|
421
426
|
|
422
427
|
|
428
|
+
memset(&int_range_table, 0, sizeof(int_range_table));
|
423
429
|
int_range_table.type = GST_TYPE_INT_RANGE;
|
430
|
+
int_range_table.klass = Qnil;
|
424
431
|
int_range_table.get_superclass = int_range_get_superclass;
|
425
432
|
int_range_table.type_init_hook = NULL;
|
426
433
|
int_range_table.rvalue2gvalue = int_range_rvalue2gvalue;
|
@@ -451,7 +458,9 @@ Init_gst_value(void)
|
|
451
458
|
G_DEF_SETTERS(cIntRange);
|
452
459
|
|
453
460
|
|
461
|
+
memset(&fourcc_table, 0, sizeof(fourcc_table));
|
454
462
|
fourcc_table.type = GST_TYPE_FOURCC;
|
463
|
+
fourcc_table.klass = Qnil;
|
455
464
|
fourcc_table.get_superclass = fourcc_get_superclass;
|
456
465
|
fourcc_table.type_init_hook = NULL;
|
457
466
|
fourcc_table.rvalue2gvalue = fourcc_rvalue2gvalue;
|
@@ -477,6 +486,7 @@ Init_gst_value(void)
|
|
477
486
|
G_DEF_SETTERS(cFourcc);
|
478
487
|
|
479
488
|
|
489
|
+
memset(&fraction_table, 0, sizeof(fraction_table));
|
480
490
|
fraction_table.type = GST_TYPE_FRACTION;
|
481
491
|
fraction_table.klass = rb_const_get(rb_cObject, rb_intern("Rational"));
|
482
492
|
fraction_table.rvalue2gvalue = fraction_rvalue2gvalue;
|
@@ -485,7 +495,9 @@ Init_gst_value(void)
|
|
485
495
|
RG_DEF_CONVERSION(&fraction_table);
|
486
496
|
|
487
497
|
|
498
|
+
memset(&fraction_range_table, 0, sizeof(fraction_range_table));
|
488
499
|
fraction_range_table.type = GST_TYPE_FRACTION_RANGE;
|
500
|
+
fraction_range_table.klass = Qnil;
|
489
501
|
fraction_range_table.get_superclass = fraction_range_get_superclass;
|
490
502
|
fraction_range_table.type_init_hook = NULL;
|
491
503
|
fraction_range_table.rvalue2gvalue = fraction_range_rvalue2gvalue;
|
@@ -1,29 +1,31 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
1
2
|
/*
|
2
|
-
*
|
3
|
-
*
|
3
|
+
* Copyright (C) 2011-2012 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2006 Sjoerd Simons <sjoerd@luon.net>
|
5
|
+
* Copyright (C) 2005 Laurent Sansonetti <lrz@gnome.org>
|
4
6
|
*
|
5
|
-
*
|
7
|
+
* This library 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.
|
6
11
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
12
|
+
* This library 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.
|
11
16
|
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
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
|
17
|
+
* You should have received a copy of the GNU Lesser General Public
|
18
|
+
* License along with this library; if not, write to the Free Software
|
19
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
20
|
+
* MA 02110-1301 USA
|
20
21
|
*/
|
21
22
|
|
22
23
|
#ifdef HAVE_GST_OVERLAY
|
23
24
|
|
24
|
-
#include "rbgst.h"
|
25
|
+
#include "rbgst-private.h"
|
25
26
|
#include <gst/interfaces/xoverlay.h>
|
26
27
|
|
28
|
+
#define RG_TARGET_NAMESPACE mXOverlay
|
27
29
|
#define SELF(o) (GST_X_OVERLAY(RVAL2GOBJ(o)))
|
28
30
|
|
29
31
|
static GQuark xoverlay_xid_data_quark;
|
@@ -68,9 +70,8 @@ xid_callback_data_destroy_cb(gpointer data)
|
|
68
70
|
g_slice_free(struct xid_callback_data, data);
|
69
71
|
}
|
70
72
|
|
71
|
-
|
72
73
|
static VALUE
|
73
|
-
|
74
|
+
rg_set_xwindow_id_with_buswatch(VALUE self, VALUE bus,
|
74
75
|
VALUE x_window_id)
|
75
76
|
{
|
76
77
|
struct xid_callback_data* xid_cb_data;
|
@@ -92,41 +93,41 @@ rb_gst_x_overlay_set_xwindow_id_with_buswatch(VALUE self, VALUE bus,
|
|
92
93
|
}
|
93
94
|
|
94
95
|
static VALUE
|
95
|
-
|
96
|
+
rg_set_xwindow_id(VALUE self, VALUE x_window_id)
|
96
97
|
{
|
97
98
|
gst_x_overlay_set_xwindow_id(SELF(self), NUM2ULONG(x_window_id));
|
98
99
|
return self;
|
99
100
|
}
|
100
101
|
|
101
102
|
static VALUE
|
102
|
-
|
103
|
+
rg_expose(VALUE self)
|
103
104
|
{
|
104
105
|
gst_x_overlay_expose(SELF(self));
|
105
106
|
return self;
|
106
107
|
}
|
107
108
|
|
108
109
|
static VALUE
|
109
|
-
|
110
|
+
rg_got_xwindow_id(VALUE self, VALUE x_window_id)
|
110
111
|
{
|
111
112
|
gst_x_overlay_got_xwindow_id(SELF(self), NUM2ULL(x_window_id));
|
112
113
|
return self;
|
113
114
|
}
|
114
115
|
|
115
116
|
void
|
116
|
-
Init_gst_x_overlay(
|
117
|
+
Init_gst_x_overlay(VALUE mGst)
|
117
118
|
{
|
118
|
-
VALUE
|
119
|
-
|
119
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(GST_TYPE_X_OVERLAY, "XOverlay", mGst);
|
120
|
+
|
120
121
|
xoverlay_xid_data_quark =
|
121
122
|
g_quark_from_static_string("__rbgst_xoverlay_xid_data_quark__");
|
122
123
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
G_DEF_SETTERS(
|
124
|
+
RG_DEF_METHOD(set_xwindow_id, 1);
|
125
|
+
RG_DEF_METHOD(expose, 0);
|
126
|
+
|
127
|
+
RG_DEF_METHOD(got_xwindow_id, 1);
|
128
|
+
RG_DEF_METHOD(set_xwindow_id_with_buswatch, 2);
|
129
|
+
|
130
|
+
G_DEF_SETTERS(RG_TARGET_NAMESPACE);
|
130
131
|
}
|
131
132
|
|
132
133
|
#endif /* HAVE_GST_OVERLAY */
|