Hi, I'm looking at ways to place a widget 'MPlayerEmbed' within a widget 'Layout' that need to see in one container, a video with mplayer and an image on the video.
My problem is that when I put the widget 'MPlayerEmbed' into the widget 'Layout', the videos are not seen. I tried loading the widget 'MozEmbed' within a widget 'layout' and I do not see the browser.
Here this my code:
#!/usr/bin/perl
use warnings;
use strict;
use Glib qw/TRUE FALSE/;
use Gtk2 '-init';
use Gtk2::Ex::MPlayerEmbed;
# Create Main Window
my $window = Gtk2::Window->new('toplevel');
$window->set_border_width(0);
$window->set_decorated(0);
$window->set_position('center-always');
$window->set_title('Player');
$window->signal_connect( destroy => sub { Gtk2->main_quit; } );
$window->set_default_size(1024, 768);
my $vbox = Gtk2::VBox->new(0, 0);
$vbox->set_border_width(0);
# Create a Fixed Container
my $layout = Gtk2::Layout->new();
$layout->set_size (1024, 768);
$vbox->add($layout);
$window->add($vbox);
$vbox->show_all;
# Create MPLAYER Widget
my $mpe = Gtk2::Ex::MPlayerEmbed->new();
$mpe->set('args', $mpe->get('args').' -vo xv');
$layout->put($mpe, 0, 0);
$mpe->play('path_to_video.mp4');
$mpe->show_all;
$window->show_all;
main Gtk2;
I noticed that both (MPlayerEmbed and MozEmbed) are not shown because they are reduced to the size of 1x1. I have not succeeded find a way to put inside a layout widget, a widget MozEmbed or MPlayerEmbed.
I hope I understand and I can help.
Thanks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.