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
nvmedia_drm.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
8 
9 #ifndef _NVMEDIA_DRM_H
10 #define _NVMEDIA_DRM_H
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
36 #define NVMEDIA_MAX_NALS 32
37 
39 typedef enum {
61  NvMDRM_Clear = 0xf,
67 
71 typedef struct
72 {
76  uint32_t uDrmMode;
78  uint32_t InitVector[NVMEDIA_MAX_NALS][4];
80  uint32_t IvValid[NVMEDIA_MAX_NALS];
84  uint32_t uEncryptBlkCnt;
86  uint32_t uSkipBlkCnt;
88  uint32_t uNumNals;
90  uint32_t KeySlotNumber;
92  uint32_t BOED[NVMEDIA_MAX_NALS];
94  uint32_t BOCD[NVMEDIA_MAX_NALS];
98  uint32_t non_slice_data;
100 
106 typedef struct {
110  uint8_t *pClearHeaderPtr;
114 
116 typedef struct {
118  uint8_t IV[16];
121 } NvMediaAESIv;
122 
127 typedef struct _NvMediaAESParams
128 {
130  uint32_t uDrmMode;
132  uint8_t *pIV;
134  uint32_t uEncryptBlkCnt;
136  uint32_t uSkipBlkCnt;
138  uint32_t KeySlotNumber;
140  uint32_t *pBOED;
142  uint32_t *pBOCD;
144  uint32_t uMetadataCount;
150 
155 #define NVMEDIA_VIDEO_DECRYPT_PROFILING (1<<0)
156 
158 typedef struct {
162  uint32_t hwClockValue;
164 
190  NvMediaVideoCodec codec,
191  uint32_t maxBitstreamSize,
192  uint32_t flags,
193  NvMediaDecoderInstanceId instanceId
194 );
195 
199 void
201  NvMediaVideoDecrypter *pDecrypter
202 );
203 
204 
225  NvMediaVideoDecrypter *pDecrypter,
226  void *pictureData,
227  const NvMediaBitstreamBuffer *pBitstream,
228  NvMediaDecoderInstanceId instanceId
229 );
230 
231 
248  NvMediaVideoDecrypter *pDecrypter,
249  void *pictureData
250 );
251 
254 #ifdef __cplusplus
255 }; /* extern "C" */
256 #endif
257 
258 #endif /* _NVMEDIA_DRM_H */
drm format: Clear data
Definition: nvmedia_drm.h:61
NvMediaDRMType
Defines the supported DRM formats.
Definition: nvmedia_drm.h:39
Holds an application data buffer containing compressed video data.
uint32_t * AesPass1OutputBuffer
encrypted metadata buffer of pass1
Definition: nvmedia_drm.h:96
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
NvMediaDecoderInstanceId
Specifies the decoder instance ID.
Holds encrypted metadata information that the parser passes to the video decoder component.
Definition: nvmedia_drm.h:71
drm format: Marlin CBC
Definition: nvmedia_drm.h:55
drm format: To tell clear data processing in secure buffer
Definition: nvmedia_drm.h:63
uint32_t * pBOCD
pointer to bytes of clear data for subsamples
Definition: nvmedia_drm.h:142
Holds re-encrypted data information that the video decoder returns to the parser. ...
Definition: nvmedia_drm.h:106
uint32_t uNumNals
total number of subsamples for given buffer
Definition: nvmedia_drm.h:88
uint32_t uBytesOfEncryptedData
total bytes of encrypted data in input buffer
Definition: nvmedia_drm.h:82
Holds the video decrypter object.
Definition: nvmedia_drm.h:158
uint32_t uDrmMode
drm mode of encrypted content
Definition: nvmedia_drm.h:130
uint32_t uDrmMode
drm mode of encrypted content.
Definition: nvmedia_drm.h:76
Holds encryption intialization vector information.
Definition: nvmedia_drm.h:116
NvMediaVideoDecrypter * NvMediaVideoDecrypterCreate(NvMediaVideoCodec codec, uint32_t maxBitstreamSize, uint32_t flags, NvMediaDecoderInstanceId instanceId)
Creates a video decrypter object.
struct _NvMediaAESParams NvMediaAESParams
Holds encrypted metadata information that the client sends to the parser.
NvMediaStatus NvMediaVideoDecryptHeader(NvMediaVideoDecrypter *pDecrypter, void *pictureData, const NvMediaBitstreamBuffer *pBitstream, NvMediaDecoderInstanceId instanceId)
Decrypts the HDR of the encrypted content.
uint32_t * pAesPass1OutputBuffer
encrypted metadata struture pointer after pass1
Definition: nvmedia_drm.h:112
uint8_t * pClearHeaderPtr
clear hdr pointer to buffer after pass1
Definition: nvmedia_drm.h:110
uint32_t uNonAlignedOffset
non aligned offset for encrypted buffer
Definition: nvmedia_drm.h:146
NvMediaVideoCodec eCodec
Codec type.
Definition: nvmedia_drm.h:160
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:178
drm format: Piff CTC
Definition: nvmedia_drm.h:53
drm format: None: This should be the last element
Definition: nvmedia_drm.h:65
uint32_t non_slice_data
bytes of non slice data in input buffer
Definition: nvmedia_drm.h:98
drm format: Widevine
Definition: nvmedia_drm.h:43
drm format: Marlin CTR
Definition: nvmedia_drm.h:57
drm format: Piff CBC
Definition: nvmedia_drm.h:51
uint32_t uSkipBlkCnt
skip blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:136
drm format: Marlin
Definition: nvmedia_drm.h:49
uint32_t uClearHeaderSize
clear hdr side after pass1
Definition: nvmedia_drm.h:108
uint32_t * pBOED
pointer to bytes of encrypted data for subsamples
Definition: nvmedia_drm.h:140
#define NVMEDIA_MAX_NALS
max number of subsample support
Definition: nvmedia_drm.h:36
NvMediaBool bIvValid
intialization vector present or not
Definition: nvmedia_drm.h:120
NvMediaBool enableEncryption
Flag that specifies whether the buffer is encrypted.
Definition: nvmedia_drm.h:74
NvMediaVideoCodec
Video codec type.
uint32_t uSkipBlkCnt
skip blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:86
Holds encrypted metadata information that the client sends to the parser.
Definition: nvmedia_drm.h:127
uint32_t KeySlotNumber
keyslot number used where content key is written
Definition: nvmedia_drm.h:90
uint8_t * pIV
pointer to intialization vector array
Definition: nvmedia_drm.h:132
drm format: Widevine CTR
Definition: nvmedia_drm.h:59
drm format: Piff
Definition: nvmedia_drm.h:47
uint32_t uEncryptBlkCnt
encrypt blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:134
drm format: Netflix
Definition: nvmedia_drm.h:41
uint32_t KeySlotNumber
keyslot number used where content key is written
Definition: nvmedia_drm.h:138
uint32_t hwClockValue
pass hw decode clock value for otf case
Definition: nvmedia_drm.h:162
drm format: Ultravoilet
Definition: nvmedia_drm.h:45
void NvMediaVideoDecrypterDestroy(NvMediaVideoDecrypter *pDecrypter)
Destroys a video decoder decrypter object.
uint32_t uMetadataCount
total number of subsamples for given buffer
Definition: nvmedia_drm.h:144
NvMediaStatus NvMediaVideoGetClearHeader(NvMediaVideoDecrypter *pDecrypter, void *pictureData)
Gets clear header data after pass1.
NvMediaAESIv IvSet[NVMEDIA_MAX_NALS]
initialization vector array
Definition: nvmedia_drm.h:148
uint32_t uEncryptBlkCnt
encrypt blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:84