NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
FrameCapture.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
29 #ifndef DW_FRAMECAPTURE_H_
30 #define DW_FRAMECAPTURE_H_
31 
33 
34 #include "Image.h"
35 
36 #include <nvscisync.h>
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
45 typedef struct dwFrameCaptureObject* dwFrameCaptureHandle_t;
46 
48 typedef enum dwFrameCaptureMode {
54 
58 typedef struct
59 {
61  uint32_t width;
62 
64  uint32_t height;
65 
71 
73  uint32_t mode;
74 
77 
80 
87 
104  const dwFrameCaptureParams* params,
105  dwSALHandle_t sal,
106  dwContextHandle_t ctx);
107 
121 
136 dwStatus dwFrameCapture_screenCapture(const dwImageGL** imageGL, const dwRect roi,
137  dwFrameCaptureHandle_t framecapture);
138 
151  dwFrameCaptureHandle_t framecapture);
152 
164 
175 DW_DEPRECATED("dwFrameCapture_appendFrameCUDA: this function is deprecated, replace with the dwFrameCapture_appendFrame")
177 
178 #ifndef VIBRANTE
179 
190 #else
191 
201 dwStatus dwFrameCapture_appendFrameNvMedia(const dwImageNvMedia* img, dwFrameCaptureHandle_t framecapture);
209 dwStatus dwFrameCapture_fillSyncAttributes(NvSciSyncAttrList syncAttrList, dwFrameCaptureHandle_t framecapture);
210 
218 dwStatus dwFrameCapture_setSyncObject(NvSciSyncObj syncObj, dwFrameCaptureHandle_t framecapture);
219 
228 dwStatus dwFrameCapture_insertFence(NvSciSyncFence* syncFence, dwFrameCaptureHandle_t framecapture);
229 
230 #endif
231 
243 
269  dwFrameCaptureHandle_t framecapture);
270 #ifdef __cplusplus
271 }
272 #endif
273 
274 #endif // DW_FRAMECAPTURE_H_
dwImageGL
Defines a GL texture image.
Definition: visualization/image/Image.h:42
DW_FRAMECAPTURE_MODE_SERIALIZE
@ DW_FRAMECAPTURE_MODE_SERIALIZE
Serialize enables the creation of the serializer which allows the calls to dwFrameCapture_appendFrame...
Definition: FrameCapture.h:52
SensorSerializer.h
dwFrameCaptureParams::serializeGL
bool serializeGL
Boolean, if true it serializes DW_IMAGE_GL only, otherwise all other serializations (CUDA/CPU on X86,...
Definition: FrameCapture.h:76
dwFrameCapture_appendFrameCUDA
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameCUDA(const dwImageCUDA *img, dwFrameCaptureHandle_t framecapture)
Append a dwImageCUDA frame to the capture and it's serialized.
dwFrameCapture_appendFrameCPU
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameCPU(const dwImageCPU *img, dwFrameCaptureHandle_t framecapture)
Append a dwImageCPU frame to the capture and it's serialized.
dwImageCPU
Defines a CPU-based image.
Definition: image/Image.h:542
dwFrameCaptureParams
Initialization parameters for the frame capture module.
Definition: FrameCapture.h:58
dwFrameCaptureMode
dwFrameCaptureMode
Enables FrameCapture functionalities. These can be set as a logical OR between the two modes....
Definition: FrameCapture.h:48
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:327
nvscisync.h
NVIDIA Software Communications Interface (SCI) : NvSciSync
dwImageNvMedia
Defines an NvMedia image.
Definition: image/Image.h:578
DW_FRAMECAPTURE_MODE_SCREENCAP
@ DW_FRAMECAPTURE_MODE_SCREENCAP
Screencapture mode allocates GL resources that enable the capture of the current rendering Window via...
Definition: FrameCapture.h:50
dwFrameCapture_appendFrame
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrame(const dwImageHandle_t img, dwFrameCaptureHandle_t framecapture)
Append a dwImageHandle frame to the capture and it's serialized.
dwImageCUDA
Defines a CUDA image.
Definition: image/Image.h:559
dwRect
Defines a rectangle.
Definition: GeometricTypes.h:53
dwFrameCaptureParams::setupForDirectCameraOutput
bool setupForDirectCameraOutput
Boolean, if it is true and MUST use dwFrameCapture_appendAllocationAttributes to append nvsciBufAttrL...
Definition: FrameCapture.h:85
dwFrameCaptureParams::params
dwSerializerParams params
SensorSerializer parameters, see SensorSerializer.h.
Definition: FrameCapture.h:79
dwFrameCaptureParams::mode
uint32_t mode
Logic OR of the dwFrameCaptureMode. Can be either or all. Useful for not allocating useless resources...
Definition: FrameCapture.h:73
dwFrameCaptureHandle_t
struct dwFrameCaptureObject * dwFrameCaptureHandle_t
Handle to a Frame Capture module object.
Definition: FrameCapture.h:45
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:528
dwFrameCapture_screenCapture
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_screenCapture(const dwImageGL **imageGL, const dwRect roi, dwFrameCaptureHandle_t framecapture)
It grabs what is currently rendered on the current frame buffer and returns a dwImageGL out of it For...
dwFrameCapture_release
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_release(dwFrameCaptureHandle_t framecapture)
Releases the frame capture module.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:32
DW_DEPRECATED
#define DW_DEPRECATED(msg)
Definition: core/base/Exports.h:80
dwSerializerParams
Holds the parameters for sensor serializer creation.
Definition: SensorSerializerTypes.h:90
dwFrameCapture_appendFrameGL
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameGL(const dwImageGL *img, dwFrameCaptureHandle_t framecapture)
Append a dwImageGL frame to the capture and it's serialized.
dwImageHandle_t
struct dwImageObject * dwImageHandle_t
Handle to an image object.
Definition: image/Image.h:99
dwImageProperties
Defines the properties of the image.
Definition: image/Image.h:523
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:81
dwFrameCaptureParams::width
uint32_t width
Width of the GL window / image.
Definition: FrameCapture.h:61
dwFrameCaptureParams::captureCustom
bool captureCustom
The frameCaptured image is returned as a dwImageGL.
Definition: FrameCapture.h:70
DW_VIZ_API_PUBLIC
#define DW_VIZ_API_PUBLIC
Definition: visualization/core/Exports.h:31
NvSciSyncFence
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:253
dwSALHandle_t
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: SensorTypes.h:40
dwFrameCaptureParams::height
uint32_t height
Height of the GL window / image.
Definition: FrameCapture.h:64
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: core/base/Exports.h:57
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:308
dwFrameCapture_screenCaptureCustom
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_screenCaptureCustom(dwImageGL *imageGL, const dwRect roi, dwFrameCaptureHandle_t framecapture)
It grabs what is currently rendered on the current frame buffer and blits onto the input dwImageGL.
Image.h
dwFrameCapture_initialize
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_initialize(dwFrameCaptureHandle_t *obj, const dwFrameCaptureParams *params, dwSALHandle_t sal, dwContextHandle_t ctx)
Create a new frame capture module.
dwFrameCapture_appendAllocationAttributes
DW_API_PUBLIC dwStatus dwFrameCapture_appendAllocationAttributes(dwImageProperties *imgProps, dwFrameCaptureHandle_t framecapture)
Append the allocation attribute to create images that work with other NvSci based modules.