[Vala] VideoTexture.set_seek_flags



Hello again,

I can't seem to call set_seek_flags on my ClutterGst VideoTexture. I get
the error that set_seek_flags does not exist in the context of
ClutterGst.VideoTexture. I am using Vala 0.14 and Clutter-Gst 1.4.4. I
would like my set_progress to do an accurate seek rather than fast. Here it
is ...

using Clutter;
using Gst;
using ClutterGst;

class Gui {

private VideoTexture tx;
private Stage stage;

public Gui() {
 stage = new Stage();
//stage.get_default ();
stage.color = Color () { alpha = 255 };
//stage.set_fullscreen(true);
stage.set_size(1280, 720);
stage.hide.connect (Clutter.main_quit);

tx = new ClutterGst.VideoTexture();
stage.add(tx);

tx.set_reactive(true);

tx.button_press_event.connect(button_press);

tx.set_uri("file:///home/brian/Downloads/louis.mp4");
tx.set_seek_flags(ClutterGst.SeekFlags(1));  // NOT WORKING HERE
tx.set_progress(0.601732);
tx.set_playing(true);

stage.show_all();

}

private bool button_press (ButtonEvent event) {
                if (tx.get_playing() == true) {
tx.set_playing(false);
stdout.printf("%f", tx.get_progress());
}else{
tx.set_playing(true);
}
return true;
}

}

void main (string[] args) {

Clutter.init(ref args);
Gst.init(ref args);
var gui = new Gui();

Clutter.main();
}

THANKS


//valac -g --pkg clutter-1.0 --pkg gstreamer-0.10 --pkg
gstreamer-interfaces-0.10 --pkg clutter-gst-1.0 g_test.vala


-- 
Duff


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