NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_array.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018, 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 
17 #ifndef NVMEDIA_ARRAY_H
18 #define NVMEDIA_ARRAY_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include "nvmedia_core.h"
25 
38 #define NVMEDIA_ARRAY_VERSION_MAJOR 2
39 
40 #define NVMEDIA_ARRAY_VERSION_MINOR 1
41 
46 #define NVMEDIA_ARRAY_TIMEOUT_INFINITE 0xFFFFFFFFu
47 
50 typedef enum {
72 
78 typedef struct NvMediaArray NvMediaArray;
79 
83 typedef enum {
87 
91 #define NVM_ARRAY_ATTR_CPU_ACCESS_UNCACHED 0x00000000
92 
93 #define NVM_ARRAY_ATTR_CPU_ACCESS_CACHED 0x00000001
94 
98 typedef struct {
102  uint32_t value;
104 
109 typedef enum {
117 
129  NvMediaVersion *version
130 );
131 
142 NvMediaArray *
144  NvMediaDevice *device,
145  NvMediaArrayType type,
146  uint32_t stride,
147  uint32_t numElements,
148  const NvMediaArrayAllocAttr *attrs,
149  uint32_t numAttrs
150 );
151 
163  NvMediaArray* handle
164 );
165 
178  NvMediaArrayType type,
179  uint32_t *elementSize
180 );
181 
197  NvMediaArray* handle,
198  uint32_t *numElementsPtr
199 );
200 
219  NvMediaArray* handle,
220  uint32_t numElements
221 );
222 
237  NvMediaArray* handle,
238  NvMediaArrayType* elementType,
239  uint32_t* capacity,
240  uint32_t* stride
241 );
242 
261  NvMediaArray *handle,
262  uint32_t millisecondWait,
263  NvMediaTaskStatus *status
264 );
265 
287  NvMediaArray *handle,
288  NvMediaArrayLockAccess lockAccessType,
289  void **ptr
290 );
291 
299 void
301  NvMediaArray *handle
302 );
303 
304 /*
305  * \defgroup history_nvmedia_array History
306  * Provides change history for the NvMedia Array API.
307  *
308  * \section history_nvmedia_arrays Version History
309  *
310  * <b> Version 1.0 </b> December 4, 2017
311  * - Initial Release.
312  *
313  * <b> Version 2.0 </b> June 1, 2018
314  * - Remove keypoint type. VPI-specific types are in VPI headers.
315  *
316  * <b> Version 2.1 </b> July 9, 2018
317  * - Add version query API.
318  */
319 
322 #ifdef __cplusplus
323 }; /* extern "C" */
324 #endif
325 
326 #endif // NVMEDIA_ARRAY_H
NvMediaArrayType
Defines the different types of Arrays.
Definition: nvmedia_array.h:50
NvMediaStatus NvMediaArrayGetVersion(NvMediaVersion *version)
Returns the version information for the NvMediaArray library.
struct NvMediaArray NvMediaArray
Holds a descriptor for the array.
Definition: nvmedia_array.h:78
NvMediaArrayAllocAttrType
Defines NvMedia array allocation attribute types.
Definition: nvmedia_array.h:83
Holds NvMedia Version information.
Definition: nvmedia_core.h:252
NvMediaStatus NvMediaArraySetSize(NvMediaArray *handle, uint32_t numElements)
Sets the size of the array.
void NvMediaArrayUnlock(NvMediaArray *handle)
Unlocks an Array.
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:235
NvMediaStatus NvMediaArrayGetProperties(NvMediaArray *handle, NvMediaArrayType *elementType, uint32_t *capacity, uint32_t *stride)
Helper function to get array properties with which array was created.
! CPU access to surface flags (default: uncached)
Definition: nvmedia_array.h:85
NVIDIA Media Interface: Core
uint32_t value
Array Allocation Attribute Value.
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
Unsigned 8 bit.
Definition: nvmedia_array.h:56
Unsigned 32 bit.
Definition: nvmedia_array.h:64
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:305
Unsigned 16 bit.
Definition: nvmedia_array.h:60
Holds array allocation attributes.
Definition: nvmedia_array.h:98
NvMediaArrayAllocAttrType type
Array Allocation Attribute Type.
NvMediaStatus NvMediaArrayDestroy(NvMediaArray *handle)
Destroys an array created by NvMediaArrayCreate().
Number of types - If more types are needed, add above this and update this.
Definition: nvmedia_array.h:70
NvMediaStatus NvMediaArrayGetStatus(NvMediaArray *handle, uint32_t millisecondWait, NvMediaTaskStatus *status)
Gets the status of the current/last operation for the Array and optionally waits for the operation to...
NvMediaArrayLockAccess
Defines array-lock access types.
NvMediaArray * NvMediaArrayCreate(NvMediaDevice *device, NvMediaArrayType type, uint32_t stride, uint32_t numElements, const NvMediaArrayAllocAttr *attrs, uint32_t numAttrs)
Creates an NvMedia Array.
Undefined array type.
Definition: nvmedia_array.h:52
NvMediaStatus NvMediaArrayGetSize(NvMediaArray *handle, uint32_t *numElementsPtr)
Gets the size of the array.
NvMediaStatus NvMediaArrayLock(NvMediaArray *handle, NvMediaArrayLockAccess lockAccessType, void **ptr)
Locks an Array to which data can be written/read without interference from another thread/process...
NvMediaStatus NvMediaArrayGetElemSizeForType(NvMediaArrayType type, uint32_t *elementSize)
Gets the size of an element, for a particular type of array element.