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

Commit ed709d00 authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Expose an API to run the WV extractor in crypto plugin mode.

Provides compatibility with the MediaCodec model.

Change-Id: I76f2c7d1e9d2cfc3e76b531ac9b2cf66aa6a4327
related-to-bug: 5986621
parent 0756aa99
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -127,6 +127,12 @@ void WVMExtractor::setAdaptiveStreamingMode(bool adaptive) {
    }
}

void WVMExtractor::setCryptoPluginMode(bool cryptoPluginMode) {
    if (mImpl != NULL) {
        mImpl->setCryptoPluginMode(cryptoPluginMode);
    }
}

void WVMExtractor::setUID(uid_t uid) {
    if (mImpl != NULL) {
        mImpl->setUID(uid);
+7 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ public:

    virtual int64_t getCachedDurationUs(status_t *finalStatus) = 0;
    virtual void setAdaptiveStreamingMode(bool adaptive) = 0;
    virtual void setCryptoPluginMode(bool cryptoPluginMode) = 0;
    virtual void setUID(uid_t uid) = 0;
};

@@ -61,6 +62,12 @@ public:
    // is used.
    void setAdaptiveStreamingMode(bool adaptive);

    // setCryptoPluginMode(true) to select crypto plugin mode.
    // In this mode, the extractor returns encrypted data for use
    // with the MediaCodec model, which handles the decryption in the
    // codec.
    void setCryptoPluginMode(bool cryptoPluginMode);

    void setUID(uid_t uid);

    static bool getVendorLibHandle();