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
data/ext/gstreamer/rbgstformat.c
CHANGED
@@ -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 cFormat
|
22
25
|
|
23
26
|
/* Class: Gst::Format
|
24
27
|
* Dynamically register new formats.
|
@@ -27,22 +30,22 @@
|
|
27
30
|
static GstFormat *
|
28
31
|
format_copy (const GstFormat* format)
|
29
32
|
{
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
33
|
+
GstFormat *new_format;
|
34
|
+
g_return_val_if_fail (format != NULL, NULL);
|
35
|
+
new_format = g_new (GstFormat, sizeof (GstFormat));
|
36
|
+
*new_format = *format;
|
37
|
+
return new_format;
|
35
38
|
}
|
36
39
|
|
37
40
|
GType
|
38
41
|
gst_format_get_type2 (void)
|
39
42
|
{
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
static GType our_type = 0;
|
44
|
+
if (our_type == 0)
|
45
|
+
our_type = g_boxed_type_register_static ("GstFormatClass",
|
46
|
+
(GBoxedCopyFunc)format_copy,
|
47
|
+
(GBoxedFreeFunc)g_free);
|
48
|
+
return our_type;
|
46
49
|
}
|
47
50
|
|
48
51
|
/*
|
@@ -53,12 +56,12 @@ gst_format_get_type2 (void)
|
|
53
56
|
* given nick, or nil if this query was not registered.
|
54
57
|
*/
|
55
58
|
static VALUE
|
56
|
-
|
59
|
+
rg_s_find (VALUE self, VALUE nick)
|
57
60
|
{
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
61
|
+
GstFormat format = gst_format_get_by_nick (RVAL2CSTR (nick));
|
62
|
+
return format != GST_FORMAT_UNDEFINED
|
63
|
+
? RGST_FORMAT_NEW (&format)
|
64
|
+
: Qnil;
|
62
65
|
}
|
63
66
|
|
64
67
|
/*
|
@@ -70,7 +73,7 @@ rb_gst_format_find (VALUE self, VALUE nick)
|
|
70
73
|
* Returns: always nil.
|
71
74
|
*/
|
72
75
|
static VALUE
|
73
|
-
|
76
|
+
rg_s_each (VALUE self)
|
74
77
|
{
|
75
78
|
GstIterator *iter;
|
76
79
|
gpointer value;
|
@@ -88,30 +91,30 @@ rb_gst_format_each (VALUE self)
|
|
88
91
|
* Returns: the type id of this format (see Gst::Format::Type).
|
89
92
|
*/
|
90
93
|
static VALUE
|
91
|
-
|
94
|
+
rg_type_id (VALUE self)
|
92
95
|
{
|
93
|
-
|
94
|
-
|
96
|
+
GstFormat *format = RGST_FORMAT (self);
|
97
|
+
return GENUM2RVAL (*format, GST_TYPE_FORMAT);
|
95
98
|
}
|
96
99
|
|
97
100
|
/* Method: nick
|
98
101
|
* Returns: the short nick of the format.
|
99
102
|
*/
|
100
103
|
static VALUE
|
101
|
-
|
104
|
+
rg_nick (VALUE self)
|
102
105
|
{
|
103
|
-
|
104
|
-
|
106
|
+
GstFormat *format = RGST_FORMAT (self);
|
107
|
+
return CSTR2RVAL (gst_format_get_details (*format)->nick);
|
105
108
|
}
|
106
109
|
|
107
110
|
/* Method: description
|
108
111
|
* Returns: a longer description of the format.
|
109
112
|
*/
|
110
113
|
static VALUE
|
111
|
-
|
114
|
+
rg_description (VALUE self)
|
112
115
|
{
|
113
|
-
|
114
|
-
|
116
|
+
GstFormat *format = RGST_FORMAT (self);
|
117
|
+
return CSTR2RVAL (gst_format_get_details (*format)->description);
|
115
118
|
}
|
116
119
|
|
117
120
|
/*
|
@@ -124,36 +127,36 @@ rb_gst_format_get_description (VALUE self)
|
|
124
127
|
* Returns: true on success, false on failure.
|
125
128
|
*/
|
126
129
|
static VALUE
|
127
|
-
|
130
|
+
rg_operator_is_equal (VALUE self, VALUE other_format)
|
128
131
|
{
|
129
|
-
|
130
|
-
|
132
|
+
GstFormat *f1, *f2;
|
133
|
+
const gchar *n1, *n2;
|
131
134
|
|
132
|
-
|
133
|
-
|
135
|
+
if (NIL_P (other_format))
|
136
|
+
return Qfalse;
|
134
137
|
|
135
|
-
|
136
|
-
|
138
|
+
f1 = RGST_FORMAT (self);
|
139
|
+
f2 = RGST_FORMAT (other_format);
|
137
140
|
|
138
|
-
|
139
|
-
|
141
|
+
n1 = gst_format_get_details (*f1)->nick;
|
142
|
+
n2 = gst_format_get_details (*f2)->nick;
|
140
143
|
|
141
|
-
|
144
|
+
return CBOOL2RVAL (strcmp (n1, n2) == 0);
|
142
145
|
}
|
143
146
|
|
144
147
|
void
|
145
|
-
Init_gst_format (
|
148
|
+
Init_gst_format (VALUE mGst)
|
146
149
|
{
|
147
|
-
|
150
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GST_TYPE_FORMAT2, "Format", mGst);
|
148
151
|
|
149
|
-
|
150
|
-
|
152
|
+
RG_DEF_SMETHOD(each, 0);
|
153
|
+
RG_DEF_SMETHOD(find, 1);
|
151
154
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
155
|
+
RG_DEF_METHOD(type_id, 0);
|
156
|
+
RG_DEF_METHOD(nick, 0);
|
157
|
+
RG_DEF_METHOD(description, 0);
|
158
|
+
RG_DEF_METHOD_OPERATOR("==", is_equal, 1);
|
156
159
|
|
157
|
-
|
158
|
-
|
160
|
+
G_DEF_CLASS (GST_TYPE_FORMAT, "Type", RG_TARGET_NAMESPACE);
|
161
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_FORMAT, "GST_FORMAT_");
|
159
162
|
}
|
data/ext/gstreamer/rbgstindex.c
CHANGED
@@ -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 cIndex
|
22
25
|
|
23
26
|
/* Class: Gst::Index
|
24
27
|
* Generates indexes on objects.
|
@@ -28,7 +31,7 @@
|
|
28
31
|
* Returns: a newly allocated Gst::Index object.
|
29
32
|
*/
|
30
33
|
static VALUE
|
31
|
-
|
34
|
+
rg_initialize (VALUE self)
|
32
35
|
{
|
33
36
|
GstIndex *index = gst_index_new ();
|
34
37
|
|
@@ -41,7 +44,7 @@ rb_gst_index_new (VALUE self)
|
|
41
44
|
* Returns: whether the index can be read.
|
42
45
|
*/
|
43
46
|
static VALUE
|
44
|
-
|
47
|
+
rg_readable_p (VALUE self)
|
45
48
|
{
|
46
49
|
return CBOOL2RVAL (GST_INDEX_IS_READABLE (RGST_INDEX (self)));
|
47
50
|
}
|
@@ -50,7 +53,7 @@ rb_gst_index_is_readable (VALUE self)
|
|
50
53
|
* Returns: whether the index can be written.
|
51
54
|
*/
|
52
55
|
static VALUE
|
53
|
-
|
56
|
+
rg_writable_p (VALUE self)
|
54
57
|
{
|
55
58
|
return CBOOL2RVAL (GST_INDEX_IS_WRITABLE (RGST_INDEX (self)));
|
56
59
|
}
|
@@ -65,7 +68,7 @@ rb_gst_index_is_writable (VALUE self)
|
|
65
68
|
* Returns: self.
|
66
69
|
*/
|
67
70
|
static VALUE
|
68
|
-
|
71
|
+
rg_commit (VALUE self, VALUE id)
|
69
72
|
{
|
70
73
|
gst_index_commit (RGST_INDEX (self), FIX2INT (id));
|
71
74
|
return self;
|
@@ -75,7 +78,7 @@ rb_gst_index_commit (VALUE self, VALUE id)
|
|
75
78
|
* Returns: the ID of the current group.
|
76
79
|
*/
|
77
80
|
static VALUE
|
78
|
-
|
81
|
+
rg_group (VALUE self)
|
79
82
|
{
|
80
83
|
return INT2FIX (gst_index_get_group (RGST_INDEX (self)));
|
81
84
|
}
|
@@ -89,7 +92,7 @@ rb_gst_index_get_group (VALUE self)
|
|
89
92
|
* Returns: the ID of the newly created group.
|
90
93
|
*/
|
91
94
|
static VALUE
|
92
|
-
|
95
|
+
rg_new_group (VALUE self)
|
93
96
|
{
|
94
97
|
return INT2FIX (gst_index_new_group (RGST_INDEX (self)));
|
95
98
|
}
|
@@ -103,7 +106,7 @@ rb_gst_index_new_group (VALUE self)
|
|
103
106
|
* Returns: true if the operation succeeded, false if the group did not exist.
|
104
107
|
*/
|
105
108
|
static VALUE
|
106
|
-
|
109
|
+
rg_set_group (VALUE self, VALUE group)
|
107
110
|
{
|
108
111
|
return
|
109
112
|
CBOOL2RVAL (gst_index_set_group (RGST_INDEX (self), FIX2INT (group)));
|
@@ -113,7 +116,7 @@ rb_gst_index_set_group (VALUE self, VALUE group)
|
|
113
116
|
* Returns: the certainty of the index (see Gst::Index::Certainty).
|
114
117
|
*/
|
115
118
|
static VALUE
|
116
|
-
|
119
|
+
rg_certainty (VALUE self)
|
117
120
|
{
|
118
121
|
return GENUM2RVAL (gst_index_get_certainty (RGST_INDEX (self)),
|
119
122
|
GST_TYPE_INDEX_CERTAINTY);
|
@@ -128,7 +131,7 @@ rb_gst_index_get_certainty (VALUE self)
|
|
128
131
|
* Returns: self.
|
129
132
|
*/
|
130
133
|
static VALUE
|
131
|
-
|
134
|
+
rg_set_certainty (VALUE self, VALUE certainty)
|
132
135
|
{
|
133
136
|
gst_index_set_certainty (RGST_INDEX (self),
|
134
137
|
RVAL2GENUM (certainty, GST_TYPE_INDEX_CERTAINTY));
|
@@ -143,7 +146,7 @@ __filter (GstIndex * index, GstIndexEntry * entry)
|
|
143
146
|
}
|
144
147
|
|
145
148
|
static VALUE
|
146
|
-
|
149
|
+
rg_set_filter (VALUE self)
|
147
150
|
{
|
148
151
|
/*
|
149
152
|
* TODO
|
@@ -164,7 +167,7 @@ __resolver (GstIndex * index, GstObject * writer, gchar ** writer_string,
|
|
164
167
|
}
|
165
168
|
|
166
169
|
static VALUE
|
167
|
-
|
170
|
+
rg_set_resolver (VALUE self)
|
168
171
|
{
|
169
172
|
gst_index_set_resolver (RGST_INDEX (self), __resolver,
|
170
173
|
(gpointer) rb_block_proc ());
|
@@ -180,15 +183,15 @@ rb_gst_index_set_resolver (VALUE self)
|
|
180
183
|
* Adds an entry into the index. The type of the entry depends of
|
181
184
|
* the number and kind of additional parameters.
|
182
185
|
*
|
183
|
-
*
|
184
|
-
*
|
185
|
-
*
|
186
|
-
*
|
186
|
+
* * For an ID type, args must be a String.
|
187
|
+
* * For a FORMAT type, args must be a Gst::Format.
|
188
|
+
* * For an ASSOCIATION type, args must contains an association flag (see Gst::Index::AssocFlags), a Gst::Format and a value for the format.
|
189
|
+
* * For an OBJECT type, well you must wait, because it is not yet implemented.
|
187
190
|
*
|
188
191
|
* Returns: a reference to the newly allocated entry in the index, as a Gst::EntryIndex object.
|
189
192
|
*/
|
190
193
|
static VALUE
|
191
|
-
|
194
|
+
rg_add (int argc, VALUE * argv, VALUE self)
|
192
195
|
{
|
193
196
|
GstIndexEntry *index_entry;
|
194
197
|
VALUE id;
|
@@ -247,7 +250,7 @@ __compare (gconstpointer a, gconstpointer b, gpointer user_data)
|
|
247
250
|
* if the value is not found.
|
248
251
|
*/
|
249
252
|
static VALUE
|
250
|
-
|
253
|
+
rg_get_assoc_entry (VALUE self, VALUE id, VALUE method, VALUE flags,
|
251
254
|
VALUE format, VALUE value)
|
252
255
|
{
|
253
256
|
GstIndexEntry *index_entry;
|
@@ -276,39 +279,39 @@ rb_gst_index_get_assoc_entry (VALUE self, VALUE id, VALUE method, VALUE flags,
|
|
276
279
|
}
|
277
280
|
|
278
281
|
void
|
279
|
-
Init_gst_index (
|
282
|
+
Init_gst_index (VALUE mGst)
|
280
283
|
{
|
281
|
-
VALUE
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
284
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GST_TYPE_INDEX, "Index", mGst);
|
285
|
+
|
286
|
+
RG_DEF_METHOD(initialize, 0);
|
287
|
+
RG_DEF_METHOD_P(readable, 0);
|
288
|
+
RG_DEF_METHOD_P(writable, 0);
|
289
|
+
RG_DEF_METHOD(commit, 1);
|
290
|
+
RG_DEF_METHOD(group, 0);
|
291
|
+
RG_DEF_METHOD(new_group, 0);
|
292
|
+
RG_DEF_METHOD(set_group, 1);
|
293
|
+
RG_DEF_METHOD(certainty, 0);
|
294
|
+
RG_DEF_METHOD(set_certainty, 1);
|
292
295
|
#if 0
|
293
|
-
|
294
|
-
|
296
|
+
RG_DEF_METHOD(set_filter, 0);
|
297
|
+
RG_DEF_METHOD(set_resolver, 0);
|
295
298
|
#endif
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
G_DEF_CLASS (GST_TYPE_INDEX_CERTAINTY, "Certainty",
|
300
|
-
G_DEF_CONSTANTS (
|
301
|
-
G_DEF_CLASS (GST_TYPE_INDEX_LOOKUP_METHOD, "LookupMethod",
|
302
|
-
G_DEF_CONSTANTS (
|
303
|
-
G_DEF_CLASS (GST_TYPE_ASSOC_FLAGS, "AssocFlags",
|
304
|
-
G_DEF_CONSTANTS (
|
305
|
-
G_DEF_CLASS (GST_TYPE_INDEX_RESOLVER_METHOD, "ResolverMethod",
|
306
|
-
G_DEF_CONSTANTS (
|
307
|
-
G_DEF_CLASS (GST_TYPE_INDEX_FLAGS, "Flags",
|
308
|
-
G_DEF_CONSTANTS (
|
309
|
-
|
310
|
-
G_DEF_SETTERS (
|
311
|
-
|
312
|
-
rb_undef_method (
|
313
|
-
rb_undef_method (
|
299
|
+
RG_DEF_METHOD(add, -1);
|
300
|
+
RG_DEF_METHOD(get_assoc_entry, 5);
|
301
|
+
|
302
|
+
G_DEF_CLASS (GST_TYPE_INDEX_CERTAINTY, "Certainty", RG_TARGET_NAMESPACE);
|
303
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_INDEX_CERTAINTY, "GST_INDEX_");
|
304
|
+
G_DEF_CLASS (GST_TYPE_INDEX_LOOKUP_METHOD, "LookupMethod", RG_TARGET_NAMESPACE);
|
305
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_INDEX_LOOKUP_METHOD, "GST_INDEX_");
|
306
|
+
G_DEF_CLASS (GST_TYPE_ASSOC_FLAGS, "AssocFlags", RG_TARGET_NAMESPACE);
|
307
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_ASSOC_FLAGS, "GST_");
|
308
|
+
G_DEF_CLASS (GST_TYPE_INDEX_RESOLVER_METHOD, "ResolverMethod", RG_TARGET_NAMESPACE);
|
309
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_INDEX_RESOLVER_METHOD, "GST_INDEX_");
|
310
|
+
G_DEF_CLASS (GST_TYPE_INDEX_FLAGS, "Flags", RG_TARGET_NAMESPACE);
|
311
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_INDEX_FLAGS, "GST_INDEX_");
|
312
|
+
|
313
|
+
G_DEF_SETTERS (RG_TARGET_NAMESPACE);
|
314
|
+
|
315
|
+
rb_undef_method (RG_TARGET_NAMESPACE, "resolver");
|
316
|
+
rb_undef_method (RG_TARGET_NAMESPACE, "resolver=");
|
314
317
|
}
|
@@ -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 cIndexEntry
|
22
25
|
|
23
26
|
/* Class: Gst::IndexEntry
|
24
27
|
* An index's entry.
|
@@ -29,15 +32,15 @@
|
|
29
32
|
*
|
30
33
|
* Gets the internal data stored in the entry. The data depends of the type
|
31
34
|
* of the entry:
|
32
|
-
*
|
33
|
-
*
|
34
|
-
*
|
35
|
-
*
|
35
|
+
* * Gst::IndexEntry::ID: the description of the ID, as a String.
|
36
|
+
* * Gst::IndexEntry::ASSOCIATION: an Array that contains the number of associations, a Gst::Format, the value of the format and the association flags (see Gst::Index::AssocFlags).
|
37
|
+
* * Gst::IndexEntry::FORMAT: an Array that contains a Gst::Format and its value.
|
38
|
+
* * Gst::IndexEntry::OBJECt: not yet implemented.
|
36
39
|
*
|
37
40
|
* Returns: the internal data of the entry.
|
38
41
|
*/
|
39
42
|
static VALUE
|
40
|
-
|
43
|
+
rg_data (VALUE self)
|
41
44
|
{
|
42
45
|
GstIndexEntry *entry;
|
43
46
|
VALUE data;
|
@@ -75,7 +78,7 @@ rb_gst_index_entry_get_data (VALUE self)
|
|
75
78
|
* Returns: the type of the entry (see Gst::IndexEntry::Types).
|
76
79
|
*/
|
77
80
|
static VALUE
|
78
|
-
|
81
|
+
rg_entry_type (VALUE self)
|
79
82
|
{
|
80
83
|
GstIndexEntry *entry = RGST_INDEX_ENTRY (self);
|
81
84
|
|
@@ -83,14 +86,14 @@ rb_gst_index_entry_get_type (VALUE self)
|
|
83
86
|
}
|
84
87
|
|
85
88
|
void
|
86
|
-
Init_gst_indexentry (
|
89
|
+
Init_gst_indexentry (VALUE mGst)
|
87
90
|
{
|
88
|
-
VALUE
|
91
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GST_TYPE_INDEX_ENTRY, "IndexEntry", mGst);
|
89
92
|
|
90
|
-
rb_undef_method (
|
91
|
-
|
92
|
-
|
93
|
+
rb_undef_method (RG_TARGET_NAMESPACE, "initialize");
|
94
|
+
RG_DEF_METHOD(data, 0);
|
95
|
+
RG_DEF_METHOD(entry_type, 0);
|
93
96
|
|
94
|
-
G_DEF_CLASS (GST_TYPE_INDEX_ENTRY_TYPE, "Types",
|
95
|
-
G_DEF_CONSTANTS (
|
97
|
+
G_DEF_CLASS (GST_TYPE_INDEX_ENTRY_TYPE, "Types", RG_TARGET_NAMESPACE);
|
98
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_INDEX_ENTRY_TYPE, "GST_INDEX_ENTRY_");
|
96
99
|
}
|