gstreamer 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -447,8 +447,6 @@ Init_gst_bin (VALUE mGst)
447
447
  RG_DEF_METHOD(to_dot_file_with_ts, 2);
448
448
  #endif
449
449
 
450
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
451
-
452
450
  G_DEF_CLASS(GST_TYPE_BIN_FLAGS, "Flags", RG_TARGET_NAMESPACE);
453
451
  G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GST_TYPE_BIN_FLAGS, "GST_BIN_");
454
452
  #ifdef GST_DEBUG_BIN_TO_DOT_FILE
@@ -360,6 +360,4 @@ Init_gst_buffer(VALUE mGst)
360
360
 
361
361
  RG_DEF_METHOD(span, 3);
362
362
  RG_DEF_METHOD_P(span, 1);
363
-
364
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
365
363
  }
@@ -439,8 +439,6 @@ Init_gst_caps (VALUE mGst)
439
439
 
440
440
  RG_DEF_METHOD(each, 0);
441
441
 
442
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
443
-
444
442
  /* TODO:
445
443
  gst_caps_structure_fixate_field_nearest_int ()
446
444
  gst_caps_structure_fixate_field_nearest_double () */
@@ -105,6 +105,4 @@ Init_gst_clock (VALUE mGst)
105
105
  RG_DEF_METHOD(set_resolution, 1);
106
106
  RG_DEF_METHOD(time, 0);
107
107
  RG_DEF_METHOD_OPERATOR("==", equal_p, 1);
108
-
109
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
110
108
  }
@@ -49,7 +49,7 @@
49
49
  * Returns: a newly created object based on Gst::Element.
50
50
  */
51
51
  static VALUE
52
- rg_s_make(int argc, VALUE *argv, VALUE self)
52
+ rg_s_make(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
53
53
  {
54
54
  GstElement *element;
55
55
  VALUE fname, ename;
@@ -79,7 +79,7 @@ rg_s_make(int argc, VALUE *argv, VALUE self)
79
79
  * Returns: a Gst::ElementFactory object if found, nil otherwise.
80
80
  */
81
81
  static VALUE
82
- rg_s_find (VALUE self, VALUE factory_name)
82
+ rg_s_find (G_GNUC_UNUSED VALUE self, VALUE factory_name)
83
83
  {
84
84
  GstElementFactory *factory = gst_element_factory_find (RVAL2CSTR (factory_name));
85
85
  return factory != NULL
@@ -890,6 +890,25 @@ rg_s_each_pad_template(VALUE self)
890
890
  return rb_ary_yield(rg_s_pad_templates(self));
891
891
  }
892
892
 
893
+ /*
894
+ * Method: seek_simple(format, flags, position)
895
+ * format: the format to use for seeking (see Gst::Format::Type).
896
+ * flags: seek options (see Gst::Seek::FlAG_*)
897
+ * position: the position to seek to.
898
+ *
899
+ * Sends a seek event (Gst::EventSseek) to the element.
900
+ *
901
+ * Returns: true if the event was handled.
902
+ */
903
+ static VALUE
904
+ rg_seek_simple(VALUE self, VALUE format, VALUE flags, VALUE position)
905
+ {
906
+ return CBOOL2RVAL(gst_element_seek_simple(SELF(self),
907
+ RVAL2GENUM(format, GST_TYPE_FORMAT),
908
+ RVAL2GFLAGS(flags, GST_TYPE_SEEK_FLAGS),
909
+ NUM2LL(position)));
910
+ }
911
+
893
912
  /*
894
913
  * Method: seek(seek_type, offset)
895
914
  * seek_type: the method to use for seeking (see Gst::EventSeek::Type).
@@ -1059,6 +1078,7 @@ Init_gst_element(VALUE mGst)
1059
1078
  RG_DEF_METHOD_P(indexable, 0);
1060
1079
  RG_DEF_METHOD(query, 1);
1061
1080
  RG_DEF_METHOD(send_event, 1);
1081
+ RG_DEF_METHOD(seek_simple, 3);
1062
1082
  RG_DEF_METHOD(seek, 7);
1063
1083
  RG_DEF_METHOD(index, 0);
1064
1084
  RG_DEF_METHOD(set_index, 1);
@@ -1067,8 +1087,6 @@ Init_gst_element(VALUE mGst)
1067
1087
  RG_DEF_METHOD(sync_state_with_parent, 0);
1068
1088
  RG_DEF_METHOD(no_more_pads, 0);
1069
1089
 
1070
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
1071
-
1072
1090
  G_DEF_CLASS(GST_TYPE_STATE, "State", mGst);
1073
1091
  G_DEF_CONSTANTS(mGst, GST_TYPE_STATE, "GST_");
1074
1092
  G_DEF_CLASS(GST_TYPE_STATE_CHANGE_RETURN, "StateChangeReturn", mGst);
@@ -320,19 +320,19 @@ Init_gst_event (VALUE mGst)
320
320
  RG_DEF_CONVERSION(&table);
321
321
 
322
322
  rb_cGstEvent = G_DEF_CLASS(GST_TYPE_EVENT, "Event", mGst);
323
- rb_define_method(rb_cGstEvent, "get_type", rbgst_event_get_type, 0);
323
+ rbg_define_method(rb_cGstEvent, "get_type", rbgst_event_get_type, 0);
324
324
  G_DEF_CLASS(GST_TYPE_EVENT_TYPE, "EventType", mGst);
325
325
  G_DEF_CONSTANTS(rb_cGstEvent, GST_TYPE_EVENT_TYPE, "GST_EVENT_");
326
326
 
327
327
  #define DEFINE_EVENT(type, lctype, arguments) \
328
328
  rb_cGstEvent ## type = \
329
329
  rb_define_class_under(mGst, "Event" #type, rb_cGstEvent); \
330
- rb_define_method(rb_cGstEvent ## type, "initialize", \
330
+ rbg_define_method(rb_cGstEvent ## type, "initialize", \
331
331
  lctype ## _initialize, arguments)
332
332
 
333
333
  #define DEFINE_EVENT_PARSE(type, lctype, arguments) \
334
334
  DEFINE_EVENT(type, lctype, arguments); \
335
- rb_define_method(rb_cGstEvent ## type, "parse", \
335
+ rbg_define_method(rb_cGstEvent ## type, "parse", \
336
336
  lctype ## _parse, 0)
337
337
 
338
338
  DEFINE_EVENT(FlushStart, flush_start, 0);
@@ -30,7 +30,7 @@
30
30
  */
31
31
 
32
32
  static VALUE
33
- rg_s_find(VALUE self, VALUE name)
33
+ rg_s_find(G_GNUC_UNUSED VALUE self, VALUE name)
34
34
  {
35
35
  return GOBJ2RVAL(gst_index_factory_find(RVAL2CSTR(name)));
36
36
  }
@@ -81,6 +81,5 @@ Init_gst_install_plugins_context(VALUE mGst)
81
81
 
82
82
  RG_DEF_METHOD(initialize, 0);
83
83
  RG_DEF_METHOD(set_xid, 1);
84
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
85
84
  }
86
85
  #endif /* HAVE_GST_PBUTILS */
@@ -37,13 +37,13 @@ gst_install_plugins_result_func(GstInstallPluginsReturn result, VALUE data)
37
37
  }
