Steve_BZ has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
Update I should have said I'm running wxPerl with Media under Kubuntu.
I'm getting a strange error with:
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_M +EDIA_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_MED +IA_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_MED +IA_PLAY, $_[2] ) }; 48 sub EVT_MEDIA_STATECHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::w +xEVT_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?
Update It seems that I have two options, 1) Get this working properly, 2) write a little loop using ->GetState to test the status and call buttons_on_media_played where appropriate.
Update 2 Well I've gone with option 2). It works a treat, although it seems a shame that the documented feature doesn't work.
Regards
Steve
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: wxPerl EVT_MEDIA_PLAY error
by Anonymous Monk on Oct 27, 2011 at 17:49 UTC |