Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8b00037 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Opt in to the WVM extractor's secondary (cryptoPlugin) mode." into jb-dev

parents e6d7f46c 94c1c8c9
Loading
Loading
Loading
Loading
+14 −0
Original line number Original line Diff line number Diff line
@@ -98,6 +98,20 @@ status_t NuMediaExtractor::setDataSource(
        return ERROR_UNSUPPORTED;
        return ERROR_UNSUPPORTED;
    }
    }


    sp<MetaData> fileMeta = mImpl->getMetaData();
    const char *containerMime;
    if (fileMeta != NULL
            && fileMeta->findCString(kKeyMIMEType, &containerMime)
            && !strcasecmp(containerMime, "video/wvm")) {
        // We always want to use "cryptoPluginMode" when using the wvm
        // extractor. We can tell that it is this extractor by looking
        // at the container mime type.
        // The cryptoPluginMode ensures that the extractor will actually
        // give us data in a call to MediaSource::read(), unlike its
        // default mode that we use from AwesomePlayer.
        static_cast<WVMExtractor *>(mImpl.get())->setCryptoPluginMode(true);
    }

    mDataSource = dataSource;
    mDataSource = dataSource;


    updateDurationAndBitrate();
    updateDurationAndBitrate();