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

Commit 94c1c8c9 authored by Andreas Huber's avatar Andreas Huber
Browse files

Opt in to the WVM extractor's secondary (cryptoPlugin) mode.

Change-Id: If0abec6e34b20b59ee2fc5bd97573a73d68465f0
related-to-bug: 6276111
parent 0756aa99
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();