I’m seeing a strange issue with the MediaCtrl on Windows 10 using Python 3.7 and wxPython 4.1.1a1 daily builds.
When I create a MediaCtrl without specifying a backend on Windows, (i.e. self.mc = wx.media.MediaCtrl(self)), the assigned EVT_MEDIA_LOADED method never gets called. However, Seek() and Tell() agree nicely with each other, as they should.
But in my application, I need EVT_MEDIA_LOADED to work (Historically, users could select different backends on Windows, but that’s not really a thing any more.) When I add the szBackend parameter to my MediaCtrl specification, EVT_MEDIA_LOADED does get called, but if I Seek(), the media position is always set exactly 1 second before the correct position, as shown by a Tell() call and by actually playing the media file.
I’ve attached a sample program that demonstrates this. At the top of the file, you’ll need to adjust the WINFILE variable to point to a media file on your computer. The USE_BACKEND_ON_WIN variable determines whether the szBackend parameter is used or not for comparison purposes. The EVT_MEDIA_LOADED event shows the difference between a Seek() call and a Tell() call, and the Test button does a series of Seek()s and Tell()s and reports the results via print().
My first question is whether this is a wxPython issue or a wxWidgets issue. Based on our experience with macOS, I’d guess the later.
Thanks in advance for taking a look,
Video_wx_410.py (3.8 KB)