Well it looks as though the bomb-out was caused by something else. The list of files needed to Gstreamer from wxMediaCtrl *or* Perl seems to be:

gstreamer0.10-ffmpeg libgstreamer0.10-0 libgstreamer-perl libgstreamer-plugins-base0.10-0 gstreamer0.10-x gstreamer0.10-plugins-good gstreamer0.10-plugins-base

The following code then runs on Windows and Linux:

#!/usr/bin/perl -w -- use Wx 0.15 qw[:allclasses]; use strict; package MyFrame; use Wx qw[:everything]; use base qw(Wx::Frame); use strict; sub new { my( $self, $parent, $id, $title, $pos, $size, $style, $name ) = @_ +; $style = wxDEFAULT_FRAME_STYLE unless defined $style; $self = $self->SUPER::new( undef, wxID_ANY, "Draw/Video Controls", + wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, "" ); $self->SetTitle("Draw/Video Controls"); # Define parents of split $self->{Ctl_Post_Exam_Videos_Sizer_2} = Wx::BoxSizer->new(wxVERTIC +AL); # Top-level left-hand sizer (contains media) # wxMEDIABACKEND_DIRECTSHOW Use ActiveMovie/DirectShow. Requires w +xUSE_DIRECTSHOW to be enabled, requires linkage with the static libra +ry strmiids.lib, and is available on Windows Only. # wxMEDIABACKEND_QUICKTIME Use QuickTime. Windows and Mac Only. NO +TE: On Mac Systems lower than OSX 10.2 this defaults to emulating win +dow positioning and suffers from several bugs, including not working +correctly embedded in a wxNotebook. # wxMEDIABACKEND_MCI Use Media Command Interface. Windows Only +. # wxMEDIABACKEND_GSTREAMER Use GStreamer. Unix Only. # wxMEDIABACKEND_WMP10 Windows Media Player 9 or 10 # wxMEDIABACKEND_REALPLAYER Realplayer # Blank Allow to choose own player $self->{Ctl_Videos_Media}= Wx::MediaCtrl->new( $self, wxID_ANY, '' +, wxDefaultPosition, wxDefaultSize,0, ); $self->{Ctl_Videos_Media}->Show( 1 ); $self->{Ctl_Videos_Media}->ShowPlayerControls(wxMEDIACTRLPLAYERCON +TROLS_DEFAULT); # or wxMEDIACTRLPLAYERCONTROLS_NONE # wxMEDIACTRLPLAYERCONTROLS_STEP # wxMEDIACTRLPLAYERCONTROLS_VOLUME # wxMEDIACTRLPLAYERCONTROLS_DEFAULT $self->{Ctl_Post_Exam_Videos_Sizer_2}->Add( $self->{Ctl_Videos_Med +ia}, 1, wxEXPAND|wxALL, 5 ); $self->{button} = Wx::Button->new( $self, -1, 'Load a media file' +); $self->{Ctl_Post_Exam_Videos_Sizer_2}->Add($self->{button}, 0, 0, +0); $self->SetSizer($self->{Ctl_Post_Exam_Videos_Sizer_2}); $self->Layout(); Wx::Event::EVT_MEDIA_LOADED( $self, $self->{Ctl_Videos_Media}, \&o +n_media_loaded ); Wx::Event::EVT_BUTTON( $self, $self->{button}, \&on_media_load ); return $self; } sub on_media_loaded { my( $self, $event ) = @_; Wx::LogMessage( 'Media loaded, start playback' ); $self->{Ctl_Videos_Media}->Play; } sub on_media_load { my( $self, $event ) = @_; my $file = Wx::FileSelector( 'Choose a media file' ); if( length( $file ) ) { $self->{Ctl_Videos_Media}->LoadFile( $file ); } } package main; unless(caller){ local *Wx::App::OnInit = sub{1}; my $app = Wx::App->new(); Wx::InitAllImageHandlers(); my $frame_1 = MyFrame->new(); $app->SetTopWindow($frame_1); $frame_1->Show(1); $app->MainLoop(); }

Regards

Steve


In reply to Re: wxMediaCtrl running under Kubuntu 9.10 by Steve_BZ
in thread wxMediaCtrl running under Kubuntu 9.10 by Steve_BZ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.