Hi Guys,

I'm still completely failing to get wxMediaCtrl and GStreamer to run under
Linux, so I'm trying different tacks. 

I have found a piece of Perl code that runs GStreamer directly (see below)
and I wondered if this could be embedded in wxPerl.  This is the point where
I get completely lost.  I'd like a frame which has three panels, a main one
for the video, a small linear one bellow for buttons and progress and a
right-hand narrow panel for thumbnails, so I'd like to embed this code into
the central panel.

Here is the code, I'd really appreciate some help if you have any ideas.

Have a great day.

Regards

Steve
<pre>
#!/usr/bin/perl -w --

  use strict;
  use warnings;

  use GStreamer -init;

  my $loop = Glib::MainLoop -> new();

  # set up
  my file = "/tmp/foo.avi";
  my $play = GStreamer::ElementFactory -> make("playbin", "play");
  $play -> set(uri => Glib::filename_to_uri $file, "localhost");
  $play -> get_bus() -> add_watch(\&my_bus_callback, $loop);
  $play -> set_state("playing");

  # run
  $loop -> run();

  # clean up
  $play -> set_state("null");

  sub my_bus_callback {
    my ($bus, $message, $loop) = @_;

    if ($message -> type & "error") {
      warn $message -> error;
      $loop -> quit();
    }

    elsif ($message -> type & "eos") {
      $loop -> quit();
    }

    # remove message from the queue
    return 1;
  }

</pre>

Reply via email to