gstreamer 1.2.6 → 2.0.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.
Files changed (92) hide show
  1. data/Rakefile +78 -39
  2. data/ext/gstreamer/extconf.rb +8 -22
  3. data/ext/gstreamer/rbgst.c +82 -194
  4. data/lib/gst/base_loader.rb +20 -0
  5. data/lib/gst/bin.rb +32 -0
  6. data/lib/gst/bus.rb +24 -0
  7. data/lib/gst/element.rb +48 -0
  8. data/lib/gst.rb +87 -22
  9. data/sample/helloworld.rb +75 -0
  10. data/sample/mp3parselaunch.rb +74 -0
  11. data/sample/queue.rb +92 -0
  12. data/sample/typefind.rb +101 -0
  13. metadata +29 -84
  14. data/README +0 -33
  15. data/ext/gstreamer/misc.c +0 -63
  16. data/ext/gstreamer/rbgst-bin.c +0 -456
  17. data/ext/gstreamer/rbgst-buffer.c +0 -363
  18. data/ext/gstreamer/rbgst-bus.c +0 -92
  19. data/ext/gstreamer/rbgst-caps.c +0 -446
  20. data/ext/gstreamer/rbgst-child-proxy.c +0 -34
  21. data/ext/gstreamer/rbgst-clock.c +0 -108
  22. data/ext/gstreamer/rbgst-element-factory.c +0 -249
  23. data/ext/gstreamer/rbgst-element.c +0 -1106
  24. data/ext/gstreamer/rbgst-event.c +0 -352
  25. data/ext/gstreamer/rbgst-ghost-pad.c +0 -45
  26. data/ext/gstreamer/rbgst-index-factory.c +0 -69
  27. data/ext/gstreamer/rbgst-install-plugins-context.c +0 -87
  28. data/ext/gstreamer/rbgst-install-plugins-return.c +0 -45
  29. data/ext/gstreamer/rbgst-install-plugins.c +0 -125
  30. data/ext/gstreamer/rbgst-message.c +0 -785
  31. data/ext/gstreamer/rbgst-mini-object.c +0 -221
  32. data/ext/gstreamer/rbgst-object.c +0 -81
  33. data/ext/gstreamer/rbgst-pad-template.c +0 -125
  34. data/ext/gstreamer/rbgst-pad.c +0 -336
  35. data/ext/gstreamer/rbgst-pipeline.c +0 -91
  36. data/ext/gstreamer/rbgst-plugin-feature.c +0 -131
  37. data/ext/gstreamer/rbgst-plugin.c +0 -162
  38. data/ext/gstreamer/rbgst-private.c +0 -88
  39. data/ext/gstreamer/rbgst-private.h +0 -97
  40. data/ext/gstreamer/rbgst-query.c +0 -291
  41. data/ext/gstreamer/rbgst-seek.c +0 -39
  42. data/ext/gstreamer/rbgst-static-caps.c +0 -49
  43. data/ext/gstreamer/rbgst-static-pad-template.c +0 -65
  44. data/ext/gstreamer/rbgst-structure.c +0 -300
  45. data/ext/gstreamer/rbgst-system-clock.c +0 -48
  46. data/ext/gstreamer/rbgst-type-find-factory.c +0 -125
  47. data/ext/gstreamer/rbgst-value.c +0 -527
  48. data/ext/gstreamer/rbgst-x-overlay.c +0 -131
  49. data/ext/gstreamer/rbgst.h +0 -197
  50. data/ext/gstreamer/rbgstclockentry.c +0 -271
  51. data/ext/gstreamer/rbgstformat.c +0 -162
  52. data/ext/gstreamer/rbgstindex.c +0 -315
  53. data/ext/gstreamer/rbgstindexentry.c +0 -99
  54. data/ext/gstreamer/rbgstparse.c +0 -69
  55. data/ext/gstreamer/rbgstquerytype.c +0 -162
  56. data/ext/gstreamer/rbgstregistry.c +0 -288
  57. data/ext/gstreamer/rbgsttag.c +0 -113
  58. data/ext/gstreamer/rbgsttagsetter.c +0 -53
  59. data/ext/gstreamer/rbgstxml.c +0 -192
  60. data/sample/audio-player.rb +0 -54
  61. data/sample/gst-gi.rb +0 -55
  62. data/sample/gst-inspect.rb +0 -417
  63. data/sample/install-plugins.rb +0 -40
  64. data/sample/media-type.rb +0 -55
  65. data/sample/media-type2.rb +0 -268
  66. data/sample/ogg-audio-player.rb +0 -54
  67. data/sample/type-find.rb +0 -46
  68. data/sample/video-player.rb +0 -57
  69. data/sample/xml-player.rb +0 -60
  70. data/test/gst-test-utils.rb +0 -18
  71. data/test/run-test.rb +0 -25
  72. data/test/test_bin.rb +0 -167
  73. data/test/test_buffer.rb +0 -185
  74. data/test/test_caps.rb +0 -24
  75. data/test/test_element.rb +0 -85
  76. data/test/test_element_factory.rb +0 -28
  77. data/test/test_event.rb +0 -10
  78. data/test/test_index_factory.rb +0 -7
  79. data/test/test_install-plugins.rb +0 -18
  80. data/test/test_message.rb +0 -191
  81. data/test/test_mini_object.rb +0 -38
  82. data/test/test_object.rb +0 -10
  83. data/test/test_pad.rb +0 -68
  84. data/test/test_plugin.rb +0 -6
  85. data/test/test_plugin_feature.rb +0 -20
  86. data/test/test_seek.rb +0 -17
  87. data/test/test_static_caps.rb +0 -18
  88. data/test/test_static_pad_template.rb +0 -16
  89. data/test/test_structure.rb +0 -159
  90. data/test/test_thread_handling.rb +0 -58
  91. data/test/test_type_find_factory.rb +0 -8
  92. 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 */