Hello,

Am Samstag, den 17.04.2010, 00:28 +0530 schrieb Yuvi Panda:
> Hey, I've applied to work on Cheese for this year's GSoC and part of
> the proposal is to migrate the UI from C to Vala. We're also moving
> parts of the code to clutter.
> 
> We also need to use clutter-gst from Vala. According to the Bindings
> page, a clutter-gst binding is supposed to be available, but I'm
> unable to find one anywhere (Google-fu, nor the git repo's vapi
> files).

I also looked for clutter-gst bindings. There are bindings at:
http://git.clutter-project.org/?r=bindings/clutter-vala

But I had my problems getting them to run. 
Anyhow, I attached a cltter-gst vapi (created from a gi file) and a
manually created one. Maybe they help you.

- fabian

/* clutter-gst-1.0.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "ClutterGst", lower_case_cprefix = "clutter_gst_")]
namespace ClutterGst {
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public class VideoSink : Gst.BaseSink {
		public weak Gst.BaseSink parent;
		public ClutterGst.VideoSinkPrivate priv;
		[CCode (type = "GstElement*", has_construct_function = false)]
		public VideoSink (Clutter.Texture texture);
		public Clutter.Texture texture { get; set; }
		public int update_priority { get; set; }
	}
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public class VideoTexture : Clutter.Texture, Clutter.Media, Clutter.Scriptable {
		public weak Clutter.Texture parent;
		public ClutterGst.VideoTexturePrivate priv;
		[CCode (type = "ClutterActor*", has_construct_function = false)]
		public VideoTexture ();
		public Gst.Element get_pipeline ();
	}
	[CCode (type_id = "CLUTTER_GST_TYPE_VIDEO_SINK_PRIVATE", cheader_filename = "clutter-gst/clutter-gst.h")]
	public struct VideoSinkPrivate {
	}
	[CCode (type_id = "CLUTTER_GST_TYPE_VIDEO_TEXTURE_PRIVATE", cheader_filename = "clutter-gst/clutter-gst.h")]
	public struct VideoTexturePrivate {
	}
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public const int CLUTTER_GST_MAJOR_VERSION;
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public const int CLUTTER_GST_MICRO_VERSION;
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public const int CLUTTER_GST_MINOR_VERSION;
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public const int CLUTTER_GST_VERSION_HEX;
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public const string CLUTTER_GST_VERSION_S;
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public static Clutter.InitError init (out int argc, string argv);
	[CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
	public static Clutter.InitError init_with_args (out int argc, string argv, string parameter_string, GLib.OptionEntry entries, string translation_domain) throws GLib.Error;
}
[CCode (cprefix = "ClutterGst", lower_case_cprefix = "clutter_gst_")]
namespace ClutterGst {
        [CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
        public class VideoSink : Gst.BaseSink {
                public VideoSink (Clutter.Texture texture);
                public Clutter.Texture texture { get; set; }
                public int update_priority { get; set; }
        }
        [CCode (cheader_filename = "clutter-gst/clutter-gst.h")]
        public class VideoTexture : Clutter.Texture, Clutter.Media, 
Clutter.Scriptable {
                [CCode (type = "ClutterActor*")]
                public VideoTexture ();
                public Gst.Element get_pipeline ();
        }
}
using Gst;

void main(string[] args)
{
	Pipeline pipeline;
	Element src, sink;

	Gst.init(ref args);

	pipeline = new Pipeline ("mypipeline");
	src = ElementFactory.make ("videotestsrc", "video");
	sink = ElementFactory.make ("autovideosink", "sink");

	pipeline.add_many (src, sink);

	src.link (sink);

	pipeline.set_state(State.PLAYING);

	var loop = new MainLoop( null, false);
	loop.run();
}

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to