Skip to content

Commit

Permalink
Merge pull request #1092 from prominenceai/v0.27.a.alpha
Browse files Browse the repository at this point in the history
v0.27.a.alpha
  • Loading branch information
rjhowell44 authored Oct 24, 2023
2 parents 2792532 + c8d4b79 commit 97c3ecc
Show file tree
Hide file tree
Showing 25 changed files with 216 additions and 401 deletions.
1 change: 0 additions & 1 deletion .codelite/deepstream-services-library.project
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@
<File Name="../examples/python/encode_and_save_frame_to_jpeg_thumbnail_periodically.py"/>
<File Name="../examples/python/encode_and_save_frame_to_jpeg_on_viewer_demand.py"/>
<File Name="../examples/python/2uri_file_demuxer_pgie_iou_tiler_osd_window_2_file.py"/>
<File Name="../examples/python/2uri_splitter_pgie_iou_osd_window_and_file.py"/>
<File Name="../examples/python/4uri_file_pgie_iou_tiler_osd_overlay.py"/>
<File Name="../examples/python/smart_record_sink_start_session_on_ode_occurrence.py"/>
<File Name="../examples/python/smart_record_sink_start_session_on_user_demand.py"/>
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)
USER_SITE = "`python3 -m site --user-site`"

CXX_VERSION:=c++17
DSL_VERSION:='L"v0.27.alpha"'
DSL_VERSION:='L"v0.27.a.alpha"'
GLIB_VERSION:=2.0
GSTREAMER_VERSION:=1.0
GSTREAMER_SUB_VERSION:=16
Expand Down
1 change: 1 addition & 0 deletions Release Notes/dsl-releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

| Release | Date |
| --------------------------------------------------- | ----------- |
| [v0.27.a.alpha](/Release%20Notes/v0.27.alpha.md) | 10/24/2023 |
| [v0.27.alpha](/Release%20Notes/v0.27.alpha.md) | 09/13/2023 |
| [v0.26.a.alpha](/Release%20Notes/v0.26.a.alpha.md) | 06/07/2023 |
| [v0.26.alpha](/Release%20Notes/v0.26.alpha.md) | 05/03/2023 |
Expand Down
12 changes: 12 additions & 0 deletions Release Notes/v0.27.a.alpha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# v0.27.a.alpha Release Notes
**Important!**
* `v0.27.a.alpha` is a **patch** release (patch `a` for the `v0.27.alpha` release).
* There are no new services in this release. The public/client API in DslApi.h has not been changed.
* There are only bug fixes and minor documentation updates.

