[Vala] Clutter-Gst VideoTexture problem (fc17)



Hello all,

I installed fedora 17 (vala 0.16, clutter 1.10) on a development machine
today and tried porting a project over from fedora 16 (using vala 0.14,
clutter 1.8, etc). I'm having trouble getting the Clutter-Gst VideoTexture
to work now. I can start the movie and pause it , but then I can't start it
again. I stripped the code down to provide an example that works in my
Fedora 16 environment but not in my Fedora 17 environment. I installed
rpm-fusion to get mp4 files playing in gstreamer via gstreamer-ffmpeg.
Could it be a bug. Any suggestions are welcome. Thanks.

Brian


using Clutter;
using ClutterGst;

/*
Gui: class called from main to define the ui before the clutter.main loop
is called
*/
class Gui : GLib.Object {

private Stage stage;
private VideoTexture videoPlayer;

public Gui() {
 // All the worlds a stage
stage = new Stage();
//stage.set_fullscreen(true);
stage.color = Color () { alpha = 255 };
stage.set_reactive(true);
stage.set_size(1280, 800);
stage.hide.connect (Clutter.main_quit);

videoPlayer = new ClutterGst.VideoTexture();
videoPlayer.set_uri("file:///home/brian/Videos/work.mp4");
videoPlayer.set_property("seek-flags", 1);
videoPlayer.set_reactive(true);

videoPlayer.button_press_event.connect(onPlayPress);

stage.add(videoPlayer);

stage.show();

}

  private bool onPlayPress (ButtonEvent event) {
if (videoPlayer.get_playing() == false) {
videoPlayer.set_playing(true);
                        stdout.printf("%s", "setting to play");
}else{
videoPlayer.set_playing(false);
}
return true;
        }


}


int main (string[] args) {

//Clutter.init(ref args);
//Gst.init(ref args);

ClutterGst.init(ref args);

var gui = new Gui();

Clutter.main();

return 0;
}

/*
valac -X -O2 -g --pkg clutter-1.0 --pkg gstreamer-0.10 --pkg
clutter-gst-1.0 VideoTest.vala
*/

// -X -O2 for optimizations
// -g for debug


-- 
Duff


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