rtprtxsend: mark RTX buffers with GST_RTP_BUFFER_FLAG_RETRANSMISSION

It is useful for elements downstream from rtxsend to know if the RTP
buffer they are dealing with is an RTX buffer or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2272>
This commit is contained in:
Havard Graff 2021-02-01 10:36:42 +01:00 committed by GStreamer Marge Bot
parent df64280874
commit b7b71e6974
2 changed files with 5 additions and 0 deletions

View file

@ -734,6 +734,9 @@ gst_rtp_rtx_buffer_new (GstRtpRtxSend * rtx, GstBuffer * buffer)
/* Copy over timestamps */ /* Copy over timestamps */
gst_buffer_copy_into (new_buffer, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1); gst_buffer_copy_into (new_buffer, buffer, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
/* mark this is a RETRANSMISSION buffer */
GST_BUFFER_FLAG_SET (new_buffer, GST_RTP_BUFFER_FLAG_RETRANSMISSION);
return new_buffer; return new_buffer;
} }

View file

@ -33,6 +33,8 @@
} else { \ } else { \
fail_unless_equals_int (GST_READ_UINT16_BE (gst_rtp_buffer_get_payload \ fail_unless_equals_int (GST_READ_UINT16_BE (gst_rtp_buffer_get_payload \
(&_rtp)), expected_seqnum); \ (&_rtp)), expected_seqnum); \
fail_unless (GST_BUFFER_FLAG_IS_SET (buf, \
GST_RTP_BUFFER_FLAG_RETRANSMISSION)); \
} \ } \
gst_rtp_buffer_unmap (&_rtp); \ gst_rtp_buffer_unmap (&_rtp); \
} G_STMT_END } G_STMT_END