Hi On 2013-12-30 15:23, Moritz Renftle <clutter renftles de> wrote:
since a month or two I'm working on a small application which needs Webcam-support. Initially, it was implemented in python using libcheese from the gir-bindings ('gir1.2-cheese-3.x' on ubuntu), but I'd like to port it to Vala for performance reasons. My question is: What do I have to do to use libcheese from Vala?
There is a VAPI file in the Cheese tarball or git repository, which should work:
https://git.gnome.org/browse/cheese/tree/src/vapi/cheese-common.vapiYou could also try generating the VAPI file from the GObject Introspection data using vapigen.
To use my app with the python-bindings, the newest version of Ubuntu was needed (Cheese >= 3.6). Does the same apply for Vala? I know Cheese is built with Vala itself for some time, so I'd expect Vala-support for libcheese to be older too? At the moment I'm not even sure which package must be included in the Makefile ('cheese-common' or 'cheese' or 'cheese-3.0' .. ?) for valac to compile my application. I could only find information concerning libcheese and python.
The Cheese VAPI file is not installed, so I suggest that you either copy it into your project or generate it from the GIR metadata.
You should be able to figure out the necessary arguments to pass to valac in the Vala bindings documentation:
https://wiki.gnome.org/Projects/Vala/Bindings -- http://amigadave.com/
Attachment:
signature.asc
Description: Digital signature