mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
test: rtpbin_buffer_list: add function to check sequence number
This commit is contained in:
parent
ec56e2fb78
commit
0537925c3a
1 changed files with 21 additions and 0 deletions
|
@ -131,6 +131,27 @@ create_rtp_packet_buffer (gconstpointer header, gint header_size,
|
|||
return buffer;
|
||||
}
|
||||
|
||||
static void
|
||||
check_seqnum (GstBuffer * buffer, guint16 seqnum)
|
||||
{
|
||||
GstMemory *memory;
|
||||
GstMapInfo info;
|
||||
gboolean ret;
|
||||
guint16 current_seqnum;
|
||||
|
||||
fail_if (buffer == NULL);
|
||||
|
||||
memory = gst_buffer_get_memory (buffer, 0);
|
||||
ret = gst_memory_map (memory, &info, GST_MAP_READ);
|
||||
fail_if (ret == FALSE);
|
||||
|
||||
current_seqnum = info.data[2] << 8 | info.data[3];
|
||||
fail_unless (current_seqnum == seqnum);
|
||||
|
||||
gst_memory_unmap (memory, &info);
|
||||
gst_memory_unref (memory);
|
||||
}
|
||||
|
||||
static void
|
||||
check_header (GstBuffer * buffer, guint index)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue