mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
tests: fix indentation
This commit is contained in:
parent
69436d5a61
commit
7335d03070
4 changed files with 114 additions and 109 deletions
|
@ -171,8 +171,8 @@ GST_END_TEST;
|
|||
static GstBuffer *
|
||||
create_buffer (guint8 * data, gsize size)
|
||||
{
|
||||
GstBuffer * buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||
data, size, 0, size, NULL, NULL);
|
||||
GstBuffer *buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||
data, size, 0, size, NULL, NULL);
|
||||
GST_BUFFER_PTS (buf) = GST_CLOCK_TIME_NONE;
|
||||
GST_BUFFER_DTS (buf) = GST_CLOCK_TIME_NONE;
|
||||
GST_BUFFER_DURATION (buf) = GST_CLOCK_TIME_NONE;
|
||||
|
@ -184,92 +184,92 @@ create_buffer (guint8 * data, gsize size)
|
|||
static void
|
||||
flvdemux_pad_added (GstElement * flvdemux, GstPad * srcpad, GstHarness * h)
|
||||
{
|
||||
(void)flvdemux;
|
||||
(void) flvdemux;
|
||||
gst_harness_add_element_src_pad (h, srcpad);
|
||||
}
|
||||
|
||||
GST_START_TEST (test_speex)
|
||||
{
|
||||
guint8 flv_header0[] = {
|
||||
0x46, 0x4c, 0x56, 0x01, 0x04, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x00
|
||||
0x46, 0x4c, 0x56, 0x01, 0x04, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
guint8 flv_header1[] = {
|
||||
0x12, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x6f, 0x6e,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61,
|
||||
0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x61,
|
||||
0x75, 0x64, 0x69, 0x6f, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x63, 0x69, 0x64, 0x00, 0x40, 0x26, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x6f, 0x72, 0x02, 0x00, 0x13,
|
||||
0x47, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65,
|
||||
0x72, 0x20, 0x46, 0x4c, 0x56, 0x20, 0x6d, 0x75,
|
||||
0x78, 0x65, 0x72, 0x00, 0x0c, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74,
|
||||
0x65, 0x02, 0x00, 0x18, 0x57, 0x65, 0x64, 0x20,
|
||||
0x53, 0x65, 0x70, 0x20, 0x32, 0x33, 0x20, 0x31,
|
||||
0x30, 0x3a, 0x34, 0x39, 0x3a, 0x35, 0x36, 0x20,
|
||||
0x32, 0x30, 0x31, 0x35, 0x00, 0x00, 0x09, 0x00,
|
||||
0x00, 0x00, 0x87,
|
||||
0x12, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x6f, 0x6e,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61,
|
||||
0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x61,
|
||||
0x75, 0x64, 0x69, 0x6f, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x63, 0x69, 0x64, 0x00, 0x40, 0x26, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x6d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x6f, 0x72, 0x02, 0x00, 0x13,
|
||||
0x47, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65,
|
||||
0x72, 0x20, 0x46, 0x4c, 0x56, 0x20, 0x6d, 0x75,
|
||||
0x78, 0x65, 0x72, 0x00, 0x0c, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74,
|
||||
0x65, 0x02, 0x00, 0x18, 0x57, 0x65, 0x64, 0x20,
|
||||
0x53, 0x65, 0x70, 0x20, 0x32, 0x33, 0x20, 0x31,
|
||||
0x30, 0x3a, 0x34, 0x39, 0x3a, 0x35, 0x36, 0x20,
|
||||
0x32, 0x30, 0x31, 0x35, 0x00, 0x00, 0x09, 0x00,
|
||||
0x00, 0x00, 0x87,
|
||||
};
|
||||
|
||||
guint8 speex_header0[] = {
|
||||
0x08, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xb2, 0x53, 0x70, 0x65, 0x65,
|
||||
0x78, 0x20, 0x20, 0x20, 0x31, 0x2e, 0x32, 0x72,
|
||||
0x63, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
|
||||
0x80, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x40, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c,
|
||||
0x08, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xb2, 0x53, 0x70, 0x65, 0x65,
|
||||
0x78, 0x20, 0x20, 0x20, 0x31, 0x2e, 0x32, 0x72,
|
||||
0x63, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
|
||||
0x80, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x40, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c,
|
||||
};
|
||||
|
||||
guint8 speex_header1[] = {
|
||||
0x08, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xb2, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20,
|
||||
0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x53, 0x74,
|
||||
0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x20, 0x53,
|
||||
0x70, 0x65, 0x65, 0x78, 0x65, 0x6e, 0x63, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34,
|
||||
0x08, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xb2, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20,
|
||||
0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x53, 0x74,
|
||||
0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x20, 0x53,
|
||||
0x70, 0x65, 0x65, 0x78, 0x65, 0x6e, 0x63, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34,
|
||||
};
|
||||
|
||||
guint8 buffer[] = {
|
||||
0x08, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xb2, 0x36, 0x9d, 0x1b, 0x9a,
|
||||
0x20, 0x00, 0x01, 0x68, 0xe8, 0xe8, 0xe8, 0xe8,
|
||||
0xe8, 0xe8, 0xe8, 0x84, 0x00, 0xb4, 0x74, 0x74,
|
||||
0x74, 0x74, 0x74, 0x74, 0x74, 0x42, 0x00, 0x5a,
|
||||
0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x21,
|
||||
0x00, 0x2d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d,
|
||||
0x1d, 0x1b, 0x3b, 0x60, 0xab, 0xab, 0xab, 0xab,
|
||||
0xab, 0x0a, 0xba, 0xba, 0xba, 0xba, 0xb0, 0xab,
|
||||
0xab, 0xab, 0xab, 0xab, 0x0a, 0xba, 0xba, 0xba,
|
||||
0xba, 0xb7, 0x00, 0x00, 0x00, 0x52,
|
||||
0x08, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xb2, 0x36, 0x9d, 0x1b, 0x9a,
|
||||
0x20, 0x00, 0x01, 0x68, 0xe8, 0xe8, 0xe8, 0xe8,
|
||||
0xe8, 0xe8, 0xe8, 0x84, 0x00, 0xb4, 0x74, 0x74,
|
||||
0x74, 0x74, 0x74, 0x74, 0x74, 0x42, 0x00, 0x5a,
|
||||
0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x21,
|
||||
0x00, 0x2d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d,
|
||||
0x1d, 0x1b, 0x3b, 0x60, 0xab, 0xab, 0xab, 0xab,
|
||||
0xab, 0x0a, 0xba, 0xba, 0xba, 0xba, 0xb0, 0xab,
|
||||
0xab, 0xab, 0xab, 0xab, 0x0a, 0xba, 0xba, 0xba,
|
||||
0xba, 0xb7, 0x00, 0x00, 0x00, 0x52,
|
||||
};
|
||||
|
||||
GstHarness * h = gst_harness_new_with_padnames ("flvdemux", "sink", NULL);
|
||||
GstHarness *h = gst_harness_new_with_padnames ("flvdemux", "sink", NULL);
|
||||
gst_harness_set_src_caps_str (h, "video/x-flv");
|
||||
|
||||
g_signal_connect (h->element, "pad-added",
|
||||
G_CALLBACK (flvdemux_pad_added), h);
|
||||
|
||||
gst_harness_push (h, create_buffer (flv_header0, sizeof (flv_header0)));
|
||||
gst_harness_push (h, create_buffer (flv_header1, sizeof (flv_header1)));
|
||||
gst_harness_push (h, create_buffer (flv_header0, sizeof (flv_header0)));
|
||||
gst_harness_push (h, create_buffer (flv_header1, sizeof (flv_header1)));
|
||||
gst_harness_push (h, create_buffer (speex_header0, sizeof (speex_header0)));
|
||||
gst_harness_push (h, create_buffer (speex_header1, sizeof (speex_header1)));
|
||||
gst_harness_push (h, create_buffer (buffer, sizeof (buffer)));
|
||||
gst_harness_push (h, create_buffer (buffer, sizeof (buffer)));
|
||||
|
||||
{
|
||||
GstCaps * caps;
|
||||
const GstStructure * s;
|
||||
GstCaps *caps;
|
||||
const GstStructure *s;
|
||||
const GValue *streamheader;
|
||||
const GValue *header;
|
||||
const GValue *vorbiscomment;
|
||||
|
|
|
@ -157,8 +157,8 @@ static GstBuffer *
|
|||
create_buffer (guint8 * data, gsize size,
|
||||
GstClockTime timestamp, GstClockTime duration)
|
||||
{
|
||||
GstBuffer * buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||
data, size, 0, size, NULL, NULL);
|
||||
GstBuffer *buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
|
||||
data, size, 0, size, NULL, NULL);
|
||||
GST_BUFFER_PTS (buf) = timestamp;
|
||||
GST_BUFFER_DTS (buf) = timestamp;
|
||||
GST_BUFFER_DURATION (buf) = duration;
|
||||
|
@ -169,43 +169,43 @@ create_buffer (guint8 * data, gsize size,
|
|||
|
||||
GST_START_TEST (test_speex_streamable)
|
||||
{
|
||||
GstBuffer * buf;
|
||||
GstBuffer *buf;
|
||||
GstMapInfo map = GST_MAP_INFO_INIT;
|
||||
|
||||
guint8 header0[] = {
|
||||
0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20, 0x20,
|
||||
0x31, 0x2e, 0x32, 0x72, 0x63, 0x31, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x50, 0x00, 0x00, 0x00, 0x80, 0x3e, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20, 0x20,
|
||||
0x31, 0x2e, 0x32, 0x72, 0x63, 0x31, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x50, 0x00, 0x00, 0x00, 0x80, 0x3e, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
guint8 header1[] = {
|
||||
0x1f, 0x00, 0x00, 0x00, 0x45, 0x6e, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68,
|
||||
0x20, 0x47, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x65, 0x78,
|
||||
0x65, 0x6e, 0x63, 0x00, 0x00, 0x00, 0x00, 0x01
|
||||
0x1f, 0x00, 0x00, 0x00, 0x45, 0x6e, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68,
|
||||
0x20, 0x47, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x65, 0x78,
|
||||
0x65, 0x6e, 0x63, 0x00, 0x00, 0x00, 0x00, 0x01
|
||||
};
|
||||
|
||||
guint8 buffer[] = {
|
||||
0x36, 0x9d, 0x1b, 0x9a, 0x20, 0x00, 0x01, 0x68,
|
||||
0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0x84,
|
||||
0x00, 0xb4, 0x74, 0x74, 0x74, 0x74, 0x74, 0x74,
|
||||
0x74, 0x42, 0x00, 0x5a, 0x3a, 0x3a, 0x3a, 0x3a,
|
||||
0x3a, 0x3a, 0x3a, 0x21, 0x00, 0x2d, 0x1d, 0x1d,
|
||||
0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1b, 0x3b, 0x60,
|
||||
0xab, 0xab, 0xab, 0xab, 0xab, 0x0a, 0xba, 0xba,
|
||||
0xba, 0xba, 0xb0, 0xab, 0xab, 0xab, 0xab, 0xab,
|
||||
0x0a, 0xba, 0xba, 0xba, 0xba, 0xb7
|
||||
0x36, 0x9d, 0x1b, 0x9a, 0x20, 0x00, 0x01, 0x68,
|
||||
0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0xe8, 0x84,
|
||||
0x00, 0xb4, 0x74, 0x74, 0x74, 0x74, 0x74, 0x74,
|
||||
0x74, 0x42, 0x00, 0x5a, 0x3a, 0x3a, 0x3a, 0x3a,
|
||||
0x3a, 0x3a, 0x3a, 0x21, 0x00, 0x2d, 0x1d, 0x1d,
|
||||
0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1b, 0x3b, 0x60,
|
||||
0xab, 0xab, 0xab, 0xab, 0xab, 0x0a, 0xba, 0xba,
|
||||
0xba, 0xba, 0xb0, 0xab, 0xab, 0xab, 0xab, 0xab,
|
||||
0x0a, 0xba, 0xba, 0xba, 0xba, 0xb7
|
||||
};
|
||||
|
||||
GstCaps * caps = gst_caps_new_simple ("audio/x-speex",
|
||||
GstCaps *caps = gst_caps_new_simple ("audio/x-speex",
|
||||
"rate", G_TYPE_INT, 16000,
|
||||
"channels", G_TYPE_INT, 1,
|
||||
NULL);
|
||||
|
@ -214,7 +214,7 @@ GST_START_TEST (test_speex_streamable)
|
|||
const GstClockTime duration_ms = 20;
|
||||
const GstClockTime duration = duration_ms * GST_MSECOND;
|
||||
|
||||
GstHarness * h = gst_harness_new_with_padnames ("flvmux", "audio", "src");
|
||||
GstHarness *h = gst_harness_new_with_padnames ("flvmux", "audio", "src");
|
||||
gst_harness_set_src_caps (h, caps);
|
||||
g_object_set (h->element, "streamable", 1, NULL);
|
||||
|
||||
|
@ -226,11 +226,11 @@ GST_START_TEST (test_speex_streamable)
|
|||
|
||||
/* push speex data */
|
||||
gst_harness_push (h, create_buffer (buffer, sizeof (buffer),
|
||||
base_time, duration));
|
||||
base_time, duration));
|
||||
|
||||
/* push speex data 2*/
|
||||
/* push speex data 2 */
|
||||
gst_harness_push (h, create_buffer (buffer, sizeof (buffer),
|
||||
base_time + duration, duration));
|
||||
base_time + duration, duration));
|
||||
|
||||
/* pull out stream-start event */
|
||||
gst_event_unref (gst_harness_pull_event (h));
|
||||
|
@ -240,8 +240,8 @@ GST_START_TEST (test_speex_streamable)
|
|||
|
||||
/* pull out segment event and verify we are using GST_FORMAT_TIME */
|
||||
{
|
||||
GstEvent * event = gst_harness_pull_event (h);
|
||||
const GstSegment * segment;
|
||||
GstEvent *event = gst_harness_pull_event (h);
|
||||
const GstSegment *segment;
|
||||
gst_event_parse_segment (event, &segment);
|
||||
fail_unless_equals_int (GST_FORMAT_TIME, segment->format);
|
||||
gst_event_unref (event);
|
||||
|
@ -294,7 +294,8 @@ GST_START_TEST (test_speex_streamable)
|
|||
fail_unless_equals_uint64 (base_time, GST_BUFFER_DTS (buf));
|
||||
fail_unless_equals_uint64 (duration, GST_BUFFER_DURATION (buf));
|
||||
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET (buf));
|
||||
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET_END (buf));
|
||||
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE,
|
||||
GST_BUFFER_OFFSET_END (buf));
|
||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
||||
/* 0x08 means it is audio */
|
||||
fail_unless_equals_int (0x08, map.data[0]);
|
||||
|
@ -313,7 +314,8 @@ GST_START_TEST (test_speex_streamable)
|
|||
fail_unless_equals_uint64 (base_time + duration, GST_BUFFER_DTS (buf));
|
||||
fail_unless_equals_uint64 (duration, GST_BUFFER_DURATION (buf));
|
||||
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET (buf));
|
||||
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE, GST_BUFFER_OFFSET_END (buf));
|
||||
fail_unless_equals_uint64 (GST_BUFFER_OFFSET_NONE,
|
||||
GST_BUFFER_OFFSET_END (buf));
|
||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
||||
/* 0x08 means it is audio */
|
||||
fail_unless_equals_int (0x08, map.data[0]);
|
||||
|
@ -328,6 +330,7 @@ GST_START_TEST (test_speex_streamable)
|
|||
|
||||
gst_harness_teardown (h);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
static Suite *
|
||||
|
|
|
@ -59,6 +59,7 @@ GST_START_TEST (test_h263depay_start_packet_too_small_mode_a)
|
|||
|
||||
gst_harness_teardown (h);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
GST_START_TEST (test_h263depay_start_packet_too_small_mode_b)
|
||||
|
@ -78,6 +79,7 @@ GST_START_TEST (test_h263depay_start_packet_too_small_mode_b)
|
|||
|
||||
gst_harness_teardown (h);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
GST_START_TEST (test_h263depay_start_packet_too_small_mode_c)
|
||||
|
@ -97,6 +99,7 @@ GST_START_TEST (test_h263depay_start_packet_too_small_mode_c)
|
|||
|
||||
gst_harness_teardown (h);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
||||
static Suite *
|
||||
|
|
|
@ -649,9 +649,8 @@ GST_START_TEST (test_two_lost_one_arrives_in_time)
|
|||
/* the first lost buffer (buffer 3) out on
|
||||
* (buffer-timestamp (60) + latency (100) = 160) */
|
||||
gst_test_clock_wait_for_next_pending_id (testclock, &id);
|
||||
fail_unless_equals_uint64 (
|
||||
3 * PCMU_BUF_DURATION + jb_latency_ms * GST_MSECOND,
|
||||
gst_clock_id_get_time (id));
|
||||
fail_unless_equals_uint64 (3 * PCMU_BUF_DURATION +
|
||||
jb_latency_ms * GST_MSECOND, gst_clock_id_get_time (id));
|
||||
gst_clock_id_unref (id);
|
||||
|
||||
/* let the time expire... */
|
||||
|
@ -1057,8 +1056,8 @@ GST_START_TEST (test_rtx_packet_delay)
|
|||
* are exceeding the max allowed reorder distance and should request a
|
||||
* retransmission right away */
|
||||
fail_unless_equals_int (GST_FLOW_OK,
|
||||
gst_harness_push (h, generate_test_buffer_full (
|
||||
20 * GST_MSECOND, TRUE, 8, 8 * PCMU_RTP_TS_DURATION)));
|
||||
gst_harness_push (h, generate_test_buffer_full (20 * GST_MSECOND, TRUE, 8,
|
||||
8 * PCMU_RTP_TS_DURATION)));
|
||||
|
||||
/* drop reconfigure event */
|
||||
gst_event_unref (gst_harness_pull_upstream_event (h));
|
||||
|
@ -1079,8 +1078,8 @@ GST_START_TEST (test_rtx_packet_delay)
|
|||
|
||||
/* push 9, this should immediately request retransmission of 5 */
|
||||
fail_unless_equals_int (GST_FLOW_OK,
|
||||
gst_harness_push (h, generate_test_buffer_full (
|
||||
20 * GST_MSECOND, TRUE, 9, 9 * PCMU_RTP_TS_DURATION)));
|
||||
gst_harness_push (h, generate_test_buffer_full (20 * GST_MSECOND, TRUE, 9,
|
||||
9 * PCMU_RTP_TS_DURATION)));
|
||||
|
||||
/* we should now receive retransmission requests for 5 */
|
||||
out_event = gst_harness_pull_upstream_event (h);
|
||||
|
@ -1203,7 +1202,7 @@ GST_START_TEST (test_gap_exceeds_latency)
|
|||
|
||||
/* Now data comes in again, a "bulk" lost packet is created for 3 -> 5 */
|
||||
fail_unless_equals_int (GST_FLOW_OK,
|
||||
gst_harness_push (h, generate_test_buffer (16)));
|
||||
gst_harness_push (h, generate_test_buffer (16)));
|
||||
|
||||
/* FIXME: something is up with the timestamp here!!?! */
|
||||
out_event = gst_harness_pull_upstream_event (h);
|
||||
|
@ -1219,7 +1218,7 @@ GST_START_TEST (test_gap_exceeds_latency)
|
|||
|
||||
for (i = 8; i < 16; i++) {
|
||||
fail_unless_equals_int (GST_FLOW_OK,
|
||||
gst_harness_push (h, generate_test_buffer (i)));
|
||||
gst_harness_push (h, generate_test_buffer (i)));
|
||||
}
|
||||
|
||||
/* FIXME: wtf is going on with timestamps and durations here??!? */
|
||||
|
@ -1242,7 +1241,7 @@ GST_START_TEST (test_gap_exceeds_latency)
|
|||
|
||||
/* 8 */
|
||||
for (i = 8; i <= 16; i++) {
|
||||
GstBuffer * out_buf = gst_harness_pull (h);
|
||||
GstBuffer *out_buf = gst_harness_pull (h);
|
||||
GST_DEBUG ("pop %d", i);
|
||||
fail_unless_equals_int (i, get_rtp_seq_num (out_buf));
|
||||
gst_buffer_unref (out_buf);
|
||||
|
@ -1341,7 +1340,7 @@ GST_START_TEST (test_dts_gap_larger_than_latency)
|
|||
/* Push packet with DTS larger than latency */
|
||||
fail_unless_equals_int (GST_FLOW_OK,
|
||||
gst_harness_push (h, generate_test_buffer_full (dts_after_gap,
|
||||
TRUE, 5, 5 * PCMU_RTP_TS_DURATION)));
|
||||
TRUE, 5, 5 * PCMU_RTP_TS_DURATION)));
|
||||
|
||||
/* drop GstEventStreamStart & GstEventCaps & GstEventSegment */
|
||||
for (int i = 0; i < 3; i++)
|
||||
|
@ -1364,7 +1363,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_push_big_gap)
|
||||
{
|
||||
GstHarness *h = gst_harness_new ("rtpjitterbuffer");
|
||||
GstBuffer * buf;
|
||||
GstBuffer *buf;
|
||||
const gint num_consecutive = 5;
|
||||
gint i;
|
||||
|
||||
|
@ -1377,7 +1376,7 @@ GST_START_TEST (test_push_big_gap)
|
|||
fail_unless (gst_harness_crank_single_clock_wait (h));
|
||||
|
||||
for (i = 0; i < num_consecutive; i++) {
|
||||
GstBuffer * buf = gst_harness_pull (h);
|
||||
GstBuffer *buf = gst_harness_pull (h);
|
||||
fail_unless_equals_int (1000 + i, get_rtp_seq_num (buf));
|
||||
gst_buffer_unref (buf);
|
||||
}
|
||||
|
@ -1391,7 +1390,7 @@ GST_START_TEST (test_push_big_gap)
|
|||
fail_unless (gst_harness_crank_single_clock_wait (h));
|
||||
|
||||
for (i = 0; i < num_consecutive; i++) {
|
||||
GstBuffer * buf = gst_harness_pull (h);
|
||||
GstBuffer *buf = gst_harness_pull (h);
|
||||
fail_unless_equals_int (20000 + i, get_rtp_seq_num (buf));
|
||||
gst_buffer_unref (buf);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue