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.
Files changed (55) hide show
  1. data/Rakefile +201 -3
  2. data/ext/gstreamer/extconf.rb +10 -10
  3. data/ext/gstreamer/misc.c +16 -15
  4. data/ext/gstreamer/rbgst-bin.c +75 -83
  5. data/ext/gstreamer/rbgst-buffer.c +91 -91
  6. data/ext/gstreamer/rbgst-bus.c +21 -21
  7. data/ext/gstreamer/rbgst-caps.c +98 -91
  8. data/ext/gstreamer/rbgst-child-proxy.c +19 -18
  9. data/ext/gstreamer/rbgst-clock.c +34 -32
  10. data/ext/gstreamer/rbgst-element-factory.c +79 -85
  11. data/ext/gstreamer/rbgst-element.c +245 -210
  12. data/ext/gstreamer/rbgst-event.c +18 -18
  13. data/ext/gstreamer/rbgst-ghost-pad.c +24 -21
  14. data/ext/gstreamer/rbgst-index-factory.c +31 -29
  15. data/ext/gstreamer/rbgst-install-plugins-context.c +86 -0
  16. data/ext/gstreamer/rbgst-install-plugins-return.c +45 -0
  17. data/ext/gstreamer/rbgst-install-plugins.c +45 -111
  18. data/ext/gstreamer/rbgst-message.c +15 -16
  19. data/ext/gstreamer/rbgst-mini-object.c +37 -37
  20. data/ext/gstreamer/rbgst-object.c +29 -26
  21. data/ext/gstreamer/rbgst-pad-template.c +36 -35
  22. data/ext/gstreamer/rbgst-pad.c +96 -96
  23. data/ext/gstreamer/rbgst-pipeline.c +32 -31
  24. data/ext/gstreamer/rbgst-plugin-feature.c +47 -48
  25. data/ext/gstreamer/rbgst-plugin.c +62 -64
  26. data/ext/gstreamer/rbgst-private.c +14 -15
  27. data/ext/gstreamer/rbgst-private.h +76 -16
  28. data/ext/gstreamer/rbgst-query.c +22 -20
  29. data/ext/gstreamer/rbgst-seek.c +22 -19
  30. data/ext/gstreamer/rbgst-static-caps.c +26 -24
  31. data/ext/gstreamer/rbgst-static-pad-template.c +27 -26
  32. data/ext/gstreamer/rbgst-structure.c +61 -59
  33. data/ext/gstreamer/rbgst-system-clock.c +23 -20
  34. data/ext/gstreamer/rbgst-type-find-factory.c +44 -43
  35. data/ext/gstreamer/rbgst-value.c +40 -28
  36. data/ext/gstreamer/rbgst-x-overlay.c +32 -31
  37. data/ext/gstreamer/rbgst.c +78 -128
  38. data/ext/gstreamer/rbgst.h +16 -16
  39. data/ext/gstreamer/rbgstclockentry.c +46 -43
  40. data/ext/gstreamer/rbgstformat.c +64 -61
  41. data/ext/gstreamer/rbgstindex.c +67 -64
  42. data/ext/gstreamer/rbgstindexentry.c +31 -28
  43. data/ext/gstreamer/rbgstparse.c +32 -29
  44. data/ext/gstreamer/rbgstquerytype.c +64 -61
  45. data/ext/gstreamer/rbgstregistry.c +79 -76
  46. data/ext/gstreamer/rbgsttag.c +34 -32
  47. data/ext/gstreamer/rbgsttagsetter.c +22 -19
  48. data/ext/gstreamer/rbgstxml.c +78 -75
  49. data/lib/gst.rb +15 -1
  50. data/test/test_buffer.rb +5 -2
  51. data/test/test_element.rb +7 -9
  52. data/test/test_value.rb +2 -2
  53. metadata +11 -11
  54. data/ChangeLog +0 -1202
  55. data/test/test_clock.rb +0 -7
@@ -1,27 +1,28 @@
1
-
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2008 Sjoerd Simons <sjoerd@luon.net>
4
- * Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
5
- *
6
- * This file is part of Ruby/GStreamer.
3
+ * Copyright (C) 2011-2012 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2008 Sjoerd Simons <sjoerd@luon.net>
5
+ * Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
7
6
  *
8
- * Ruby/GStreamer is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU Lesser General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2.1 of the License, or (at your option) any later version.
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.
12
11
  *
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.
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.
17
16
  *
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
24
 
25
+ #define RG_TARGET_NAMESPACE cPipeline
25
26
  #define SELF(obj) (RVAL2GST_PIPELINE(obj))
26
27
 
27
28
  /* Class: Gst::Pipeline
@@ -44,21 +45,21 @@
44
45
  * Returns: a newly constructed Gst::Pipeline.
45
46
  */
46
47
  static VALUE
47
- rb_gst_pipeline_new (int argc, VALUE *argv, VALUE self)
48
+ rg_initialize (int argc, VALUE *argv, VALUE self)
48
49
  {
49
- GstElement *bin;
50
- VALUE name;
50
+ GstElement *bin;
51
+ VALUE name;
51
52
 
52
- rb_scan_args (argc, argv, "01", &name);
53
+ rb_scan_args (argc, argv, "01", &name);
53
54
 
54
- bin = gst_pipeline_new (NIL_P (name) ? NULL : RVAL2CSTR(name));
55
- if (bin != NULL)
56
- RBGST_INITIALIZE (self, bin);
57
- return Qnil;
55
+ bin = gst_pipeline_new (RVAL2CSTR_ACCEPT_NIL(name));
56
+ if (bin != NULL)
57
+ RBGST_INITIALIZE (self, bin);
58
+ return Qnil;
58
59
  }
59
60
 
60
61
  static VALUE
61
- rb_gst_pipeline_get_bus(VALUE self)
62
+ rg_bus(VALUE self)
62
63
  {
63
64
  GstBus *bus;
64
65
  VALUE ret;
@@ -78,13 +79,13 @@ rb_gst_pipeline_get_bus(VALUE self)
78
79
  }
79
80
 
80
81
  void
81
- Init_gst_pipeline(void)
82
+ Init_gst_pipeline(VALUE mGst)
82
83
  {
83
- VALUE cPipeline;
84
+ VALUE RG_TARGET_NAMESPACE;
84
85
 
85
- cPipeline = G_DEF_CLASS(GST_TYPE_PIPELINE, "Pipeline", mGst);
86
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GST_TYPE_PIPELINE, "Pipeline", mGst);
86
87
 
87
- rb_define_method(cPipeline, "initialize", rb_gst_pipeline_new, -1);
88
+ RG_DEF_METHOD(initialize, -1);
88
89
 
89
- rb_define_method(cPipeline, "bus", rb_gst_pipeline_get_bus, 0);
90
+ RG_DEF_METHOD(bus, 0);
90
91
  }
@@ -1,27 +1,28 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
4
- * Copyright (C) 2007 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2011-2012 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
- * This file is part of Ruby/GStreamer.
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
- * Ruby/GStreamer is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU Lesser General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2.1 of the License, or (at your option) any later version.
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
- * 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
- #include "rbgst.h"
23
+ #include "rbgst-private.h"
24
24
 
25
+ #define RG_TARGET_NAMESPACE cPluginFeature
25
26
  #define SELF(self) RVAL2GST_PLUGIN_FEATURE(self)
26
27
 
27
28
  #define RVAL2GST_RANK(rank) RVAL2GENUM(rank, GST_TYPE_RANK)
@@ -35,16 +36,16 @@
35
36
  * Returns: the name of the feature.
36
37
  */
37
38
  static VALUE
38
- rb_gst_pluginfeature_get_name (VALUE self)
39
+ rg_name (VALUE self)
39
40
  {
40
- GstPluginFeature *feature = RGST_PLUGIN_FEATURE (self);
41
- return CSTR2RVAL (GST_PLUGIN_FEATURE_NAME (feature));
41
+ GstPluginFeature *feature = RGST_PLUGIN_FEATURE (self);
42
+ return CSTR2RVAL (GST_PLUGIN_FEATURE_NAME (feature));
42
43
  }
43
44
 
44
45
  gboolean
45
46
  is_valid_pluginfeature_type (const GType type)
46
47
  {
47
- return type == GST_TYPE_ELEMENT_FACTORY ||
48
+ return type == GST_TYPE_ELEMENT_FACTORY ||
48
49
  type == GST_TYPE_INDEX_FACTORY;
49
50
  }
50
51
 
@@ -52,21 +53,21 @@ VALUE
52
53
  instanciate_pluginfeature (GstPluginFeature *feature)
