Hello,

I'm using clutter 0.8 with clutter-gst 0.8 with Clutter-0.8.0 Perl binding.

1) When I'm using transition effects, video playing freezes during
some transitions.
Actors are Clutter::Texture from files and Effect is move.

2) VideoTexture CPU usage is very high regarding direct usage with gst-launch.

Could I fix these problems with best usage of Clutter (see code below) ?

Thanks in advance,

Stephane

_________________________________________
#!/usr/bin/perl

use warnings;
use strict;

use Glib ':constants';
use Clutter '-init';

my $status = Clutter::Gst->init();
printf "status = $status\n";

my $actor = Clutter::Gst::VideoTexture->new();
$actor->set_filename($ARGV[0]);
$actor->set_playing(TRUE);
$actor->set_size(1280, 720);

my $control = Clutter::Texture->new("logo.png");
$control->set_size(100, 100);
$control->set_position(300, 300);

my $stage = Clutter::Stage->get_default();
$stage->set_size(1280, 720);
$stage->signal_connect('key_press_event' => \&key_press_event_cb);
$stage->add($actor, $control);
$stage->show();

sub key_press_event_cb {
  my $template = Clutter::EffectTemplate->new_for_duration (1000, sub
{ return Clutter::Alpha->sine(@_); } );
  my $timeline = Clutter::Effect->move($template, $control, 200, 200);
}

Clutter->main();
_________________________________________
-- 
To unsubscribe send a mail to [email protected]

Reply via email to