rtp: mp4gpay: Don't set seqnum-base on the caps

This is supposed to be set by another layer, e.g. rtspsrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
This commit is contained in:
Sebastian Dröge 2024-08-07 10:53:25 +03:00 committed by GStreamer Marge Bot
parent de42ae432c
commit 30a5987c9e
2 changed files with 10 additions and 11 deletions

View file

@ -347,7 +347,6 @@ impl RtpBasePay2Impl for RtpMpeg4GenericPay {
let codec_data_str = hex::encode(&codec_data); let codec_data_str = hex::encode(&codec_data);
let caps_builder = gst::Caps::builder("application/x-rtp") let caps_builder = gst::Caps::builder("application/x-rtp")
.field("seqnum-base", self.obj().property::<u32>("seqnum") + 1)
.field("mpegversion", 4i32) .field("mpegversion", 4i32)
.field("encoding-name", "MPEG4-GENERIC") .field("encoding-name", "MPEG4-GENERIC")
.field("config", codec_data_str); .field("config", codec_data_str);

View file

@ -19,8 +19,8 @@ fn aac_hbr_not_fragmented() {
let src = let src =
"audiotestsrc num-buffers=100 ! audio/x-raw,rate=48000,channels=2 ! fdkaacenc ! aacparse"; "audiotestsrc num-buffers=100 ! audio/x-raw,rate=48000,channels=2 ! fdkaacenc ! aacparse";
let pay = "rtpmp4gpay2"; let pay = "rtpmp4gpay2 seqnum-offset=1";
let depay = "rtpmp4gdepay2"; let depay = "capsfilter caps=application/x-rtp,seqnum-base=(uint)1 ! rtpmp4gdepay2";
let mut expected_pay = Vec::with_capacity(102); let mut expected_pay = Vec::with_capacity(102);
for i in 0..102 { for i in 0..102 {
@ -68,8 +68,8 @@ fn aac_hbr_fragmented() {
let src = let src =
"audiotestsrc num-buffers=100 ! audio/x-raw,rate=48000,channels=1 ! fdkaacenc ! aacparse"; "audiotestsrc num-buffers=100 ! audio/x-raw,rate=48000,channels=1 ! fdkaacenc ! aacparse";
let pay = "rtpmp4gpay2 mtu=288"; let pay = "rtpmp4gpay2 mtu=288 seqnum-offset=1";
let depay = "rtpmp4gdepay2"; let depay = "capsfilter caps=application/x-rtp,seqnum-base=(uint)1 ! rtpmp4gdepay2";
let mut expected_pay = Vec::with_capacity(102); let mut expected_pay = Vec::with_capacity(102);
for i in 0..102 { for i in 0..102 {
@ -183,8 +183,8 @@ fn generic_not_fragmented() {
buffers.push(buffer); buffers.push(buffer);
} }
let pay = format!("rtpmp4gpay2 mtu={MTU}"); let pay = format!("rtpmp4gpay2 mtu={MTU} seqnum-offset=1");
let depay = "rtpmp4gdepay2"; let depay = "capsfilter caps=application/x-rtp,seqnum-base=(uint)1 ! rtpmp4gdepay2";
let mut expected_pay = Vec::with_capacity(BUFFER_NB); let mut expected_pay = Vec::with_capacity(BUFFER_NB);
for i in 0..PACKETS_PER_BUFFER { for i in 0..PACKETS_PER_BUFFER {
@ -296,8 +296,8 @@ fn generic_fragmented() {
buffers.push(buffer); buffers.push(buffer);
} }
let pay = format!("rtpmp4gpay2 mtu={MTU}"); let pay = format!("rtpmp4gpay2 mtu={MTU} seqnum-offset=1");
let depay = "rtpmp4gdepay2"; let depay = "capsfilter caps=application/x-rtp,seqnum-base=(uint)1 ! rtpmp4gdepay2";
let mut expected_pay = Vec::with_capacity(BUFFER_NB); let mut expected_pay = Vec::with_capacity(BUFFER_NB);
for i in 0..BUFFER_NB { for i in 0..BUFFER_NB {
@ -422,8 +422,8 @@ fn generic_variable_au_size() {
buffers.push(buffer); buffers.push(buffer);
} }
let pay = format!("rtpmp4gpay2 mtu={MTU}"); let pay = format!("rtpmp4gpay2 mtu={MTU} seqnum-offset=1");
let depay = "rtpmp4gdepay2"; let depay = "capsfilter caps=application/x-rtp,seqnum-base=(uint)1 ! rtpmp4gdepay2";
let mut expected_pay = Vec::with_capacity(AU_NB); let mut expected_pay = Vec::with_capacity(AU_NB);
let mut pending_size = 0; let mut pending_size = 0;