- Welcome
- Getting Started With the NVIDIA DriveWorks SDK
- Modules
- Samples
- Tools
- Tutorials
- SDK Porting Guide
- DriveWorks API
- More
Defines FrameCapture module for performing capture of currently bound GL frame buffer.
Data Structures | |
struct | dwFrameCaptureParams |
Initialization parameters for the frame capture module. More... | |
Typedefs | |
typedef struct dwFrameCaptureObject * | dwFrameCaptureHandle_t |
Handle to a Frame Capture module object. More... | |
Enumerations | |
enum | dwFrameCaptureMode { DW_FRAMECAPTURE_MODE_SCREENCAP = 1 << 0 , DW_FRAMECAPTURE_MODE_SERIALIZE = 1 << 1 } |
Enables FrameCapture functionalities. These can be set as a logical OR between the two modes. Choosing a mode means that the resources needed by that feature will be allocated. More... | |
Functions | |
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. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameAsync (const dwImageHandle_t img, dwFrameCaptureHandle_t framecapture) |
Asynchronously append a dwImageHandle frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameCUDA (const dwImageCUDA *img, dwFrameCaptureHandle_t framecapture) |
Append a dwImageCUDA frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameCUDAAsync (const dwImageCUDA *img, dwFrameCaptureHandle_t framecapture) |
Asynchronously append a dwImageCUDA frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameGL (const dwImageGL *img, dwFrameCaptureHandle_t framecapture) |
Append a dwImageGL frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameGLAsync (const dwImageGL *img, dwFrameCaptureHandle_t framecapture) |
Asynchronously append a dwImageGL frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameNvMedia (const dwImageNvMedia *img, dwFrameCaptureHandle_t framecapture) |
Append a dwImageNvMedia frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_appendFrameNvMediaAsync (const dwImageNvMedia *img, dwFrameCaptureHandle_t framecapture) |
Asynchronously append a dwImageNvMedia frame to the capture and it's serialized. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_fillSyncAttributes (NvSciSyncAttrList syncAttrList, dwFrameCaptureHandle_t framecapture) |
Fill the sync attributes for the encoder to signal EOF fences. More... | |
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. More... | |
DW_API_PUBLIC dwStatus | dwFrameCapture_insertFence (NvSciSyncFence *syncFence, dwFrameCaptureHandle_t framecapture) |
Insert fence to wait on completed operations. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_release (dwFrameCaptureHandle_t framecapture) |
Releases the frame capture module. More... | |
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 example, it permits to serialize additional information, such as bounding boxes, labels, etc., that are rendered on top of the current GL frame. More... | |
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. More... | |
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. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_start (dwFrameCaptureHandle_t framecapture) |
Starts frame capture. More... | |
DW_VIZ_API_PUBLIC dwStatus | dwFrameCapture_stop (dwFrameCaptureHandle_t framecapture) |
Stops frame capture. More... | |
struct dwFrameCaptureParams |
Data Fields | ||
---|---|---|
bool | captureCustom |
The frameCaptured image is returned as a dwImageGL. By default (false) the resources for the dwImageGL are allocated automatically and the image received through the call dwFrameCapture_screenCapture. If true, then no resource will be allocated and the dwImageGL will have to be allocated by with dwImage_createGL()/dwImage_getGL and the frameCapture will return the image through dwFrameCapture_screenCaptureCustom() |
uint32_t | height | Height of the GL window / image. |
uint32_t | mode | Logic OR of the dwFrameCaptureMode. Can be either or all. Useful for not allocating useless resources. |
dwSerializerParams | params | SensorSerializer parameters, see SensorSerializer.h. |
bool | serializeGL | Boolean, if true it serializes DW_IMAGE_GL only, otherwise all other serializations (CUDA/CPU on X86, CUDA/NVMEDIA on Drive) |
uint32_t | width | Width of the GL window / image. |
typedef struct dwFrameCaptureObject* dwFrameCaptureHandle_t |
Handle to a Frame Capture module object.
Definition at line 63 of file FrameCapture.h.
enum dwFrameCaptureMode |
Enables FrameCapture functionalities. These can be set as a logical OR between the two modes. Choosing a mode means that the resources needed by that feature will be allocated.
Definition at line 66 of file FrameCapture.h.
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.
[in] | img | dwImageHandle to serialize |
[in] | framecapture | Handle to the frame capture module being released. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameAsync | ( | const dwImageHandle_t | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Asynchronously append a dwImageHandle frame to the capture and it's serialized.
[in] | img | dwImageHandle to serialize |
[in] | framecapture | Handle to the frame capture module being released. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameCUDA | ( | const dwImageCUDA * | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Append a dwImageCUDA frame to the capture and it's serialized.
[in] | img | dwImageCUDA to serialize |
[in] | framecapture | Handle to the frame capture module being released. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameCUDAAsync | ( | const dwImageCUDA * | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Asynchronously append a dwImageCUDA frame to the capture and it's serialized.
[in] | img | dwImageCUDA to serialize |
[in] | framecapture | Handle to the frame capture module being released. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameGL | ( | const dwImageGL * | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameGLAsync | ( | const dwImageGL * | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameNvMedia | ( | const dwImageNvMedia * | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Append a dwImageNvMedia frame to the capture and it's serialized.
[in] | img | dwImageNvMedia to serialize |
[in] | framecapture | Handle to the frame capture module being released. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_appendFrameNvMediaAsync | ( | const dwImageNvMedia * | img, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Asynchronously append a dwImageNvMedia frame to the capture and it's serialized.
[in] | img | dwImageNvMedia to serialize |
[in] | framecapture | Handle to the frame capture module being released. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_fillSyncAttributes | ( | NvSciSyncAttrList | syncAttrList, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Fill the sync attributes for the encoder to signal EOF fences.
Note that multiple calls on the same syncAttrList will append attributes on the same
[out] | syncAttrList | The sync attributes list to be filled |
[in] | framecapture | The frame capture handle |
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.
[out] | obj | Handle to the frame capture module being initialized. |
[in] | params | Frame capture initialization parameters. |
[in] | sal | Handle to current SAL interface |
[in] | ctx | Handle to the current driveworks context. |
DW_API_PUBLIC dwStatus dwFrameCapture_insertFence | ( | NvSciSyncFence * | syncFence, |
dwFrameCaptureHandle_t | framecapture | ||
) |
Insert fence to wait on completed operations.
[out] | syncFence | The sync fence of the frame |
[in] | framecapture | The frame capture handle |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_release | ( | dwFrameCaptureHandle_t | framecapture | ) |
Releases the frame capture module.
[in] | framecapture | Handle to the frame capture module being released. |
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 example, it permits to serialize additional information, such as bounding boxes, labels, etc., that are rendered on top of the current GL frame.
It is independent from the original source of the GL frame, i.e. video or camera, and platform, i.e. Linux or Drive platforms.
[out] | imageGL | a pointer to a dwImageGL pointer containing the captured window |
[in] | roi | Region of interest to be captured |
[in] | framecapture | Handle to the frame capture module being released. |
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.
[out] | imageGL | a pointer to a previously allocated dwImageGL |
[in] | roi | Region of interest to be captured |
[in] | framecapture | Handle to the frame capture module being released. |
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.
The sync object is not reference counted
[in] | syncObj | The sync object |
[in] | framecapture | The frame capture handle |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_start | ( | dwFrameCaptureHandle_t | framecapture | ) |
Starts frame capture.
This method creates a new thread and begins the serialization loop.
[in] | framecapture | Specifies the frame capture handle. |
DW_VIZ_API_PUBLIC dwStatus dwFrameCapture_stop | ( | dwFrameCaptureHandle_t | framecapture | ) |
Stops frame capture.
This method stops the thread and the serialization loop.
[in] | framecapture | Specifies the sensor serializer handle. |