diff options
author | Chong Zhang <chz@google.com> | 2013-09-11 12:52:43 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2013-09-11 17:58:54 -0700 |
commit | 4b7069dac546ad21cf62ca6132d50ea41857d08e (patch) | |
tree | a692fbb194536dcd7ee4f8e7681e7a36143267d5 /media | |
parent | c728c580fc512b50604f33f1c4581c500062b245 (diff) | |
download | frameworks_av-4b7069dac546ad21cf62ca6132d50ea41857d08e.zip frameworks_av-4b7069dac546ad21cf62ca6132d50ea41857d08e.tar.gz frameworks_av-4b7069dac546ad21cf62ca6132d50ea41857d08e.tar.bz2 |
Add FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flags
Also update seek flag in NuPlayerDriver, otherwise MediaPlayer will
get wrong flags.
Bug: 10676387
Change-Id: Ice30f27a9a04e37b4718d26228a407fea8d9e4fc
Diffstat (limited to 'media')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 5 | ||||
-rw-r--r-- | media/libmediaplayerservice/nuplayer/RTSPSource.cpp | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index e1735fa..750287f 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -1396,6 +1396,11 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) { uint32_t flags; CHECK(msg->findInt32("flags", (int32_t *)&flags)); + sp<NuPlayerDriver> driver = mDriver.promote(); + if (driver != NULL) { + driver->notifyFlagsChanged(flags); + } + if ((mSourceFlags & Source::FLAG_DYNAMIC_DURATION) && (!(flags & Source::FLAG_DYNAMIC_DURATION))) { cancelPollDuration(); diff --git a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp index 3385a19..18cf6d1 100644 --- a/media/libmediaplayerservice/nuplayer/RTSPSource.cpp +++ b/media/libmediaplayerservice/nuplayer/RTSPSource.cpp @@ -358,11 +358,10 @@ void NuPlayer::RTSPSource::onMessageReceived(const sp<AMessage> &msg) { uint32_t flags = 0; if (mHandler->isSeekable()) { - flags = FLAG_CAN_PAUSE | FLAG_CAN_SEEK; - - // Seeking 10secs forward or backward is a very expensive - // operation for rtsp, so let's not enable that. - // The user can always use the seek bar. + flags = FLAG_CAN_PAUSE + | FLAG_CAN_SEEK + | FLAG_CAN_SEEK_BACKWARD + | FLAG_CAN_SEEK_FORWARD; } notifyFlagsChanged(flags); |