NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Video Decryptor (DRM) API

Detailed Description

Decrypts and re-encrypts video data with supported formats for the hardware in a video stream.

Data Structures

struct  NvMediaEncryptParams
 Holds encrypted metadata information that the parser passes to the video decoder component. More...
 
struct  NvMediaAESMetaData
 Holds re-encrypted data information that the video decoder returns to the parser. More...
 
struct  NvMediaAESIv
 Holds encryption intialization vector information. More...
 
struct  _NvMediaAESParams
 Holds encrypted metadata information that the client sends to the parser. More...
 
struct  NvMediaVideoDecrypter
 Holds the video decrypter object. More...
 

Macros

#define NVMEDIA_MAX_NALS
 max number of subsample support More...
 
#define NVMEDIA_VIDEO_DECRYPT_PROFILING
 Defines flags used for decryptor creation. More...
 

Typedefs

typedef struct _NvMediaAESParams NvMediaAESParams
 Holds encrypted metadata information that the client sends to the parser. More...
 

Enumerations

enum  NvMediaDRMType {
  NvMDRM_Netflix = 0,
  NvMDRM_Widevine = 1,
  NvMDRM_Ultraviolet,
  NvMDRM_Piff,
  NvMDRM_Marlin,
  NvMDRM_PiffCbc,
  NvMDRM_PiffCtr,
  NvMDRM_MarlinCbc,
  NvMDRM_MarlinCtr,
  NvMDRM_WidevineCtr,
  NvMDRM_Clear = 0xf,
  NvMDRM_ClearAsEncrypted,
  NvMDRM_None
}
 Defines the supported DRM formats. More...
 

Functions

NvMediaVideoDecrypterNvMediaVideoDecrypterCreate (NvMediaVideoCodec codec, uint32_t maxBitstreamSize, uint32_t flags, NvMediaDecoderInstanceId instanceId)
 Creates a video decrypter object. More...
 
void NvMediaVideoDecrypterDestroy (NvMediaVideoDecrypter *pDecrypter)
 Destroys a video decoder decrypter object. More...
 
NvMediaStatus NvMediaVideoDecryptHeader (NvMediaVideoDecrypter *pDecrypter, void *pictureData, const NvMediaBitstreamBuffer *pBitstream, NvMediaDecoderInstanceId instanceId)
 Decrypts the HDR of the encrypted content. More...
 
NvMediaStatus NvMediaVideoGetClearHeader (NvMediaVideoDecrypter *pDecrypter, void *pictureData)
 Gets clear header data after pass1. More...
 

Macro Definition Documentation

#define NVMEDIA_MAX_NALS

max number of subsample support

Definition at line 36 of file nvmedia_drm.h.

#define NVMEDIA_VIDEO_DECRYPT_PROFILING

Defines flags used for decryptor creation.

Definition at line 155 of file nvmedia_drm.h.

Typedef Documentation

Holds encrypted metadata information that the client sends to the parser.

See also
NvMediaParserSetEncryption()

Enumeration Type Documentation

Defines the supported DRM formats.

Enumerator
NvMDRM_Netflix 

drm format: Netflix

NvMDRM_Widevine 

drm format: Widevine

NvMDRM_Ultraviolet 

drm format: Ultravoilet

NvMDRM_Piff 

drm format: Piff

NvMDRM_Marlin 

drm format: Marlin

NvMDRM_PiffCbc 

drm format: Piff CBC

NvMDRM_PiffCtr 

drm format: Piff CTC

NvMDRM_MarlinCbc 

drm format: Marlin CBC

NvMDRM_MarlinCtr 

drm format: Marlin CTR

NvMDRM_WidevineCtr 

drm format: Widevine CTR

NvMDRM_Clear 

drm format: Clear data

NvMDRM_ClearAsEncrypted 

drm format: To tell clear data processing in secure buffer

NvMDRM_None 

drm format: None: This should be the last element

Definition at line 39 of file nvmedia_drm.h.

Function Documentation

NvMediaVideoDecrypter* NvMediaVideoDecrypterCreate ( NvMediaVideoCodec  codec,
uint32_t  maxBitstreamSize,
uint32_t  flags,
NvMediaDecoderInstanceId  instanceId 
)

Creates a video decrypter object.

Creates a NvMediaVideoDecrypter object for the specified codec NvMediaVideoCodec. Use NvMediaVideoDecrypterDestroy() to destroy this video decrypter object.

Parameters
[in]codecCodec type. The following types are supported:
[in]maxBitstreamSizeThe maximum size for bitstream. This limits internal allocations.
[in]flagsSet the flags of the decoder.
[in]instanceIdThe ID of the engine instance. The following instances are supported:
NVMEDIA_DECODER_INSTANCE_0
NVMEDIA_DECODER_INSTANCE_1
NVMEDIA_DECODER_INSTANCE_AUTO
Returns
NvMediaVideoDecrypter The new video decoder decrypter handle or NULL if unsuccessful.
void NvMediaVideoDecrypterDestroy ( NvMediaVideoDecrypter pDecrypter)

Destroys a video decoder decrypter object.

Parameters
[in]pDecrypterThe video decoder decrypter to be destroyed.
NvMediaStatus NvMediaVideoDecryptHeader ( NvMediaVideoDecrypter pDecrypter,
void *  pictureData,
const NvMediaBitstreamBuffer pBitstream,
NvMediaDecoderInstanceId  instanceId 
)

Decrypts the HDR of the encrypted content.

The NvMediaParserClientCb::DecryptHdr callback function calls this function.

Parameters
[in]pDecrypterA pointer to the decrypter object.
[in]pictureDataA pointer to NvMediaParserPictureData.
[in]pBitstreamA pointer to bitstream data.
[in]instanceIdThe ID of the engine instance. The following instances are supported if NVMEDIA_DECODER_INSTANCE_AUTO was used in NvMediaVideoDecoderCreateEx API, else this parameter is ignored:
NVMEDIA_DECODER_INSTANCE_0
NVMEDIA_DECODER_INSTANCE_1
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_ERROR
NvMediaStatus NvMediaVideoGetClearHeader ( NvMediaVideoDecrypter pDecrypter,
void *  pictureData 
)

Gets clear header data after pass1.

The NvMediaParserClientCb::GetClearHdr callback function calls this function. This is a blocking call, which means the output data is guaranteed to contain clear header data along with re-entrypted data for pass2.

Parameters
[in]pDecrypterThe decrypter object.
[out]pictureDataA pointer to NvMediaParserPictureData.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_ERROR