Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.4 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

    Detailed Description

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

    6

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

    Definition at line 47 of file nvmedia_drm.h.

    ◆ NVMEDIA_VIDEO_DECRYPT_PROFILING

    #define NVMEDIA_VIDEO_DECRYPT_PROFILING

    Defines flags used for decryptor creation.

    Definition at line 166 of file nvmedia_drm.h.

    Typedef Documentation

    ◆ NvMediaAESParams

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

    See also
    NvMediaParserSetEncryption()

    Enumeration Type Documentation

    ◆ NvMediaDRMType

    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 50 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
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    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
    • API group
      • Init: No
      • Runtime: No
      • De-Init: Yes
    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
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No
    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
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    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:
    人人超碰97caoporen国产