53
54
  {
54
55
 
55
- if (GST_IS_ELEMENT_FACTORY (feature))
56
- return RGST_ELEMENT_FACTORY_NEW (feature);
57
- else if (GST_IS_INDEX_FACTORY (feature))
58
- return RGST_INDEX_FACTORY_NEW (feature);
59
- else if (GST_IS_TYPE_FIND_FACTORY (feature))
60
- return RGST_TYPE_FIND_FACTORY_NEW (feature);
61
- else
62
- rb_raise(rb_eArgError,
63
- "Invalid plugin feature of type ``%s''",
64
- g_type_name (G_OBJECT_TYPE (feature)));
65
- return Qnil;
56
+ if (GST_IS_ELEMENT_FACTORY (feature))
57
+ return RGST_ELEMENT_FACTORY_NEW (feature);
58
+ else if (GST_IS_INDEX_FACTORY (feature))
59
+ return RGST_INDEX_FACTORY_NEW (feature);
60
+ else if (GST_IS_TYPE_FIND_FACTORY (feature))
61
+ return RGST_TYPE_FIND_FACTORY_NEW (feature);
62
+ else
63
+ rb_raise(rb_eArgError,
64
+ "Invalid plugin feature of type ``%s''",
65
+ g_type_name (G_OBJECT_TYPE (feature)));
66
+ return Qnil;
66
67
  }
67
68
 
68
69
  static VALUE
69
- load_bang(VALUE self)
70
+ rg_load_bang(VALUE self)
70
71
  {
71
72
  GstPluginFeature *original, *feature;
72
73
 
@@ -83,52 +84,50 @@ load_bang(VALUE self)
83
84
  }
84
85
 
85
86
  static VALUE
86
- loaded_p(VALUE self)
87
+ rg_loaded_p(VALUE self)
87
88
  {
88
89
  return CBOOL2RVAL(SELF(self)->loaded);
89
90
  }
90
91
 
91
92
  static VALUE
92
- get_rank(VALUE self)
93
+ rg_rank(VALUE self)
93
94
  {
94
95
  return GST_RANK2RVAL(gst_plugin_feature_get_rank(SELF(self)));
95
96
  }
96
97
 
97
98
  static VALUE
98
- set_rank(VALUE self, VALUE rank)
99
+ rg_set_rank(VALUE self, VALUE rank)
99
100
  {
100
101
  gst_plugin_feature_set_rank(SELF(self), RVAL2GST_RANK(rank));
101
102
  return Qnil;
102
103
  }
103
104
 
104
105
  static VALUE
105
- get_plugin_name(VALUE self)
106
+ rg_plugin_name(VALUE self)
106
107
  {
107
108
  return CSTR2RVAL(SELF(self)->plugin_name);
108
109
  }
109
110
 
110
-
111
111
  void
112
- Init_gst_plugin_feature (void)
112
+ Init_gst_plugin_feature (VALUE mGst)
113
113
  {
114
- VALUE rb_cGstPluginFeature;
114
+ VALUE RG_TARGET_NAMESPACE;
115
115
 
116
- rb_cGstPluginFeature = G_DEF_CLASS(GST_TYPE_PLUGIN_FEATURE,
116
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GST_TYPE_PLUGIN_FEATURE,
117
117
  "PluginFeature", mGst);
118
118
 
119
119
  G_DEF_CLASS(GST_TYPE_RANK, "Rank", mGst);
120
120
  G_DEF_CONSTANTS(mGst, GST_TYPE_RANK, "GST_");
121
121
 
122
- rb_define_method(rb_cGstPluginFeature, "name",
123
- rb_gst_pluginfeature_get_name, 0);
122
+ RG_DEF_METHOD(name, 0);
124
123
 
125
- rb_define_method(rb_cGstPluginFeature, "load!", load_bang, 0);
126
- rb_define_method(rb_cGstPluginFeature, "loaded?", loaded_p, 0);
124
+ RG_DEF_METHOD_BANG(load, 0);
125
+ RG_DEF_METHOD_P(loaded, 0);
127
126
 
128
- rb_define_method(rb_cGstPluginFeature, "rank", get_rank, 0);
129
- rb_define_method(rb_cGstPluginFeature, "set_rank", set_rank, 1);
127
+ RG_DEF_METHOD(rank, 0);
128
+ RG_DEF_METHOD(set_rank, 1);
130
129
 
131
- rb_define_method(rb_cGstPluginFeature, "plugin_name", get_plugin_name, 0);
130
+ RG_DEF_METHOD(plugin_name, 0);
132
131
 
133
- G_DEF_SETTERS(rb_cGstPluginFeature);
132
+ G_DEF_SETTERS(RG_TARGET_NAMESPACE);
134
133
  }
@@ -1,27 +1,28 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2003, 2004 Laurent Sansonetti <lrz@gnome.org>
4
- * Copyright (C) 2007 Ruby-GNOME2 Project Team
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
- * This file is part of Ruby/GStreamer.
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
- * Ruby/GStreamer is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU Lesser General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2.1 of the License, or (at your option) any later version.
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
- * 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
- #include "rbgst.h"
23
+ #include "rbgst-private.h"
24
24
 
