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

Commit 52afd94a authored by Lajos Molnar's avatar Lajos Molnar
Browse files

codec2: define secure mode SM_READ_PROTECTED_WITH_ENCRYPTED

This is for secure decoders that need to access the encrypred unprotected
compressed data e.g. because they do frame parsing outside of the trusted
environment.

Bug: 163444453
Change-Id: I18739796de085c0cf45cbcd06f2012efcd30950e
parent 6f7a1f3e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ enum C2ParamIndexKind : C2Param::type_index_t {

    /* protected content */
    kParamIndexSecureMode,
    kParamIndexEncryptedBuffer, // info-buffer, used with SM_READ_PROTECTED_WITH_ENCRYPTED

    // deprecated
    kParamIndexDelayRequest = kParamIndexDelay | C2Param::CoreIndex::IS_REQUEST_FLAG,
@@ -1144,6 +1145,8 @@ constexpr char C2_PARAMKEY_PRIORITY[] = "algo.priority";
C2ENUM(C2Config::secure_mode_t, uint32_t,
    SM_UNPROTECTED,    ///< no content protection
    SM_READ_PROTECTED, ///< input and output buffers shall be protected from reading
    /// both read protected and readable encrypted buffers are used
    SM_READ_PROTECTED_WITH_ENCRYPTED,
)

typedef C2GlobalParam<C2Tuning, C2SimpleValueStruct<C2Config::secure_mode_t>, kParamIndexSecureMode>