Skip to main content

OH_VideoDecoder_SetDecryptionConfig

Function OH_VideoDecoder_SetDecryptionConfig 

Source
pub unsafe extern "C" fn OH_VideoDecoder_SetDecryptionConfig(
    codec: *mut OH_AVCodec,
    mediaKeySession: *mut MediaKeySession,
    secureVideoPath: bool,
) -> OH_AVErrCode
Available on crate feature api-11 only.
Expand description

Set decryption info.

Required System Capabilities: SystemCapability.Multimedia.Media.VideoDecoder

§Arguments

  • codec - Pointer to an OH_AVCodec instance

  • mediaKeySession - A media key session instance with decryption function.

  • secureVideoPath - Require secure decoder or not.

§Returns

  • [AV_ERR_OK] 0 - Success [AV_ERR_OPERATE_NOT_PERMIT] 2 - If the codec service or the media key session service is in wrong status. [AV_ERR_NO_MEMORY], instance has already released or no memory. [AV_ERR_INVALID_VAL] 3 - If the codec instance is nullptr or invalid, the mediaKeySession is nullptr or invalid.

Available since API-level: 11