25
+ #define RG_TARGET_NAMESPACE cPlugin
25
26
  #define SELF(self) RVAL2GST_PLUGIN(self)
26
27
 
27
28
  /* Class: Gst::Plugin
@@ -32,50 +33,50 @@
32
33
  * Returns: true if the plugin is loaded into memory, false otherwise.
33
34
  */
34
35
  static VALUE
35
- rb_gst_plugin_is_loaded (VALUE self)
36
+ rg_loaded_p (VALUE self)
36
37
  {
37
- GstPlugin *plugin = RGST_PLUGIN (self);
38
- return CBOOL2RVAL (gst_plugin_is_loaded (plugin));
38
+ GstPlugin *plugin = RGST_PLUGIN (self);
39
+ return CBOOL2RVAL (gst_plugin_is_loaded (plugin));
39
40
  }
40
41
 
41
42
  /* Method: filename
42
43
  * Returns: the filename where this plugin comes from.
43
44
  */
44
45
  static VALUE
45
- rb_gst_plugin_get_filename (VALUE self)
46
+ rg_filename (VALUE self)
46
47
  {
47
- return CSTR2RVAL (gst_plugin_get_filename (RGST_PLUGIN (self)));
48
+ return CSTR2RVAL (gst_plugin_get_filename (RGST_PLUGIN (self)));
48
49
  }
49
50
 
50
51
  /* Method: description
51
52
  * Returns: a long description of the plugin.
52
53
  */
53
54
  static VALUE
54
- rb_gst_plugin_get_description (VALUE self)
55
+ rg_description (VALUE self)
55
56
  {
56
- return CSTR2RVAL (gst_plugin_get_description (RGST_PLUGIN (self)));
57
+ return CSTR2RVAL (gst_plugin_get_description (RGST_PLUGIN (self)));
57
58
  }
58
59
 
59
60
  /* Method: package
60
61
  * Returns: the name of the package this plugin belongs to.
61
62
  */
62
63
  static VALUE
63
- rb_gst_plugin_get_package (VALUE self)
64
+ rg_package (VALUE self)
64
65
  {
65
- return CSTR2RVAL (gst_plugin_get_package (RGST_PLUGIN (self)));
66
+ return CSTR2RVAL (gst_plugin_get_package (RGST_PLUGIN (self)));
66
67
  }
67
68
 
68
69
  /* Method: license
69
70
  * Returns: the effective license of the plugin.
70
71
  */
71
72
  static VALUE
72
- rb_gst_plugin_get_license (VALUE self)
73
+ rg_license (VALUE self)
73
74
  {
74
- return CSTR2RVAL (gst_plugin_get_license (RGST_PLUGIN (self)));
75
+ return CSTR2RVAL (gst_plugin_get_license (RGST_PLUGIN (self)));
75
76
  }
76
77
 
77
78
  static VALUE
78
- get_source (VALUE self)
79
+ rg_source (VALUE self)
79
80
  {
80
81
  return CSTR2RVAL(gst_plugin_get_source(SELF(self)));
81
82
  }
@@ -84,45 +85,45 @@ get_source (VALUE self)
84
85
  * Returns: the URL to the provider of the plugin.
85
86
  */
86
87
  static VALUE
87
- rb_gst_plugin_get_origin (VALUE self)
88
+ rg_origin (VALUE self)
88
89
  {
89
- return CSTR2RVAL (gst_plugin_get_origin ( RGST_PLUGIN (self)));
90
+ return CSTR2RVAL (gst_plugin_get_origin ( RGST_PLUGIN (self)));
90
91
  }
91
92
 
92
93
  /* Method: name
93
94
  * Returns: the unique name of the plugin.
94
95
  */
95
96
  static VALUE
96
- rb_gst_plugin_get_name (VALUE self)
97
+ rg_name (VALUE self)
97
98
  {
98
- return CSTR2RVAL (gst_plugin_get_name (RGST_PLUGIN (self)));
99
+ return CSTR2RVAL (gst_plugin_get_name (RGST_PLUGIN (self)));
99
100
  }
100
101
 
101
102
  /* Method: minor_version
102
103
  * Returns: the minor version of the core this plugin was compiled for.
103
104
  */
104
105
  static VALUE
