summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-12-15 19:24:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-15 19:24:26 +0000
commita0b3a0a46dc42eafe620ffd053604515bbd9ca9a (patch)
treeecc06c27de37c7b561e86e90a9a996617a9454dc /media
parentaff13ad4e639316bca12827d68a4f0a6ac54cd02 (diff)
parent6e430fbd927b9cc043639eb728ddc921392a60e8 (diff)
downloadframeworks_av-a0b3a0a46dc42eafe620ffd053604515bbd9ca9a.zip
frameworks_av-a0b3a0a46dc42eafe620ffd053604515bbd9ca9a.tar.gz
frameworks_av-a0b3a0a46dc42eafe620ffd053604515bbd9ca9a.tar.bz2
am 6e430fbd: Merge "NuPlayer: send NOT_SEEKABLE media info to client when the source is not seekable." into lmp-mr1-dev
* commit '6e430fbd927b9cc043639eb728ddc921392a60e8': NuPlayer: send NOT_SEEKABLE media info to client when the source is not seekable.
Diffstat (limited to 'media')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp4
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 080cd52..a28591e 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1667,6 +1667,10 @@ void NuPlayer::onSourceNotify(const sp<AMessage> &msg) {
sp<NuPlayerDriver> driver = mDriver.promote();
if (driver != NULL) {
+ if ((flags & NuPlayer::Source::FLAG_CAN_SEEK) == 0) {
+ driver->notifyListener(
+ MEDIA_INFO, MEDIA_INFO_NOT_SEEKABLE, 0);
+ }
driver->notifyFlagsChanged(flags);
}
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index 5eb4652..0b18666 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -1109,11 +1109,11 @@ status_t LiveSession::onSeek(const sp<AMessage> &msg) {
}
status_t LiveSession::getDuration(int64_t *durationUs) const {
- int64_t maxDurationUs = 0ll;
+ int64_t maxDurationUs = -1ll;
for (size_t i = 0; i < mFetcherInfos.size(); ++i) {
int64_t fetcherDurationUs = mFetcherInfos.valueAt(i).mDurationUs;
- if (fetcherDurationUs >= 0ll && fetcherDurationUs > maxDurationUs) {
+ if (fetcherDurationUs > maxDurationUs) {
maxDurationUs = fetcherDurationUs;
}
}