#include "vidbase.h"
#include "vidxanm.h"
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxVideoXANIM, wxVideoBaseDriver)
-#endif
wxVideoXANIM::wxVideoXANIM()
: wxVideoBaseDriver()
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;
return TRUE;
}
- if (SendCommand(" ")) {
+ // The movie starts with xanim
+ if (RestartXANIM()) {
m_paused = FALSE;
return TRUE;
}
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)
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 ||
if (!wxVideoBaseDriver::AttachOutput(out))
return FALSE;
- return RestartXANIM();
+ return TRUE;
}
void wxVideoXANIM::DetachOutput()
// wxYield();
}
-// m_paused = TRUE;
+ m_paused = FALSE;
m_xanim_started = TRUE;
return TRUE;