Re: [Vala] vala and gstreamer plugins



On Fri, 09 Jan 2009 21:20:07 +0000
alberto colombo <a colombo kingston ac uk> wrote:

Hello,

Hi Alberto,

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]:

[...]

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]:

[...]

The following snippet shows how to achieve this in Vala:

public class Plugin : Gst.Element {
        class construct {
                // set the plugin information
                set_details_simple(...);
                                
                // create and add the template
                var templ = new PadTemplate(...);
                add_pad_template(templ);
        }
}

Please note the additional `class' keyword which causes valac to create
the required _base_init() function instead of the regular constructor.

[...]

Any help will be greatly appreciated. I'm using Vala 0.5.4.
Thanks in advance

alb

HTH,
Roland

Attachment: signature.asc
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]