105
- rb_gst_plugin_get_minor_version (VALUE self)
106
+ rg_minor_version (VALUE self)
106
107
  {
107
- return INT2FIX (RGST_PLUGIN (self)->desc.minor_version);
108
+ return INT2FIX (RGST_PLUGIN (self)->desc.minor_version);
108
109
  }
109
110
 
110
111
  /* Method: major_version
111
112
  * Returns: the major version of the core this plugin was compiled for.
112
113
  */
113
114
  static VALUE
114
- rb_gst_plugin_get_major_version (VALUE self)
115
+ rg_major_version (VALUE self)
115
116
  {
116
- return INT2FIX (RGST_PLUGIN (self)->desc.major_version);
117
+ return INT2FIX (RGST_PLUGIN (self)->desc.major_version);
117
118
  }
118
119
 
119
120
  /* Method: version
120
121
  * Returns: the version of the plugin (note: as a string).
121
122
  */
122
123
  static VALUE
123
- rb_gst_plugin_get_version (VALUE self)
124
+ rg_version (VALUE self)
124
125
  {
125
- return CSTR2RVAL (RGST_PLUGIN (self)->desc.version);
126
+ return CSTR2RVAL (RGST_PLUGIN (self)->desc.version);
126
127
  }
127
128
 
128
129
  /* Method: ==(plugin)
@@ -130,35 +131,32 @@ rb_gst_plugin_get_version (VALUE self)
130
131
  * false otherwise.
131
132
  */
132
133
  static VALUE
133
- rb_gst_plugin_is_equal (VALUE self, VALUE other_plugin)
134
+ rg_operator_is_equal (VALUE self, VALUE other_plugin)
134
135
  {
135
- return NIL_P (other_plugin)
136
- ? Qfalse
137
- : rb_equal (rb_gst_plugin_get_filename (self),
138
- rb_gst_plugin_get_filename (other_plugin));
136
+ return NIL_P (other_plugin)
137
+ ? Qfalse
138
+ : rb_equal (rg_filename (self),
139
+ rg_filename (other_plugin));
139
140
  }
140
141
 
141
142
  void
142
- Init_gst_plugin (void)
143
+ Init_gst_plugin (VALUE mGst)
143
144
  {
144
- VALUE rb_cGstPlugin;
145
-
146
- rb_cGstPlugin = G_DEF_CLASS(GST_TYPE_PLUGIN, "Plugin", mGst);
147
-
148
- rb_define_method(rb_cGstPlugin, "loaded?", rb_gst_plugin_is_loaded, 0);
149
- rb_define_method(rb_cGstPlugin, "==", rb_gst_plugin_is_equal, 1);
150
-
151
- rb_define_method(rb_cGstPlugin, "filename", rb_gst_plugin_get_filename, 0);
152
- rb_define_method(rb_cGstPlugin, "major_version",
153
- rb_gst_plugin_get_major_version, 0);
154
- rb_define_method(rb_cGstPlugin, "minor_version",
155
- rb_gst_plugin_get_minor_version, 0);
156
- rb_define_method(rb_cGstPlugin, "name", rb_gst_plugin_get_name, 0);
157
- rb_define_method(rb_cGstPlugin, "description",
158
- rb_gst_plugin_get_description, 0);
159
- rb_define_method(rb_cGstPlugin, "version", rb_gst_plugin_get_version, 0);
160
- rb_define_method(rb_cGstPlugin, "license", rb_gst_plugin_get_license, 0);
161
- rb_define_method(rb_cGstPlugin, "source", get_source, 0);
162
- rb_define_method(rb_cGstPlugin, "package", rb_gst_plugin_get_package, 0);
163
- rb_define_method(rb_cGstPlugin, "origin", rb_gst_plugin_get_origin, 0);
145
+ VALUE RG_TARGET_NAMESPACE;
146
+
147
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(GST_TYPE_PLUGIN, "Plugin", mGst);
148
+
149
+ RG_DEF_METHOD_P(loaded, 0);
150
+ RG_DEF_METHOD_OPERATOR("==", is_equal, 1);
151
+
152
+ RG_DEF_METHOD(filename, 0);
153
+ RG_DEF_METHOD(major_version, 0);
154
+ RG_DEF_METHOD(minor_version, 0);
155
+ RG_DEF_METHOD(name, 0);
156
+ RG_DEF_METHOD(description, 0);
157
+ RG_DEF_METHOD(version, 0);
158
+ RG_DEF_METHOD(license, 0);
159
+ RG_DEF_METHOD(source, 0);
160
+ RG_DEF_METHOD(package, 0);
161
+ RG_DEF_METHOD(origin, 0);
164
162
  }