Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@ Full source-build, source4 and non-x86 runtime validation remain pending.
- Reorganize the MV3DT configuration templates into per-detector profiles with a
shared `common/` folder.

## Fixed issues

- `gst-nvdsudp`:
- `nvdsudpsrc` adds the `enable-dhds` property (default `true`), which enables
RTP Dynamic Header Data Split so that ST 2110-20 streams with more than one
SRD per packet are received correctly.
- `nvdsudpsrc` and `nvdsudpsink` derive RTP-timestamp PTS from an offset to
UTC, so they work when the pipeline clock is not a REALTIME clock.
`nvdsudpsrc` no longer changes the shared system clock to REALTIME.
- `nvdsudpsink` keeps the parity bits of the ST 2110-40 Data Count word.
- `nvdsudpsink` sends the two fields of interlaced ST 2110-20 video
correctly.
- `nvdsudpsink` sets the RTP timestamp 5 ticks before the media time, as the
Rivermax dev kit does.
- `nvdsudpsink` with `ptp-src` set sends ANC and RTP packet input on time.
It used to give Rivermax send times 37 seconds in the past.
- `nvdsudpsink` with `pass-rtp-timestamp` set and no `GstRTPTimestampMeta`
on its input sends RTP timestamps in TAI time, as it does by default. It
used to send them in UTC time. A receiving `nvdsudpsrc` needs
`adjust-leap-seconds=1`.
- `nvdsudpsink` with `pass-rtp-timestamp` set converts the buffer PTS to
running time, so RTP timestamps are correct when the segment does not
start at 0. It used to treat the PTS as running time.
- `gst-nvdsudp` is tested with Rivermax 1.91.21.

____

# DeepStream 9.2.0 (19 October 2026)

## Source availability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ timeout,Posts a message after this many nanoseconds; 0 disables the timeout,"Int
0 to 18,446,744,073,709,551,615",timeout=0,dGPU Jetson
latency-offset,"Offset in nanoseconds to add to buffer PTS/DTS when use-rtp-timestamp is enabled, to account for pipeline latency","Integer (uint64),
0 to 18,446,744,073,709,551,615",latency-offset=0,dGPU Jetson
enable-dhds,"Enable RTP Dynamic Header Data Split (DHDS) on the Rivermax device, to receive ST 2110-20 streams with more than one SRD per packet. Has no effect when header-size is 0. When DHDS is active, a header-size below 32 is raised to 32. If the interface does not support DHDS, the element logs a warning and receives without it",Boolean,enable-dhds=true,dGPU Jetson
11 changes: 6 additions & 5 deletions docs/text/DS_plugin_gst-nvdsudpsink.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,19 @@ If enabled, Rivermax media API's will allocate GPU memory to receive the SMPTE 2
- If user want to generate RTP header timestamp based on upstream time (e.g. buffer pts or meta), set `pass-rtp-timestamp` property. It will ignore the timestamp generation logic discussed above.
It has two ways to set RTP timestamp for outgoing buffers:

- Use the buffer PTS it received from upstream component for calculating RTP timestamp for outgoing buffers:
- Use the buffer PTS it received from upstream component for calculating RTP timestamp for outgoing buffers. The RTP timestamp is in TAI, as in the default mode:

```text
RTP time = base time of pipeline + buffer PTS
RTP time = base wall-clock time + buffer running time + 37 s + rtp-timestamp-offset
```

The buffer running time is the running time of the buffer PTS in the sink's segment. If the first buffer has no valid running time, nvdsudpsink generates RTP timestamps from the clock, as in the default mode. The base wall-clock time is the CLOCK_REALTIME (UTC) time at the moment the pipeline clock read the pipeline's base time. nvdsudpsink converts between the pipeline clock and CLOCK_REALTIME using an offset taken at the first buffer, so the pipeline clock does not need to be REALTIME, but it must run at the CLOCK_REALTIME rate.

- If metadata `GstRTPTimestampMeta` is attached along with the upstream buffer, the timestamp from that metadata will be used directly and take precedence over the RTP timestamp calculated using buffer PTS.

`pass-rtp-timestamp` is only valid if no payloader is used before nvdsudpsink, that is, in Mode 3 and the SMPTE ST 2110-40 ancillary data sub-variant.

- Receiver (nvdsudpsrc) has to do leap second adjustment if they receive timestamp in TAI time and wants to use UTC time. Whenever sender (nvdsudpsink) does packetization, by default it uses TAI time. So leap-second adjustment will be required in most scenarios except when `pass-rtp-timestamp` is set and the upstream component does not provide timestamps in TAI time.
It is the user's responsibility to identify if TAI time based timestamps are expected in such cases.
- nvdsudpsink sends TAI RTP timestamps in every case except one: when `pass-rtp-timestamp` is set and the `GstRTPTimestampMeta` from the upstream component carries timestamps that are not TAI, nvdsudpsink sends those timestamps unchanged. So a receiver normally has to remove the 37 s (nvdsudpsrc: `adjust-leap-seconds`). It is the user's responsibility to identify which timestamps are expected in that case.

