Hi Steve,

Somehow you have an auto/Wx/Media/Media.so installed that does not match your Wx build. Probably I would guess because you have needed to build from SVN to get the latest events etc and things have gone awry along the way.

To get things up and running:

Download latest Alien-wxWidgets from CPAN ( version 0.53 )

perl Build.PL --wxWidgets-extraflags="--enable-graphics_ctx --enable-mediactrl"

# note - you MUST build your own wxWidgets so answer 'yes' to that question. You can then select either 2.8.12 or 2.9.2 as your build choice.

perl Build
perl Build test
sudo perl Build install

Then

sudo cpan -if Wx

should get you a working Wx.

I've just tested on Ubuntu 10.04 building Wx against 2.8.12 and 2.9.2 wxWidgets and it all seems to work OK.

Last thing to mention to avoid possible grief - remember to ensure that PERL5LIB isn't set to something that will cause problems.

If you have your own working wxWidgets pre built then you can build / use Alien::wxWidgets with that, but Alien:wxWidgets needs to know where to find it. Ensure that your <wxWidgets-install-prefix>/bin is first on your path before you run 'perl Build.PL ....' and Alien::wxWidgets should find the wx-config for your custom build of wxWidgets and build against it accordingly.

Note that in <wxWidgets-install-prefix>/lib/wx/include/gtk-unicode-release-2.x/setup.h

you must have
#define wxUSE_MEDIACTRL 1

If this isn't there, you need to rebuild wxWidgets with the '--enable-mediactrl' flag


Hope it helps

Mark


On 28/10/2011 00:09, Steve Cookson via RT wrote:
Thu Oct 27 19:09:05 2011: Request 71996 was acted upon.
Transaction: Ticket created by steve.cook...@sca-uk.com
        Queue: Wx
      Subject: Wx::MediaCtrl EVT_MEDIA_PLAY error
    Broken in: 0.9902
     Severity: Normal
        Owner: Nobody
   Requestors: steve.cook...@sca-uk.com
       Status: new
  Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=71996>


Hi Mattia, Mark

This is taken from an entry I made on PerlMonks.

I'm running wxPerl with MediaCtrl under Kubuntu 10.04. It doesn't work
at all as far as I can see on 10.10+ but I'm looking into it.

I'm getting a strange error with the following line of Perl:

Wx::Event::EVT_MEDIA_PLAY( $i_frame, $i_frame->{Ctl_Media},
\&buttons_on_media_played );

Which gives me: Error while autoloading 'Wx::wxEVT_MEDIA_PLAY' at
/usr/local/lib/perl/5.10.1/Wx/Media.pm line 47

If I track through to the module in question, I find this stretch of code:

43 sub EVT_MEDIA_LOADED($$$) { $_[0]->Connect( $_[1], -1,
&Wx::wxEVT_MEDIA_LOADED, $_[2] ) }; 44 sub EVT_MEDIA_FINISHED($$$) {
$_[0]->Connect( $_[1], -1,&Wx::wxEVT +_MEDIA_FINISHED, $_[2] ) }; 45
sub EVT_MEDIA_STOP($$$) { $_[0]->Connect( $_[1], -1,
&Wx::wxEVT_MEDIA_STOP, $_[2] ) }; 46 sub EVT_MEDIA_PAUSE($$$) {
$_[0]->Connect( $_[1], -1,&Wx::wxEVT_ME +DIA_PAUSE, $_[2] ) }; 47 sub
EVT_MEDIA_PLAY($$$) { $_[0]->Connect( $_[1], -1,&Wx::wxEVT_MEDIA_PLAY,
$_[2] ) }; 48 sub EVT_MEDIA_STATECHANGED($$$) { $_[0]->Connect( $_[1],
-1,&Wx::wxEVT_MEDIA_STATECHANGED, $_[2] ) };

What have I got here? I'm guessing it might be a wrapping bug, or even a
GStreamer bug :(

What are your thoughts?

In the meantime I have written a little loop using ->GetState to test
the status and call buttons_on_media_played where appropriate.

It works a treat, although it seems a shame that the documented feature
doesn't work and it's a little heavy on CPU cycles.

Regards

Steve

Reply via email to