NVIDIA DeepStream SDK API Reference6.0.1 Release |
Specifies APIs relating to smart recording.
Data Structures | |
struct | NvDsSRInitParams |
Holds initializtion paramerters required to create NvDsSRContext. More... | |
struct | NvDsSRContext |
Holds information about smart record instance. More... | |
struct | NvDsSRRecordingInfo |
Hold information about video recorded. More... | |
Typedefs | |
typedef struct NvDsSRRecordingInfo | NvDsSRRecordingInfo |
Hold information about video recorded. More... | |
typedef gpointer(* | NvDsSRCallbackFunc )(NvDsSRRecordingInfo *info, gpointer userData) |
typedef guint32 | NvDsSRSessionId |
typedef struct NvDsSRInitParams | NvDsSRInitParams |
Holds initializtion paramerters required to create NvDsSRContext. More... | |
typedef struct NvDsSRContext | NvDsSRContext |
Holds information about smart record instance. More... | |
Enumerations | |
enum | NvDsSRContainerType { NVDSSR_CONTAINER_MP4, NVDSSR_CONTAINER_MKV } |
Specifies container types. More... | |
enum | NvDsSRStatus { NVDSSR_STATUS_OK, NVDSSR_STATUS_INVALID_VAL, NVDSSR_STATUS_INVALID_OP, NVDSSR_STATUS_ERROR, NVDSSR_STATUS_CUSTOM1 = 100, NVDSSR_STATUS_CUSTOM2 = 101, NVDSSR_STATUS_CUSTOM3 = 102 } |
Specifies API return status. More... | |
Functions | |
NvDsSRStatus | NvDsSRCreate (NvDsSRContext **ctx, NvDsSRInitParams *params) |
Creates the instance of smart record. More... | |
NvDsSRStatus | NvDsSRStart (NvDsSRContext *ctx, NvDsSRSessionId *sessionId, guint startTime, guint duration, gpointer userData) |
Starts the video recording. More... | |
NvDsSRStatus | NvDsSRStop (NvDsSRContext *ctx, NvDsSRSessionId sessionId) |
Stops the previously started recording. More... | |
NvDsSRStatus | NvDsSRDestroy (NvDsSRContext *ctx) |
Destroys the instance of smart record. More... | |
typedef gpointer(* NvDsSRCallbackFunc)(NvDsSRRecordingInfo *info, gpointer userData) |
Definition at line 45 of file gst-nvdssr.h.
typedef struct NvDsSRContext NvDsSRContext |
Holds information about smart record instance.
typedef struct NvDsSRInitParams NvDsSRInitParams |
Holds initializtion paramerters required to create NvDsSRContext.
typedef struct NvDsSRRecordingInfo NvDsSRRecordingInfo |
Hold information about video recorded.
Definition at line 43 of file gst-nvdssr.h.
typedef guint32 NvDsSRSessionId |
Definition at line 47 of file gst-nvdssr.h.
enum NvDsSRContainerType |
Specifies container types.
Enumerator | |
---|---|
NVDSSR_CONTAINER_MP4 | |
NVDSSR_CONTAINER_MKV |
Definition at line 52 of file gst-nvdssr.h.
enum NvDsSRStatus |
Specifies API return status.
Enumerator | |
---|---|
NVDSSR_STATUS_OK | |
NVDSSR_STATUS_INVALID_VAL | |
NVDSSR_STATUS_INVALID_OP | |
NVDSSR_STATUS_ERROR | |
NVDSSR_STATUS_CUSTOM1 | |
NVDSSR_STATUS_CUSTOM2 | |
NVDSSR_STATUS_CUSTOM3 |
Definition at line 60 of file gst-nvdssr.h.
NvDsSRStatus NvDsSRCreate | ( | NvDsSRContext ** | ctx, |
NvDsSRInitParams * | params | ||
) |
Creates the instance of smart record.
This function creates the instance of smart record and returns the pointer to an allocated NvDsSRContext. The params structure must be filled with initialization parameters required to create the instance.
recordbin of NvDsSRContext is smart record bin which must be added to the pipeline. It expects encoded frames which will be muxed and saved to the file. Add this bin after parser element in the pipeline.
Call NvDsSRDestroy() to free resources allocated by this function.
[out] | ctx | An indirect pointer to the smart record instance. |
[in] | params | A pointer to a NvDsSRInitParams structure. |
NvDsSRStatus NvDsSRDestroy | ( | NvDsSRContext * | ctx | ) |
Destroys the instance of smart record.
This function releases the resources previously allocated by NvDsSRCreate().
[in] | ctx | A pointer to a NvDsSRContext to be freed. |
NvDsSRStatus NvDsSRStart | ( | NvDsSRContext * | ctx, |
NvDsSRSessionId * | sessionId, | ||
guint | startTime, | ||
guint | duration, | ||
gpointer | userData | ||
) |
Starts the video recording.
This function starts writing the cached video data to a file. It returns the session id which later can be used in NvDsSRStop() to stop the corresponding recording.
Here startTime specifies the seconds before the current time and duration specifies the seconds after the start of recording. If current time is t1, content from t1 - startTime to t1 + duration will be saved to file. Therefore a total of startTime + duration seconds of data will be recorded.
[in] | ctx | A pointer to a NvDsSRContext. |
[out] | sessionId | A pointer to a NvDsSRSessionId. |
[in] | startTime | Seconds before the current time. Should be less than video cache size. |
[in] | duration | Duration value in seconds after the start of recording. |
[in] | userData | A pointer to user specified data. |
NvDsSRStatus NvDsSRStop | ( | NvDsSRContext * | ctx, |
NvDsSRSessionId | sessionId | ||
) |
Stops the previously started recording.
[in] | ctx | A pointer to a NvDsSRContext. |
[in] | sessionId | Id of seesion to stop. |