[Vala] vala and gstreamer plugins
- From: alberto colombo <a colombo kingston ac uk>
- To: vala list <vala-list gnome org>
- Subject: [Vala] vala and gstreamer plugins
- Date: Fri, 09 Jan 2009 21:20:07 +0000
Hello,
I've been playing with Vala and GStreamer to build a simple
application... smooth like a breeze :-) However, things get difficult
when I try to build a GStreamer plugin, i.e. and object derived from
Gst.Element.
The problem is that I need to put some code in the _base_init function
of my plugin [1]:
static void
gst_my_filter_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
static const GstElementDetails my_filter_details = {
[..]
};
gst_element_class_set_details (element_class, &my_filter_details);
}
but I can't find out how to do that in Vala. Similar problem when I
need to add a static pad template to my plugin Class [2]:
static void
gst_my_filter_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
[..]
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&src_factory));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_factory));
}
In the gstreamer-0.10.vapi file, the add_pad_template is declared as:
[CCode (cname = "gst_element_class_add_pad_template")]
public class void add_pad_template (Gst.PadTemplate templ);
which looks correct, but what does the "class" modifier mean? In
practice, it behaves like a normal instance method, which is
not what I want...
Any help will be greatly appreciated. I'm using Vala 0.5.4.
Thanks in advance
alb
[1]
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-boiler-details.html
[2]
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-boiler-padtemplates.html
--
alberto colombo <a colombo kingston ac uk>
This email has been scanned for all viruses by the MessageLabs Email
Security System.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]