Cannot Rewind WVM in MediaCodec Mode

The solution previously checked in as 2e0e3 is re-introduced here. However,
the MediaCodec-compatible heuristic is not used unless WVM is in Crypto Plugin
(i.e. Media Codec) mode.

To repeat from last time: The problem here is that WVM cannot independently
seek the audio and video read heads, but the API assumes it can. WVM does the
right thing for AwesomePlayer-based playback (essentially ignoring audio
seeks) but the wrong thing for MediaCodec-based playback. For MediaCodec
mode, we should respect the first seek we get for a given destination and
ignore the second.

In this part, the new heuristic is reintroduced, but the old heuristic is
maintained for use in non-Crypto Plugin mode.

Bug: 6793514
Change-Id: I7ced2bf20af117a57eec27490b0920d906a8a684
This commit is contained in:
John "Juce" Bruce
2012-10-09 15:17:49 -07:00
parent 2316ae8825
commit e8cad9485c
2 changed files with 18 additions and 3 deletions

View File

@@ -26,7 +26,8 @@ class WVMFileSource;
class WVMMediaSource : public MediaSource {
public:
WVMMediaSource(WVSession *session, WVEsSelector esSelector,
const sp<MetaData> &metaData, bool isLive, bool cryptoPluginMode);
const sp<MetaData> &metaData, bool isLive,
bool cryptoPluginMode);
void delegateFileSource(sp<WVMFileSource> fileSource);
void delegateDataSource(sp<DataSource> dataSource);
@@ -76,6 +77,7 @@ protected:
private:
Mutex mLock;
static int64_t sLastSeekTimeUs;
WVSession *mSession;
WVEsSelector mESSelector; // indicates audio vs. video
@@ -88,6 +90,7 @@ private:
bool mNewSegment;
bool mCryptoInitialized;
bool mStripADTS;
bool mCryptoPluginMode;
MediaBufferGroup *mGroup;