DriveWorks SDK Reference
4.0.0 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 
47 #ifndef DW_FRAMECAPTURE_H_
48 #define DW_FRAMECAPTURE_H_
49 
51 
52 #include "Image.h"
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
61 typedef struct dwFrameCaptureObject* dwFrameCaptureHandle_t;
62 
64 typedef enum dwFrameCaptureMode {
70 
74 typedef struct
75 {
77  uint32_t width;
78 
80  uint32_t height;
81 
87 
89  uint32_t mode;
90 
93 
97 
110 dwStatus dwFrameCapture_initialize(dwFrameCaptureHandle_t* obj,
111  const dwFrameCaptureParams* params,
112  dwSALHandle_t sal,
113  dwContextHandle_t ctx);
114 
124 dwStatus dwFrameCapture_release(dwFrameCaptureHandle_t framecapture);
125 
140 dwStatus dwFrameCapture_screenCapture(const dwImageGL** imageGL, const dwRect roi,
141  dwFrameCaptureHandle_t framecapture);
142 
155  dwFrameCaptureHandle_t framecapture);
156 
167 dwStatus dwFrameCapture_appendFrame(const dwImageHandle_t img, dwFrameCaptureHandle_t framecapture);
168 
179 dwStatus dwFrameCapture_appendFrameCUDA(const dwImageCUDA* img, dwFrameCaptureHandle_t framecapture);
180 
181 #ifndef VIBRANTE
182 
192 dwStatus dwFrameCapture_appendFrameCPU(const dwImageCPU* img, dwFrameCaptureHandle_t framecapture);
193 #else
194 
204 dwStatus dwFrameCapture_appendFrameNvMedia(const dwImageNvMedia* img, dwFrameCaptureHandle_t framecapture);
205 #endif
206 
217 dwStatus dwFrameCapture_appendFrameGL(const dwImageGL* img, dwFrameCaptureHandle_t framecapture);
218 
219 #ifdef __cplusplus
220 }
221 #endif
222 
223 #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:284
uint32_t height
Height of the GL window / image.
Definition: FrameCapture.h:80
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:100
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:89
Serialize enables the creation of the serializer which allows the calls to dwFrameCapture_appendFrame...
Definition: FrameCapture.h:68
NVIDIA DriveWorks API: Sensor Serializer
bool captureCustom
The frameCaptured image is returned as a dwImageGL.
Definition: FrameCapture.h:86
NVIDIA DriveWorks GL API: Image Conversion and Streaming Functionality
Defines a CUDA image.
Definition: Image.h:268
Holds the parameters for sensor serializer creation.
dwSerializerParams params
SensorSerializer parameters, see SensorSerializer.h.
Definition: FrameCapture.h:95
dwStatus
Status definition.
Definition: Status.h:180
bool serializeGL
Boolean, if true it serializes DW_IMAGE_GL only, otherwise all other serializations (CUDA/CPU on X86...
Definition: FrameCapture.h:92
dwFrameCaptureMode
Enables FrameCapture functionalities. These can be set as a logical OR between the two modes...
Definition: FrameCapture.h:64
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:49
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: Sensors.h:81
Screencapture mode allocates GL resources that enable the capture of the current rendering Window via...
Definition: FrameCapture.h:66
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:79
struct dwFrameCaptureObject * dwFrameCaptureHandle_t
Handle to a Frame Capture module object.
Definition: FrameCapture.h:61
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:77
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:60
Initialization parameters for the frame capture module.
Definition: FrameCapture.h:74
Defines a CPU-based image.
Definition: Image.h:255