Beispiel #1
0
static VALUE
missing_uri_source_message_initialize(VALUE self, VALUE element, VALUE protocol)
{
    GstMessage *message;

    message = gst_missing_uri_source_message_new(RVAL2GST_ELEMENT(element),
                                                 RVAL2CSTR(protocol));
    G_INITIALIZE(self, message);
    return Qnil;
}
Beispiel #2
0
/*
 * Method: <<(element)
 * element: a Gst::Element object.
 *
 * Adds a Gst::Element object to the bin.
 *
 * Returns: self.
 */
static VALUE
rb_gst_bin_add(VALUE self, VALUE element)
{
    VALUE klass = GTYPE2CLASS(GST_TYPE_ELEMENT);

    if (!RVAL2CBOOL(rb_obj_is_kind_of(element, klass))) {
        rb_raise(rb_eTypeError, "Gst::Element expected");
    }
    gst_bin_add(SELF(self), RVAL2GST_ELEMENT(element));
    G_CHILD_ADD(self, element);
    return self;
}
Beispiel #3
0
/*
 * Method: remove(*elements)
 * elements: a list of Gst::Element objects.
 *
 * Removes one or more Gst::Element objects from the bin, unparenting
 * as well.
 *
 * Returns: nil.
 */
static VALUE
rb_gst_bin_remove(int argc, VALUE *argv, VALUE self)
{
    int i;
    GstBin *bin;

    bin = SELF(self);
    for (i = 0; i < argc; i++) {
        G_CHILD_REMOVE(self, argv[i]);
        gst_bin_remove(bin, RVAL2GST_ELEMENT(argv[i]));
    }
    return Qnil;
}