{
QTMovie *movie = [notification object];
long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute] longValue];
- if (loadState >= QTMovieLoadStatePlayable)
+ if ( loadState == QTMovieLoadStateError )
{
- // the movie has loaded enough media data to begin playing
+ // error occurred
}
- else if (loadState >= QTMovieLoadStateLoaded)
+ else if (loadState >= QTMovieLoadStatePlayable)
{
- m_backend->FinishLoad();
+ // the movie has loaded enough media data to begin playing, but we don't have an event for that yet
}
- else if (loadState == -1)
+ else if (loadState >= QTMovieLoadStateComplete) // we might use QTMovieLoadStatePlaythroughOK
{
- // error occurred
+ m_backend->FinishLoad();
}
}
IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
wxQTMediaBackend::wxQTMediaBackend() :
- m_interfaceflags(wxMEDIACTRLPLAYERCONTROLS_NONE),
- m_movie(nil), m_movieview(nil)
+ m_movie(nil), m_movieview(nil),
+ m_interfaceflags(wxMEDIACTRLPLAYERCONTROLS_NONE)
{
}
// also check the load state here and finish our initialization if it has
// been loaded.
long loadState = [[m_movie attributeForKey:QTMovieLoadStateAttribute] longValue];
- if (loadState >= QTMovieLoadStateLoaded)
+ if (loadState >= QTMovieLoadStateComplete)
{
FinishLoad();
}
void wxQTMediaBackend::Move(int x, int y, int w, int h)
{
+ // as we have a native player, no need to move the video area
}
bool wxQTMediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags)
}
else
{
+ [m_movieview setControllerVisible:YES];
+
[m_movieview setStepButtonsVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_STEP) ? YES:NO];
[m_movieview setVolumeButtonVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_VOLUME) ? YES:NO];
}