Merge remote-tracking branch 'origin/5.3' into 5.4

Change-Id: I716fd3acb69e424047691069cd4a781f656d0487
This commit is contained in:
Frederik Gladhorn
2014-10-14 14:05:02 +02:00
2 changed files with 8 additions and 7 deletions

View File

@@ -70,7 +70,7 @@ void MmRendererPlayerVideoRendererControl::setSurface(QAbstractVideoSurface *sur
m_surface = QPointer<QAbstractVideoSurface>(surface);
if (QOpenGLContext::currentContext())
m_windowGrabber->checkForEglImageExtension();
else
else if (m_surface)
m_surface->setProperty("_q_GLThreadCallback", QVariant::fromValue<QObject*>(this));
}

View File

@@ -242,14 +242,19 @@ void MFPlayerSession::handleSourceError(long hr)
void MFPlayerSession::handleMediaSourceReady()
{
if (QMediaPlayer::LoadingMedia != m_status || !m_sourceResolver)
if (QMediaPlayer::LoadingMedia != m_status || !m_sourceResolver || m_sourceResolver != sender())
return;
#ifdef DEBUG_MEDIAFOUNDATION
qDebug() << "handleMediaSourceReady";
#endif
HRESULT hr = S_OK;
IMFPresentationDescriptor* sourcePD;
IMFMediaSource* mediaSource = m_sourceResolver->mediaSource();
DWORD dwCharacteristics = 0;
mediaSource->GetCharacteristics(&dwCharacteristics);
emit seekableUpdate(MFMEDIASOURCE_CAN_SEEK & dwCharacteristics);
IMFPresentationDescriptor* sourcePD;
hr = mediaSource->CreatePresentationDescriptor(&sourcePD);
if (SUCCEEDED(hr)) {
m_duration = 0;
@@ -1630,10 +1635,6 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
}
}
DWORD dwCharacteristics = 0;
m_sourceResolver->mediaSource()->GetCharacteristics(&dwCharacteristics);
emit seekableUpdate(MFMEDIASOURCE_CAN_SEEK & dwCharacteristics);
// Topology is resolved and successfuly set, this happens only after loading a new media.
// Make sure we always start the media from the beginning
m_varStart.vt = VT_I8;