Skip to content

Commit

Permalink
v0.11.alpha (#405)
Browse files Browse the repository at this point in the history
* Update version to v0.11.alpha

* Upgrade to DeepStream 5.1

* Update api-smtp.md

* Update installing-dependencies.md

* Update installing-dependencies.md
  • Loading branch information
rjhowell44 authored Mar 23, 2021
1 parent 0129172 commit a514352
Show file tree
Hide file tree
Showing 23 changed files with 406 additions and 244 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ CXX = g++

TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)

DSL_VERSION:='L"v0.10.alpha"'
NVDS_VERSION:=5.0
DSL_VERSION:='L"v0.11.alpha"'
NVDS_VERSION:=5.1
GS_VERSION:=1.0
GLIB_VERSION:=2.0
GSTREAMER_VERSION:=1.0
Expand Down
32 changes: 16 additions & 16 deletions docs/api-smtp.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ DslReturnType dsl_smtp_mail_enabled_get(boolean* enabled);
This services queries the SMTP services object for its current enabled state. Services are automatically disabled if and while the outgoing queue size exceeds `DSL_SMTP_MAX_PENDING_MESSAGES`. Services are enabled by default.
**Parameters**
 * `enabled` [out] true if SMTP services are currently enabled, false otherwise.
* `enabled` [out] true if SMTP services are currently enabled, false otherwise.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -95,7 +95,7 @@ DslReturnType dsl_smtp_mail_enabled_set(boolean enabled);
This services sets the enabled state for the SMTP services object. Setting the state to true while the outgoing queue size exceeds `DSL_SMTP_MAX_PENDING_MESSAGES` will return `DSL_RESULT_FAILURE`. Services are enabled by default.
**Parameters**
 * `enabled` [in] set to true to enable SMTP services, false to disable.
