gstreamer 1.2.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +78 -39
- data/ext/gstreamer/extconf.rb +8 -22
- data/ext/gstreamer/rbgst.c +82 -194
- data/lib/gst/base_loader.rb +20 -0
- data/lib/gst/bin.rb +32 -0
- data/lib/gst/bus.rb +24 -0
- data/lib/gst/element.rb +48 -0
- data/lib/gst.rb +87 -22
- data/sample/helloworld.rb +75 -0
- data/sample/mp3parselaunch.rb +74 -0
- data/sample/queue.rb +92 -0
- data/sample/typefind.rb +101 -0
- metadata +29 -84
- data/README +0 -33
- data/ext/gstreamer/misc.c +0 -63
- data/ext/gstreamer/rbgst-bin.c +0 -456
- data/ext/gstreamer/rbgst-buffer.c +0 -363
- data/ext/gstreamer/rbgst-bus.c +0 -92
- data/ext/gstreamer/rbgst-caps.c +0 -446
- data/ext/gstreamer/rbgst-child-proxy.c +0 -34
- data/ext/gstreamer/rbgst-clock.c +0 -108
- data/ext/gstreamer/rbgst-element-factory.c +0 -249
- data/ext/gstreamer/rbgst-element.c +0 -1106
- data/ext/gstreamer/rbgst-event.c +0 -352
- data/ext/gstreamer/rbgst-ghost-pad.c +0 -45
- data/ext/gstreamer/rbgst-index-factory.c +0 -69
- data/ext/gstreamer/rbgst-install-plugins-context.c +0 -87
- data/ext/gstreamer/rbgst-install-plugins-return.c +0 -45
- data/ext/gstreamer/rbgst-install-plugins.c +0 -125
- data/ext/gstreamer/rbgst-message.c +0 -785
- data/ext/gstreamer/rbgst-mini-object.c +0 -221
- data/ext/gstreamer/rbgst-object.c +0 -81
- data/ext/gstreamer/rbgst-pad-template.c +0 -125
- data/ext/gstreamer/rbgst-pad.c +0 -336
- data/ext/gstreamer/rbgst-pipeline.c +0 -91
- data/ext/gstreamer/rbgst-plugin-feature.c +0 -131
- data/ext/gstreamer/rbgst-plugin.c +0 -162
- data/ext/gstreamer/rbgst-private.c +0 -88
- data/ext/gstreamer/rbgst-private.h +0 -97
- data/ext/gstreamer/rbgst-query.c +0 -291
- data/ext/gstreamer/rbgst-seek.c +0 -39
- data/ext/gstreamer/rbgst-static-caps.c +0 -49
- data/ext/gstreamer/rbgst-static-pad-template.c +0 -65
- data/ext/gstreamer/rbgst-structure.c +0 -300
- data/ext/gstreamer/rbgst-system-clock.c +0 -48
- data/ext/gstreamer/rbgst-type-find-factory.c +0 -125
- data/ext/gstreamer/rbgst-value.c +0 -527
- data/ext/gstreamer/rbgst-x-overlay.c +0 -131
- data/ext/gstreamer/rbgst.h +0 -197
- data/ext/gstreamer/rbgstclockentry.c +0 -271
- data/ext/gstreamer/rbgstformat.c +0 -162
- data/ext/gstreamer/rbgstindex.c +0 -315
- data/ext/gstreamer/rbgstindexentry.c +0 -99
- data/ext/gstreamer/rbgstparse.c +0 -69
- data/ext/gstreamer/rbgstquerytype.c +0 -162
- data/ext/gstreamer/rbgstregistry.c +0 -288
- data/ext/gstreamer/rbgsttag.c +0 -113
- data/ext/gstreamer/rbgsttagsetter.c +0 -53
- data/ext/gstreamer/rbgstxml.c +0 -192
- data/sample/audio-player.rb +0 -54
- data/sample/gst-gi.rb +0 -55
- data/sample/gst-inspect.rb +0 -417
- data/sample/install-plugins.rb +0 -40
- data/sample/media-type.rb +0 -55
- data/sample/media-type2.rb +0 -268
- data/sample/ogg-audio-player.rb +0 -54
- data/sample/type-find.rb +0 -46
- data/sample/video-player.rb +0 -57
- data/sample/xml-player.rb +0 -60
- data/test/gst-test-utils.rb +0 -18
- data/test/run-test.rb +0 -25
- data/test/test_bin.rb +0 -167
- data/test/test_buffer.rb +0 -185
- data/test/test_caps.rb +0 -24
- data/test/test_element.rb +0 -85
- data/test/test_element_factory.rb +0 -28
- data/test/test_event.rb +0 -10
- data/test/test_index_factory.rb +0 -7
- data/test/test_install-plugins.rb +0 -18
- data/test/test_message.rb +0 -191
- data/test/test_mini_object.rb +0 -38
- data/test/test_object.rb +0 -10
- data/test/test_pad.rb +0 -68
- data/test/test_plugin.rb +0 -6
- data/test/test_plugin_feature.rb +0 -20
- data/test/test_seek.rb +0 -17
- data/test/test_static_caps.rb +0 -18
- data/test/test_static_pad_template.rb +0 -16
- data/test/test_structure.rb +0 -159
- data/test/test_thread_handling.rb +0 -58
- data/test/test_type_find_factory.rb +0 -8
- data/test/test_value.rb +0 -69
@@ -1,125 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
*
|
5
|
-
* This library is free software; you can redistribute it and/or
|
6
|
-
* modify it under the terms of the GNU Lesser General Public
|
7
|
-
* License as published by the Free Software Foundation; either
|
8
|
-
* version 2.1 of the License, or (at your option) any later version.
|
9
|
-
*
|
10
|
-
* This library is distributed in the hope that it will be useful,
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
-
* Lesser General Public License for more details.
|
14
|
-
*
|
15
|
-
* You should have received a copy of the GNU Lesser General Public
|
16
|
-
* License along with this library; if not, write to the Free Software
|
17
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18
|
-
* MA 02110-1301 USA
|
19
|
-
*/
|
20
|
-
|
21
|
-
#ifdef HAVE_GST_PBUTILS
|
22
|
-
#include "rbgst-private.h"
|
23
|
-
#include <gst/pbutils/pbutils-enumtypes.h>
|
24
|
-
#include <gst/pbutils/install-plugins.h>
|
25
|
-
|
26
|
-
#define RG_TARGET_NAMESPACE mInstallPlugins
|
27
|
-
|
28
|
-
static VALUE RG_TARGET_NAMESPACE;
|
29
|
-
static VALUE cInstallPluginsContext;
|
30
|
-
|
31
|
-
static void
|
32
|
-
gst_install_plugins_result_func(GstInstallPluginsReturn result, VALUE data)
|
33
|
-
{
|
34
|
-
rb_funcall(data, rb_intern("call"), 1,
|
35
|
-
GENUM2RVAL(result, GST_TYPE_INSTALL_PLUGINS_RETURN));
|
36
|
-
G_CHILD_REMOVE(RG_TARGET_NAMESPACE, data);
|
37
|
-
}
|
38
|
-
|
39
|
-
static VALUE
|
40
|
-
rg_s_supported_p(G_GNUC_UNUSED VALUE self)
|
41
|
-
{
|
42
|
-
return CBOOL2RVAL(gst_install_plugins_supported());
|
43
|
-
}
|
44
|
-
|
45
|
-
static VALUE
|
46
|
-
rg_s_progress_p(G_GNUC_UNUSED VALUE self)
|
47
|
-
{
|
48
|
-
return CBOOL2RVAL(gst_install_plugins_installation_in_progress());
|
49
|
-
}
|
50
|
-
|
51
|
-
static VALUE
|
52
|
-
rg_s_async(int argc, VALUE *argv, VALUE self)
|
53
|
-
{
|
54
|
-
VALUE details, rcontext, block;
|
55
|
-
int length, i;
|
56
|
-
char **carray;
|
57
|
-
VALUE *str;
|
58
|
-
GstInstallPluginsContext *context;
|
59
|
-
GstInstallPluginsReturn result;
|
60
|
-
|
61
|
-
rb_scan_args(argc, argv, "11", &details, &rcontext);
|
62
|
-
|
63
|
-
/*Define a macro in rbgtuil.h for this. RARRAY2CSTRARRAY(VALUE, ??)*/
|
64
|
-
length = RARRAY_LEN(details);
|
65
|
-
str = RARRAY_PTR(details);
|
66
|
-
carray= ALLOCA_N (char *, length+1);
|
67
|
-
for (i = 0; i<length; i++) {
|
68
|
-
carray[i] = RVAL2CSTR(str[i]);
|
69
|
-
}
|
70
|
-
carray[length] = NULL;
|
71
|
-
|
72
|
-
if (!NIL_P(rcontext)) {
|
73
|
-
if (!RVAL2CBOOL(rb_obj_is_kind_of(rcontext, cInstallPluginsContext)))
|
74
|
-
rb_raise(rb_eTypeError,
|
75
|
-
"2nd parameter is not Gst::InstallPluginsContext");
|
76
|
-
context = (GstInstallPluginsContext *)RVAL2GOBJ(rcontext);
|
77
|
-
}
|
78
|
-
else {
|
79
|
-
context = NULL;
|
80
|
-
}
|
81
|
-
|
82
|
-
block = rb_block_proc();
|
83
|
-
G_CHILD_ADD(self, block);
|
84
|
-
|
85
|
-
result = gst_install_plugins_async(carray, context,
|
86
|
-
(GstInstallPluginsResultFunc)gst_install_plugins_result_func,
|
87
|
-
(gpointer)block);
|
88
|
-
return GENUM2RVAL(result, GST_TYPE_INSTALL_PLUGINS_RETURN);
|
89
|
-
}
|
90
|
-
|
91
|
-
static VALUE
|
92
|
-
rg_s_sync(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
|
93
|
-
{
|
94
|
-
VALUE details, context;
|
95
|
-
int length, i;
|
96
|
-
char **carray;
|
97
|
-
VALUE *str;
|
98
|
-
GstInstallPluginsReturn result;
|
99
|
-
|
100
|
-
rb_scan_args(argc, argv, "11", &details, &context);
|
101
|
-
|
102
|
-
length = RARRAY_LEN(details);
|
103
|
-
str = RARRAY_PTR(details);
|
104
|
-
carray= ALLOCA_N (char *, length+1);
|
105
|
-
for (i = 0; i<length; i++) {
|
106
|
-
carray[i] = RVAL2CSTR(str[i]);
|
107
|
-
}
|
108
|
-
carray[length] = NULL;
|
109
|
-
|
110
|
-
result = gst_install_plugins_sync(carray, NULL);
|
111
|
-
return GENUM2RVAL(result, GST_TYPE_INSTALL_PLUGINS_RETURN);
|
112
|
-
}
|
113
|
-
|
114
|
-
void
|
115
|
-
Init_gst_install_plugins(VALUE mGst)
|
116
|
-
{
|
117
|
-
RG_TARGET_NAMESPACE = rb_define_module_under(mGst, "InstallPlugins");
|
118
|
-
cInstallPluginsContext = rb_const_get(mGst, rb_intern("InstallPluginsContext"));
|
119
|
-
|
120
|
-
RG_DEF_SMETHOD_P(supported, 0);
|
121
|
-
RG_DEF_SMETHOD_P(progress, 0);
|
122
|
-
RG_DEF_SMETHOD(async, -1);
|
123
|
-
RG_DEF_SMETHOD(sync, -1);
|
124
|
-
}
|
125
|
-
#endif /* HAVE_GST_PBUTILS */
|