diff options
author | vivek mehta <mvivek@codeaurora.org> | 2012-12-04 20:57:49 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2012-12-20 22:49:25 -0800 |
commit | 5b3f5c54f11adec2a2b0b747b9fc86678f32b8c7 (patch) | |
tree | 8d5c43ab82ebe2c4207a45fe9473422d30bb9648 /media/libstagefright | |
parent | 90d6cf79ae229671d3ef735a94d6e215e1a37c5e (diff) | |
download | frameworks_av-5b3f5c54f11adec2a2b0b747b9fc86678f32b8c7.zip frameworks_av-5b3f5c54f11adec2a2b0b747b9fc86678f32b8c7.tar.gz frameworks_av-5b3f5c54f11adec2a2b0b747b9fc86678f32b8c7.tar.bz2 |
libstagefright: Add support to seek to zero
- Add CAN_SEEK_TO_ZERO flag in MediaExtractor to allow
seek to zero, when previous button is pressed, for clip
that can't be seeked.
Change-Id: Ic2761cc5bac2403ee1339da77ad02fde942a3437
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 1e2625a..48b6371 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 The Android Open Source Project + * Copyright (c) 2012, The Linux Foundation. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1297,7 +1298,8 @@ status_t AwesomePlayer::getPosition(int64_t *positionUs) { status_t AwesomePlayer::seekTo(int64_t timeUs) { ATRACE_CALL(); - if (mExtractorFlags & MediaExtractor::CAN_SEEK) { + if (((timeUs == 0) && (mExtractorFlags & MediaExtractor::CAN_SEEK_TO_ZERO)) || + (mExtractorFlags & MediaExtractor::CAN_SEEK)) { Mutex::Autolock autoLock(mLock); return seekTo_l(timeUs); } |