summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-08-12 21:25:48 -0700
committerChong Zhang <chz@google.com>2014-08-14 12:18:48 -0700
commit1228d6b175de8b21787cbe0c6c4bb5642f4d555e (patch)
tree187b3da8fd4c4d8b8131f3c3095f0d894863861a /media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
parente6e18e8de729316b3fac7733f9ebc7f1b3feba95 (diff)
downloadframeworks_av-1228d6b175de8b21787cbe0c6c4bb5642f4d555e.zip
frameworks_av-1228d6b175de8b21787cbe0c6c4bb5642f4d555e.tar.gz
frameworks_av-1228d6b175de8b21787cbe0c6c4bb5642f4d555e.tar.bz2
use dedicated looper for GenericSource
- handle setVideoSurface in deferred action, and return to client immediately - handle GenericSource's prepareAsync on its own looper, instead of sharing looper with NuPlayer - let HTTPLiveSource share looper with LiveSession, instead of NuPlayer - remove reflector in RTSPSource Bug: 16892748 Change-Id: I1aed557320052012065f5a90adbcb03c238da988
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
index e33e647..bf7542f 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp
@@ -34,7 +34,6 @@ NuPlayerDriver::NuPlayerDriver()
: mState(STATE_IDLE),
mIsAsyncPrepare(false),
mAsyncResult(UNKNOWN_ERROR),
- mSetSurfaceInProgress(false),
mDurationUs(-1),
mPositionUs(-1),
mNumFramesTotal(0),
@@ -135,10 +134,6 @@ status_t NuPlayerDriver::setVideoSurfaceTexture(
const sp<IGraphicBufferProducer> &bufferProducer) {
Mutex::Autolock autoLock(mLock);
- if (mSetSurfaceInProgress) {
- return INVALID_OPERATION;
- }
-
switch (mState) {
case STATE_SET_DATASOURCE_PENDING:
case STATE_RESET_IN_PROGRESS:
@@ -148,14 +143,8 @@ status_t NuPlayerDriver::setVideoSurfaceTexture(
break;
}
- mSetSurfaceInProgress = true;
-
mPlayer->setVideoSurfaceTextureAsync(bufferProducer);
- while (mSetSurfaceInProgress) {
- mCondition.wait(mLock);
- }
-
return OK;
}
@@ -483,15 +472,6 @@ void NuPlayerDriver::notifyResetComplete() {
mCondition.broadcast();
}
-void NuPlayerDriver::notifySetSurfaceComplete() {
- Mutex::Autolock autoLock(mLock);
-
- CHECK(mSetSurfaceInProgress);
- mSetSurfaceInProgress = false;
-
- mCondition.broadcast();
-}
-
void NuPlayerDriver::notifyDuration(int64_t durationUs) {
Mutex::Autolock autoLock(mLock);
mDurationUs = durationUs;