mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
test: rtpbin_buffer_list: add function to check timestamp
This commit is contained in:
parent
31f221f89d
commit
b158be0d98
1 changed files with 21 additions and 0 deletions
|
@ -184,6 +184,27 @@ check_seqnum (GstBuffer * buffer, guint16 seqnum)
|
|||
gst_memory_unref (memory);
|
||||
}
|
||||
|
||||
static void
|
||||
check_timestamp (GstBuffer * buffer, guint32 timestamp)
|
||||
{
|
||||
GstMemory *memory;
|
||||
GstMapInfo info;
|
||||
gboolean ret;
|
||||
guint32 current_timestamp;
|
||||
|
||||
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_timestamp = g_ntohl (*((guint32 *) & (info.data[4])));
|
||||
fail_unless (current_timestamp == timestamp);
|
||||
|
||||
gst_memory_unmap (memory, &info);
|
||||
gst_memory_unref (memory);
|
||||
}
|
||||
|
||||
static void
|
||||
check_header (GstBuffer * buffer, guint index)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue