Repository navigation
Conversation
|
Test pipelines for this PR added in a public gist:
The full test plan, with pass criteria and the expected PR vs |
|
I've added three more
0fe9baf also updates the docs: the sink page's RTP time formula, the sink and source pages' description of when the timestamps are in TAI time, and (These three commits have not been built or tested yet. The Validation section above still refers to 5d0f742.) |
b6170c9 to
158e4c3
Compare
|
Updated the test gist for the current head (158e4c3). Test plan: https://gist.github.com/tony-fw/d17e07747b3ed515198d46a99f61610d#file-0-st2110-pr113-tests-md What changed:
New check: |
nvdsudpsink kept only the low 8 bits of the 10-bit Data Count word when it parsed ST 2038 input, so the RFC 8331 payload it sent had b8 and b9 cleared instead of the parity bits required by SMPTE ST 291-1 section 6. Keep the full word, and use its low 8 bits as the number of User Data Words. Co-authored-by: Johan Jino <jjino@nvidia.com> Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Enable RTP Dynamic Header Data Split on Rivermax devices for correct ST 2110-20 multi-SRD header data handling. Adds enable-dhds property (default true), device capability checks, and payload size aggregation. Co-authored-by: Anthony Walasik <awalasik@nvidia.com> Co-authored-by: Simon Therriault <stherriault@nvidia.com> Co-authored-by: Johan Jino <jjino@nvidia.com> Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
…idance Subtract 5 from the timestamp as recommended by the Rivermax team. Co-authored-by: Harsh Sinha <hasinha@nvidia.com> Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
…dpsrc/sink work on non-REALTIME clocks The nvdsudpsrc documentation now describes the offset instead of saying that nvdsudpsrc provides a REALTIME pipeline clock. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Rivermax 1.91's rivermax_api.h no longer includes rivermax_deprecated.h, which defines RMAX_CPU_SETSIZE. Use glibc's CPU_SETSIZE from <sched.h> instead. Both are 1024, so builds against older Rivermax are unaffected. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Add enable-dhds to the nvdsudpsrc properties tables. State in the nvdsudpsrc and nvdsudpsink pages and the plugin README that gst-nvdsudp is tested with Rivermax 1.91.21, and note in the README that Rivermax 1.91 needs ibverbs-providers 63 or newer. Add the gst-nvdsudp fixes to CHANGELOG.md. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
For interlaced ST 2110-20 video, nvdsudpsink copied the frame into the packet payload memory in a single 2D copy, keeping the source row order. The payload holds the rows of the first field followed by the rows of the second field, so copy each field separately, taking every other source row. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
…et-list send times with ptp-src nvdsudpsink computes each send time in TAI. Rivermax compares a send time with its own clock, which counts TAI when the sink uses the PTP clock (ptp-src) and UTC otherwise. The raw video and audio path therefore subtracts the leap seconds only when ptp-src is unset. The packet-list path, which ANC and RTP packet input use, subtracted them always, so with ptp-src set it gave Rivermax send times 37 seconds in the past. Make the same check there. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
With pass-rtp-timestamp set and no GstRTPTimestampMeta on its input, nvdsudpsink generates each RTP timestamp from the buffer PTS and the pipeline base time converted to UTC. It added the leap seconds to the send time but not to the RTP timestamp, so each packet was sent at TAI time T and stamped with UTC time T. That put the stream 37 seconds off any ST 2110 receiver, and off a sink with the default pass-rtp-timestamp=0 in the same pipeline. Add the same offset to the RTP timestamp, so it is in TAI time, as in the default mode. When GstRTPTimestampMeta is present, its timestamp is still sent unchanged. A receiving nvdsudpsrc now needs adjust-leap-seconds=1, so the ST 2110-40 receiver examples set it. The sink and source pages now name the remaining case where the timestamps may not be in TAI time: meta from upstream that is not in TAI time. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
With pass-rtp-timestamp set, nvdsudpsink computes the first packet time, which sets both the RTP timestamp and the send time, as the wall-clock time at the pipeline's base time plus the first buffer's PTS. A buffer is due at the base time plus its running time, not its PTS, so the stream was stamped and sent early or late by the difference between the two. They differ when the segment does not start at 0, for example with a demuxer whose segment starts at the first media timestamp, or a pipeline started at a seek position. A PTS of GST_CLOCK_TIME_NONE gave a meaningless time. Convert the PTS with gst_segment_to_running_time. If the first buffer has no valid running time, warn and generate the RTP timestamps from the clock, as with pass-rtp-timestamp=0. With the render thread, do this before queueing the buffer, so that the conversion uses the segment the buffer arrived in, not a later one. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
158e4c3 to
ebdcd39
Compare
Description
Fixes to
nvdsudpsrcandnvdsudpsinkfor SMPTE ST 2110 streams, and a build fix for Rivermax 1.91.nvdsudpsrcenables RTP Dynamic Header Data Split (DHDS) on the Rivermax device, so that ST 2110-20 streams with more than one SRD per packet are received correctly. The newenable-dhdsproperty (defaulttrue) controls it. When DHDS is active, aheader-sizebelow the 32-byte hardware minimum is raised to 32. If an interface does not support DHDS, the element logs a warning and receives without it. With ST 2022-7, DHDS is configured on each leg.nvdsudpsrcandnvdsudpsinkderive RTP-timestamp PTS from an offset between the pipeline clock and UTC, so they work when the pipeline clock is not a REALTIME clock.nvdsudpsrcno longer changes the clock type of the shared system clock, which affected every pipeline in the process.nvdsudpsinkkeeps the parity bits (b8 and b9) of the 10-bit ST 2110-40 Data Count word. It used to keep only the low 8 bits, so the RFC 8331 payload it sent had the parity bits cleared.nvdsudpsinkcopies each field of interlaced ST 2110-20 video into the packet payload memory separately. It used to copy the frame in a single 2D copy, keeping the source row order, but the payload holds the rows of the first field followed by the rows of the second field.nvdsudpsinksets the RTP timestamp 5 ticks before the media time, as the Rivermax dev kit does, instead of 1 tick.nvdsudpsinkuses glibc'sCPU_SETSIZEinstead ofRMAX_CPU_SETSIZEfor its thread affinity. Rivermax 1.91'srivermax_api.hno longer includesrivermax_deprecated.h, which definesRMAX_CPU_SETSIZE. Both are 1024.enable-dhdsto thenvdsudpsrcproperties tables, state thatgst-nvdsudpis tested with Rivermax 1.91.21, and note that Rivermax 1.91 needsibverbs-providers63 or newer.CHANGELOG.mdlists the fixes.No related issue.
Reason
These fixes are needed to receive and transmit ST 2110-20 and ST 2110-40 streams in NMOS-controlled pipelines, where the pipeline clock is not always a REALTIME clock, and to build against current Rivermax.
Validation
developat 4cc9b11)CHANGELOG.md)bash ./build/build.sh --package)This PR only changes
gst-nvdsudp, whichbuild/build.shdoes not build (seeCONTRIBUTING.md). Neither the package build nor the source4 sanity test runs this code, so they have not been run for this PR.gst-nvdsudpwas built withmake CUDA_VER=13.2, using the CUDA 13.2 that comes with DeepStream 9.2, against Rivermax 1.91.21, and tested with the pipelines below.Pipelines used to exercise the changes:
Known limitations:
LEGACY_API=1build ofgst-nvdsudp(legacy_api/) still usesRMAX_CPU_SETSIZEand is unchanged.Checklist
NVIDIA/DeepStream:develop.NVIDIA/DeepStream:develop.bash ./build/build.sh --packagecompleted successfully.deepstream-appon x86 or Jetson.git commit -s).CHANGELOG.mdare updated, where applicable.By submitting this pull request, you agree to follow our code of conduct and our contribution guidelines. See the pull request guidelines for details.
Co-authored-by: Gareth's 🤖 buddy