* `enabled` [in] set to true to enable SMTP services, false to disable.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -115,8 +115,8 @@ DslReturnType dsl_smtp_credentials_set(const wchar_t* username,
This service is used to set the SMTP account credentials, username and password, for all subsequent emails sent.
**Parameters**
 * `username` [in] username for the SMTP account
 * `password` [in] password for the same account
* `username` [in] username for the SMTP account
* `password` [in] password for the same account
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -135,7 +135,7 @@ DslReturnType dsl_smtp_server_url_get(const wchar_t** server_url);
This service gets the current Server URL in use. The service will return an empty string unless set by a previous call made to [dsl_smtp_server_url_set](#dsl_smtp_server_url_set).
**Parameters**
 * `server_url` [out] current Server URL in use.
* `server_url` [out] current Server URL in use.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -154,7 +154,7 @@ DslReturnType dsl_smtp_server_url_get(const wchar_t** server_url);
This service sets the Server URL to use for all subsequent emails sent.
**Parameters**
 * `server_url` [in] new Server URL to use.
* `server_url` [in] new Server URL to use.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -174,8 +174,8 @@ DslReturnType dsl_smtp_address_from_get(const wchar_t** name,
This service gets the current `From` address in use by SMTP services, values that were previously set with a call to [dsl_smtp_address_from_set](#dsl_smtp_address_from_set).
**Parameters**
 * `name` [out] returns the display name (optional) for the `From` address in use
 * `address` [out] returns the email address in use.
* `name` [out] returns the display name (optional) for the `From` address in use
* `address` [out] returns the email address in use.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure.
Expand All @@ -195,8 +195,8 @@ DslReturnType dsl_smtp_address_from_get(const wchar_t* name,
This service sets the `From` address to use for all subsequent emails.
**Parameters**
 * `name` [in] the display name (optional) to use for the `From` address
 * `address` [in] the email address to use. Will be set by the server if omitted.
* `name` [in] the display name (optional) to use for the `From` address
* `address` [in] the email address to use. Will be set by the server if omitted.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure.
Expand All @@ -215,7 +215,7 @@ DslReturnType dsl_smtp_ssl_enabled_get(boolean* enabled);
This service gets the SSL enabled setting for the SMTP services. SSL is enabled by default
**Parameters**
 * `enabled` [out] true if SSL is currently enabled, false otherwise.
* `enabled` [out] true if SSL is currently enabled, false otherwise.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -234,7 +234,7 @@ DslReturnType dsl_smtp_ssl_enabled_set(boolean enabled);
This service sets the SSL enabled state for SMTP Services. SSL is enabled by default
**Parameters**
 * `enabled` [in] set to true to enable SSL, false to disable.
* `enabled` [in] set to true to enable SSL, false to disable.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure
Expand All @@ -254,8 +254,8 @@ DslReturnType dsl_smtp_address_to_add(const wchar_t* name,
This service adds a `To` address to use for all subsequent emails.
**Parameters**
 * `name` [in] the display name (optional) to use for the `To` address
 * `address` [in] the email address to add.
* `name` [in] the display name (optional) to use for the `To` address
* `address` [in] the email address to add.
**Returns**
* `DSL_RESULT_SUCCESS` on successful call. One of the [Return Values](#return-values) defined above on failure.
Expand Down Expand Up @@ -291,8 +291,8 @@ DslReturnType dsl_smtp_address_cc_add(const wchar_t* name,
This service adds a `Cc` address to use for all subsequent emails. `Cc` addresses are optional.
**Parameters**
 * `name` [in] the display name (optional) to use for the `Cc` address
 * `address` [in] the email address to add.
* `name` [in] the display name (optional) to use for the `Cc` address
* `address` [in] the email address to add.
**Returns**
* `DSL_RESULT_SUCCESS` on successful add. One of the [Return Values](#return-values) defined above on failure.
Expand Down
7 changes: 6 additions & 1 deletion docs/building-dsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Invoke the standard make (all) to compile all source code and test scenarios in
```
$ make
```
or
```
$ make -j 4
```
to use all 4 CPU cores for a much faster build time.

### Running the Test Application
***This step is optional unless contributing changes.***
Expand All @@ -39,7 +44,7 @@ $ ./dsl-test-app
After completion, ensure that all tests have passed before building the shared library.
```
===============================================================================
All tests passed (3790 assertions in 492 test cases)
All tests passed (4075 assertions in 527 test cases)
```

Note: the total passed assertions and test cases are subject to change.
Expand Down
13 changes: 11 additions & 2 deletions docs/installing-dependencies.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Installing DSL Dependencies
The DeepStream Services Library (DSL) is built on the NVIDA® [DeepStream SDK](https://developer.nvidia.com/deepstream-sdk) and requires all SDK components to be installed and verified. The current Alpha version of DSL supports only the NVIDI® Jetson™ platform, and all development and testing to date has been purposely done on the Jetson Nano™, the smallest model with the most constraints on resources. Testing will be scalled up to the bigger models before releasing v1.0.
The DeepStream Services Library (DSL) is built on the NVIDA® [DeepStream SDK](https://developer.nvidia.com/deepstream-sdk) and requires all SDK components to be installed and verified. The current Alpha version of DSL supports only the NVIDI® Jetson™ platform, and all development and testing to date has been done on the Jetson Nano™ 4GB Developer Kit. Testing will be scalled up to larger models before releasing v1.0.

Please consult the [NVIDIA DeepStream Documentation](https://docs.nvidia.com/metropolis/index.html) for complete Installation Instructions.
Please consult the [NVIDIA DeepStream Quick Start Guide](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html) for complete Installation Instructions.

DSL is built on [Deepstream 5.1](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html) and [JetPack 4.5.1 GA (corresponding to L4T 32.5.1 release)](https://developer.nvidia.com/embedded/jetpack)

## GStreamer RTSP Server
The RTSP Server lib is required by the RTSP Sink Component
```
sudo apt-get install libgstrtspserver-1.0-dev gstreamer1.0-rtsp
```

## Apache Runtime
The Apache Runtime is used by the GStreamer Window Sink requiring the following libraries to be installed
Expand Down Expand Up @@ -75,4 +83,5 @@ $ sudo apt-get install doxygen
* [Display Type](/docs/api-display-type.md)
* [Branch](/docs/api-branch.md)
* [Component](/docs/api-component.md)
* [SMTP Services](/docs/api-smtp.md)

Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ def main(args):
if retval != DSL_RETURN_SUCCESS:
break

# Add Nvidia's example batch meta handler to the Source Pad of the KTL Tracker
retval = dsl_osd_batch_meta_handler_add('on-screen-display', DSL_PAD_SINK, osd_sink_pad_buffer_probe, None)
# New Custom Pad Probe Handler to call Nvidia's example callback for handling the Batched Meta Data
retval = dsl_pph_custom_new('custom-pph', client_handler=osd_sink_pad_buffer_probe, client_data=None)

# Add the custom PPH to the Sink pad of the OSD
retval = dsl_osd_pph_add('on-screen-display', handler='custom-pph', pad=DSL_PAD_SINK)
if retval != DSL_RETURN_SUCCESS:
break

Expand Down
22 changes: 14 additions & 8 deletions src/DslApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2231,15 +2231,18 @@ DslReturnType dsl_gie_primary_new(const wchar_t* name, const wchar_t* infer_conf
{
RETURN_IF_PARAM_IS_NULL(name);
RETURN_IF_PARAM_IS_NULL(infer_config_file);
RETURN_IF_PARAM_IS_NULL(model_engine_file);

std::wstring wstrName(name);
std::string cstrName(wstrName.begin(), wstrName.end());
std::wstring wstrConfig(infer_config_file);
std::string cstrConfig(wstrConfig.begin(), wstrConfig.end());
std::wstring wstrEngine(model_engine_file);
std::string cstrEngine(wstrEngine.begin(), wstrEngine.end());


std::string cstrEngine;
if (model_engine_file != NULL)
{
std::wstring wstrEngine(model_engine_file);
cstrEngine.assign(wstrEngine.begin(), wstrEngine.end());
}
return DSL::Services::GetServices()->PrimaryGieNew(cstrName.c_str(), cstrConfig.c_str(),
cstrEngine.c_str(), interval);
}
Expand Down Expand Up @@ -2277,18 +2280,21 @@ DslReturnType dsl_gie_secondary_new(const wchar_t* name, const wchar_t* infer_co
{
RETURN_IF_PARAM_IS_NULL(name);
RETURN_IF_PARAM_IS_NULL(infer_config_file);
RETURN_IF_PARAM_IS_NULL(model_engine_file);
RETURN_IF_PARAM_IS_NULL(infer_on_gie);

std::wstring wstrName(name);
std::string cstrName(wstrName.begin(), wstrName.end());
std::wstring wstrConfig(infer_config_file);
std::string cstrConfig(wstrConfig.begin(), wstrConfig.end());
std::wstring wstrEngine(model_engine_file);
std::string cstrEngine(wstrEngine.begin(), wstrEngine.end());
std::wstring wstrInferOnGie(infer_on_gie);
std::string cstrInferOnGie(wstrInferOnGie.begin(), wstrInferOnGie.end());


std::string cstrEngine;
if (model_engine_file != NULL)
{
std::wstring wstrEngine(model_engine_file);
cstrEngine.assign(wstrEngine.begin(), wstrEngine.end());
}
return DSL::Services::GetServices()->SecondaryGieNew(cstrName.c_str(), cstrConfig.c_str(),
cstrEngine.c_str(), cstrInferOnGie.c_str(), interval);
}
Expand Down
67 changes: 36 additions & 31 deletions src/DslApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,41 +304,41 @@ THE SOFTWARE.
#define DSL_RESULT_ODE_AREA_SET_FAILED 0x00100005
#define DSL_RESULT_ODE_AREA_PARAMETER_INVALID 0x00100006

#define DSL_RESULT_DISPLAY_TYPE_RESULT 0x00100000
#define DSL_RESULT_DISPLAY_TYPE_NAME_NOT_UNIQUE 0x00100001
#define DSL_RESULT_DISPLAY_TYPE_NAME_NOT_FOUND 0x00100002
#define DSL_RESULT_DISPLAY_TYPE_THREW_EXCEPTION 0x00100003
#define DSL_RESULT_DISPLAY_TYPE_IN_USE 0x00100004
#define DSL_RESULT_DISPLAY_TYPE_NOT_THE_CORRECT_TYPE 0x00100005
#define DSL_RESULT_DISPLAY_TYPE_IS_BASE_TYPE 0x00100006
#define DSL_RESULT_DISPLAY_RGBA_COLOR_NAME_NOT_UNIQUE 0x00100007
#define DSL_RESULT_DISPLAY_RGBA_FONT_NAME_NOT_UNIQUE 0x00100008
#define DSL_RESULT_DISPLAY_RGBA_TEXT_NAME_NOT_UNIQUE 0x00100009
#define DSL_RESULT_DISPLAY_RGBA_LINE_NAME_NOT_UNIQUE 0x0010000A
#define DSL_RESULT_DISPLAY_RGBA_ARROW_NAME_NOT_UNIQUE 0x0010000B
#define DSL_RESULT_DISPLAY_RGBA_ARROW_HEAD_INVALID 0x0010000C
#define DSL_RESULT_DISPLAY_RGBA_RECTANGLE_NAME_NOT_UNIQUE 0x0010000D
#define DSL_RESULT_DISPLAY_RGBA_POLYGON_NAME_NOT_UNIQUE 0x0010000E
#define DSL_RESULT_DISPLAY_RGBA_CIRCLE_NAME_NOT_UNIQUE 0x0010000F
#define DSL_RESULT_DISPLAY_SOURCE_NUMBER_NAME_NOT_UNIQUE 0x00100010
#define DSL_RESULT_DISPLAY_SOURCE_NAME_NAME_NOT_UNIQUE 0x00100011
#define DSL_RESULT_DISPLAY_SOURCE_DIMENSIONS_NAME_NOT_UNIQUE 0x00100012
#define DSL_RESULT_DISPLAY_SOURCE_FRAMERATE_NAME_NOT_UNIQUE 0x00100013
#define DSL_RESULT_DISPLAY_PARAMETER_INVALID 0x00100014
#define DSL_RESULT_DISPLAY_TYPE_RESULT 0x00200000
#define DSL_RESULT_DISPLAY_TYPE_NAME_NOT_UNIQUE 0x00200001
#define DSL_RESULT_DISPLAY_TYPE_NAME_NOT_FOUND 0x00200002
#define DSL_RESULT_DISPLAY_TYPE_THREW_EXCEPTION 0x00200003
#define DSL_RESULT_DISPLAY_TYPE_IN_USE 0x00200004
#define DSL_RESULT_DISPLAY_TYPE_NOT_THE_CORRECT_TYPE 0x00200005
#define DSL_RESULT_DISPLAY_TYPE_IS_BASE_TYPE 0x00200006
#define DSL_RESULT_DISPLAY_RGBA_COLOR_NAME_NOT_UNIQUE 0x00200007
#define DSL_RESULT_DISPLAY_RGBA_FONT_NAME_NOT_UNIQUE 0x00200008
#define DSL_RESULT_DISPLAY_RGBA_TEXT_NAME_NOT_UNIQUE 0x00200009
#define DSL_RESULT_DISPLAY_RGBA_LINE_NAME_NOT_UNIQUE 0x0020000A
#define DSL_RESULT_DISPLAY_RGBA_ARROW_NAME_NOT_UNIQUE 0x0020000B
#define DSL_RESULT_DISPLAY_RGBA_ARROW_HEAD_INVALID 0x0020000C
#define DSL_RESULT_DISPLAY_RGBA_RECTANGLE_NAME_NOT_UNIQUE 0x0020000D
#define DSL_RESULT_DISPLAY_RGBA_POLYGON_NAME_NOT_UNIQUE 0x0020000E
#define DSL_RESULT_DISPLAY_RGBA_CIRCLE_NAME_NOT_UNIQUE 0x0020000F
#define DSL_RESULT_DISPLAY_SOURCE_NUMBER_NAME_NOT_UNIQUE 0x00200010
#define DSL_RESULT_DISPLAY_SOURCE_NAME_NAME_NOT_UNIQUE 0x00200011
#define DSL_RESULT_DISPLAY_SOURCE_DIMENSIONS_NAME_NOT_UNIQUE 0x00200012
#define DSL_RESULT_DISPLAY_SOURCE_FRAMERATE_NAME_NOT_UNIQUE 0x00200013
#define DSL_RESULT_DISPLAY_PARAMETER_INVALID 0x00200014


/**
* Tap API Return Values
*/
#define DSL_RESULT_TAP_RESULT 0x00200000
#define DSL_RESULT_TAP_NAME_NOT_UNIQUE 0x00200001
#define DSL_RESULT_TAP_NAME_NOT_FOUND 0x00200002
#define DSL_RESULT_TAP_THREW_EXCEPTION 0x00200003
#define DSL_RESULT_TAP_IN_USE 0x00200004
#define DSL_RESULT_TAP_SET_FAILED 0x00200005
#define DSL_RESULT_TAP_COMPONENT_IS_NOT_TAP 0x00200006
#define DSL_RESULT_TAP_FILE_PATH_NOT_FOUND 0x00200007
#define DSL_RESULT_TAP_CONTAINER_VALUE_INVALID 0x00200008
#define DSL_RESULT_TAP_RESULT 0x00300000
#define DSL_RESULT_TAP_NAME_NOT_UNIQUE 0x00300001
#define DSL_RESULT_TAP_NAME_NOT_FOUND 0x00300002
#define DSL_RESULT_TAP_THREW_EXCEPTION 0x00300003
#define DSL_RESULT_TAP_IN_USE 0x00300004
#define DSL_RESULT_TAP_SET_FAILED 0x00300005
#define DSL_RESULT_TAP_COMPONENT_IS_NOT_TAP 0x00300006
#define DSL_RESULT_TAP_FILE_PATH_NOT_FOUND 0x00300007
#define DSL_RESULT_TAP_CONTAINER_VALUE_INVALID 0x00300008

/**
*
Expand Down Expand Up @@ -416,6 +416,7 @@ THE SOFTWARE.
#define DSL_DEFAULT_STREAMMUX_BATCH_TIMEOUT 40000
#define DSL_DEFAULT_STREAMMUX_WIDTH 1920
#define DSL_DEFAULT_STREAMMUX_HEIGHT 1080
#define DSL_DEFAULT_STREAMMUX_MAX_NUM_SERFACES_PER_FRAME 1

#define DSL_DEFAULT_STATE_CHANGE_TIMEOUT_IN_SEC 10

Expand Down Expand Up @@ -2254,6 +2255,8 @@ DslReturnType dsl_tap_record_reset_done_get(const wchar_t* name, boolean* reset_
* @param[in] name unique name for the new GIE object
* @param[in] infer_config_file pathspec of the Infer Config file to use
* @param[in] model_engine_file pathspec of the Model Engine file to use
* Set to NULL or empty string "" to leave unspecified, indicating that
* the model should be created based on the infer_config_file settings
* @param[in] interval frame interval to infer on. 0 = every frame,
* @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GIE_RESULT otherwise.
*/
Expand Down Expand Up @@ -2284,7 +2287,9 @@ DslReturnType dsl_gie_primary_pph_remove(const wchar_t* name, const wchar_t* han
* @param[in] name unique name for the new GIE object
* @param[in] infer_config_file pathspec of the Infer Config file to use
* @param[in] model_engine_file pathspec of the Model Engine file to use
* @param[in] infer_on_gie name of the Primary of Secondary GIE to infer on
* Set to NULL or empty string "" to leave unspecified, indicating that
* the model should be created based on the infer_config_file settings
* @param[in] infer_on_gie name of the Primary or Secondary GIE to infer on
* @param[in] interval frame interval to infer on. 0 = every frame,
* @return DSL_RESULT_SUCCESS on success, DSL_RESULT_GIE_RESULT otherwise.
*/
Expand Down
4 changes: 3 additions & 1 deletion src/DslPipelineSourcesBintr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace DSL
, m_streamMuxHeight(0)
, m_isPaddingEnabled(false)
, m_areSourcesLive(false)
, m_numSurfacesPerFrame(0)
, m_numSurfacesPerFrame(DSL_DEFAULT_STREAMMUX_MAX_NUM_SERFACES_PER_FRAME)
{
LOG_FUNC();

Expand All @@ -47,6 +47,8 @@ namespace DSL
m_pStreamMux = DSL_ELEMENT_NEW(NVDS_ELEM_STREAM_MUX, "stream_muxer");

SetStreamMuxDimensions(DSL_DEFAULT_STREAMMUX_WIDTH, DSL_DEFAULT_STREAMMUX_HEIGHT);

m_pStreamMux->SetAttribute("num-surfaces-per-frame", m_numSurfacesPerFrame);

AddChild(m_pStreamMux);

Expand Down
1 change: 0 additions & 1 deletion src/DslSourceBintr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ namespace DSL
g_object_set(pObject, "skip-frames", 2, NULL);
}
g_object_set(pObject, "enable-max-performance", TRUE, NULL);
g_object_set(pObject, "bufapi-version", TRUE, NULL);
g_object_set(pObject, "drop-frame-interval", m_dropFrameInterval, NULL);
g_object_set(pObject, "num-extra-surfaces", m_numExtraSurfaces, NULL);

Expand Down
Loading

0 comments on commit a514352

Please sign in to comment.