38
38
 
39
39
  static VALUE
40
- rg_s_supported_p(VALUE self)
40
+ rg_s_supported_p(G_GNUC_UNUSED VALUE self)
41
41
  {
42
42
  return CBOOL2RVAL(gst_install_plugins_supported());
43
43
  }
44
44
 
45
45
  static VALUE
46
- rg_s_progress_p(VALUE self)
46
+ rg_s_progress_p(G_GNUC_UNUSED VALUE self)
47
47
  {
48
48
  return CBOOL2RVAL(gst_install_plugins_installation_in_progress());
49
49
  }
@@ -89,7 +89,7 @@ rg_s_async(int argc, VALUE *argv, VALUE self)
89
89
  }
90
90
 
91
91
  static VALUE
92
- rg_s_sync(int argc, VALUE *argv, VALUE self)
92
+ rg_s_sync(int argc, VALUE *argv, G_GNUC_UNUSED VALUE self)
93
93
  {
94
94
  VALUE details, context;
95
95
  int length, i;
@@ -666,122 +666,119 @@ Init_gst_message(VALUE mGst)
666
666
  "Type", rb_cGstMessage);
667
667
  G_DEF_CONSTANTS(rb_cGstMessage, GST_TYPE_MESSAGE_TYPE, "GST_MESSAGE_");
668
668
 
669
- rb_define_method(rb_cGstMessage, "initialize", initialize, 3);
669
+ rbg_define_method(rb_cGstMessage, "initialize", initialize, 3);
670
670
 
671
- rb_define_method(rb_cGstMessage, "type", get_type, 0);
672
- rb_define_method(rb_cGstMessage, "set_type", set_type, 1);
671
+ rbg_define_method(rb_cGstMessage, "type", get_type, 0);
672
+ rbg_define_method(rb_cGstMessage, "set_type", set_type, 1);
673
673
 
674
- rb_define_method(rb_cGstMessage, "have_mutex?", have_mutex_p, 0);
675
- rb_define_method(rb_cGstMessage, "lock", lock, 0);
676
- rb_define_method(rb_cGstMessage, "unlock", unlock, 0);
677
- rb_define_method(rb_cGstMessage, "have_cond?", have_cond_p, 0);
678
- rb_define_method(rb_cGstMessage, "wait", cond_wait, 0);
679
- rb_define_method(rb_cGstMessage, "signal", cond_signal, 0);
674
+ rbg_define_method(rb_cGstMessage, "have_mutex?", have_mutex_p, 0);
675
+ rbg_define_method(rb_cGstMessage, "lock", lock, 0);
676
+ rbg_define_method(rb_cGstMessage, "unlock", unlock, 0);
677
+ rbg_define_method(rb_cGstMessage, "have_cond?", have_cond_p, 0);
678
+ rbg_define_method(rb_cGstMessage, "wait", cond_wait, 0);
679
+ rbg_define_method(rb_cGstMessage, "signal", cond_signal, 0);
680
680
 
681
- rb_define_method(rb_cGstMessage, "timestamp", get_timestamp, 0);
682
- rb_define_method(rb_cGstMessage, "set_timestamp", set_timestamp, 1);
683
- rb_define_method(rb_cGstMessage, "valid_timestamp?", valid_timestamp_p, 0);
681
+ rbg_define_method(rb_cGstMessage, "timestamp", get_timestamp, 0);
682
+ rbg_define_method(rb_cGstMessage, "set_timestamp", set_timestamp, 1);
683
+ rbg_define_method(rb_cGstMessage, "valid_timestamp?", valid_timestamp_p, 0);
684
684
 
