NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

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...
 

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

NvMediaVideoDecrypter * NvMediaVideoDecrypterCreate (NvMediaVideoCodec codec, uint32_t maxBitstreamSize, uint32_t flags, NvMediaDecoderInstanceId instanceId)
 Creates a video decrypter object. More...
 
void NvMediaVideoDecrypterDestroy (const NvMediaVideoDecrypter *pDecrypter)
 Destroys a video decoder decrypter object. More...
 
NvMediaStatus NvMediaVideoDecryptHeader (const NvMediaVideoDecrypter *pDecrypter, const 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

◆ NVMEDIA_MAX_NALS

#define NVMEDIA_MAX_NALS

max number of subsample support

  • Maturity: GA

Definition at line 48 of file nvmedia_drm.h.

◆ NVMEDIA_VIDEO_DECRYPT_PROFILING

#define NVMEDIA_VIDEO_DECRYPT_PROFILING

Defines flags used for decryptor creation.

  • Maturity: GA

Definition at line 175 of file nvmedia_drm.h.

Enumeration Type Documentation

◆ NvMediaDRMType

Defines the supported DRM formats.

  • Maturity: GA
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 53 of file nvmedia_drm.h.

Function Documentation

◆ NvMediaVideoDecrypterCreate()

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.

Precondition
NvMediaIDEGetVersion()
NvMediaIDENvSciSyncGetVersion()
Postcondition
NvMediaVideoDecrypter Instance that was created.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: No
    • Reinit/Deinit Preparation: No
  • Maturity: GA
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:
Returns
NvMediaVideoDecrypter The new video decoder decrypter handle or NULL if unsuccessful.

◆ NvMediaVideoDecrypterDestroy()

void NvMediaVideoDecrypterDestroy ( const NvMediaVideoDecrypter *  pDecrypter)

Destroys a video decoder decrypter object.

Precondition
NvMediaVideoDecrypterCreate which creates the instance
Postcondition
None


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: No
    • Operational: No
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA
Parameters
[in]pDecrypterThe video decoder decrypter to be destroyed.

◆ NvMediaVideoDecryptHeader()

NvMediaStatus NvMediaVideoDecryptHeader ( const NvMediaVideoDecrypter *  pDecrypter,
const void *  pictureData,
const NvMediaBitstreamBuffer *  pBitstream,
NvMediaDecoderInstanceId  instanceId 
)

Decrypts the HDR of the encrypted content.

The NvMediaParserClientCb::DecryptHdr callback function calls this function.

Precondition
NvMediaVideoDecrypterCreate which creates the instance
instanceID for NVDEC.
Postcondition
NvMediaStatus True or False


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA
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 NvMediaIDECreate API, else this parameter is ignored:
Returns
NvMediaStatus The completion status of the operation. Possible values are:

◆ NvMediaVideoGetClearHeader()

NvMediaStatus NvMediaVideoGetClearHeader ( NvMediaVideoDecrypter *  pDecrypter,
void *  pictureData 
)

Gets clear header data after pass1.

Precondition
NvMediaVideoDecrypterCreate which creates the instance
Call to NvMediaVideoDecryptHeader
Postcondition
Clear Header information that is width, height and codec type etc.


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: No
    • Thread-safe: No
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA

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: