okay, I received some help from the IRC channel (thanks!) and here is
what I found:

To create the appsink object, you need to use the element factory and
cast it like this:

        // not this.sink = AppSink()  like you would think.
        this.sink = (AppSink)ElementFactory.make ("appsink", "sink");

then, you can set the signals like so:

        this.sink.new_preroll.connect(this.new_preroll);
        this.sink.new_buffer.connect(this.new_buf_cb);

my problem now  is how to deal with Gst.Buffers.  Sorry if my questions
are elementary.  I'm trying to learn vala, glib, gst all at once.  
In my signal callback for new_buffer, I do this:

private void new_buf_cb( ) {
        print("new buffer.\n");
        //Gst.Buffer.replace(ref buffer,this.sink.pull_buffer() );
        buffer = this.sink.pull_buffer();
        this.queue_draw();
}

Can someone tell my why the app crashes when trying to assign the
pull_buffer() to my Buffer buffer?

I also tried to call replace on the buffer, but it won't compile.

Any hints?

chugging along -august.


> 
> I was talking with some folks about the faulty appsink bindings in
> gstreamer on IRC last night.
> 
> I also found this online:
> http://www.mail-archive.com/vala-list@gnome.org/msg05147.html
> 
> Any answers to those questions?
> 
> It seems you can't even create the AppSink object.
> 
> Is there another way to create it and set the signals using
> ElementFactory ?
> 
> 
> thanks -august.
_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to