X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526ddb13e289be62ee1926c265138c0dea36fa56..3da93aae505563c359f58b357e6c79cd117c5320:/utils/wxMMedia2/lib/vidxanm.cpp diff --git a/utils/wxMMedia2/lib/vidxanm.cpp b/utils/wxMMedia2/lib/vidxanm.cpp index 09eebc2d57..522fad34b2 100644 --- a/utils/wxMMedia2/lib/vidxanm.cpp +++ b/utils/wxMMedia2/lib/vidxanm.cpp @@ -31,9 +31,7 @@ #include "vidbase.h" #include "vidxanm.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxVideoXANIM, wxVideoBaseDriver) -#endif wxVideoXANIM::wxVideoXANIM() : wxVideoBaseDriver() @@ -60,13 +58,13 @@ wxVideoXANIM::wxVideoXANIM(wxInputStream& str) wxVideoXANIM::~wxVideoXANIM() { if (m_xanim_started) - StopPlay(); + Stop(); delete m_internal; wxRemoveFile(m_filename); } -bool wxVideoXANIM::StartPlay() +bool wxVideoXANIM::Play() { if (!m_paused && m_xanim_started) return TRUE; @@ -75,7 +73,8 @@ bool wxVideoXANIM::StartPlay() return TRUE; } - if (SendCommand(" ")) { + // The movie starts with xanim + if (RestartXANIM()) { m_paused = FALSE; return TRUE; } @@ -100,15 +99,17 @@ bool wxVideoXANIM::Resume() return FALSE; } -void wxVideoXANIM::StopPlay() +bool wxVideoXANIM::Stop() { if (!m_xanim_started) - return; + return FALSE; SendCommand("q"); m_xanim_started = FALSE; m_paused = FALSE; + + return TRUE; } bool wxVideoXANIM::SetVolume(wxUint8 vol) @@ -127,6 +128,12 @@ bool wxVideoXANIM::Resize(wxUint16 WXUNUSED(w), wxUint16 WXUNUSED(h)) return FALSE; } +bool wxVideoXANIM::GetSize(wxSize& size) const +{ + // Not implemented + return FALSE; +} + bool wxVideoXANIM::IsCapable(wxVideoType v_type) { if (v_type == wxVIDEO_MSAVI || v_type == wxVIDEO_MPEG || @@ -142,7 +149,7 @@ bool wxVideoXANIM::AttachOutput(wxVideoOutput& out) if (!wxVideoBaseDriver::AttachOutput(out)) return FALSE; - return RestartXANIM(); + return TRUE; } void wxVideoXANIM::DetachOutput() @@ -229,7 +236,7 @@ bool wxVideoXANIM::RestartXANIM() // wxYield(); } -// m_paused = TRUE; + m_paused = FALSE; m_xanim_started = TRUE; return TRUE;