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

Commit 899d1a68 authored by Jeff Tinker's avatar Jeff Tinker Committed by Android (Google) Code Review
Browse files

Merge "Add a method to associate MediaDrm session with MediaCrypto"

parents 4b7bfa48 ac7d8fe3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -14,7 +14,9 @@
 * limitations under the License.
 */

#include <media/stagefright/MediaErrors.h>
#include <utils/Errors.h>
#include <utils/Vector.h>

#ifndef CRYPTO_API_H_

@@ -71,6 +73,16 @@ struct CryptoPlugin {

    virtual void notifyResolution(uint32_t /* width */, uint32_t /* height */) {}

    // A MediaDrm session may be associated with a MediaCrypto session.  The
    // associated MediaDrm session is used to load decryption keys
    // into the crypto/drm plugin.  The keys are then referenced by key-id
    // in the 'key' parameter to the decrypt() method.
    // Should return NO_ERROR on success, ERROR_DRM_SESSION_NOT_OPENED if
    // the session is not opened and a code from MediaErrors.h otherwise.
    virtual status_t setMediaDrmSession(const Vector<uint8_t> & /*sessionId */) {
        return ERROR_UNSUPPORTED;
    }

    // If the error returned falls into the range
    // ERROR_DRM_VENDOR_MIN..ERROR_DRM_VENDOR_MAX, errorDetailMsg should be
    // filled in with an appropriate string.