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


In reply to wxPerl EVT_MEDIA_PLAY error 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.