## Issues closed in this release
### Bugs closed in this release
* 2uri_file_pgie_iou_tracker_3sgie_tiler_osd_custom_pph_window.py fails to fully transition to play [#1086](https://github.com/prominenceai/deepstream-services-library/issues/1086).
* 2uri_file_demuxer_pgie_iou_tiler_osd_window_2_file.py fails to play - demuxer not allowed as branch [#1087](https://github.com/prominenceai/deepstream-services-library/issues/1087).
* dsl_sink_record_session_stop missing async parameter in dsl.py [#1088](https://github.com/prominenceai/deepstream-services-library/issues/1088).
* Set all "async" and "qos" properties for all Sinks to "false" on construction - as done previous to v0.27.alpha. [#1090](https://github.com/prominenceai/deepstream-services-library/issues/1090).
39 changes: 22 additions & 17 deletions docs/api-sink.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,28 @@ As a general rule
* **`max-lateness`** : The max-lateness property affects how the Sink deals with buffers that arrive too late. A buffer arrives too late in the Sink when the presentation time (as a combination of the last segment, buffer timestamp and element base_time) plus the duration is before the current time of the clock. If the frame is later than max-lateness (in nanoseconds), the sink will drop the buffer without calling the render method. This feature is disabled if `sync=false`. See [`dsl_sink_max_lateness_get`](#dsl_sink_max_lateness_get) and [`dsl_sink_max_lateness_se`t](#dsl_sink_max_lateness_set).
* **`qos`** :If `qos=true`, the property will enable the quality-of-service features of the Sink which gather statistics about the real-time performance of the clock synchronization. For each buffer received in the Sink, statistics are gathered and a QOS event is sent upstream with these numbers. This information can then be used by upstream elements to reduce their processing rate, for example. See [`dsl_sink_qos_enabled_get`](#dsl_sink_qos_enabled_get) and [`dsl_sink_qos_enabled_set`](#dsl_sink_qos_enabled_set).

**IMPORTANT!** All DSL Sink Components use the default property values assigned to their GStreamer (GST) Sink Plugin as defined in the table below.

#### Default common property values
| Sink | GST Plugin | sync | async | max-lateness | qos |
| -------------------|---------------|-------|------ | ------------ | ----- |
| Overlay Sink | nvoverlaysink | true | true | 20000000 | true |
| Window Sink | nveglglessink | true | true | 20000000 | true |
| File Sink | filesink | false | true | -1 | false |
| Record Sink | n/a | n/a | n/a | n/a | n/a |
| RTSP Sink | udpsink | true | true | -1 | false |
| WebRTC Sink | fakesink | false | true | -1 | false |
| Message Sink | nvmsgbroker | true | true | -1 | false |
| App Sink | appsink | true | true | -1 | false |
| Interpipe Sink | interpipesink | false | true | -1 | false |
| Multi-Image Sink | multifilesink | false | true | -1 | false |
| Frame-Capture Sink | appsink | true | true | -1 | false |
| Fake Sink | fakesink | false | true | -1 | false |
**IMPORTANT!** All DSL Sink Components use the default property values assigned to their GStreamer (GST) Sink Plugins, except for.
1. All set their `async` property to false on construction. Synchronization is required to support multiple levels of multiple [Secondary Inference](/docs/api-infer.md)
2. All use a QOS value assigned to false (disabled)

#### Sink common property values
* A single value indicates that the default is used.
* `a/b` values define both default/updated used value.

| Sink | GST Plugin | sync | async | max-lateness | qos |
| -------------------|---------------|-------|------------ | ------------ | ----------- |
| Overlay Sink | nvoverlaysink | true | true/false | 20000000 | true/false |
| Window Sink | nveglglessink | true | true/false | 20000000 | true/false |
| File Sink | filesink | false | true/false | -1 | false |
| Record Sink | na | na | na | na | na |
| RTSP Sink | udpsink | true | true/false | -1 | false |
| WebRTC Sink | fakesink | false | true/false | -1 | false |
| Message Sink | nvmsgbroker | true | true/false | -1 | false |
| App Sink | appsink | true | true/false | -1 | false |
| Interpipe Sink | interpipesink | false | true/false | -1 | false |
| Multi-Image Sink | multifilesink | false | true/false | -1 | false |
| Frame-Capture Sink | appsink | true | true/false | -1 | false |
| Fake Sink | fakesink | false | true/false | -1 | false |

<b id="f1">1</b> _The NVIDIA Smart Recording Bin - used by the Record Sink - does not support/extern any of the common sink properties._ [↩](#a1)

Expand Down
6 changes: 3 additions & 3 deletions dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5506,11 +5506,11 @@ def dsl_sink_record_session_start(name, start, duration, client_data):
##
## dsl_sink_record_session_stop()
##
_dsl.dsl_sink_record_session_stop.argtypes = [c_wchar_p]
_dsl.dsl_sink_record_session_stop.argtypes = [c_wchar_p, c_bool]
_dsl.dsl_sink_record_session_stop.restype = c_uint
def dsl_sink_record_session_stop(name):
def dsl_sink_record_session_stop(name, sync):
global _dsl
result = _dsl.dsl_sink_record_session_stop(name)
result = _dsl.dsl_sink_record_session_stop(name, sync)
return int(result)

##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,25 +195,15 @@ int main(int argc, char** argv)
retval = dsl_osd_new(L"on-screen-display", TRUE, TRUE, TRUE, FALSE);
if (retval != DSL_RESULT_SUCCESS) break;

// IMPORTANT! the default Window-Sink (and Overlay-Sink) settings must by
// updated to support dynamic Pipeline updates... specifically, we need to
// disable the "sync", "max-lateness", and "qos" properties.
// New Window Sink, 0 x/y offsets.
retval = dsl_sink_window_new(L"window-sink",
300, 300, 1280, 720);
if (retval != DSL_RESULT_SUCCESS) break;

// Disable the "sync" setting
// IMPORTANT! the default Window-Sink (and Overlay-Sink) "sync" settings must
// be set to false to support dynamic Pipeline updates.ties.
retval = dsl_sink_sync_enabled_set(L"window-sink", FALSE);
if (retval != DSL_RESULT_SUCCESS) break;

// Disable the "max-lateness" setting
retval = dsl_sink_max_lateness_set(L"window-sink", -1);
if (retval != DSL_RESULT_SUCCESS) break;

// Disable the "qos" setting
retval = dsl_sink_qos_enabled_set(L"window-sink", FALSE);
if (retval != DSL_RESULT_SUCCESS) break;

// Add the XWindow event handler functions defined above
retval = dsl_sink_window_key_event_handler_add(L"window-sink",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,26 +208,16 @@ int main(int argc, char** argv)
retval = dsl_osd_new(L"on-screen-display", TRUE, TRUE, TRUE, FALSE);
if (retval != DSL_RESULT_SUCCESS) break;

// IMPORTANT! the default Window-Sink (and Overlay-Sink) settings must by
// updated to support dynamic Pipeline updates... specifically, we need to
// disable the "sync", "max-lateness", and "qos" properties.
// New Window Sink, 0 x/y offsets.
retval = dsl_sink_window_new(L"window-sink",
300, 300, 1280, 720);
if (retval != DSL_RESULT_SUCCESS) break;

// Disable the "sync" setting
// IMPORTANT! the default Window-Sink (and Overlay-Sink) "sync" settings must
// be set to false to support dynamic Pipeline updates.ties.
retval = dsl_sink_sync_enabled_set(L"window-sink", FALSE);
if (retval != DSL_RESULT_SUCCESS) break;

// Disable the "max-lateness" setting
retval = dsl_sink_max_lateness_set(L"window-sink", -1);
if (retval != DSL_RESULT_SUCCESS) break;

// Disable the "qos" setting
retval = dsl_sink_qos_enabled_set(L"window-sink", FALSE);
if (retval != DSL_RESULT_SUCCESS) break;

// Add the XWindow event handler functions defined above
retval = dsl_sink_window_key_event_handler_add(L"window-sink",
xwindow_key_event_handler, NULL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ def main(args):
break

# New File Sink with H264 Codec type and MKV conatiner muxer,
# and bit-rate and iframe interval
# and bit-rate=0 (use plugin default) and interval=0=everyframe.
retval = dsl_sink_file_new('file-sink', "./output.mkv",
DSL_CODEC_H264, DSL_CONTAINER_MKV, 2000000, 0)
DSL_CODEC_H264, DSL_CONTAINER_MKV, 0, 0)
if retval != DSL_RETURN_SUCCESS:
break

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def main(args):

# New OSD with text, clock and bbox display all enabled.
retval = dsl_osd_new('on-screen-display',
text_enabled=True, clock_enabled=True, bbox_enabled=True, mask_enabled=False)
text_enabled=True, clock_enabled=True,
bbox_enabled=True, mask_enabled=False)
if retval != DSL_RETURN_SUCCESS:
break

Expand All @@ -147,15 +148,16 @@ def main(args):
break

# New File Sink with H265 Codec type and MPEG4 conatiner muxer,
# and bit-rate and iframe interval
# and bit-rate=0 (use plugin default) and interval=0=everyframe.
retval = dsl_sink_file_new('file-sink',
"./output.mp4", DSL_CODEC_H265, DSL_CONTAINER_MP4, 2000000, 0)
"./output.mp4", DSL_CODEC_H265, DSL_CONTAINER_MP4, 0, 0)
if retval != DSL_RETURN_SUCCESS:
break

# Add all the components to a new pipeline
retval = dsl_pipeline_new_component_add_many('pipeline',
['uri-source', 'primary-gie', 'iou-tracker', 'on-screen-display', 'window-sink', 'file-sink', None])
['uri-source', 'primary-gie', 'iou-tracker', 'on-screen-display',
'window-sink', 'file-sink', None])
if retval != DSL_RETURN_SUCCESS:
break

Expand Down
182 changes: 0 additions & 182 deletions examples/python/2uri_splitter_pgie_iou_osd_window_and_file.py

This file was deleted.

Loading

0 comments on commit 97c3ecc

Please sign in to comment.