gstreamer 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/rbgst.c
CHANGED
@@ -1,138 +1,90 @@
|
|
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
|
+
|
25
|
+
#define RG_TARGET_NAMESPACE mGst
|
26
|
+
|
27
|
+
void Init_gstreamer (void);
|
24
28
|
|
25
29
|
/* Module: Gst
|
26
30
|
* The GStreamer module.
|
27
31
|
*/
|
28
|
-
VALUE
|
32
|
+
VALUE RG_TARGET_NAMESPACE;
|
29
33
|
|
30
34
|
static void
|
31
35
|
Init_gst_classes (void)
|
32
36
|
{
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
extern void Init_gst_typefindfactory (void);
|
72
|
-
extern void Init_gst_value(void);
|
73
|
-
extern void Init_gst_xml (void);
|
37
|
+
Init_gst_bin (RG_TARGET_NAMESPACE);
|
38
|
+
Init_gst_bus(RG_TARGET_NAMESPACE);
|
39
|
+
Init_gst_caps (RG_TARGET_NAMESPACE);
|
40
|
+
Init_gst_child_proxy(RG_TARGET_NAMESPACE);
|
41
|
+
Init_gst_clock (RG_TARGET_NAMESPACE);
|
42
|
+
Init_gst_clock_entry (RG_TARGET_NAMESPACE);
|
43
|
+
Init_gst_element (RG_TARGET_NAMESPACE);
|
44
|
+
Init_gst_elementfactory (RG_TARGET_NAMESPACE);
|
45
|
+
Init_gst_seek(RG_TARGET_NAMESPACE);
|
46
|
+
Init_gst_format (RG_TARGET_NAMESPACE);
|
47
|
+
Init_gst_structure(RG_TARGET_NAMESPACE);
|
48
|
+
Init_gst_index (RG_TARGET_NAMESPACE);
|
49
|
+
Init_gst_indexentry (RG_TARGET_NAMESPACE);
|
50
|
+
Init_gst_indexfactory (RG_TARGET_NAMESPACE);
|
51
|
+
Init_gst_object (RG_TARGET_NAMESPACE);
|
52
|
+
Init_gst_pad (RG_TARGET_NAMESPACE);
|
53
|
+
Init_gst_pad_template(RG_TARGET_NAMESPACE);
|
54
|
+
Init_gst_ghost_pad(RG_TARGET_NAMESPACE);
|
55
|
+
Init_gst_parse (RG_TARGET_NAMESPACE);
|
56
|
+
Init_gst_pipeline (RG_TARGET_NAMESPACE);
|
57
|
+
Init_gst_plugin (RG_TARGET_NAMESPACE);
|
58
|
+
Init_gst_plugin_feature(RG_TARGET_NAMESPACE);
|
59
|
+
Init_gst_querytype (RG_TARGET_NAMESPACE);
|
60
|
+
Init_gst_registry (RG_TARGET_NAMESPACE);
|
61
|
+
Init_gst_static_caps(RG_TARGET_NAMESPACE);
|
62
|
+
Init_gst_static_pad_template(RG_TARGET_NAMESPACE);
|
63
|
+
Init_gst_systemclock (RG_TARGET_NAMESPACE);
|
64
|
+
Init_gst_tag (RG_TARGET_NAMESPACE);
|
65
|
+
Init_gst_tag_setter (RG_TARGET_NAMESPACE);
|
66
|
+
Init_gst_typefindfactory (RG_TARGET_NAMESPACE);
|
67
|
+
Init_gst_value(RG_TARGET_NAMESPACE);
|
68
|
+
Init_gst_xml (RG_TARGET_NAMESPACE);
|
69
|
+
|
70
|
+
Init_gst_mini_object(RG_TARGET_NAMESPACE);
|
71
|
+
Init_gst_buffer(RG_TARGET_NAMESPACE);
|
72
|
+
Init_gst_message(RG_TARGET_NAMESPACE);
|
73
|
+
Init_gst_query(RG_TARGET_NAMESPACE);
|
74
|
+
Init_gst_event(RG_TARGET_NAMESPACE);
|
74
75
|
|
75
76
|
#if defined(HAVE_GST_OVERLAY)
|
76
|
-
|
77
|
-
#endif
|
78
|
-
|
79
|
-
#if defined(HAVE_MEDIA_INFO)
|
80
|
-
extern void Init_gst_mediatype (void);
|
81
|
-
#endif
|
82
|
-
|
83
|
-
#ifdef HAVE_GST_PBUTILS
|
84
|
-
extern void Init_gst_install_plugins (void);
|
85
|
-
#endif
|
86
|
-
|
87
|
-
Init_gst_bin ();
|
88
|
-
Init_gst_bus();
|
89
|
-
Init_gst_caps ();
|
90
|
-
Init_gst_child_proxy();
|
91
|
-
Init_gst_clock ();
|
92
|
-
Init_gst_clock_entry ();
|
93
|
-
Init_gst_element ();
|
94
|
-
Init_gst_elementfactory ();
|
95
|
-
Init_gst_seek();
|
96
|
-
Init_gst_format ();
|
97
|
-
Init_gst_structure();
|
98
|
-
Init_gst_index ();
|
99
|
-
Init_gst_indexentry ();
|
100
|
-
Init_gst_indexfactory ();
|
101
|
-
Init_gst_object ();
|
102
|
-
Init_gst_pad ();
|
103
|
-
Init_gst_pad_template();
|
104
|
-
Init_gst_ghost_pad();
|
105
|
-
Init_gst_parse ();
|
106
|
-
Init_gst_pipeline ();
|
107
|
-
Init_gst_plugin ();
|
108
|
-
Init_gst_plugin_feature();
|
109
|
-
Init_gst_querytype ();
|
110
|
-
Init_gst_registry ();
|
111
|
-
Init_gst_static_caps();
|
112
|
-
Init_gst_static_pad_template();
|
113
|
-
Init_gst_systemclock ();
|
114
|
-
Init_gst_tag ();
|
115
|
-
Init_gst_tag_setter ();
|
116
|
-
Init_gst_typefindfactory ();
|
117
|
-
Init_gst_value();
|
118
|
-
Init_gst_xml ();
|
119
|
-
|
120
|
-
Init_gst_mini_object();
|
121
|
-
Init_gst_buffer();
|
122
|
-
Init_gst_message();
|
123
|
-
Init_gst_query();
|
124
|
-
Init_gst_event();
|
125
|
-
|
126
|
-
#if defined(HAVE_GST_OVERLAY)
|
127
|
-
Init_gst_x_overlay ();
|
77
|
+
Init_gst_x_overlay (RG_TARGET_NAMESPACE);
|
128
78
|
#endif
|
129
79
|
|
130
80
|
#ifdef HAVE_MEDIA_INFO
|
131
|
-
Init_gst_mediatype ();
|
81
|
+
Init_gst_mediatype (RG_TARGET_NAMESPACE);
|
132
82
|
#endif
|
133
83
|
|
134
84
|
#ifdef HAVE_GST_PBUTILS
|
135
|
-
|
85
|
+
Init_gst_install_plugins_context (RG_TARGET_NAMESPACE);
|
86
|
+
Init_gst_install_plugins (RG_TARGET_NAMESPACE);
|
87
|
+
Init_gst_install_plugins_return (RG_TARGET_NAMESPACE);
|
136
88
|
#endif
|
137
89
|
}
|
138
90
|
|
@@ -151,7 +103,7 @@ Init_gst_classes (void)
|
|
151
103
|
*/
|
152
104
|
|
153
105
|
static VALUE
|
154
|
-
|
106
|
+
rg_m_init (int argc, VALUE * argv, VALUE self)
|
155
107
|
{
|
156
108
|
gint i, gargc;
|
157
109
|
VALUE argary;
|
@@ -215,13 +167,13 @@ rb_gst_init (int argc, VALUE * argv, VALUE self)
|
|
215
167
|
* Gets the version number of the GStreamer library, in an array
|
216
168
|
* of 3 fixnums, which represent major, minor and macro numbers.
|
217
169
|
*
|
218
|
-
*
|
219
|
-
*
|
170
|
+
* # Prints GStreamer version in a String 'major.minor.macro.nano'
|
171
|
+
* p Gst.version.join('.')
|
220
172
|
*
|
221
173
|
* Returns: an Array of 4 fixnums (major, minor, macro and nano numbers).
|
222
174
|
*/
|
223
175
|
static VALUE
|
224
|
-
|
176
|
+
rg_m_version (VALUE self)
|
225
177
|
{
|
226
178
|
guint major, minor, micro, nano;
|
227
179
|
|
@@ -232,7 +184,7 @@ rb_gst_version (VALUE self)
|
|
232
184
|
}
|
233
185
|
|
234
186
|
static VALUE
|
235
|
-
|
187
|
+
rg_m_check_version_p(VALUE self, VALUE rb_major, VALUE rb_minor, VALUE rb_micro)
|
236
188
|
{
|
237
189
|
guint major, minor, micro, nano;
|
238
190
|
|
@@ -245,43 +197,41 @@ rbgst_m_check_version(VALUE self, VALUE rb_major, VALUE rb_minor, VALUE rb_micro
|
|
245
197
|
micro >= NUM2UINT(rb_micro)));
|
246
198
|
}
|
247
199
|
|
248
|
-
|
249
200
|
void
|
250
|
-
|
201
|
+
Init_gstreamer (void)
|
251
202
|
{
|
252
|
-
|
203
|
+
RG_TARGET_NAMESPACE = rb_define_module ("Gst");
|
253
204
|
|
254
|
-
|
255
|
-
|
205
|
+
RG_DEF_MODFUNC(init, -1);
|
206
|
+
RG_DEF_MODFUNC(version, 0);
|
256
207
|
|
257
208
|
/*
|
258
209
|
* Constant: VERSION_MAJOR
|
259
210
|
* GStreamer's major version.
|
260
211
|
*/
|
261
|
-
rb_define_const(
|
212
|
+
rb_define_const(RG_TARGET_NAMESPACE, "VERSION_MAJOR", INT2FIX(GST_VERSION_MAJOR));
|
262
213
|
|
263
214
|
/*
|
264
215
|
* Constant: VERSION_MINOR
|
265
216
|
* GStreamer's minor version.
|
266
217
|
*/
|
267
|
-
rb_define_const(
|
218
|
+
rb_define_const(RG_TARGET_NAMESPACE, "VERSION_MINOR", INT2FIX(GST_VERSION_MINOR));
|
268
219
|
|
269
220
|
/*
|
270
221
|
* Constant: VERSION_MICRO
|
271
222
|
* GStreamer's micro version.
|
272
223
|
*/
|
273
|
-
rb_define_const(
|
274
|
-
|
224
|
+
rb_define_const(RG_TARGET_NAMESPACE, "VERSION_MICRO", INT2FIX(GST_VERSION_MICRO));
|
275
225
|
|
276
226
|
/*
|
277
227
|
* Constant: BUILD_VERSION
|
278
228
|
* GStreamer's build version.
|
279
229
|
*/
|
280
|
-
rb_define_const(
|
230
|
+
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
|
281
231
|
rb_ary_new3(3,
|
282
232
|
INT2FIX(GST_VERSION_MAJOR),
|
283
233
|
INT2FIX(GST_VERSION_MINOR),
|
284
234
|
INT2FIX(GST_VERSION_MICRO)));
|
285
235
|
|
286
|
-
|
236
|
+
RG_DEF_MODFUNC_P(check_version, 3);
|
287
237
|
}
|
data/ext/gstreamer/rbgst.h
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
1
2
|
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2004 Ruby-GNOME2 Project
|
5
|
+
* Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
|
2
6
|
*
|
3
|
-
*
|
4
|
-
*
|
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.
|
5
11
|
*
|
6
|
-
*
|
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.
|
7
16
|
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
* Ruby/GStreamer is distributed in the hope that it will be useful,
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
16
|
-
* Lesser General Public License for more details.
|
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
23
|
#ifndef __RBGST_H_
|
@@ -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 cClockEntry
|
22
25
|
|
23
26
|
/* Class: Gst::ClockEntry
|
24
27
|
* A wrapper for GstClockID, used to create and start timers
|
@@ -69,7 +72,7 @@ gst_clock_entry_get_type (void)
|
|
69
72
|
* Returns: a new Gst::ClockEntry object.
|
70
73
|
*/
|
71
74
|
static VALUE
|
72
|
-
|
75
|
+
rg_initialize (int argc, VALUE * argv, VALUE self)
|
73
76
|
{
|
74
77
|
VALUE clock, time, interval;
|
75
78
|
GstClockID id;
|
@@ -96,7 +99,7 @@ rb_gst_clock_entry_new (int argc, VALUE * argv, VALUE self)
|
|
96
99
|
* Returns: true if the entry is single-shot, false otherwise.
|
97
100
|
*/
|
98
101
|
static VALUE
|
99
|
-
|
102
|
+
rg_single_shot_p (VALUE self)
|
100
103
|
{
|
101
104
|
return CBOOL2RVAL (GST_CLOCK_ENTRY_TYPE (RGST_CLOCK_ENTRY (self)) ==
|
102
105
|
GST_CLOCK_ENTRY_SINGLE);
|
@@ -106,7 +109,7 @@ rb_gst_clock_entry_is_single_shot (VALUE self)
|
|
106
109
|
* Returns: true if the entry is periodic, false otherwise.
|
107
110
|
*/
|
108
111
|
static VALUE
|
109
|
-
|
112
|
+
rg_periodic_p (VALUE self)
|
110
113
|
{
|
111
114
|
return CBOOL2RVAL (GST_CLOCK_ENTRY_TYPE (RGST_CLOCK_ENTRY (self)) ==
|
112
115
|
GST_CLOCK_ENTRY_PERIODIC);
|
@@ -120,7 +123,7 @@ rb_gst_clock_entry_is_periodic (VALUE self)
|
|
120
123
|
* Returns: self.
|
121
124
|
*/
|
122
125
|
static VALUE
|
123
|
-
|
126
|
+
rg_unschedule (VALUE self)
|
124
127
|
{
|
125
128
|
gst_clock_id_unschedule (RGST_CLOCK_ENTRY (self));
|
126
129
|
return self;
|
@@ -134,7 +137,7 @@ rb_gst_clock_entry_unschedule (VALUE self)
|
|
134
137
|
* Returns: a return code (see Gst::Clock::Return).
|
135
138
|
*/
|
136
139
|
static VALUE
|
137
|
-
|
140
|
+
rg_wait (VALUE self)
|
138
141
|
{
|
139
142
|
return GENUM2RVAL (gst_clock_id_wait (RGST_CLOCK_ENTRY (self), NULL),
|
140
143
|
GST_TYPE_CLOCK_RETURN);
|
@@ -185,7 +188,7 @@ __callback_dispatcher (GstClock * clock, GstClockTime time, GstClockID id,
|
|
185
188
|
* Returns: a return code (see Gst::Clock::Return).
|
186
189
|
*/
|
187
190
|
static VALUE
|
188
|
-
|
191
|
+
rg_wait_async (VALUE self)
|
189
192
|
{
|
190
193
|
GstClockID id = (GstClockID) RGST_CLOCK_ENTRY (self);
|
191
194
|
|
@@ -211,7 +214,7 @@ rb_gst_clock_entry_wait_async (VALUE self)
|
|
211
214
|
* Returns: the requested time of the entry, in nanoseconds.
|
212
215
|
*/
|
213
216
|
static VALUE
|
214
|
-
|
217
|
+
rg_time (VALUE self)
|
215
218
|
{
|
216
219
|
return ULL2NUM (GST_CLOCK_ENTRY_TIME (RGST_CLOCK_ENTRY (self)));
|
217
220
|
}
|
@@ -221,7 +224,7 @@ rb_gst_clock_entry_get_time (VALUE self)
|
|
221
224
|
* if the entry is not periodic.
|
222
225
|
*/
|
223
226
|
static VALUE
|
224
|
-
|
227
|
+
rg_interval (VALUE self)
|
225
228
|
{
|
226
229
|
return ULL2NUM (GST_CLOCK_ENTRY_INTERVAL (RGST_CLOCK_ENTRY (self)));
|
227
230
|
}
|
@@ -230,7 +233,7 @@ rb_gst_clock_entry_get_interval (VALUE self)
|
|
230
233
|
* Returns: the owner clock of the entry, as a Gst::Clock object.
|
231
234
|
*/
|
232
235
|
static VALUE
|
233
|
-
|
236
|
+
rg_clock (VALUE self)
|
234
237
|
{
|
235
238
|
return RGST_CLOCK_NEW (GST_CLOCK_ENTRY_CLOCK (RGST_CLOCK_ENTRY (self)));
|
236
239
|
}
|
@@ -239,30 +242,30 @@ rb_gst_clock_entry_get_clock (VALUE self)
|
|
239
242
|
* Returns: the status of the entry (see Gst::ClockEntry::Return).
|
240
243
|
*/
|
241
244
|
static VALUE
|
242
|
-
|
245
|
+
rg_status (VALUE self)
|
243
246
|
{
|
244
247
|
return GENUM2RVAL(GST_CLOCK_ENTRY_STATUS(RGST_CLOCK_ENTRY (self)),
|
245
248
|
GST_TYPE_CLOCK_RETURN);
|
246
249
|
}
|
247
250
|
|
248
251
|
void
|
249
|
-
Init_gst_clock_entry (
|
252
|
+
Init_gst_clock_entry (VALUE mGst)
|
250
253
|
{
|
251
|
-
VALUE
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
G_DEF_CLASS (GST_TYPE_CLOCK_ENTRY_TYPE, "Type",
|
265
|
-
G_DEF_CONSTANTS (
|
266
|
-
G_DEF_CLASS (GST_TYPE_CLOCK_RETURN, "Return",
|
267
|
-
G_DEF_CONSTANTS (
|
254
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GST_TYPE_CLOCK_ENTRY, "ClockEntry", mGst);
|
255
|
+
|
256
|
+
RG_DEF_METHOD(initialize, -1);
|
257
|
+
RG_DEF_METHOD_P(single_shot, 0);
|
258
|
+
RG_DEF_METHOD_P(periodic, 0);
|
259
|
+
RG_DEF_METHOD(wait, 0);
|
260
|
+
RG_DEF_METHOD(wait_async, 0);
|
261
|
+
RG_DEF_METHOD(unschedule, 0);
|
262
|
+
RG_DEF_METHOD(clock, 0);
|
263
|
+
RG_DEF_METHOD(time, 0);
|
264
|
+
RG_DEF_METHOD(interval, 0);
|
265
|
+
RG_DEF_METHOD(status, 0);
|
266
|
+
|
267
|
+
G_DEF_CLASS (GST_TYPE_CLOCK_ENTRY_TYPE, "Type", RG_TARGET_NAMESPACE);
|
268
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_CLOCK_ENTRY_TYPE, "GST_CLOCK_ENTRY_");
|
269
|
+
G_DEF_CLASS (GST_TYPE_CLOCK_RETURN, "Return", RG_TARGET_NAMESPACE);
|
270
|
+
G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_CLOCK_RETURN, "GST_CLOCK_");
|
268
271
|
}
|