NVIDIA DeepStream SDK API Reference

5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 NVIDIA Corporation. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  *
10  */
12 #ifndef NVDSSR_H_
13 #define NVDSSR_H_
15 #include <gst/gst.h>
17 #ifdef __cplusplus
18 extern "C"
19 {
20 #endif
24 typedef gpointer (*NvDsSRCallbackFunc) (NvDsSRRecordingInfo *info, gpointer userData);
26 typedef guint32 NvDsSRSessionId;
31 typedef enum {
39 typedef enum {
48 } NvDsSRStatus;
53 typedef struct NvDsSRInitParams
54 {
60  guint width;
62  guint height;
66  gchar *dirpath;
76 typedef struct NvDsSRContext
77 {
79  GstElement *recordbin;
81  GstElement *recordQue;
83  GstElement *encodebin;
85  GstElement *filesink;
87  gboolean gotKeyFrame;
89  gboolean recordOn;
91  gboolean resetDone;
93  gboolean isPlaying;
97  GMutex flowLock;
99  GThread *resetThread;
101  gpointer uData;
102 } NvDsSRContext;
107 typedef struct NvDsSRRecordingInfo
108 {
112  NvDsSRSessionId sessionId;
114  gchar *filename;
116  gchar *dirpath;
118  guint duration;
122  guint width;
124  guint height;
168 NvDsSRStatus NvDsSRStart (NvDsSRContext *ctx, NvDsSRSessionId *sessionId,
169  guint startTime, guint duration, gpointer userData);
179 NvDsSRStatus NvDsSRStop (NvDsSRContext *ctx, NvDsSRSessionId sessionId);
192 #ifdef __cplusplus
193 }
194 #endif
195 #endif /* NVDSSR_H_ */
NvDsSRStatus NvDsSRCreate(NvDsSRContext **ctx, NvDsSRInitParams *params)
Creates the instance of smart record.
Specifies container types.
Definition: gst-nvdssr.h:31
gboolean isPlaying
flag to check if encodebin is in playing state.
Definition: gst-nvdssr.h:93
guint videoCacheSize
size of video cache in seconds.
Definition: gst-nvdssr.h:70
NvDsSRInitParams initParams
initialization parameters
Definition: gst-nvdssr.h:95
Holds information about smart record instance.
Definition: gst-nvdssr.h:76
GMutex flowLock
mutex to control the flow
Definition: gst-nvdssr.h:97
Holds initializtion paramerters required to create NvDsSRContext.
Definition: gst-nvdssr.h:53
NvDsSRStatus NvDsSRStop(NvDsSRContext *ctx, NvDsSRSessionId sessionId)
Stops the previously started recording.
guint height
recorded video height
Definition: gst-nvdssr.h:124
NvDsSRStatus NvDsSRDestroy(NvDsSRContext *ctx)
Destroys the instance of smart record.
guint32 NvDsSRSessionId
Definition: gst-nvdssr.h:26
gpointer(* NvDsSRCallbackFunc)(NvDsSRRecordingInfo *info, gpointer userData)
Definition: gst-nvdssr.h:24
GstElement * recordQue
queue element to cache the content.
Definition: gst-nvdssr.h:81
GstElement * recordbin
parent bin element.
Definition: gst-nvdssr.h:79
gchar * filename
recorded file name
Definition: gst-nvdssr.h:114
guint width
recorded video width
Definition: gst-nvdssr.h:122
gchar * dirpath
recorded file dir path
Definition: gst-nvdssr.h:116
Hold information about video recorded.
Definition: gst-nvdssr.h:107
gboolean gotKeyFrame
flag to check the key frame.
Definition: gst-nvdssr.h:87
Specifies API return status.
Definition: gst-nvdssr.h:39
guint width
optional, recording video width, 0 means no transcode
Definition: gst-nvdssr.h:60
gchar * fileNamePrefix
recorded file name prefix
Definition: gst-nvdssr.h:64
NvDsSRContext * ctx
SR bin context.
Definition: gst-nvdssr.h:110
gboolean recordOn
flag to check if recording is on
Definition: gst-nvdssr.h:89
NvDsSRContainerType containerType
recording video container, MP4 / MKV
Definition: gst-nvdssr.h:56
gpointer uData
pointer to user provided data
Definition: gst-nvdssr.h:101
struct NvDsSRRecordingInfo NvDsSRRecordingInfo
Hold information about video recorded.
Definition: gst-nvdssr.h:22
guint height
optional, recording video height, 0 means no transcode
Definition: gst-nvdssr.h:62
struct NvDsSRContext NvDsSRContext
Holds information about smart record instance.
NvDsSRStatus NvDsSRStart(NvDsSRContext *ctx, NvDsSRSessionId *sessionId, guint startTime, guint duration, gpointer userData)
Starts the video recording.
gboolean resetDone
flag to check if encodebin is reset
Definition: gst-nvdssr.h:91
GstElement * filesink
filesink element
Definition: gst-nvdssr.h:85
guint defaultDuration
default recording duration in seconds
Definition: gst-nvdssr.h:68
NvDsSRSessionId sessionId
recording session-id
Definition: gst-nvdssr.h:112
NvDsSRContainerType containerType
recorded video container, MP4 / MKV
Definition: gst-nvdssr.h:120
guint duration
duration in seconds
Definition: gst-nvdssr.h:118
NvDsSRCallbackFunc callback
callback function gets called once recording is complete
Definition: gst-nvdssr.h:58
GstElement * encodebin
child bin to save the content to file.
Definition: gst-nvdssr.h:83
struct NvDsSRInitParams NvDsSRInitParams
Holds initializtion paramerters required to create NvDsSRContext.
GThread * resetThread
thread to reset the encodebin
Definition: gst-nvdssr.h:99
gchar * dirpath
store recorded file under directory path
Definition: gst-nvdssr.h:66