gstreamer 0.90.6
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/ChangeLog +1157 -0
- data/README +33 -0
- data/Rakefile +15 -0
- data/ext/gstreamer/Makefile +162 -0
- data/ext/gstreamer/depend +5 -0
- data/ext/gstreamer/extconf.rb +63 -0
- data/ext/gstreamer/gst.so +0 -0
- data/ext/gstreamer/misc.c +62 -0
- data/ext/gstreamer/misc.o +0 -0
- data/ext/gstreamer/rbgst-bin.c +466 -0
- data/ext/gstreamer/rbgst-bin.o +0 -0
- data/ext/gstreamer/rbgst-buffer.c +365 -0
- data/ext/gstreamer/rbgst-buffer.o +0 -0
- data/ext/gstreamer/rbgst-bus.c +92 -0
- data/ext/gstreamer/rbgst-bus.o +0 -0
- data/ext/gstreamer/rbgst-caps.c +441 -0
- data/ext/gstreamer/rbgst-caps.o +0 -0
- data/ext/gstreamer/rbgst-child-proxy.c +33 -0
- data/ext/gstreamer/rbgst-child-proxy.o +0 -0
- data/ext/gstreamer/rbgst-clock.c +108 -0
- data/ext/gstreamer/rbgst-clock.o +0 -0
- data/ext/gstreamer/rbgst-element-factory.c +255 -0
- data/ext/gstreamer/rbgst-element-factory.o +0 -0
- data/ext/gstreamer/rbgst-element.c +1053 -0
- data/ext/gstreamer/rbgst-element.o +0 -0
- data/ext/gstreamer/rbgst-event.c +351 -0
- data/ext/gstreamer/rbgst-event.o +0 -0
- data/ext/gstreamer/rbgst-ghost-pad.c +42 -0
- data/ext/gstreamer/rbgst-ghost-pad.o +0 -0
- data/ext/gstreamer/rbgst-index-factory.c +67 -0
- data/ext/gstreamer/rbgst-index-factory.o +0 -0
- data/ext/gstreamer/rbgst-message.c +784 -0
- data/ext/gstreamer/rbgst-message.o +0 -0
- data/ext/gstreamer/rbgst-mini-object.c +220 -0
- data/ext/gstreamer/rbgst-mini-object.o +0 -0
- data/ext/gstreamer/rbgst-object.c +81 -0
- data/ext/gstreamer/rbgst-object.o +0 -0
- data/ext/gstreamer/rbgst-pad-template.c +124 -0
- data/ext/gstreamer/rbgst-pad-template.o +0 -0
- data/ext/gstreamer/rbgst-pad.c +338 -0
- data/ext/gstreamer/rbgst-pad.o +0 -0
- data/ext/gstreamer/rbgst-pipeline.c +90 -0
- data/ext/gstreamer/rbgst-pipeline.o +0 -0
- data/ext/gstreamer/rbgst-plugin-feature.c +134 -0
- data/ext/gstreamer/rbgst-plugin-feature.o +0 -0
- data/ext/gstreamer/rbgst-plugin.c +164 -0
- data/ext/gstreamer/rbgst-plugin.o +0 -0
- data/ext/gstreamer/rbgst-private.c +89 -0
- data/ext/gstreamer/rbgst-private.h +37 -0
- data/ext/gstreamer/rbgst-private.o +0 -0
- data/ext/gstreamer/rbgst-query.c +289 -0
- data/ext/gstreamer/rbgst-query.o +0 -0
- data/ext/gstreamer/rbgst-seek.c +36 -0
- data/ext/gstreamer/rbgst-seek.o +0 -0
- data/ext/gstreamer/rbgst-static-caps.c +49 -0
- data/ext/gstreamer/rbgst-static-caps.o +0 -0
- data/ext/gstreamer/rbgst-static-pad-template.c +64 -0
- data/ext/gstreamer/rbgst-static-pad-template.o +0 -0
- data/ext/gstreamer/rbgst-structure.c +300 -0
- data/ext/gstreamer/rbgst-structure.o +0 -0
- data/ext/gstreamer/rbgst-system-clock.c +45 -0
- data/ext/gstreamer/rbgst-system-clock.o +0 -0
- data/ext/gstreamer/rbgst-type-find-factory.c +124 -0
- data/ext/gstreamer/rbgst-type-find-factory.o +0 -0
- data/ext/gstreamer/rbgst-value.c +517 -0
- data/ext/gstreamer/rbgst-value.o +0 -0
- data/ext/gstreamer/rbgst-x-overlay.c +132 -0
- data/ext/gstreamer/rbgst-x-overlay.o +0 -0
- data/ext/gstreamer/rbgst.c +279 -0
- data/ext/gstreamer/rbgst.h +197 -0
- data/ext/gstreamer/rbgst.o +0 -0
- data/ext/gstreamer/rbgstclockentry.c +268 -0
- data/ext/gstreamer/rbgstclockentry.o +0 -0
- data/ext/gstreamer/rbgstformat.c +159 -0
- data/ext/gstreamer/rbgstformat.o +0 -0
- data/ext/gstreamer/rbgstindex.c +314 -0
- data/ext/gstreamer/rbgstindex.o +0 -0
- data/ext/gstreamer/rbgstindexentry.c +96 -0
- data/ext/gstreamer/rbgstindexentry.o +0 -0
- data/ext/gstreamer/rbgstparse.c +66 -0
- data/ext/gstreamer/rbgstparse.o +0 -0
- data/ext/gstreamer/rbgstquerytype.c +159 -0
- data/ext/gstreamer/rbgstquerytype.o +0 -0
- data/ext/gstreamer/rbgstregistry.c +278 -0
- data/ext/gstreamer/rbgstregistry.o +0 -0
- data/ext/gstreamer/rbgsttag.c +111 -0
- data/ext/gstreamer/rbgsttag.o +0 -0
- data/ext/gstreamer/rbgsttagsetter.c +50 -0
- data/ext/gstreamer/rbgsttagsetter.o +0 -0
- data/ext/gstreamer/rbgstxml.c +189 -0
- data/ext/gstreamer/rbgstxml.o +0 -0
- data/ext/gstreamer/ruby-gstreamer.pc +3 -0
- data/extconf.rb +49 -0
- data/lib/gst.rb +19 -0
- data/sample/audio-player.rb +54 -0
- data/sample/gst-inspect.rb +417 -0
- data/sample/media-type.rb +55 -0
- data/sample/media-type2.rb +268 -0
- data/sample/ogg-audio-player.rb +54 -0
- data/sample/type-find.rb +46 -0
- data/sample/video-player.rb +57 -0
- data/sample/xml-player.rb +60 -0
- data/test/gst-test-utils.rb +18 -0
- data/test/run-test.rb +25 -0
- data/test/test_bin.rb +167 -0
- data/test/test_buffer.rb +174 -0
- data/test/test_caps.rb +24 -0
- data/test/test_clock.rb +7 -0
- data/test/test_element.rb +87 -0
- data/test/test_element_factory.rb +28 -0
- data/test/test_event.rb +10 -0
- data/test/test_index_factory.rb +7 -0
- data/test/test_message.rb +191 -0
- data/test/test_mini_object.rb +38 -0
- data/test/test_object.rb +10 -0
- data/test/test_pad.rb +68 -0
- data/test/test_plugin.rb +6 -0
- data/test/test_plugin_feature.rb +20 -0
- data/test/test_seek.rb +17 -0
- data/test/test_static_caps.rb +18 -0
- data/test/test_static_pad_template.rb +16 -0
- data/test/test_structure.rb +159 -0
- data/test/test_thread_handling.rb +58 -0
- data/test/test_type_find_factory.rb +8 -0
- data/test/test_value.rb +69 -0
- metadata +208 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright (C) 2008 Ruby-GNOME2 Project
|
|
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
|
+
#ifndef __RBGST_PRIVATE_H_
|
|
23
|
+
#define __RBGST_PRIVATE_H_
|
|
24
|
+
|
|
25
|
+
#include <ruby.h>
|
|
26
|
+
|
|
27
|
+
char *_rbgst_inspect(VALUE object);
|
|
28
|
+
void _rbgst_define_class_if_need(VALUE klass, GType type, const gchar *prefix);
|
|
29
|
+
VALUE _rbgst_collect_elements(GstIterator *iter);
|
|
30
|
+
|
|
31
|
+
void _rbgst_mini_object_free(void *ptr);
|
|
32
|
+
|
|
33
|
+
/* implemented in rbgst-object.c */
|
|
34
|
+
VALUE rbgst_object_instance2robj(gpointer instance);
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
#endif /* __RBGST_PRIVATE_H_ */
|
|
Binary file
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2006 Sjoerd Simons <sjoerd@luon.net>
|
|
3
|
+
* Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
|
|
4
|
+
* Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
|
5
|
+
* Copyright (C) 2007 Ruby-GNOME2 Project Team
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Ruby/GStreamer.
|
|
8
|
+
*
|
|
9
|
+
* Ruby/GStreamer is free software; you can redistribute it and/or
|
|
10
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
11
|
+
* License as published by the Free Software Foundation; either
|
|
12
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* Ruby/GStreamer is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
17
|
+
* Lesser General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
20
|
+
* License along with Ruby/GStreamer; if not, write to the Free Software
|
|
21
|
+
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
#include "rbgst.h"
|
|
25
|
+
#include "rbgst-private.h"
|
|
26
|
+
|
|
27
|
+
/* Document-class: Gst::Query
|
|
28
|
+
* Queries.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
static RGConvertTable table = {0};
|
|
32
|
+
|
|
33
|
+
static VALUE rb_cGstQueryPosition;
|
|
34
|
+
static VALUE rb_cGstQueryDuration;
|
|
35
|
+
static VALUE rb_cGstQueryLatency;
|
|
36
|
+
static VALUE rb_cGstQuerySeeking;
|
|
37
|
+
static VALUE rb_cGstQuerySegment;
|
|
38
|
+
static VALUE rb_cGstQueryConvert;
|
|
39
|
+
static VALUE rb_cGstQueryFormats;
|
|
40
|
+
static VALUE rb_cGstQuery;
|
|
41
|
+
|
|
42
|
+
static VALUE
|
|
43
|
+
get_superclass(void)
|
|
44
|
+
{
|
|
45
|
+
return rb_cGstMiniObject;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static VALUE
|
|
49
|
+
instance2robj(gpointer instance)
|
|
50
|
+
{
|
|
51
|
+
VALUE klass;
|
|
52
|
+
GstQuery *query;
|
|
53
|
+
|
|
54
|
+
query = instance;
|
|
55
|
+
|
|
56
|
+
switch (GST_QUERY_TYPE(query)) {
|
|
57
|
+
case GST_QUERY_POSITION:
|
|
58
|
+
klass = rb_cGstQueryPosition;
|
|
59
|
+
break;
|
|
60
|
+
case GST_QUERY_DURATION:
|
|
61
|
+
klass = rb_cGstQueryDuration;
|
|
62
|
+
break;
|
|
63
|
+
case GST_QUERY_LATENCY:
|
|
64
|
+
klass = rb_cGstQueryLatency;
|
|
65
|
+
break;
|
|
66
|
+
case GST_QUERY_SEEKING:
|
|
67
|
+
klass = rb_cGstQuerySeeking;
|
|
68
|
+
break;
|
|
69
|
+
case GST_QUERY_SEGMENT:
|
|
70
|
+
klass = rb_cGstQuerySegment;
|
|
71
|
+
break;
|
|
72
|
+
case GST_QUERY_CONVERT:
|
|
73
|
+
klass = rb_cGstQueryConvert;
|
|
74
|
+
break;
|
|
75
|
+
case GST_QUERY_FORMATS:
|
|
76
|
+
klass = rb_cGstQueryFormats;
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
klass = rb_cGstQuery;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
gst_mini_object_ref(instance);
|
|
84
|
+
return Data_Wrap_Struct(klass, NULL, _rbgst_mini_object_free, instance);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static VALUE
|
|
88
|
+
position_initialize(VALUE self, VALUE format)
|
|
89
|
+
{
|
|
90
|
+
GstQuery *query;
|
|
91
|
+
|
|
92
|
+
query = gst_query_new_position(RVAL2GST_FORMAT(format));
|
|
93
|
+
|
|
94
|
+
G_INITIALIZE(self, query);
|
|
95
|
+
return Qnil;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static VALUE
|
|
99
|
+
position_parse(VALUE self)
|
|
100
|
+
{
|
|
101
|
+
GstFormat format;
|
|
102
|
+
gint64 cur;
|
|
103
|
+
|
|
104
|
+
gst_query_parse_position(RVAL2GST_QUERY(self), &format, &cur);
|
|
105
|
+
|
|
106
|
+
return rb_ary_new3(2, GST_FORMAT2RVAL(format), LL2NUM(cur));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static VALUE
|
|
110
|
+
duration_initialize(VALUE self, VALUE format)
|
|
111
|
+
{
|
|
112
|
+
GstQuery *query;
|
|
113
|
+
|
|
114
|
+
query = gst_query_new_duration(RVAL2GST_FORMAT(format));
|
|
115
|
+
|
|
116
|
+
G_INITIALIZE(self, query);
|
|
117
|
+
return Qnil;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
static VALUE
|
|
121
|
+
duration_parse(VALUE self)
|
|
122
|
+
{
|
|
123
|
+
GstFormat format;
|
|
124
|
+
gint64 cur;
|
|
125
|
+
|
|
126
|
+
gst_query_parse_duration(RVAL2GST_QUERY(self), &format, &cur);
|
|
127
|
+
|
|
128
|
+
return rb_ary_new3(2, GST_FORMAT2RVAL(format), LL2NUM(cur));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static VALUE
|
|
132
|
+
latency_initialize(VALUE self)
|
|
133
|
+
{
|
|
134
|
+
GstQuery *query;
|
|
135
|
+
|
|
136
|
+
query = gst_query_new_latency();
|
|
137
|
+
|
|
138
|
+
G_INITIALIZE(self, query);
|
|
139
|
+
return Qnil;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static VALUE
|
|
143
|
+
latency_parse(VALUE self)
|
|
144
|
+
{
|
|
145
|
+
GstClockTime min_latency;
|
|
146
|
+
GstClockTime max_latency;
|
|
147
|
+
gboolean live;
|
|
148
|
+
|
|
149
|
+
gst_query_parse_latency(RVAL2GST_QUERY(self), &live, &min_latency,
|
|
150
|
+
&max_latency);
|
|
151
|
+
|
|
152
|
+
return rb_ary_new3(3, CBOOL2RVAL(live), ULL2NUM(min_latency),
|
|
153
|
+
ULL2NUM(max_latency));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
static VALUE
|
|
158
|
+
seeking_initialize(VALUE self, VALUE format)
|
|
159
|
+
{
|
|
160
|
+
GstQuery *query;
|
|
161
|
+
|
|
162
|
+
query = gst_query_new_seeking(RVAL2GST_FORMAT(format));
|
|
163
|
+
|
|
164
|
+
G_INITIALIZE(self, query);
|
|
165
|
+
return Qnil;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
static VALUE
|
|
169
|
+
seeking_parse(VALUE self)
|
|
170
|
+
{
|
|
171
|
+
GstFormat format;
|
|
172
|
+
gboolean seekable;
|
|
173
|
+
gint64 segment_start, segment_end;
|
|
174
|
+
|
|
175
|
+
gst_query_parse_seeking(RVAL2GST_QUERY(self), &format, &seekable,
|
|
176
|
+
&segment_start, &segment_end);
|
|
177
|
+
|
|
178
|
+
return rb_ary_new3(4, GST_FORMAT2RVAL(format), CBOOL2RVAL(seekable),
|
|
179
|
+
LL2NUM(segment_start), LL2NUM(segment_end));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
static VALUE
|
|
184
|
+
segment_initialize(VALUE self, VALUE format)
|
|
185
|
+
{
|
|
186
|
+
GstQuery *query;
|
|
187
|
+
|
|
188
|
+
query = gst_query_new_segment(RVAL2GST_FORMAT(format));
|
|
189
|
+
|
|
190
|
+
G_INITIALIZE(self, query);
|
|
191
|
+
return Qnil;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
static VALUE
|
|
195
|
+
segment_parse(VALUE self)
|
|
196
|
+
{
|
|
197
|
+
GstFormat format;
|
|
198
|
+
gdouble rate;
|
|
199
|
+
gint64 start_value, stop_value;
|
|
200
|
+
|
|
201
|
+
gst_query_parse_segment(RVAL2GST_QUERY(self), &rate, &format,
|
|
202
|
+
&start_value, &stop_value);
|
|
203
|
+
|
|
204
|
+
return rb_ary_new3(4, rb_dbl2big(rate), GST_FORMAT2RVAL(format),
|
|
205
|
+
LL2NUM(start_value), LL2NUM(stop_value));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
static VALUE
|
|
209
|
+
convert_initialize(VALUE self, VALUE src_format, VALUE value, VALUE dest_format)
|
|
210
|
+
{
|
|
211
|
+
GstQuery *query;
|
|
212
|
+
|
|
213
|
+
query = gst_query_new_convert(GST_FORMAT2RVAL(src_format),
|
|
214
|
+
NUM2LL(value), GST_FORMAT2RVAL(dest_format));
|
|
215
|
+
|
|
216
|
+
G_INITIALIZE(self, query);
|
|
217
|
+
return Qnil;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
static VALUE
|
|
221
|
+
convert_parse(VALUE self)
|
|
222
|
+
{
|
|
223
|
+
GstFormat src_format, dest_format;
|
|
224
|
+
gint64 src_value, dest_value;
|
|
225
|
+
|
|
226
|
+
gst_query_parse_convert(RVAL2GST_QUERY(self), &src_format, &src_value,
|
|
227
|
+
&dest_format, &dest_value);
|
|
228
|
+
|
|
229
|
+
return rb_ary_new3(4, GST_FORMAT2RVAL(src_format), LL2NUM(src_value),
|
|
230
|
+
RVAL2GST_FORMAT(dest_format), LL2NUM(dest_value));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
static VALUE
|
|
235
|
+
formats_initialize(VALUE self, VALUE format)
|
|
236
|
+
{
|
|
237
|
+
GstQuery *query;
|
|
238
|
+
|
|
239
|
+
query = gst_query_new_formats();
|
|
240
|
+
|
|
241
|
+
G_INITIALIZE (self, query);
|
|
242
|
+
return Qnil;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static VALUE
|
|
246
|
+
formats_parse(VALUE self)
|
|
247
|
+
{
|
|
248
|
+
VALUE ret;
|
|
249
|
+
guint n_formats;
|
|
250
|
+
guint i;
|
|
251
|
+
|
|
252
|
+
gst_query_parse_formats_length(RVAL2GST_QUERY(self), &n_formats);
|
|
253
|
+
ret = rb_ary_new2(n_formats);
|
|
254
|
+
for (i = 0 ; i< n_formats; i++) {
|
|
255
|
+
GstFormat format;
|
|
256
|
+
gst_query_parse_formats_nth(RVAL2GST_QUERY(self), i, &format);
|
|
257
|
+
rb_ary_push(ret, GST_FORMAT2RVAL(format));
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return ret;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
void
|
|
264
|
+
Init_gst_query (void)
|
|
265
|
+
{
|
|
266
|
+
table.type = GST_TYPE_QUERY;
|
|
267
|
+
table.get_superclass = get_superclass;
|
|
268
|
+
table.instance2robj = instance2robj;
|
|
269
|
+
RG_DEF_CONVERSION(&table);
|
|
270
|
+
|
|
271
|
+
rb_cGstQuery = G_DEF_CLASS (GST_TYPE_QUERY, "Query", mGst);
|
|
272
|
+
|
|
273
|
+
#define DEFINE_QUERY(type, lctype, arguments) \
|
|
274
|
+
rb_cGstQuery ## type = \
|
|
275
|
+
rb_define_class_under(mGst, "Query" #type, rb_cGstQuery); \
|
|
276
|
+
rb_define_method(rb_cGstQuery ## type, "initialize", \
|
|
277
|
+
lctype ## _initialize, arguments); \
|
|
278
|
+
rb_define_method(rb_cGstQuery ## type, "parse", \
|
|
279
|
+
lctype ## _parse, 0) \
|
|
280
|
+
|
|
281
|
+
DEFINE_QUERY(Position, position, 1);
|
|
282
|
+
DEFINE_QUERY(Duration, duration, 1);
|
|
283
|
+
DEFINE_QUERY(Latency, latency, 0);
|
|
284
|
+
DEFINE_QUERY(Seeking, seeking, 1);
|
|
285
|
+
DEFINE_QUERY(Segment, segment, 1);
|
|
286
|
+
DEFINE_QUERY(Convert, convert, 2);
|
|
287
|
+
DEFINE_QUERY(Formats, formats, 0);
|
|
288
|
+
#undef DEFINE_QUERY
|
|
289
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
|
|
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
|
+
|
|
23
|
+
/* Class: Gst::Seek
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
void
|
|
27
|
+
Init_gst_seek (void)
|
|
28
|
+
{
|
|
29
|
+
VALUE c = rb_define_module_under(mGst, "Seek");
|
|
30
|
+
|
|
31
|
+
G_DEF_CLASS(GST_TYPE_SEEK_TYPE, "SeekType", mGst);
|
|
32
|
+
G_DEF_CONSTANTS(c, GST_TYPE_SEEK_TYPE, "GST_SEEK_");
|
|
33
|
+
|
|
34
|
+
G_DEF_CLASS(GST_TYPE_SEEK_FLAGS, "SeekFlags", mGst);
|
|
35
|
+
G_DEF_CONSTANTS(c, GST_TYPE_SEEK_FLAGS, "GST_SEEK_");
|
|
36
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
|
|
23
|
+
#define SELF(obj) (RVAL2GST_STATIC_CAPS(obj))
|
|
24
|
+
|
|
25
|
+
static VALUE
|
|
26
|
+
get_description(VALUE self)
|
|
27
|
+
{
|
|
28
|
+
return CSTR2RVAL(SELF(self)->string);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static VALUE
|
|
32
|
+
get(VALUE self)
|
|
33
|
+
{
|
|
34
|
+
return GST_CAPS2RVAL(gst_static_caps_get(SELF(self)));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
void
|
|
38
|
+
Init_gst_static_caps(void)
|
|
39
|
+
{
|
|
40
|
+
VALUE rb_cGstStaticCaps;
|
|
41
|
+
|
|
42
|
+
rb_cGstStaticCaps = G_DEF_CLASS(GST_TYPE_STATIC_CAPS, "StaticCaps", mGst);
|
|
43
|
+
|
|
44
|
+
rb_define_method(rb_cGstStaticCaps, "description", get_description, 0);
|
|
45
|
+
rb_define_method(rb_cGstStaticCaps, "get", get, 0);
|
|
46
|
+
rb_define_alias(rb_cGstStaticCaps, "to_caps", "get");
|
|
47
|
+
|
|
48
|
+
G_DEF_SETTERS(rb_cGstStaticCaps);
|
|
49
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (C) 2007 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
|
+
/* Class: Gst::StaticPadTemplate
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
#define SELF(self) RVAL2GST_STATIC_PAD_TEMPLATE(self)
|
|
28
|
+
|
|
29
|
+
static VALUE
|
|
30
|
+
get_name(VALUE self)
|
|
31
|
+
{
|
|
32
|
+
return CSTR2RVAL(SELF(self)->name_template);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static VALUE
|
|
36
|
+
get_presence(VALUE self)
|
|
37
|
+
{
|
|
38
|
+
return GENUM2RVAL(SELF(self)->presence, GST_TYPE_PAD_PRESENCE);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static VALUE
|
|
42
|
+
get_direction(VALUE self)
|
|
43
|
+
{
|
|
44
|
+
return GENUM2RVAL(SELF(self)->direction, GST_TYPE_PAD_DIRECTION);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static VALUE
|
|
48
|
+
get_caps(VALUE self)
|
|
49
|
+
{
|
|
50
|
+
return GST_STATIC_CAPS2RVAL(gst_static_pad_template_get_caps(SELF(self)));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
void
|
|
54
|
+
Init_gst_static_pad_template (void)
|
|
55
|
+
{
|
|
56
|
+
VALUE cGstStaticPadTemplate;
|
|
57
|
+
|
|
58
|
+
cGstStaticPadTemplate = G_DEF_CLASS(GST_TYPE_STATIC_PAD_TEMPLATE,
|
|
59
|
+
"StaticPadTemplate", mGst);
|
|
60
|
+
rb_define_method(cGstStaticPadTemplate, "name", get_name, 0);
|
|
61
|
+
rb_define_method(cGstStaticPadTemplate, "presence", get_presence, 0);
|
|
62
|
+
rb_define_method(cGstStaticPadTemplate, "direction", get_direction, 0);
|
|
63
|
+
rb_define_method(cGstStaticPadTemplate, "caps", get_caps, 0);
|
|
64
|
+
}
|