* Example pipeline that uses "pass-rtp-timestamp" property to pass the timestamp it received from upstream nvdsudpsrc component.

Expand Down Expand Up @@ -243,7 +244,7 @@ Refer to the `SMPTE ST 2110-20:2017` for more information.
System can also have Gstreamer provided OSS implementation of udp sink (`udpsink`) component. In that case system would have two implementations for udp sink - `udpsink` and `nvdsudpsink`.
`nvdsudpsink` component can only be used with NVIDIA ConnectX-5 and above cards after having installed `Rivermax` SDK and its license.

* Download and setup the `Rivermax` 1.70.x SDK here: https://developer.nvidia.com/networking/rivermax-getting-started.
* Download and setup the `Rivermax` SDK here: https://developer.nvidia.com/networking/rivermax-getting-started. `nvdsudpsink` is tested with Rivermax 1.91.21.

* Follow the instruction on the SDK page to obtain development license for Rivermax.

Expand Down
32 changes: 14 additions & 18 deletions docs/text/DS_plugin_gst-nvdsudpsrc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,26 @@ With the support for de-packetization, `nvdsudpsrc` can now have five different
The logic for reconstruction of rtp ticks and converting it to running time is as follows:

```text
- Get current time from epoch time (real clock)
- Convert current time to RTP ticks. (clock rate used for calculation to rtp ticks)
- Mask upper 32 bits out of the above RTP ticks and consider as rtp_tick_base for reconstruction of 64 bit RTP ticks.
- Add 32 bit rtp ticks received from RTP packet header to this rtp_tick_base
(This will be 64 bit reconstructed rtp ticks)
- Convert the 64 bit rtp ticks to RTP time
(RTP time = rtp ticks in seconds / clock rate)

Buffer PTS/DTS = (RTP time - Base Time Of Pipeline) - LEAP_SECONDS (if enabled "adjust-leap-seconds" is enabled)
- Get the current wall-clock time: CLOCK_REALTIME (UTC), plus 37 s (TAI) if "adjust-leap-seconds" is enabled
- Convert it to RTP ticks at the stream's clock rate, and keep the upper 32 bits as rtp_tick_base
- Add the 32-bit RTP timestamp from the packet header to rtp_tick_base, giving 64-bit RTP ticks
- RTP time = 64-bit RTP ticks / clock rate

Buffer PTS/DTS = RTP time - base wall-clock time + latency-offset
```

We should use CLOCK_REALTIME for the sender and receiver pipeline, in case we want to achieve reconstruction of RTP timestamp (punched from nvdsudpsink/sender) at nvdsudpsrc/receiver component. That is why, when `use-rtp-timestamp` property is enabled the nvdsudpsrc acts as a clock provider to the pipeline based on REALTIME_CLOCK.
Also, for the above logic to work, it is important that the systems used are synchronized to same time using some protocols like NTP or PTP.
The base wall-clock time is the wall-clock time at the moment the pipeline clock read the pipeline's base time.

- The `adjust-leap-seconds` property is used to subtract the leap-seconds (37) from the received RTP timestamp in TAI time, so that it matches the UTC time. Use it, if nvdsudpsrc is expected to receive RTP packets in TAI time and your pipeline is using UTC time for buffer PTS/DTS.
To reconstruct the RTP timestamp that nvdsudpsink sent, the sender and receiver hosts must have their system clocks (CLOCK_REALTIME) synchronized to the same time, normally by PTP, with the system clock on UTC. When `use-rtp-timestamp` is enabled, nvdsudpsrc offers the system clock to the pipeline. It converts between the pipeline clock and CLOCK_REALTIME using an offset taken when the first packet arrives, so the pipeline clock does not need to be REALTIME, but it must run at the CLOCK_REALTIME rate.

For most scenarios "nvdsudpsink" component will sent TAI time as RTP timestamps, so this property should be enabled. Exception comes when `pass-rtp-timestamp` is employed by `nvdsudpsink` and its upstream component does not provide timestamps in TAI time.
It is the user's responsibility to identify if TAI time based timestamps are expected in such cases.
- The `adjust-leap-seconds` property is for RTP timestamps in TAI, which is 37 s ahead of UTC. It removes that difference from buffer PTS/DTS. It has no effect unless `use-rtp-timestamp` is enabled.

If `use-rtp-timestamp` is not enabled, then `adjust-leap-seconds` will have no effect.
nvdsudpsink sends TAI RTP timestamps in most cases, so this property should normally be enabled. The exception is when nvdsudpsink uses `pass-rtp-timestamp` and the `GstRTPTimestampMeta` from its upstream component carries timestamps that are not TAI. It is the user's responsibility to identify which timestamps are expected in that case.

System can also have Gstreamer provided OSS implementation of udp source (`udpsrc`) component. In that case system would have two implementations for udp source - `udpsrc` and `nvdsudpsrc`.
`nvdsudpsrc` component can only be used with NVIDIA ConnectX-5 and above cards after having installed `Rivermax` SDK and its license.

