summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/WVMExtractor.cpp
diff options
context:
space:
mode:
authorJeffrey Tinker <jtinker@google.com>2011-05-21 18:19:17 -0700
committerJeffrey Tinker <jtinker@google.com>2011-05-23 11:09:16 -0700
commitcd0b0fe858a9f109281031717d5c0001953b9054 (patch)
treeea40303fc3c65d365206fdad9655b39748b804dc /media/libstagefright/WVMExtractor.cpp
parent5a4e4804aa5340a4cf7ef4250d31fd901f53ddb2 (diff)
downloadframeworks_av-cd0b0fe858a9f109281031717d5c0001953b9054.zip
frameworks_av-cd0b0fe858a9f109281031717d5c0001953b9054.tar.gz
frameworks_av-cd0b0fe858a9f109281031717d5c0001953b9054.tar.bz2
Multi-repository checkin, goes with https://android-git.corp.google.com/g/111038
Fix for b/4198446 HC - Support for Widevine Adaptive VOD Change-Id: Ia777c80825e3416bab6ae6273fba46a194135e60
Diffstat (limited to 'media/libstagefright/WVMExtractor.cpp')
-rw-r--r--media/libstagefright/WVMExtractor.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp
index 83a1eaa..26eda0c 100644
--- a/media/libstagefright/WVMExtractor.cpp
+++ b/media/libstagefright/WVMExtractor.cpp
@@ -45,8 +45,7 @@ namespace android {
static Mutex gWVMutex;
WVMExtractor::WVMExtractor(const sp<DataSource> &source)
- : mDataSource(source),
- mUseAdaptiveStreaming(false) {
+ : mDataSource(source) {
{
Mutex::Autolock autoLock(gWVMutex);
if (gVendorLibHandle == NULL) {
@@ -59,13 +58,12 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source)
}
}
- typedef MediaExtractor *(*GetInstanceFunc)(sp<DataSource>);
+ typedef WVMLoadableExtractor *(*GetInstanceFunc)(sp<DataSource>);
GetInstanceFunc getInstanceFunc =
(GetInstanceFunc) dlsym(gVendorLibHandle,
"_ZN7android11GetInstanceENS_2spINS_10DataSourceEEE");
if (getInstanceFunc) {
- LOGD("Calling GetInstanceFunc");
mImpl = (*getInstanceFunc)(source);
CHECK(mImpl != NULL);
} else {
@@ -102,19 +100,17 @@ sp<MetaData> WVMExtractor::getMetaData() {
}
int64_t WVMExtractor::getCachedDurationUs(status_t *finalStatus) {
- // TODO: Fill this with life.
-
- *finalStatus = OK;
+ if (mImpl == NULL) {
+ return 0;
+ }
- return 0;
+ return mImpl->getCachedDurationUs(finalStatus);
}
void WVMExtractor::setAdaptiveStreamingMode(bool adaptive) {
- mUseAdaptiveStreaming = adaptive;
-}
-
-bool WVMExtractor::getAdaptiveStreamingMode() const {
- return mUseAdaptiveStreaming;
+ if (mImpl != NULL) {
+ mImpl->setAdaptiveStreamingMode(adaptive);
+ }
}
} //namespace android