X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02b800ce7c2bb1c1f08075f22be2e7412124b47f..e86fbab1bade4c76243ab6552d0823989295cad5:/wxPython/src/media.i?ds=sidebyside diff --git a/wxPython/src/media.i b/wxPython/src/media.i index d811acb598..129284aeb0 100644 --- a/wxPython/src/media.i +++ b/wxPython/src/media.i @@ -31,8 +31,6 @@ %pythoncode { wx = _core } %pythoncode { __docfilter__ = wx.__DocFilter(globals()) } -%include _media_rename.i - //--------------------------------------------------------------------------- %typemap(in) wxLongLong { @@ -63,7 +61,14 @@ enum wxMediaCtrlPlayerControls wxMEDIACTRLPLAYERCONTROLS_DEFAULT }; - +static wxString wxMEDIABACKEND_DIRECTSHOW(wxEmptyString); +static wxString wxMEDIABACKEND_MCI (wxEmptyString); +static wxString wxMEDIABACKEND_QUICKTIME (wxEmptyString); +static wxString wxMEDIABACKEND_GSTREAMER (wxEmptyString); +static wxString wxMEDIABACKEND_REALPLAYER(wxEmptyString); +static wxString wxMEDIABACKEND_WMP10 (wxEmptyString); + + class wxMediaEvent : public wxNotifyEvent { public: @@ -118,10 +123,18 @@ public: bool Load(const wxString& fileName) { return false; } bool LoadURI(const wxString& fileName) { return false; } bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy) { return false; } + + wxFileOffset GetDownloadProgress() { return 0; } + wxFileOffset GetDownloadTotal() { return 0; } + }; const wxEventType wxEVT_MEDIA_FINISHED = 0; const wxEventType wxEVT_MEDIA_STOP = 0; +const wxEventType wxEVT_MEDIA_LOADED = 0; +const wxEventType wxEVT_MEDIA_STATECHANGED = 0; +const wxEventType wxEVT_MEDIA_PLAY = 0; +const wxEventType wxEVT_MEDIA_PAUSE = 0; #endif %} @@ -138,10 +151,21 @@ enum wxMediaState }; +enum wxMediaCtrlPlayerControls +{ + wxMEDIACTRLPLAYERCONTROLS_NONE, + wxMEDIACTRLPLAYERCONTROLS_STEP, + wxMEDIACTRLPLAYERCONTROLS_VOLUME, + wxMEDIACTRLPLAYERCONTROLS_DEFAULT +}; -// MAKE_CONST_WXSTRING(MEDIABACKEND_DIRECTSHOW); -// MAKE_CONST_WXSTRING(MEDIABACKEND_MCI ); -// MAKE_CONST_WXSTRING(MEDIABACKEND_QUICKTIME ); + +MAKE_CONST_WXSTRING(MEDIABACKEND_DIRECTSHOW); +MAKE_CONST_WXSTRING(MEDIABACKEND_MCI ); +MAKE_CONST_WXSTRING(MEDIABACKEND_QUICKTIME ); +MAKE_CONST_WXSTRING(MEDIABACKEND_GSTREAMER ); +MAKE_CONST_WXSTRING(MEDIABACKEND_REALPLAYER); +MAKE_CONST_WXSTRING(MEDIABACKEND_WMP10); //--------------------------------------------------------------------------- @@ -212,16 +236,34 @@ public: bool LoadURI(const wxString& fileName); bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy); %pythoncode { LoadFromURI = LoadURI } + + wxFileOffset GetDownloadProgress(); // DirectShow only + wxFileOffset GetDownloadTotal(); // DirectShow only + + %property(DownloadProgress, GetDownloadProgress, doc="See `GetDownloadProgress`"); + %property(DownloadTotal, GetDownloadTotal, doc="See `GetDownloadTotal`"); + %property(PlaybackRate, GetPlaybackRate, SetPlaybackRate, doc="See `GetPlaybackRate` and `SetPlaybackRate`"); + %property(State, GetState, doc="See `GetState`"); + %property(Volume, GetVolume, SetVolume, doc="See `GetVolume` and `SetVolume`"); }; %constant wxEventType wxEVT_MEDIA_FINISHED; %constant wxEventType wxEVT_MEDIA_STOP; +%constant wxEventType wxEVT_MEDIA_LOADED; +%constant wxEventType wxEVT_MEDIA_STATECHANGED; +%constant wxEventType wxEVT_MEDIA_PLAY; +%constant wxEventType wxEVT_MEDIA_PAUSE; + %pythoncode { -EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) -EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) +EVT_MEDIA_FINISHED = wx.PyEventBinder( wxEVT_MEDIA_FINISHED, 1) +EVT_MEDIA_STOP = wx.PyEventBinder( wxEVT_MEDIA_STOP, 1) +EVT_MEDIA_LOADED = wx.PyEventBinder( wxEVT_MEDIA_LOADED, 1) +EVT_MEDIA_STATECHANGED = wx.PyEventBinder( wxEVT_MEDIA_STATECHANGED, 1) +EVT_MEDIA_PLAY = wx.PyEventBinder( wxEVT_MEDIA_PLAY, 1) +EVT_MEDIA_PAUSE = wx.PyEventBinder( wxEVT_MEDIA_PAUSE, 1) } //---------------------------------------------------------------------------