* Download and setup the `Rivermax` 1.70.x SDK here: https://developer.nvidia.com/networking/rivermax-getting-started
* Download and setup the `Rivermax` SDK here: https://developer.nvidia.com/networking/rivermax-getting-started. `nvdsudpsrc` is tested with Rivermax 1.91.21.

* Follow the instruction on the SDK page to obtain `Rivermax` development license.

Expand Down Expand Up @@ -175,6 +170,7 @@ The following table describes the Gst-nvdsudpsrc plugin’s Gst properties.
| used-socket (read-only) | Socket currently in use for UDP reception; NULL means no socket | GObject (GSocket) | | dGPU Jetson |
| timeout | Posts a message after this many nanoseconds; 0 disables the timeout | Integer (uint64),<br />0 to 18,446,744,073,709,551,615 | timeout=0 | dGPU Jetson |
| latency-offset | Offset in nanoseconds to add to buffer PTS/DTS when use-rtp-timestamp is enabled, to account for pipeline latency | Integer (uint64),<br />0 to 18,446,744,073,709,551,615 | latency-offset=0 | dGPU Jetson |
| enable-dhds | Enable RTP Dynamic Header Data Split (DHDS) on the Rivermax device, to receive ST 2110-20 streams with more than one SRD per packet. Has no effect when header-size is 0. When DHDS is active, a header-size below 32 is raised to 32. If the interface does not support DHDS, the element logs a warning and receives without it | Boolean | enable-dhds=true | dGPU Jetson |

## Example pipelines

Expand Down Expand Up @@ -265,7 +261,7 @@ In this mode, `nvdsudpsrc` depayloads RFC 8331 RTP packets back into ST2038 wire
```text
gst-launch-1.0 nvdsudpsrc address=<unicast / multicast address> port=<port number> \
local-iface-ip=<ip addr of NIC> \
use-rtp-timestamp=1 adjust-leap-seconds=0 header-size=20 \
use-rtp-timestamp=1 adjust-leap-seconds=1 header-size=20 \
caps='meta/x-st-2038, alignment=frame, framerate=30/1' \
! identity silent=0 ! fakesink dump=true -v
```
Expand All @@ -276,7 +272,7 @@ In this mode, `nvdsudpsrc` depayloads RFC 8331 RTP packets back into ST2038 wire
gst-launch-1.0 nvdsudpsrc \
st2022-7-streams=<address1>:<port1>,<address2>:<port2> \
local-iface-ip=<ip addr of NIC1>,<ip addr of NIC2> \
use-rtp-timestamp=1 adjust-leap-seconds=0 header-size=20 \
use-rtp-timestamp=1 adjust-leap-seconds=1 header-size=20 \
caps='meta/x-st-2038, alignment=frame, framerate=30/1' \
! identity silent=0 ! fakesink dump=true -v
```
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ timeout,Posts a message after this many nanoseconds; 0 disables the timeout,"Int
0 to 18,446,744,073,709,551,615",timeout=0,dGPU Jetson
latency-offset,"Offset in nanoseconds to add to buffer PTS/DTS when use-rtp-timestamp is enabled, to account for pipeline latency","Integer (uint64),
0 to 18,446,744,073,709,551,615",latency-offset=0,dGPU Jetson
enable-dhds,"Enable RTP Dynamic Header Data Split (DHDS) on the Rivermax device, to receive ST 2110-20 streams with more than one SRD per packet. Has no effect when header-size is 0. When DHDS is active, a header-size below 32 is raised to 32. If the interface does not support DHDS, the element logs a warning and receives without it",Boolean,enable-dhds=true,dGPU Jetson
7 changes: 5 additions & 2 deletions src/gst-plugins/gst-nvdsudp/README
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ Rivermax SDK:
1. Go to https://developer.nvidia.com/networking/rivermax-getting-started and
log in or sign up for an NVIDIA Developer account.
2. Download the Rivermax SDK installation package for your Ubuntu version.
For example, on Ubuntu 24.04:
https://developer.nvidia.com/downloads/networking/secure/Rivermax-Linux-SDK/Installation-Package/Version-1.80.x/rivermax_ubuntu2404_1.80.24.tar.gz
The plugin is tested with Rivermax 1.91.21. For example, on Ubuntu 24.04,
rivermax_ubuntu2404_1.91.21.tar.gz.
Rivermax 1.91 needs ibverbs-providers 63 or newer, which Ubuntu does not
provide. Install the RDMA userspace from DOCA, matching the host ConnectX
driver.
3. Extract the downloaded tarball:
tar -xvf rivermax_ubuntu2404_<rivermax version>.tar.gz
4. Install the Rivermax SDK .deb package from the extracted directory:
Expand Down
2 changes: 1 addition & 1 deletion src/gst-plugins/gst-nvdsudp/gstnvdsudpcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ typedef struct AncPacketInfo {
guint16 horizontal_offset;
guint16 did;
guint16 sdid;
guint8 data_count;
guint16 data_count;
guint16 user_data[ANC_MAX_DATA_COUNT];
guint16 checksum;
} AncPacketInfo;
Expand Down
Loading