static VALUE new_clock_initialize(VALUE self, VALUE src, VALUE clock) { G_INITIALIZE(self, gst_message_new_new_clock(RVAL2GST_OBJ(src), RVAL2GST_CLOCK(clock))); return Qnil; }
static VALUE clock_provide_initialize(VALUE self, VALUE src, VALUE clock, VALUE ready) { G_INITIALIZE(self, gst_message_new_clock_provide(RVAL2GST_OBJ(src), RVAL2GST_CLOCK(clock), RVAL2CBOOL(ready))); return Qnil; }
/* * Class method: new(clock, time, interval=nil) * clock: a Gst::Clock. * time: a time period, in nanoseconds. * interval: an interval period, in nanoseconds. * * Creates a new Gst::ClockEntry object based on the given Gst::Clock. * * Two types of Gst::ClockEntry objects can be created: * * * One-shot: if the interval is ommited or nil, the entry will trigger a single shot notification, at the requested time (in nanoseconds); * * Periodic: if the interval is not nil, the timer entry will trigger a periodic notification, starting at time (in nanoseconds), and be fired with the given interval (also in nanoseconds). * * The timer will be issued after Gst::ClockEntry#wait or * Gst::ClockEntry#wait_async. * * Returns: a new Gst::ClockEntry object. */ static VALUE rg_initialize (int argc, VALUE * argv, VALUE self) { VALUE clock, time, interval; GstClockID id; rb_scan_args (argc, argv, "21", &clock, &time, &interval); /* * Single-shot */ if (NIL_P (interval)) id = gst_clock_new_single_shot_id (RVAL2GST_CLOCK (clock), NUM2ULL (time)); /* * Periodic */ else id = gst_clock_new_periodic_id (RVAL2GST_CLOCK (clock), NUM2ULL (time), NUM2ULL (interval)); G_INITIALIZE (self, GST_CLOCK_ENTRY (id)); return Qnil; }
/* * Method: provided_clock=(clock) * clock: a Gst::Clock. * * Forces the bin to use the given clock. Use nil to force it * to use no clock at all. * * Returns: self. */ static VALUE rb_gst_bin_set_provided_clock(VALUE self, VALUE clock) { GstBin *bin; bin = SELF(self); if (bin->provided_clock) g_object_unref(bin->provided_clock); bin->provided_clock = RVAL2GST_CLOCK(clock); if (bin->provided_clock) g_object_ref(bin->provided_clock); return self; }
/* * Method: set_clock(clock) * clock: the Gst::Clock to set for the element. * * Sets the clock for the element. * * Returns: self. */ static VALUE rg_set_clock(VALUE self, VALUE clock) { gst_element_set_clock(SELF(self), RVAL2GST_CLOCK(clock)); return self; }