//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-IMPLEMENT_DYNAMIC_CLASS(wxAMMediaBackend, wxMediaBackend);
+IMPLEMENT_DYNAMIC_CLASS(wxAMMediaBackend, wxMediaBackend)
//---------------------------------------------------------------------------
// Usual debugging macros
if(m_pAX)
{
- m_pAX->DissociateHandle();
+ {
+ wxLogNull noLog;
+ m_pAX->DissociateHandle();
+ }
delete m_pAX;
m_pAM->Release();
void wxAMMediaBackend::Clear()
{
if(m_pTimer)
+ {
delete m_pTimer;
+ m_pTimer = NULL;
+ }
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool wxAMMediaBackend::Play()
{
- // if the movie isn't done loading yet
- // go into an sync getmessage loop until it is :)
- if(m_pMP)
- {
- MPReadyStateConstants nState;
- m_pMP->get_ReadyState(&nState);
- while(nState == mpReadyStateLoading && wxYieldIfNeeded())
- {
- m_pMP->get_ReadyState(&nState);
- }
- }
- else
- {
- IActiveMovie2* pAM2;
- ReadyStateConstants nState;
- if(m_pAM->QueryInterface(IID_IActiveMovie2, (void**)&pAM2) == 0 &&
- pAM2->get_ReadyState(&nState) == 0)
- {
- while(nState == amvLoading && wxYieldIfNeeded())
- {
- pAM2->get_ReadyState(&nState);
- }
- pAM2->Release();
- }
- }
-
- //Actually try to play the movie
+ // Actually try to play the movie, even though it may not be loaded yet.
HRESULT hr = m_pAM->Run();
if(SUCCEEDED(hr))
{
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-IMPLEMENT_DYNAMIC_CLASS(wxMCIMediaBackend, wxMediaBackend);
+IMPLEMENT_DYNAMIC_CLASS(wxMCIMediaBackend, wxMediaBackend)
//---------------------------------------------------------------------------
// Usual debugging macros for MCI returns
// with this backend are treated as playable anyway - not verifyed though.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
+IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend)
//Time between timer calls - this is the Apple recommondation to the TCL
//team I believe
//in source file that contains stuff you don't directly use
#include "wx/html/forcelnk.h"
-FORCE_LINK_ME(basewxmediabackends);
+FORCE_LINK_ME(basewxmediabackends)
//---------------------------------------------------------------------------
// End wxMediaCtrl Compilation Guard and this file