NVIDIA DRIVE OS Linux API Reference Release
For Test and Development only

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019, 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  */
9 #ifndef NVMEDIA_DRM_H
10 #define NVMEDIA_DRM_H
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
16 #include "nvmedia_common.h"
17 #include "nvmedia_core.h"
39 #define NVMEDIA_MAX_NALS 32
42 typedef enum {
64  NvMDRM_Clear = 0xf,
74 typedef struct
75 {
79  uint32_t uDrmMode;
81  uint32_t InitVector[NVMEDIA_MAX_NALS][4];
83  uint32_t IvValid[NVMEDIA_MAX_NALS];
87  uint32_t uEncryptBlkCnt;
89  uint32_t uSkipBlkCnt;
91  uint32_t uNumNals;
93  uint32_t KeySlotNumber;
95  uint32_t BOED[NVMEDIA_MAX_NALS];
97  uint32_t BOCD[NVMEDIA_MAX_NALS];
101  uint32_t non_slice_data;
109 typedef struct {
113  uint8_t *pClearHeaderPtr;
119 typedef struct {
121  uint8_t IV[16];
124 } NvMediaAESIv;
130 typedef struct _NvMediaAESParams
131 {
133  uint32_t uDrmMode;
135  uint8_t *pIV;
137  uint32_t uEncryptBlkCnt;
139  uint32_t uSkipBlkCnt;
141  uint32_t KeySlotNumber;
143  uint32_t *pBOED;
145  uint32_t *pBOCD;
147  uint32_t uMetadataCount;
161 typedef struct {
165  uint32_t hwClockValue;
193  NvMediaVideoCodec codec,
194  uint32_t maxBitstreamSize,
195  uint32_t flags,
196  NvMediaDecoderInstanceId instanceId
197 );
202 void
204  const NvMediaVideoDecrypter *pDecrypter
205 );
228  const NvMediaVideoDecrypter *pDecrypter,
229  const void *pictureData,
230  const NvMediaBitstreamBuffer *pBitstream,
231  NvMediaDecoderInstanceId instanceId
232 );
251  NvMediaVideoDecrypter *pDecrypter,
252  void *pictureData
253 );
257 #ifdef __cplusplus
258 }; /* extern "C" */
259 #endif
261 #endif /* NVMEDIA_DRM_H */
drm format: Clear data
Definition: nvmedia_drm.h:64
Defines the supported DRM formats.
Definition: nvmedia_drm.h:42
Holds an application data buffer containing compressed video data.
uint32_t * AesPass1OutputBuffer
encrypted metadata buffer of pass1
Definition: nvmedia_drm.h:99
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:80
Specifies the decoder instance ID.
Holds encrypted metadata information that the parser passes to the video decoder component.
Definition: nvmedia_drm.h:74
drm format: Marlin CBC
Definition: nvmedia_drm.h:58
drm format: To tell clear data processing in secure buffer
Definition: nvmedia_drm.h:66
uint32_t * pBOCD
pointer to bytes of clear data for subsamples
Definition: nvmedia_drm.h:145
Holds re-encrypted data information that the video decoder returns to the parser. ...
Definition: nvmedia_drm.h:109
uint32_t uNumNals
total number of subsamples for given buffer
Definition: nvmedia_drm.h:91
uint32_t uBytesOfEncryptedData
total bytes of encrypted data in input buffer
Definition: nvmedia_drm.h:85
Holds the video decrypter object.
Definition: nvmedia_drm.h:161
NvMediaStatus NvMediaVideoDecryptHeader(const NvMediaVideoDecrypter *pDecrypter, const void *pictureData, const NvMediaBitstreamBuffer *pBitstream, NvMediaDecoderInstanceId instanceId)
Decrypts the HDR of the encrypted content.
uint32_t uDrmMode
drm mode of encrypted content
Definition: nvmedia_drm.h:133
uint32_t uDrmMode
drm mode of encrypted content.
Definition: nvmedia_drm.h:79
Holds encryption intialization vector information.
Definition: nvmedia_drm.h:119
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.
NVIDIA Media Interface: Common Types for Video/Image Encode/Decode
uint32_t * pAesPass1OutputBuffer
encrypted metadata struture pointer after pass1
Definition: nvmedia_drm.h:115
uint8_t * pClearHeaderPtr
clear hdr pointer to buffer after pass1
Definition: nvmedia_drm.h:113
uint32_t uNonAlignedOffset
non aligned offset for encrypted buffer
Definition: nvmedia_drm.h:149
NvMediaVideoCodec eCodec
Codec type.
Definition: nvmedia_drm.h:163
NVIDIA Media Interface: Core
Defines all possible error codes.
Definition: nvmedia_core.h:169
drm format: Piff CTC
Definition: nvmedia_drm.h:56
drm format: None: This should be the last element
Definition: nvmedia_drm.h:68
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t uint32_t flags
uint32_t non_slice_data
bytes of non slice data in input buffer
Definition: nvmedia_drm.h:101
drm format: Widevine
Definition: nvmedia_drm.h:46
drm format: Marlin CTR
Definition: nvmedia_drm.h:60
drm format: Piff CBC
Definition: nvmedia_drm.h:54
uint32_t uSkipBlkCnt
skip blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:139
drm format: Marlin
Definition: nvmedia_drm.h:52
uint32_t uClearHeaderSize
clear hdr side after pass1
Definition: nvmedia_drm.h:111
uint32_t * pBOED
pointer to bytes of encrypted data for subsamples
Definition: nvmedia_drm.h:143
void NvMediaVideoDecrypterDestroy(const NvMediaVideoDecrypter *pDecrypter)
Destroys a video decoder decrypter object.
max number of subsample support
Definition: nvmedia_drm.h:39
NvMediaBool bIvValid
intialization vector present or not
Definition: nvmedia_drm.h:123
NvMediaBool enableEncryption
Flag that specifies whether the buffer is encrypted.
Definition: nvmedia_drm.h:77
Video codec type.
uint32_t uSkipBlkCnt
skip blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:89
Holds encrypted metadata information that the client sends to the parser.
Definition: nvmedia_drm.h:130
uint32_t KeySlotNumber
keyslot number used where content key is written
Definition: nvmedia_drm.h:93
uint8_t * pIV
pointer to intialization vector array
Definition: nvmedia_drm.h:135
drm format: Widevine CTR
Definition: nvmedia_drm.h:62
drm format: Piff
Definition: nvmedia_drm.h:50
uint32_t uEncryptBlkCnt
encrypt blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:137
drm format: Netflix
Definition: nvmedia_drm.h:44
uint32_t KeySlotNumber
keyslot number used where content key is written
Definition: nvmedia_drm.h:141
uint32_t hwClockValue
pass hw decode clock value for otf case
Definition: nvmedia_drm.h:165
drm format: Ultravoilet
Definition: nvmedia_drm.h:48
uint32_t uMetadataCount
total number of subsamples for given buffer
Definition: nvmedia_drm.h:147
NvMediaStatus NvMediaVideoGetClearHeader(NvMediaVideoDecrypter *pDecrypter, void *pictureData)
Gets clear header data after pass1.
initialization vector array
Definition: nvmedia_drm.h:151
uint32_t uEncryptBlkCnt
encrypt blk count when pattern mode encryption is used
Definition: nvmedia_drm.h:87