DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

FrameCapture.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2019-2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
49 #ifndef DW_FRAMECAPTURE_H_
50 #define DW_FRAMECAPTURE_H_
51 
53 
54 #include "Image.h"
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
63 typedef struct dwFrameCaptureObject* dwFrameCaptureHandle_t;
64 
66 typedef enum dwFrameCaptureMode {
72 
76 typedef struct
77 {
79  uint32_t width;
80 
82  uint32_t height;
83 
89 
91  uint32_t mode;
92 
95 
99 
112 dwStatus dwFrameCapture_initialize(dwFrameCaptureHandle_t* obj,
113  const dwFrameCaptureParams* params,
114  dwSALHandle_t sal,
115  dwContextHandle_t ctx);
116 
126 dwStatus dwFrameCapture_release(dwFrameCaptureHandle_t framecapture);
127 
142 dwStatus dwFrameCapture_screenCapture(const dwImageGL** imageGL, const dwRect roi,
143  dwFrameCaptureHandle_t framecapture);
144 
157  dwFrameCaptureHandle_t framecapture);
158 
169 dwStatus dwFrameCapture_appendFrame(const dwImageHandle_t img, dwFrameCaptureHandle_t framecapture);
170 
181 dwStatus dwFrameCapture_appendFrameCUDA(const dwImageCUDA* img, dwFrameCaptureHandle_t framecapture);
182 
183 #ifndef VIBRANTE
184 
194 dwStatus dwFrameCapture_appendFrameCPU(const dwImageCPU* img, dwFrameCaptureHandle_t framecapture);
195 #else
196 
206 dwStatus dwFrameCapture_appendFrameNvMedia(const dwImageNvMedia* img, dwFrameCaptureHandle_t framecapture);
207 #endif
208 
219 dwStatus dwFrameCapture_appendFrameGL(const dwImageGL* img, dwFrameCaptureHandle_t framecapture);
220 
221 #ifdef __cplusplus
222 }
223 #endif
224 
225 #endif // DW_FRAMECAPTURE_H_
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameGL(const dwImageGL *img, dwFrameCaptureHandle_t framecapture)
Append a dwImageGL frame to the capture and it's serialized.
Defines an NvMedia image.
Definition: Image.h:282
uint32_t height
Height of the GL window / image.
Definition: FrameCapture.h:82
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.
struct dwImageObject * dwImageHandle_t
Definition: Image.h:99
Defines a rectangle.
Definition: Types.h:189
uint32_t mode
Logic OR of the dwFrameCaptureMode. Can be either or all. Useful for not allocating useless resources...
Definition: FrameCapture.h:91
Serialize enables the creation of the serializer which allows the calls to dwFrameCapture_appendFrame...
Definition: FrameCapture.h:70
NVIDIA DriveWorks API: Sensor Serializer
bool captureCustom
The frameCaptured image is returned as a dwImageGL.
Definition: FrameCapture.h:88
NVIDIA DriveWorks GL API: Image Conversion and Streaming Functionality
Defines a CUDA image.
Definition: Image.h:266
Holds the parameters for sensor serializer creation.
dwSerializerParams params
SensorSerializer parameters, see SensorSerializer.h.
Definition: FrameCapture.h:97
dwStatus
Status definition.
Definition: Status.h:178
bool serializeGL
Boolean, if true it serializes DW_IMAGE_GL only, otherwise all other serializations (CUDA/CPU on X86...
Definition: FrameCapture.h:94
dwFrameCaptureMode
Enables FrameCapture functionalities. These can be set as a logical OR between the two modes...
Definition: FrameCapture.h:66
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...
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.
#define DW_VIZ_API_PUBLIC
Definition: Exports.h:51
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: Sensors.h:85
Screencapture mode allocates GL resources that enable the capture of the current rendering Window via...
Definition: FrameCapture.h:68
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameNvMedia(const dwImageNvMedia *img, dwFrameCaptureHandle_t framecapture)
Append a dwImageNvMedia frame to the capture and it's serialized.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
struct dwFrameCaptureObject * dwFrameCaptureHandle_t
Handle to a Frame Capture module object.
Definition: FrameCapture.h:63
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_release(dwFrameCaptureHandle_t framecapture)
Releases the frame capture module.
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...
uint32_t width
Width of the GL window / image.
Definition: FrameCapture.h:79
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameCUDA(const dwImageCUDA *img, dwFrameCaptureHandle_t framecapture)
Append a dwImageCUDA frame to the capture and it's serialized.
Defines a GL texture image.
Definition: Image.h:62
Initialization parameters for the frame capture module.
Definition: FrameCapture.h:76
Defines a CPU-based image.
Definition: Image.h:253