diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2021-04-02 19:41:28 +0300 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2021-04-26 16:25:56 +0300 |
commit | 5fa3325335a0dd982dfe2d2a5e73b134f2a43e47 (patch) | |
tree | 5ba67800c257b8d6d158c0956902894999c4c752 /tests | |
parent | 41ba8c1b00f5ad5f27c37b97ddee196d9d6e6d6a (diff) |
rtpopuspay: set MARKER flag
Set MARKER flag on first buffer after DTX.
According to RFC 3551 section 4.1 the marker bit needs to be set on
"the first packet after a silence period during which packets have
not been transmitted contiguously".
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/rtp-payloading.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c index 038fac458..d26261011 100644 --- a/tests/check/elements/rtp-payloading.c +++ b/tests/check/elements/rtp-payloading.c @@ -1672,7 +1672,7 @@ GST_START_TEST (rtp_vorbis_renegotiate) GST_END_TEST; static guint16 -pull_rtp_buffer (GstHarness * h) +pull_rtp_buffer (GstHarness * h, gboolean has_marker) { gint16 seq; GstBuffer *buf; @@ -1685,6 +1685,11 @@ pull_rtp_buffer (GstHarness * h) seq = gst_rtp_buffer_get_seq (&rtp); gst_rtp_buffer_unmap (&rtp); + if (has_marker) + fail_unless (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_MARKER)); + else + fail_if (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_MARKER)); + gst_buffer_unref (buf); return seq; } @@ -1715,7 +1720,7 @@ test_rtp_opus_dtx (gboolean dtx) gst_buffer_new_wrapped (g_memdup (opus_frame, sizeof (opus_frame)), sizeof (opus_frame)); fail_unless_equals_int (gst_harness_push (h, buf), GST_FLOW_OK); - seq = pull_rtp_buffer (h); + seq = pull_rtp_buffer (h, TRUE); expected_seq = seq + 1; /* push empty frame */ @@ -1728,7 +1733,7 @@ test_rtp_opus_dtx (gboolean dtx) buf = gst_harness_try_pull (h); fail_if (buf); } else { - seq = pull_rtp_buffer (h); + seq = pull_rtp_buffer (h, FALSE); fail_unless_equals_int (seq, expected_seq); expected_seq++; } @@ -1738,7 +1743,7 @@ test_rtp_opus_dtx (gboolean dtx) gst_buffer_new_wrapped (g_memdup (opus_frame, sizeof (opus_frame)), sizeof (opus_frame)); fail_unless_equals_int (gst_harness_push (h, buf), GST_FLOW_OK); - seq = pull_rtp_buffer (h); + seq = pull_rtp_buffer (h, dtx); fail_unless_equals_int (seq, expected_seq); gst_harness_teardown (h); |