wxMediaCtrl is a class that allows a way to convieniently display types of media, such as videos, audio files, natively through native codecs.
On Windows wxMediaCtrl uses DirectShow, and on Macintosh wxMediaCtrl uses QuickTime.
wxMediaCtrl is not currently available on unix systems.
Derived from
Include files
<wx/mediactrl.h>
Members
wxMediaCtrl::wxMediaCtrl
wxMediaCtrl::Create
wxMediaCtrl::GetDuration
wxMediaCtrl::GetPosition
wxMediaCtrl::GetState
wxMediaCtrl::Load
wxMediaCtrl::Pause
wxMediaCtrl::Play
wxMediaCtrl::SetPosition
wxMediaCtrl::Stop
wxMediaCtrl()
Default constructor - you must call Create before calling any other methods of wxMediaCtrl.
wxMediaCtrl(wxWindow* parent, wxWindowID id, const wxString& fileName, const wxString& label = wxT(""), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, long driver = 0, const wxString& name = wxPanelNameStr)
Constructor that calls Create. You may prefer to call Create directly to check to see if wxMediaCtrl is available on the system.
parent
bool Create(wxWindow* parent, wxWindowID id, const wxString& fileName, const wxString& label = wxT(""), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, long driver = 0, const wxString& name = wxPanelNameStr)
Creates this control. Returns false if it can't load the movie located at fileName or it cannot load one of its native backends.
parent
long GetDuration()
Obtains the length - the total amount of time the movie has in milliseconds.
long GetPosition()
Obtains the current position in time within the movie in milliseconds.
wxMediaCtrlState GetState()
Obtains the state the playback of the movie is in -
wxMEDIASTATE_STOPPED | The movie has stopped. |
wxMEDIASTATE_PAUSED | The movie is paused. |
wxMEDIASTATE_PLAYING | The movie is currently playing. |
bool Load(const wxString& fileName)
Loads the file that fileName refers to. Returns false if loading fails.
bool Pause()
Pauses playback of the movie.
bool Play()
Resumes playback of the movie.
bool SetPosition(long where)
Seeks to a position within the movie.
bool Stop()
Stops the media.