685
- rb_define_method(rb_cGstMessage, "source", get_source, 0);
686
- rb_define_method(rb_cGstMessage, "set_source", set_source, 1);
685
+ rbg_define_method(rb_cGstMessage, "source", get_source, 0);
686
+ rbg_define_method(rb_cGstMessage, "set_source", set_source, 1);
687
687
  rb_define_alias(rb_cGstMessage, "src", "source");
688
688
  rb_define_alias(rb_cGstMessage, "set_src", "set_source");
689
689
 
690
- rb_define_method(rb_cGstMessage, "structure", get_structure, 0);
690
+ rbg_define_method(rb_cGstMessage, "structure", get_structure, 0);
691
691
 
692
692
 
693
- rb_define_method(rb_cGstMessageEos, "initialize", eos_initialize, 1);
693
+ rbg_define_method(rb_cGstMessageEos, "initialize", eos_initialize, 1);
694
694
 
695
695
  #if 0
696
- rb_define_method(rb_cGstMessageError, "initialize", error_initialize, 3);
696
+ rbg_define_method(rb_cGstMessageError, "initialize", error_initialize, 3);
697
697
  #endif
698
- rb_define_method(rb_cGstMessageError, "parse", error_parse, 0);
698
+ rbg_define_method(rb_cGstMessageError, "parse", error_parse, 0);
699
699
 
700
700
  #if 0
701
- rb_define_method(rb_cGstMessageWarning, "initialize", warning_initialize, 3);
701
+ rbg_define_method(rb_cGstMessageWarning, "initialize", warning_initialize, 3);
702
702
  #endif
703
- rb_define_method(rb_cGstMessageWarning, "parse", warning_parse, 0);
703
+ rbg_define_method(rb_cGstMessageWarning, "parse", warning_parse, 0);
704
704
 
705
705
  #if 0
706
- rb_define_method(rb_cGstMessageInfo, "initialize", info_initialize, 3);
706
+ rbg_define_method(rb_cGstMessageInfo, "initialize", info_initialize, 3);
707
707
  #endif
708
- rb_define_method(rb_cGstMessageInfo, "parse", info_parse, 0);
708
+ rbg_define_method(rb_cGstMessageInfo, "parse", info_parse, 0);
709
709
 
710
710
  #if 0
711
- rb_define_method(rb_cGstMessageTag, "initialize", tag_initialize, 2);
711
+ rbg_define_method(rb_cGstMessageTag, "initialize", tag_initialize, 2);
712
712
  #endif
713
- rb_define_method(rb_cGstMessageTag, "parse", tag_parse, 0);
713
+ rbg_define_method(rb_cGstMessageTag, "parse", tag_parse, 0);
714
714
 
