git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72391
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
QTMovie *movie = [notification object];
long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute] longValue];
{
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
- 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
+ m_backend->FinishLoad();
IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
wxQTMediaBackend::wxQTMediaBackend() :
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];
// 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)
void wxQTMediaBackend::Move(int x, int y, int w, int h)
{
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)
}
bool wxQTMediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags)
+ [m_movieview setControllerVisible:YES];
+
[m_movieview setStepButtonsVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_STEP) ? YES:NO];
[m_movieview setVolumeButtonVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_VOLUME) ? YES:NO];
}
[m_movieview setStepButtonsVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_STEP) ? YES:NO];
[m_movieview setVolumeButtonVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_VOLUME) ? YES:NO];
}