I'm trying to replace Transana's custom media control code with wxMediaCtrl.
Transana currently runs on Windows and Mac, though wxMediaCtrl may buy us a
Linux version for the folks who've asked us about it. Mostly it's working
really well, but there are a few issues. Some I think just can't be done,
and some I just can't seem to figure out.
1. Is there a way to get the MediaCtrl to tell you the original dimensions
of a video it's loaded? Both Media Player and QuickTime provide methods for
this, but I don't see a way to access the information from wxMediaCtrl.
2. I can't seem to select the QuickTime player on Windows when I need it.
I can't find the right szBackend constant to pass in the Create() method.
There don't appear to be any wx.MEDIABACKEND_... constant definitions that I
can find. help(wx.media.MediaCtrl) suggests that I need to pass a string,
but I can't find a value that works.
3. ShowPlayerControls() works on Windows, but produces an AttributeError on
the Mac. "AttributeError: 'MediaCtrl' object has no attribute
'ShowPlayerControls'". Is there a way to show the player's controls on the
Mac?
4. ShowPlayerControls() on Windows is supposed to be able to take some
parameters or flags. How do I find out what the legal values are?
Specifically, I need to have the Player Control Buttons, but I'd prefer not
to have the status display area below the buttons. Media Player has a
method for setting "showdisplay = False" to turn this area off. Is there a
way to accomplish this using ShowPlayerControls()? Is there any way to do
it?
5. My current implementation loads a gif image into the media player when
my program starts to be displayed before a video file is selected. The
image doesn't display using wx.MediaCtrl. Also, when I load a movie using
the Load() method, the video's first frame isn't displayed until I call
"Play", unlike my current implementation. Any idea why not? (This is
obviously a small, cosmetic issue, but I'd like to be able to keep my
program's appearance consistent.)
I've attached a little Media Controller program for your convenience if
you'd like to see it. I need the capacity to control the video from other
windows, so I've separated the video presentation and the video controller,
and the choices I've made in this example match the requirements for
Transana.
Thanks in advance.
David K. Woods, Ph.D.
Transana Lead Developer
Wisconsin Center for Education Research
University of Wisconsin, Madison
http://www.transana.org
"Quick. Cheap. Good. Pick two."
video_crossplatform.py (9.71 KB)