summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-15 20:58:35 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-15 20:58:35 +0100
commit9500aadc219481d89d32e5c2a2de10b0740c50de (patch)
tree2555f3bf593f772637ecc135b90b8778869e48f2
parent7610f6e9ba8b92df6d18b94fcec982064dffacbd (diff)
parentdd7c19ea9d6be922faca57013b06b0f2b0787169 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1
Conflicts: .qmake.conf Change-Id: If5d9ea0fb6187bb6f74881289ebb15a57eb82e0c
-rw-r--r--src/plugins/common/evr/evrcustompresenter.cpp28
-rw-r--r--src/plugins/common/evr/evrcustompresenter.h4
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--tests/auto/integration/qaudiooutput/BLACKLIST1
-rw-r--r--tests/auto/integration/qmediaplayerbackend/BLACKLIST1
-rw-r--r--tests/auto/integration/qsoundeffect/BLACKLIST1
6 files changed, 13 insertions, 24 deletions
diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp
index e7508013a..9df08012a 100644
--- a/src/plugins/common/evr/evrcustompresenter.cpp
+++ b/src/plugins/common/evr/evrcustompresenter.cpp
@@ -254,6 +254,12 @@ HRESULT Scheduler::flush()
return S_OK;
}
+bool Scheduler::areSamplesScheduled()
+{
+ QMutexLocker locker(&m_mutex);
+ return m_scheduledSamples.count() > 0;
+}
+
HRESULT Scheduler::scheduleSample(IMFSample *sample, bool presentNow)
{
if (!m_schedulerThread)
@@ -447,7 +453,6 @@ DWORD Scheduler::schedulerThreadProcPrivate()
SamplePool::SamplePool()
: m_initialized(false)
- , m_pending(0)
{
}
@@ -474,8 +479,6 @@ HRESULT SamplePool::getSample(IMFSample **sample)
IMFSample *taken = m_videoSampleQueue.takeFirst();
- m_pending++;
-
// Give the sample to the caller.
*sample = taken;
(*sample)->AddRef();
@@ -495,25 +498,9 @@ HRESULT SamplePool::returnSample(IMFSample *sample)
m_videoSampleQueue.append(sample);
sample->AddRef();
- m_pending--;
-
return S_OK;
}
-BOOL SamplePool::areSamplesPending()
-{
- QMutexLocker locker(&m_mutex);
-
- bool ret = false;
-
- if (!m_initialized)
- ret = false;
- else
- ret = (m_pending > 0);
-
- return ret;
-}
-
HRESULT SamplePool::initialize(QList<IMFSample*> &samples)
{
QMutexLocker locker(&m_mutex);
@@ -546,7 +533,6 @@ HRESULT SamplePool::clear()
m_videoSampleQueue[i]->Release();
m_videoSampleQueue.clear();
m_initialized = false;
- m_pending = 0;
return S_OK;
}
@@ -1220,7 +1206,7 @@ HRESULT EVRCustomPresenter::checkEndOfStream()
return S_OK;
}
- if (m_samplePool.areSamplesPending()) {
+ if (m_scheduler.areSamplesScheduled()) {
// Samples are still scheduled for rendering.
return S_OK;
}
diff --git a/src/plugins/common/evr/evrcustompresenter.h b/src/plugins/common/evr/evrcustompresenter.h
index c5593ee41..67ae61991 100644
--- a/src/plugins/common/evr/evrcustompresenter.h
+++ b/src/plugins/common/evr/evrcustompresenter.h
@@ -137,6 +137,8 @@ public:
HRESULT processSample(IMFSample *sample, LONG *nextSleep);
HRESULT flush();
+ bool areSamplesScheduled();
+
// ThreadProc for the scheduler thread.
static DWORD WINAPI schedulerThreadProc(LPVOID parameter);
@@ -173,13 +175,11 @@ public:
HRESULT getSample(IMFSample **sample);
HRESULT returnSample(IMFSample *sample);
- BOOL areSamplesPending();
private:
QMutex m_mutex;
QList<IMFSample*> m_videoSampleQueue;
bool m_initialized;
- DWORD m_pending;
};
class EVRCustomPresenter
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index dc1979187..8b3322024 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -25,7 +25,7 @@ qnx:!blackberry {
SUBDIRS += qnx-audio
}
-win32:!winrt {
+win32:!winrt:!wince {
SUBDIRS += audiocapture \
windowsaudio
diff --git a/tests/auto/integration/qaudiooutput/BLACKLIST b/tests/auto/integration/qaudiooutput/BLACKLIST
index e640ef926..4d45efe06 100644
--- a/tests/auto/integration/qaudiooutput/BLACKLIST
+++ b/tests/auto/integration/qaudiooutput/BLACKLIST
@@ -1,4 +1,5 @@
[pullSuspendResume]
redhatenterpriselinuxworkstation-6.6
+rhel-7.1
ubuntu-14.04
opensuse-13.1 64bit
diff --git a/tests/auto/integration/qmediaplayerbackend/BLACKLIST b/tests/auto/integration/qmediaplayerbackend/BLACKLIST
index 9f0d4b746..b55c167ac 100644
--- a/tests/auto/integration/qmediaplayerbackend/BLACKLIST
+++ b/tests/auto/integration/qmediaplayerbackend/BLACKLIST
@@ -21,6 +21,7 @@ windows 64bit developer-build
[playPauseStop]
opensuse-13.1 64bit
redhatenterpriselinuxworkstation-6.6
+rhel-7.1
ubuntu-14.04 64bit
windows 64bit developer-build
diff --git a/tests/auto/integration/qsoundeffect/BLACKLIST b/tests/auto/integration/qsoundeffect/BLACKLIST
index f290cc8ff..1feeb4b5f 100644
--- a/tests/auto/integration/qsoundeffect/BLACKLIST
+++ b/tests/auto/integration/qsoundeffect/BLACKLIST
@@ -3,4 +3,5 @@
[testLooping]
ubuntu-14.04 64bit
redhatenterpriselinuxworkstation-6.6
+rhel-7.1
opensuse-13.1