git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30356
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- ::GoToBeginningOfMovie(m_movie);
- wxASSERT( ::GetMoviesError() == noErr );
wxMovieEvent theEvent(wxEVT_MOVIE_FINISHED, m_parent->GetId());
m_parent->GetParent()->ProcessEvent(theEvent);
}
wxMovieEvent theEvent(wxEVT_MOVIE_FINISHED, m_parent->GetId());
m_parent->GetParent()->ProcessEvent(theEvent);
}
bool wxMovieCtrl::Stop()
{
m_timer->SetPaused(false);
bool wxMovieCtrl::Stop()
{
m_timer->SetPaused(false);
::StopMovie(m_movie);
if(::GetMoviesError() != noErr)
return false;
::StopMovie(m_movie);
if(::GetMoviesError() != noErr)
return false;
- ::GoToBeginningOfMovie(m_movie);
+ ::GoToEndOfMovie(m_movie);
return ::GetMoviesError() == noErr;
}
return ::GetMoviesError() == noErr;
}
bool wxMovieCtrl::Seek(const wxTimeSpan& where)
{
TimeRecord theTimeRecord;
bool wxMovieCtrl::Seek(const wxTimeSpan& where)
{
TimeRecord theTimeRecord;
- theTimeRecord.value.lo = ((size_t)where.GetMilliseconds().ToLong()) * 10;
+ memset(&theTimeRecord, 0, sizeof(TimeRecord));
+ theTimeRecord.value.lo = ((size_t)where.GetMilliseconds().ToLong());
theTimeRecord.scale = ::GetMovieTimeScale(m_movie);
theTimeRecord.base = ::GetMovieTimeBase(m_movie);
::SetMovieTime(m_movie, &theTimeRecord);
theTimeRecord.scale = ::GetMovieTimeScale(m_movie);
theTimeRecord.base = ::GetMovieTimeBase(m_movie);
::SetMovieTime(m_movie, &theTimeRecord);
wxTimeSpan wxMovieCtrl::Tell()
{
wxTimeSpan wxMovieCtrl::Tell()
{
- return (wxTimeSpan) ::GetMovieTime(m_movie, NULL);
+ return wxTimeSpan(0,0,0, ::GetMovieTime(m_movie, NULL));
}
wxTimeSpan wxMovieCtrl::Length()
{
}
wxTimeSpan wxMovieCtrl::Length()
{
- return (wxTimeSpan) ::GetMovieDuration(m_movie);
+ return wxTimeSpan(0,0,0, ::GetMovieDuration(m_movie));
}
#endif // wxUSE_DATETIME
}
#endif // wxUSE_DATETIME
wxMovieCtrlState wxMovieCtrl::GetState()
{
if( m_timer->IsRunning() == true )
wxMovieCtrlState wxMovieCtrl::GetState()
{
if( m_timer->IsRunning() == true )
- return wxMOVIECTRL_STOPPED;
+ return wxMOVIECTRL_PLAYING;
if ( m_timer->GetPaused() == false )
if ( m_timer->GetPaused() == false )
- return wxMOVIECTRL_PLAYING;
+ return wxMOVIECTRL_STOPPED;
else
return wxMOVIECTRL_PAUSED;
}
else
return wxMOVIECTRL_PAUSED;
}