Re: [Vala] Some basic problems with gstreamer
- From: "Juerg Billeter" <j bitron ch>
- To: "Klaus Rotter" <klaus rotters de>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Some basic problems with gstreamer
- Date: Mon, 28 Apr 2008 16:22:53 +0200 (CEST)
On Wed, April 23, 2008 15:47, Klaus Rotter wrote:
Phil Housley wrote:
Vala will use the data argument of a callback registering function to
pass a "this" pointer, it's that which allows you to use an instance
method as a callback. If you run valac with the --save-temps argument
you can see the C code that is produced, which is pretty useful for
checking if you know a C API as well.
Hm... I think defining the callbacks inside the class (at least my way)
isn't useful. I moved it outside (just like a global C function) and
it worked better.
Isn't there a way to define the callbacks inside my class?
Create a class where you can store your pipeline as a field, then move the
printPosition method to that class, as instance method without any
parameters. Then do something like Timeout.add (200, foo.printPosition);
where foo is an instance to the new class.
Juerg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]