DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

FrameCapture.h
Go to the documentation of this file.
1 //
3 // Notice
4 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 //
9 // NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10 // information or for any infringement of patents or other rights of third parties that may
11 // result from its use. No license is granted by implication or otherwise under any patent
12 // or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13 // expressly authorized by NVIDIA. Details are subject to change without notice.
14 // This code supersedes and replaces all information previously supplied.
15 // NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16 // components in life support devices or systems without express written approval of
17 // NVIDIA CORPORATION & AFFILIATES.
18 //
19 // SPDX-FileCopyrightText: Copyright (c) 2019-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20 // SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21 //
22 // NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23 // property and proprietary rights in and to this material, related
24 // documentation and any modifications thereto. Any use, reproduction,
25 // disclosure or distribution of this material and related documentation
26 // without an express license agreement from NVIDIA CORPORATION or
27 // its affiliates is strictly prohibited.
28 //
30 
47 #ifndef DW_FRAMECAPTURE_H_
48 #define DW_FRAMECAPTURE_H_
49 
51 
52 #include "Image.h"
53 
54 #include <nvscisync.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);
214 dwStatus dwFrameCapture_fillSyncAttributes(NvSciSyncAttrList syncAttrList, dwFrameCaptureHandle_t framecapture);
215 
223 dwStatus dwFrameCapture_setSyncObject(NvSciSyncObj syncObj, dwFrameCaptureHandle_t framecapture);
224 
225 #endif
226 
237 dwStatus dwFrameCapture_appendFrameGL(const dwImageGL* img, dwFrameCaptureHandle_t framecapture);
238 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #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&#39;s serialized.
Defines an NvMedia image.
Definition: Image.h:413
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&#39;s serialized.
struct dwImageObject * dwImageHandle_t
Definition: Image.h:105
Defines a rectangle.
Definition: Types.h:191
uint32_t mode
Logic OR of the dwFrameCaptureMode. Can be either or all. Useful for not allocating useless resources...
Definition: FrameCapture.h:91
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_setSyncObject(NvSciSyncObj syncObj, dwFrameCaptureHandle_t framecapture)
Set the sync obj to which the encoder will wait on SOF fences.
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:397
Holds the parameters for sensor serializer creation.
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_fillSyncAttributes(NvSciSyncAttrList syncAttrList, dwFrameCaptureHandle_t framecapture)
Fill the sync attributes for the encoder to signal EOF fences.
dwSerializerParams params
SensorSerializer parameters, see SensorSerializer.h.
Definition: FrameCapture.h:97
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: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:49
struct dwSALObject * dwSALHandle_t
Handle representing the Sensor Abstraction Layer interface.
Definition: Sensors.h:82
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&#39;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: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&#39;s serialized.
Defines a GL texture image.
Definition: Image.h:60
Initialization parameters for the frame capture module.
Definition: FrameCapture.h:76
Defines a CPU-based image.
Definition: Image.h:384