Example #1
0
/*
 * Method: get_structure(index)
 * index: the index of a structure.
 *
 * Finds the structure in the caps that has the given index, and 
returns it.
 *
 * Returns: a Hash object corresponding to index, or nil if not found.
 */
static VALUE
rg_get_structure (VALUE self, VALUE index)
{
    GstStructure *structure = gst_caps_get_structure (RGST_CAPS (self),
                                                      FIX2INT (index));

    return GST_STRUCT2RVAL(structure);
}
Example #2
0
static VALUE
tag_parse(VALUE self)
{
    GstTagList *taglist;

    gst_event_parse_tag(RGST_EVENT(self), &taglist);

    return GST_STRUCT2RVAL(taglist);
}
Example #3
0
static VALUE
rg_each(VALUE self)
{
    int i, size;
    GstCaps *caps;

    caps = SELF(self);
    size = gst_caps_get_size(caps);

    for (i = 0; i < size; i++) {
        rb_yield(GST_STRUCT2RVAL(gst_caps_get_structure(caps, i)));
    }

    return Qnil;
}
Example #4
0
static VALUE
get_structure(VALUE self)
{
    return GST_STRUCT2RVAL((gpointer)gst_message_get_structure(SELF(self)));
}