Problems playing AVI file with wxMediaCtrl

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
mbeardsley
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu Sep 25, 2014 7:40 pm

Problems playing AVI file with wxMediaCtrl

Post by mbeardsley »

I'm trying to get an AVI file to play inside a wxFrame (this is on Win7 with VC10).

I can play the AVI file fine on my machine with the default windows player (so I know that I have the proper codecs installed).

But, if I try to play this in my window, I have a few problems:
1) The video will not play on the first call to Play(). It DOES play if I call Play() a second time.
2) When the video does play, there is no sound (adjusting the volume with SetVolume( 1.0 ) makes no difference).
3) I don't get the events triggering like I would expect. After calling Play() (the first time), I see a EVT_MEDIA_PLAY event, immediately followed by a EVT_MEDIA_STOP event. This may be why I have to call Play() a second time.
4) I NEVER see an EVT_MEDIA_LOADED or an EVT_MEDIA_FINISHED event at any time.

Furthermore, I see very similar behavior when I run the wxWidgets mediaplayer sample. I need to press the "play" button twice, no audio, and when I put in break points at all of the mediaplayer's event handlers, I see similar (unexpected and missing) event behavior.

I also tried this with a completely different MOV file and got the same results, so I do not believe that this is related to my media.

I did some searching, and found some comments that seem to be similar (or at least related) from a few years ago, but it is not clear if this is a known active bug or not.

Thanks,
Mark Beardsley
User avatar
doublemax
Moderator
Moderator
Posts: 19162
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problems playing AVI file with wxMediaCtrl

Post by doublemax »

wxWidgets version?

Also, which backend are you using? I don't know which the default is under Windows, so try both wxMEDIABACKEND_DIRECTSHOW and wxMEDIABACKEND_WMP10 and see if one of them works better.
Use the source, Luke!
mbeardsley
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu Sep 25, 2014 7:40 pm

Re: Problems playing AVI file with wxMediaCtrl

Post by mbeardsley »

Sorry, this is using wxWidgets 3.0.0

I believe the default is DirectShow, but I tried them both in the sample, and got basically the same results.
Post Reply