Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-08-05 10:41:33 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-08-08 10:08:31 +0300
commite9a0307b9429663433ceb4a93f71009c2d178607 (patch)
tree268608d1f65d55174f4bc1d6aa473475385b5a14 /gst
parent3296a03d73b9794aedf3e040b71fe39f3362bbbd (diff)
rtph26[45]pay: Change default aggregate-mode to "none" for backwards compatibility
We didn't aggregate at all in previous versions and there are apparently various RTP implementations that don't handle aggregation well at all. As part of this also document that for RTSP it is recommended to keep it set to "none" while for WebRTC it should be set to "zero-latency". Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/749 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/692>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtp/gstrtph264pay.c17
-rw-r--r--gst/rtp/gstrtph265pay.c15
2 files changed, 29 insertions, 3 deletions
diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c
index 01a3659b1..67353283e 100644
--- a/gst/rtp/gstrtph264pay.c
+++ b/gst/rtp/gstrtph264pay.c
@@ -99,7 +99,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
#define DEFAULT_SPROP_PARAMETER_SETS NULL
#define DEFAULT_CONFIG_INTERVAL 0
-#define DEFAULT_AGGREGATE_MODE GST_RTP_H264_AGGREGATE_ZERO_LATENCY
+#define DEFAULT_AGGREGATE_MODE GST_RTP_H264_AGGREGATE_NONE
enum
{
@@ -167,12 +167,25 @@ gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
+ /**
+ * GstRtpH264Pay:aggregate-mode
+ *
+ * Bundle suitable SPS/PPS NAL units into STAP-A aggregate packets.
+ *
+ * This can potentially reduce RTP packetization overhead but not all
+ * RTP implementations handle it correctly.
+ *
+ * For best compatibility, it is recommended to set this to "none" (the
+ * default) for RTSP and for WebRTC to "zero-latency".
+ *
+ * Since: 1.18
+ */
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_AGGREGATE_MODE,
g_param_spec_enum ("aggregate-mode",
"Attempt to use aggregate packets",
"Bundle suitable SPS/PPS NAL units into STAP-A "
- "aggregate packets. ",
+ "aggregate packets",
GST_TYPE_RTP_H264_AGGREGATE_MODE,
DEFAULT_AGGREGATE_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
diff --git a/gst/rtp/gstrtph265pay.c b/gst/rtp/gstrtph265pay.c
index fc11e60fa..3793ad613 100644
--- a/gst/rtp/gstrtph265pay.c
+++ b/gst/rtp/gstrtph265pay.c
@@ -133,7 +133,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
);
#define DEFAULT_CONFIG_INTERVAL 0
-#define DEFAULT_AGGREGATE_MODE GST_RTP_H265_AGGREGATE_ZERO_LATENCY
+#define DEFAULT_AGGREGATE_MODE GST_RTP_H265_AGGREGATE_NONE
enum
{
@@ -192,6 +192,19 @@ gst_rtp_h265_pay_class_init (GstRtpH265PayClass * klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
);
+ /**
+ * GstRtpH265Pay:aggregate-mode
+ *
+ * Bundle suitable SPS/PPS NAL units into STAP-A aggregate packets.
+ *
+ * This can potentially reduce RTP packetization overhead but not all
+ * RTP implementations handle it correctly.
+ *
+ * For best compatibility, it is recommended to set this to "none" (the
+ * default) for RTSP and for WebRTC to "zero-latency".
+ *
+ * Since: 1.18
+ */
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_AGGREGATE_MODE,
g_param_spec_enum ("aggregate-mode",