wxMediaCtrl is a class for displaying types of media, such as videos, audio files, natively through native codecs.
wxMediaCtrl uses native backends to render media, for example on Windows there is a ActiveMovie/DirectShow backend, and on Macintosh there is a QuickTime backend.
Platform Specific Quirks
- Loading on windows may fail after the call to Load() but before the wxEVT_MEDIA_LOADED event is sent, and in this case the user will notified with a message dialog
- On Linux, the size of the video through GetBestSize() and the duration is not available until AFTER the media starts playing for a while
- GetBestSize() on mac with player controls enabled does not return the video size but instead returns the video size plus the size of the player controls
- Be sure to call Play() in wxEVT_MEDIA_LOADED and not right after Load() as on most platforms that won't work anymore
- The documentation at wxMediaCtrl is not up to date the second and third parameter of the constructor are switched. The windowId is the second parameter and the filename is the third.
To build wxWidgets with wxMediaCtrl enabled on linux (gstreamer 0.10) libgconf2-dev and libgstreamer0.10-dev are required.