715
- rb_define_method(rb_cGstMessageBuffering, "initialize",
715
+ rbg_define_method(rb_cGstMessageBuffering, "initialize",
716
716
  buffering_initialize, 2);
717
- rb_define_method(rb_cGstMessageBuffering, "parse", buffering_parse, 0);
717
+ rbg_define_method(rb_cGstMessageBuffering, "parse", buffering_parse, 0);
718
718
 
719
- rb_define_method(rb_cGstMessageStateChanged, "initialize",
719
+ rbg_define_method(rb_cGstMessageStateChanged, "initialize",
720
720
  state_changed_initialize, 4);
721
- rb_define_method(rb_cGstMessageStateChanged, "parse",
721
+ rbg_define_method(rb_cGstMessageStateChanged, "parse",
722
722
  state_changed_parse, 0);
723
723
 
724
- rb_define_method(rb_cGstMessageStateDirty, "initialize",
724
+ rbg_define_method(rb_cGstMessageStateDirty, "initialize",
725
725
  state_dirty_initialize, 1);
726
726
 
727
- rb_define_method(rb_cGstMessageClockProvide, "initialize",
727
+ rbg_define_method(rb_cGstMessageClockProvide, "initialize",
728
728
  clock_provide_initialize, 3);
729
- rb_define_method(rb_cGstMessageClockProvide, "parse",
729
+ rbg_define_method(rb_cGstMessageClockProvide, "parse",
730
730
  clock_provide_parse, 0);
731
731
 
732
- rb_define_method(rb_cGstMessageClockLost, "initialize",
732
+ rbg_define_method(rb_cGstMessageClockLost, "initialize",
733
733
  clock_lost_initialize, 2);
734
- rb_define_method(rb_cGstMessageClockLost, "parse", clock_lost_parse, 0);
734
+ rbg_define_method(rb_cGstMessageClockLost, "parse", clock_lost_parse, 0);
735
735
 
736
- rb_define_method(rb_cGstMessageNewClock, "initialize",
736
+ rbg_define_method(rb_cGstMessageNewClock, "initialize",
737
737
  new_clock_initialize, 2);
738
- rb_define_method(rb_cGstMessageNewClock, "parse", new_clock_parse, 0);
738
+ rbg_define_method(rb_cGstMessageNewClock, "parse", new_clock_parse, 0);
739
739
 
740
- rb_define_method(rb_cGstMessageApplication, "initialize",
740
+ rbg_define_method(rb_cGstMessageApplication, "initialize",
741
741
  application_initialize, 2);
742
742
 
743
- rb_define_method(rb_cGstMessageElement, "initialize",
743
+ rbg_define_method(rb_cGstMessageElement, "initialize",
744
744
  element_initialize, 2);
745
745
  #ifdef HAVE_GST_PBUTILS
746
746
  rb_cGstMissingMessage =
747
747
  rb_define_class_under(mGst, "MissingMessage", rb_cGstMessageElement);
748
- rb_define_method(rb_cGstMissingMessage, "installer_detail",
748
+ rbg_define_method(rb_cGstMissingMessage, "installer_detail",
749
749
  missing_message_get_installer_detail, 0);
750
- rb_define_method(rb_cGstMissingMessage, "description",
750
+ rbg_define_method(rb_cGstMissingMessage, "description",
751
751
  missing_message_get_description, 0);
752
752
 
753
753
  rb_cGstMissingURISourceMessage =
754
754
  rb_define_class_under(mGst, "MissingURISourceMessage",
755
755
  rb_cGstMissingMessage);
756
- rb_define_method(rb_cGstMissingURISourceMessage, "initialize",
756
+ rbg_define_method(rb_cGstMissingURISourceMessage, "initialize",
757
757
  missing_uri_source_message_initialize, 2);
758
758
  #endif
759
759
 
760
- rb_define_method(rb_cGstMessageSegmentStart, "initialize",
760
+ rbg_define_method(rb_cGstMessageSegmentStart, "initialize",
761
761
  segment_start_initialize, 3);
762
- rb_define_method(rb_cGstMessageSegmentStart, "parse",
762
+ rbg_define_method(rb_cGstMessageSegmentStart, "parse",
763
763
  segment_start_parse, 0);
764
764
 
765
- rb_define_method(rb_cGstMessageSegmentDone, "initialize",
765
+ rbg_define_method(rb_cGstMessageSegmentDone, "initialize",
766
766
  segment_done_initialize, 3);
767
- rb_define_method(rb_cGstMessageSegmentDone, "parse", segment_done_parse, 0);
767
+ rbg_define_method(rb_cGstMessageSegmentDone, "parse", segment_done_parse, 0);
768
768
 
769
- rb_define_method(rb_cGstMessageDuration, "initialize",
769
+ rbg_define_method(rb_cGstMessageDuration, "initialize",
770
770
  duration_initialize, 3);
771
- rb_define_method(rb_cGstMessageDuration, "parse", duration_parse, 0);
771
+ rbg_define_method(rb_cGstMessageDuration, "parse", duration_parse, 0);
772
772
 
773
- rb_define_method(rb_cGstMessageAsyncStart, "initialize",
773
+ rbg_define_method(rb_cGstMessageAsyncStart, "initialize",
774
774
  async_start_initialize, 2);
775
- rb_define_method(rb_cGstMessageAsyncStart, "parse", async_start_parse, 0);
775
+ rbg_define_method(rb_cGstMessageAsyncStart, "parse", async_start_parse, 0);
776
776
 
777
- rb_define_method(rb_cGstMessageAsyncDone, "initialize",
777
+ rbg_define_method(rb_cGstMessageAsyncDone, "initialize",
778
778
  async_done_initialize, 1);
779
779
 
780
- rb_define_method(rb_cGstMessageLatency, "initialize", latency_initialize, 1);
780
+ rbg_define_method(rb_cGstMessageLatency, "initialize", latency_initialize, 1);
781
781
 
782
782
 
783
- rb_define_method(rb_cGstMessageType, "name", type_name, 0);
784
-
785
-
786
- G_DEF_SETTERS(rb_cGstMessage);
783
+ rbg_define_method(rb_cGstMessageType, "name", type_name, 0);
787
784
  }
@@ -65,7 +65,7 @@ static void
65
65
  rbgst_mini_object_type_init_hook(VALUE klass)
66
66
  {
67
67
  if (G_TYPE_IS_ABSTRACT(CLASS2GTYPE(klass)))
68
- rb_define_method(klass, "initialize",
68
+ rbg_define_method(klass, "initialize",
69
69
  initialize_with_abstract_check, -1);
70
70
  }
71
71
 
@@ -215,6 +215,4 @@ Init_gst_mini_object(VALUE mGst)
215
215
  RG_DEF_METHOD_P(flag_raised, 1);
216
216
  RG_DEF_METHOD_P(writable, 0);
217
217
  RG_DEF_METHOD_BANG(writable, 0);
218
-
219
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
220
218
  }
@@ -76,8 +76,6 @@ Init_gst_object(VALUE mGst)
76
76
 
77
77
  G_REPLACE_SET_PROPERTY(RG_TARGET_NAMESPACE, "name", rg_set_name, 1);
78
78
 
79
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
80
-
81
79
  G_DEF_CLASS(GST_TYPE_OBJECT_FLAGS, "Flags", RG_TARGET_NAMESPACE);
82
80
  G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GST_TYPE_OBJECT_FLAGS, "GST_");
83
81
  }
@@ -325,8 +325,6 @@ Init_gst_pad (VALUE mGst)
325
325
  RG_DEF_METHOD(set_active, 1);
326
326
  RG_DEF_METHOD(peer, 0);
327
327
 
328
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
329
-
330
328
  G_DEF_CLASS(GST_TYPE_PAD_LINK_RETURN, "LinkReturn", RG_TARGET_NAMESPACE);
331
329
  G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GST_TYPE_PAD_LINK_RETURN, "GST_PAD_");
332
330
  G_DEF_CLASS(GST_TYPE_PAD_DIRECTION, "Direction", RG_TARGET_NAMESPACE);
@@ -128,6 +128,4 @@ Init_gst_plugin_feature (VALUE mGst)
128
128
  RG_DEF_METHOD(set_rank, 1);
129
129
 
130
130
  RG_DEF_METHOD(plugin_name, 0);
131
-
132
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
133
131
  }
@@ -275,9 +275,9 @@ Init_gst_query (VALUE mGst)
275
275
  #define DEFINE_QUERY(type, lctype, arguments) \
276
276
  rb_cGstQuery ## type = \
277
277
  rb_define_class_under(mGst, "Query" #type, rb_cGstQuery); \
278
- rb_define_method(rb_cGstQuery ## type, "initialize", \
278
+ rbg_define_method(rb_cGstQuery ## type, "initialize", \
279
279
  lctype ## _initialize, arguments); \
280
- rb_define_method(rb_cGstQuery ## type, "parse", \
280
+ rbg_define_method(rb_cGstQuery ## type, "parse", \
281
281
  lctype ## _parse, 0) \
282
282
 
283
283
  DEFINE_QUERY(Position, position, 1);
@@ -46,6 +46,4 @@ Init_gst_static_caps(VALUE mGst)
46
46
  RG_DEF_METHOD(description, 0);
47
47
  RG_DEF_METHOD(get, 0);
48
48
  RG_DEF_ALIAS("to_caps", "get");
49
-
50
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
51
49
  }
@@ -25,7 +25,7 @@
25
25
  #define SELF(obj) (RVAL2GST_STRUCT(obj))
26
26
 
27
27
  static VALUE
28
- rg_s_parse(VALUE self, VALUE string)
28
+ rg_s_parse(G_GNUC_UNUSED VALUE self, VALUE string)
29
29
  {
30
30
  GstStructure *structure;
31
31
  gchar *end;
@@ -297,6 +297,4 @@ Init_gst_structure(VALUE mGst)
297
297
  RG_DEF_ALIAS("have_field?", "has_field?");
298
298
 
299
299
  RG_DEF_METHOD(to_s, 0);
300
-
301
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
302
300
  }
@@ -35,7 +35,7 @@
35
35
  * to a Gst::SystemClock object.
36
36
  */
37
37
  static VALUE
38
- rg_s_obtain (self)
38
+ rg_s_obtain (G_GNUC_UNUSED VALUE self)
39
39
  {
40
40
  return RGST_SYSTEM_CLOCK_NEW (gst_system_clock_obtain ());
41
41
  }
@@ -443,20 +443,17 @@ Init_gst_value(VALUE mGst)
443
443
 
444
444
  rb_define_alloc_func(cIntRange, int_range_allocate);
445
445
 
446
- rb_define_method(cIntRange, "initialize", int_range_initialize, 2);
446
+ rbg_define_method(cIntRange, "initialize", int_range_initialize, 2);
447
447
 
448
- rb_define_method(cIntRange, "min", int_range_get_min, 0);
449
- rb_define_method(cIntRange, "set_min", int_range_set_min, 1);
450
- rb_define_method(cIntRange, "max", int_range_get_max, 0);
451
- rb_define_method(cIntRange, "set_max", int_range_set_max, 1);
448
+ rbg_define_method(cIntRange, "min", int_range_get_min, 0);
449
+ rbg_define_method(cIntRange, "set_min", int_range_set_min, 1);
450
+ rbg_define_method(cIntRange, "max", int_range_get_max, 0);
451
+ rbg_define_method(cIntRange, "set_max", int_range_set_max, 1);
452
452
 
453
- rb_define_method(cIntRange, "set", int_range_set, 2);
454
-
455
- rb_define_method(cIntRange, "to_a", int_range_to_a, 0);
456
- rb_define_method(cIntRange, "to_s", g_value_to_s, 0);
457
-
458
- G_DEF_SETTERS(cIntRange);
453
+ rbg_define_method(cIntRange, "set", int_range_set, 2);
459
454
 
455
+ rbg_define_method(cIntRange, "to_a", int_range_to_a, 0);
456
+ rbg_define_method(cIntRange, "to_s", g_value_to_s, 0);
460
457
 
461
458
  memset(&fourcc_table, 0, sizeof(fourcc_table));
462
459
  fourcc_table.type = GST_TYPE_FOURCC;
@@ -476,15 +473,12 @@ Init_gst_value(VALUE mGst)
476
473
 
477
474
  rb_define_alloc_func(cFourcc, fourcc_allocate);
478
475
 
479
- rb_define_method(cFourcc, "initialize", fourcc_initialize, 1);
480
-
481
- rb_define_method(cFourcc, "replace!", fourcc_replace_bang, 1);
476
+ rbg_define_method(cFourcc, "initialize", fourcc_initialize, 1);
482
477
 
483
- rb_define_method(cFourcc, "to_i", fourcc_to_i, 0);
484
- rb_define_method(cFourcc, "to_s", g_value_to_s, 0);
485
-
486
- G_DEF_SETTERS(cFourcc);
478
+ rbg_define_method(cFourcc, "replace!", fourcc_replace_bang, 1);
487
479
 
480
+ rbg_define_method(cFourcc, "to_i", fourcc_to_i, 0);
481
+ rbg_define_method(cFourcc, "to_s", g_value_to_s, 0);
488
482
 
489
483
  memset(&fraction_table, 0, sizeof(fraction_table));
490
484
  fraction_table.type = GST_TYPE_FRACTION;
@@ -513,17 +507,15 @@ Init_gst_value(VALUE mGst)
513
507
 
514
508
  rb_define_alloc_func(cFractionRange, fraction_range_allocate);
515
509
 
516
- rb_define_method(cFractionRange, "initialize", fraction_range_initialize, 2);
517
-
518
- rb_define_method(cFractionRange, "min", fraction_range_get_min, 0);
519
- rb_define_method(cFractionRange, "set_min", fraction_range_set_min, 1);
520
- rb_define_method(cFractionRange, "max", fraction_range_get_max, 0);
521
- rb_define_method(cFractionRange, "set_max", fraction_range_set_max, 1);
510
+ rbg_define_method(cFractionRange, "initialize", fraction_range_initialize, 2);
522
511
 
523
- rb_define_method(cFractionRange, "set", fraction_range_set, 2);
512
+ rbg_define_method(cFractionRange, "min", fraction_range_get_min, 0);
513
+ rbg_define_method(cFractionRange, "set_min", fraction_range_set_min, 1);
514
+ rbg_define_method(cFractionRange, "max", fraction_range_get_max, 0);
515
+ rbg_define_method(cFractionRange, "set_max", fraction_range_set_max, 1);
524
516
 
525
- rb_define_method(cFractionRange, "to_a", fraction_range_to_a, 0);
526
- rb_define_method(cFractionRange, "to_s", g_value_to_s, 0);
517
+ rbg_define_method(cFractionRange, "set", fraction_range_set, 2);
527
518
 
528
- G_DEF_SETTERS(cFractionRange);
519
+ rbg_define_method(cFractionRange, "to_a", fraction_range_to_a, 0);
520
+ rbg_define_method(cFractionRange, "to_s", g_value_to_s, 0);
529
521
  }
@@ -126,8 +126,6 @@ Init_gst_x_overlay(VALUE mGst)
126
126
 
127
127
  RG_DEF_METHOD(got_xwindow_id, 1);
128
128
  RG_DEF_METHOD(set_xwindow_id_with_buswatch, 2);
129
-
130
- G_DEF_SETTERS(RG_TARGET_NAMESPACE);
131
129
  }
132
130
 
133
131
  #endif /* HAVE_GST_OVERLAY */
@@ -103,7 +103,7 @@ Init_gst_classes (void)
103
103
  */
104
104
 
105
105
  static VALUE
106
- rg_m_init (int argc, VALUE * argv, VALUE self)
106
+ rg_s_init (int argc, VALUE * argv, G_GNUC_UNUSED VALUE self)
107
107
  {
108
108
  gint i, gargc;
109
109
  VALUE argary;
@@ -173,7 +173,7 @@ rg_m_init (int argc, VALUE * argv, VALUE self)
173
173
  * Returns: an Array of 4 fixnums (major, minor, macro and nano numbers).
174
174
  */
175
175
  static VALUE
176
- rg_m_version (VALUE self)
176
+ rg_s_version (G_GNUC_UNUSED VALUE self)
177
177
  {
178
178
  guint major, minor, micro, nano;
179
179
 
@@ -184,7 +184,7 @@ rg_m_version (VALUE self)
184
184
  }
185
185
 
186
186
  static VALUE
187
- rg_m_check_version_p(VALUE self, VALUE rb_major, VALUE rb_minor, VALUE rb_micro)
187
+ rg_s_check_version_p(G_GNUC_UNUSED VALUE self, VALUE rb_major, VALUE rb_minor, VALUE rb_micro)
188
188
  {
189
189
  guint major, minor, micro, nano;
190
190
 
@@ -202,8 +202,8 @@ Init_gstreamer (void)
202
202
  {
203
203
  RG_TARGET_NAMESPACE = rb_define_module ("Gst");
204
204
 
205
- RG_DEF_MODFUNC(init, -1);
206
- RG_DEF_MODFUNC(version, 0);
205
+ RG_DEF_SMETHOD(init, -1);
206
+ RG_DEF_SMETHOD(version, 0);
207
207
 
208
208
  /*
209
209
  * Constant: VERSION_MAJOR
@@ -233,5 +233,5 @@ Init_gstreamer (void)
233
233
  INT2FIX(GST_VERSION_MINOR),
234
234
  INT2FIX(GST_VERSION_MICRO)));
235
235
 
236
- RG_DEF_MODFUNC_P(check_version, 3);
236
+ RG_DEF_SMETHOD_P(check_version, 3);
237
237
  }
@@ -56,7 +56,7 @@ gst_format_get_type2 (void)
56
56
  * given nick, or nil if this query was not registered.
57
57
  */
58
58
  static VALUE
59
- rg_s_find (VALUE self, VALUE nick)
59
+ rg_s_find (G_GNUC_UNUSED VALUE self, VALUE nick)
60
60
  {
61
61
  GstFormat format = gst_format_get_by_nick (RVAL2CSTR (nick));
62
62
  return format != GST_FORMAT_UNDEFINED
@@ -73,7 +73,7 @@ rg_s_find (VALUE self, VALUE nick)
73
73
  * Returns: always nil.
74
74
  */
75
75
  static VALUE
76
- rg_s_each (VALUE self)
76
+ rg_s_each (G_GNUC_UNUSED VALUE self)
77
77
  {
78
78
  GstIterator *iter;
79
79
  gpointer value;
@@ -310,8 +310,6 @@ Init_gst_index (VALUE mGst)
310
310
  G_DEF_CLASS (GST_TYPE_INDEX_FLAGS, "Flags", RG_TARGET_NAMESPACE);
311
311
  G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_INDEX_FLAGS, "GST_INDEX_");
312
312
 
313
- G_DEF_SETTERS (RG_TARGET_NAMESPACE);
314
-
315
313
  rb_undef_method (RG_TARGET_NAMESPACE, "resolver");
316
314
  rb_undef_method (RG_TARGET_NAMESPACE, "resolver=");
317
315
  }
@@ -39,7 +39,7 @@
39
39
  * an exception on failure.
40
40
  */
41
41
  static VALUE
42
- rg_m_launch (VALUE self, VALUE command)
42
+ rg_s_launch (G_GNUC_UNUSED VALUE self, VALUE command)
43
43
  {
44
44
  #if !defined(GST_DISABLE_PARSE)
45
45
  GError *error;
@@ -62,7 +62,7 @@ void
62
62
  Init_gst_parse (VALUE mGst)
63
63
  {
64
64
  VALUE RG_TARGET_NAMESPACE = rb_define_module_under (mGst, "Parse");
65
- RG_DEF_MODFUNC(launch, 1);
65
+ RG_DEF_SMETHOD(launch, 1);
66
66
 
67
67
  G_DEF_ERROR(GST_PARSE_ERROR, "ParseError", mGst, rb_eRuntimeError,
68
68
  GST_TYPE_PARSE_ERROR);
@@ -56,7 +56,7 @@ gst_query_type_get_type2 (void)
56
56
  * given nick, or nil if this query was not registered.
57
57
  */
58
58
  static VALUE
59
- rg_s_find (VALUE self, VALUE nick)
59
+ rg_s_find (G_GNUC_UNUSED VALUE self, VALUE nick)
60
60
  {
61
61
  GstQueryType type = gst_query_type_get_by_nick (RVAL2CSTR (nick));
62
62
  return type != GST_QUERY_NONE
@@ -73,7 +73,7 @@ rg_s_find (VALUE self, VALUE nick)
73
73
  * Returns: always nil.
74
74
  */
75
75
  static VALUE
76
- rg_s_each (VALUE self)
76
+ rg_s_each (G_GNUC_UNUSED VALUE self)
77
77
  {
78
78
  GstIterator *iter;
79
79
  gpointer value;
@@ -28,13 +28,13 @@
28
28
  */
29
29
 
30
30
  static VALUE
31
- rg_s_default(VALUE self)
31
+ rg_s_default(G_GNUC_UNUSED VALUE self)
32
32
  {
33
33
  return RGST_REGISTRY_NEW(gst_registry_get_default());
34
34
  }
35
35
 
36
36
  static VALUE
37
- rg_s_update(VALUE self)
37
+ rg_s_update(G_GNUC_UNUSED VALUE self)
38
38
  {
39
39
  return CBOOL2RVAL(gst_update_registry());
40
40
  }
@@ -36,7 +36,7 @@
36
36
  * Returns: true if the tag is registered, false otherwise.
37
37
  */
38
38
  static VALUE
39
- rg_m_exists_p (VALUE self, VALUE tag)
39
+ rg_s_exists_p (G_GNUC_UNUSED VALUE self, VALUE tag)
40
40
  {
41
41
  return CBOOL2RVAL (gst_tag_exists (RVAL2CSTR (tag)));
42
42
  }
@@ -51,7 +51,7 @@ rg_m_exists_p (VALUE self, VALUE tag)
51
51
  * Returns: true if the tag is fixed, false otherwise.
52
52
  */
53
53
  static VALUE
54
- rg_m_fixed_p (VALUE self, VALUE tag)
54
+ rg_s_fixed_p (G_GNUC_UNUSED VALUE self, VALUE tag)
55
55
  {
56
56
  return CBOOL2RVAL (gst_tag_is_fixed (RVAL2CSTR (tag)));
57
57
  }
@@ -63,7 +63,7 @@ rg_m_fixed_p (VALUE self, VALUE tag)
63
63
  * Returns: the human-readable name of this tag.
64
64
  */
65
65
  static VALUE
66
- rg_m_get_nick (VALUE self, VALUE tag)
66
+ rg_s_get_nick (G_GNUC_UNUSED VALUE self, VALUE tag)
67
67
  {
68
68
  return CSTR2RVAL (gst_tag_get_nick (RVAL2CSTR (tag)));
69
69
  }
@@ -75,7 +75,7 @@ rg_m_get_nick (VALUE self, VALUE tag)
75
75
  * Returns: the human-readable description of this tag.
76
76
  */
77
77
  static VALUE
78
- rg_m_get_description (VALUE self, VALUE tag)
78
+ rg_s_get_description (G_GNUC_UNUSED VALUE self, VALUE tag)
79
79
  {
80
80
  return CSTR2RVAL (gst_tag_get_description (RVAL2CSTR (tag)));
81
81
  }
@@ -89,7 +89,7 @@ rg_m_get_description (VALUE self, VALUE tag)
89
89
  * Returns: the flag of this tag (see Gst::Tag::Flag).
90
90
  */
91
91
  static VALUE
92
- rg_m_get_flag (VALUE self, VALUE tag)
92
+ rg_s_get_flag (G_GNUC_UNUSED VALUE self, VALUE tag)
93
93
  {
94
94
  return GFLAGS2RVAL (gst_tag_get_flag (RVAL2CSTR (tag)),
95
95
  GST_TYPE_TAG_FLAG);
@@ -100,11 +100,11 @@ Init_gst_tag (VALUE mGst)
100
100
  {
101
101
  VALUE RG_TARGET_NAMESPACE = rb_define_module_under (mGst, "Tag");
102
102
 
103
- RG_DEF_MODFUNC_P(exists, 1);
104
- RG_DEF_MODFUNC(get_nick, 1);
105
- RG_DEF_MODFUNC(get_description, 1);
106
- RG_DEF_MODFUNC(get_flag, 1);
107
- RG_DEF_MODFUNC_P(fixed, 1);
103
+ RG_DEF_SMETHOD_P(exists, 1);
104
+ RG_DEF_SMETHOD(get_nick, 1);
105
+ RG_DEF_SMETHOD(get_description, 1);
106
+ RG_DEF_SMETHOD(get_flag, 1);
107
+ RG_DEF_SMETHOD_P(fixed, 1);
108
108
 
109
109
  G_DEF_CLASS (GST_TYPE_TAG_FLAG, "Flag", RG_TARGET_NAMESPACE);
110
110
  G_DEF_CONSTANTS (RG_TARGET_NAMESPACE, GST_TYPE_TAG_FLAG, "GST_TAG_");
@@ -54,7 +54,7 @@ rg_initialize (VALUE self)
54
54
  * Returns: true on success, false on failure.
55
55
  */
56
56
  static VALUE
57
- rg_s_write_file (VALUE self, VALUE element, VALUE filename)
57
+ rg_s_write_file (G_GNUC_UNUSED VALUE self, VALUE element, VALUE filename)
58
58
  {
59
59
  FILE *file = fopen (RVAL2CSTR (filename), "w");
60
60
  gboolean ret = FALSE;
@@ -23,7 +23,7 @@ class TestElement < Test::Unit::TestCase
23
23
 
24
24
  def test_state
25
25
  pipeline = Gst::Pipeline.new
26
- src = create_element("videotestsrc")
26
+ src = create_element("fakesrc")
27
27
  sink = create_element("fakesink")
28
28
  pipeline.add(src, sink)
29
29
 
@@ -42,25 +42,25 @@ class TestElement < Test::Unit::TestCase
42
42
  assert_equal([Gst::STATE_CHANGE_FAILURE,
43
43
  Gst::STATE_READY,
44
44
  Gst::STATE_PLAYING],
45
- pipeline.get_state(1000))
45
+ pipeline.get_state)
46
46
 
47
47
  pipeline.pause
48
48
  assert_equal([Gst::STATE_CHANGE_ASYNC,
49
49
  Gst::STATE_READY,
50
50
  Gst::STATE_PAUSED],
51
- pipeline.get_state(10))
51
+ pipeline.get_state(1))
52
52
 
53
53
  pipeline.stop
54
54
  assert_equal([Gst::STATE_CHANGE_SUCCESS,
55
55
  Gst::STATE_NULL,
56
56
  Gst::STATE_VOID_PENDING],
57
- pipeline.get_state(1000))
57
+ pipeline.get_state)
58
58
 
59
59
  pipeline.set_state(:playing)
60
60
  assert_equal([Gst::STATE_CHANGE_FAILURE,
61
61
  Gst::STATE_READY,
62
62
  Gst::STATE_PLAYING],
63
- pipeline.get_state(1000))
63
+ pipeline.get_state)
64
64
  end
65
65
 
66
66
  def test_query
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gstreamer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 2
10
- version: 1.1.2
9
+ - 3
10
+ version: 1.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - The Ruby-GNOME2 Project Team
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-15 00:00:00 Z
18
+ date: 2012-04-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: glib2
@@ -25,12 +25,12 @@ dependencies:
25
25
  requirements:
26
26
  - - ">="
27
27
  - !ruby/object:Gem::Version
28
- hash: 23
28
+ hash: 21
29
29
  segments:
30
30
  - 1
31
31
  - 1
32
- - 2
33
- version: 1.1.2
32
+ - 3
33
+ version: 1.1.3
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  description: Ruby/GStreamer is a Ruby binding for GStreamer.
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  requirements: []
158
158
 
159
159
  rubyforge_project:
160
- rubygems_version: 1.8.12
160
+ rubygems_version: 1.8.15
161
161
  signing_key:
162
162
  specification_version: 3
163
163
  summary: Ruby/GStreamer is a Ruby binding for GStreamer.