From ac79b52cff65ac2e9f896bc954148867ef0c8930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 31 May 2024 09:57:18 +0300 Subject: [PATCH] rtp: Don't restrict payload types for payloaders WebRTC uses payload types 35-63 as dynamic payload types too to be able to place more codec variants into the SDP offer. Instead of allowing just certain payload types, completely remove any restrictions and let the user decide. There's technically nothing wrong with using any payload type, especially when using the encoding-name. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/551 Part-of: --- docs/plugins/gst_plugins_cache.json | 4 ++-- net/rtp/src/av1/depay/imp.rs | 1 - net/rtp/src/av1/pay/imp.rs | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index 87ae9c49..6739a0d9 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -6254,7 +6254,7 @@ "long-name": "RTP AV1 Depayloader", "pad-templates": { "sink": { - "caps": "application/x-rtp:\n media: video\n payload: [ 96, 127 ]\n clock-rate: 90000\n encoding-name: AV1\n", + "caps": "application/x-rtp:\n media: video\n clock-rate: 90000\n encoding-name: AV1\n", "direction": "sink", "presence": "always" }, @@ -6286,7 +6286,7 @@ "presence": "always" }, "src": { - "caps": "application/x-rtp:\n media: video\n payload: [ 96, 127 ]\n clock-rate: 90000\n encoding-name: AV1\n", + "caps": "application/x-rtp:\n media: video\n clock-rate: 90000\n encoding-name: AV1\n", "direction": "src", "presence": "always" } diff --git a/net/rtp/src/av1/depay/imp.rs b/net/rtp/src/av1/depay/imp.rs index 0cc92f70..5fdfc323 100644 --- a/net/rtp/src/av1/depay/imp.rs +++ b/net/rtp/src/av1/depay/imp.rs @@ -107,7 +107,6 @@ impl ElementImpl for RTPAv1Depay { gst::PadPresence::Always, &gst::Caps::builder("application/x-rtp") .field("media", "video") - .field("payload", gst::IntRange::new(96, 127)) .field("clock-rate", CLOCK_RATE as i32) .field("encoding-name", "AV1") .build(), diff --git a/net/rtp/src/av1/pay/imp.rs b/net/rtp/src/av1/pay/imp.rs index 4182c14b..70ce0458 100644 --- a/net/rtp/src/av1/pay/imp.rs +++ b/net/rtp/src/av1/pay/imp.rs @@ -598,7 +598,6 @@ impl ElementImpl for RTPAv1Pay { gst::PadPresence::Always, &gst::Caps::builder("application/x-rtp") .field("media", "video") - .field("payload", gst::IntRange::new(96, 127)) .field("clock-rate", CLOCK_RATE as i32) .field("encoding-name", "AV1") .build(),