wxMEDIASTATE_PLAYING
};
-enum wxMediaTimeFormat
-{
- wxMEDIATIMEFORMAT_TIME
-};
-
#define wxMEDIABACKEND_DIRECTSHOW wxT("wxAMMediaBackend")
#define wxMEDIABACKEND_MCI wxT("wxMCIMediaBackend")
#define wxMEDIABACKEND_QUICKTIME wxT("wxQTMediaBackend")
long style = 0,
const wxString& szBackend = wxT(""),
const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxT("mediaCtrl"));
+ const wxString& name = wxT("mediaCtrl")); //DirectShow only
bool DoCreate(wxClassInfo* instance,
wxWindow* parent, wxWindowID id,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxT("mediaCtrl"));
- static wxClassInfo* NextBackend();
-
-
bool Play();
bool Pause();
bool Stop();
bool Load(const wxString& fileName);
- bool Load(const wxURI& location);
+ bool Load(const wxURI& location); //DirectShow only
void Loop(bool bLoop = true);
bool IsLooped();
wxMediaState GetState();
- double GetPlaybackRate();
- bool SetPlaybackRate(double dRate);
+ double GetPlaybackRate(); //All but MCI
+ bool SetPlaybackRate(double dRate); //All but MCI
- bool SetPosition(wxLongLong where);
- wxLongLong GetPosition();
- wxLongLong GetDuration();
+ wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart);
+ wxFileOffset Tell(); //FIXME: This should be const
+ wxFileOffset Length(); //FIXME: This should be const
protected:
+ static wxClassInfo* NextBackend();
+
void OnMediaFinished(wxMediaEvent& evt);
virtual void DoMoveWindow(int x, int y, int w, int h);
wxSize DoGetBestSize() const;
//
// wxMediaBackend
//
-// Currently an internal class - API stability not gauranteed.
+// Currently an internal class - API stability not guaranteed.
//
// ----------------------------------------------------------------------------
#define wxMEDIA_STOP_ID 13001
//Define our event types - we need to call DEFINE_EVENT_TYPE(EVT) later
-DECLARE_LOCAL_EVENT_TYPE(wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID)
-DECLARE_LOCAL_EVENT_TYPE(wxEVT_MEDIA_STOP, wxMEDIA_STOP_ID)
+DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID)
+DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STOP, wxMEDIA_STOP_ID)
//Function type(s) our events need
typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);