mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
tests: fix more unit tests
This commit is contained in:
parent
44d369211c
commit
f3f54403b1
2 changed files with 8 additions and 5 deletions
|
@ -103,10 +103,10 @@ on_handoff (GstElement * object, GstBuffer * buffer, GstPad * pad,
|
||||||
{
|
{
|
||||||
if (!have_data) {
|
if (!have_data) {
|
||||||
GstMapInfo map;
|
GstMapInfo map;
|
||||||
gdouble *data;
|
gfloat *data;
|
||||||
|
|
||||||
gst_buffer_map (buffer, &map, GST_MAP_READ);
|
fail_unless (gst_buffer_map (buffer, &map, GST_MAP_READ));
|
||||||
data = (gdouble *) map.data;
|
data = (gfloat *) map.data;
|
||||||
|
|
||||||
fail_unless (map.size > 5 * sizeof (gdouble));
|
fail_unless (map.size > 5 * sizeof (gdouble));
|
||||||
fail_unless (data[0] == 0.0);
|
fail_unless (data[0] == 0.0);
|
||||||
|
|
|
@ -40,6 +40,7 @@ GstPad *mysrcpad, *mysinkpad;
|
||||||
#define INVERT_CAPS_STRING \
|
#define INVERT_CAPS_STRING \
|
||||||
"audio/x-raw, " \
|
"audio/x-raw, " \
|
||||||
"format = (string) "GST_AUDIO_NE(S16)", " \
|
"format = (string) "GST_AUDIO_NE(S16)", " \
|
||||||
|
"layout = (string) interleaved, " \
|
||||||
"channels = (int) 1, " \
|
"channels = (int) 1, " \
|
||||||
"rate = (int) 44100"
|
"rate = (int) 44100"
|
||||||
|
|
||||||
|
@ -48,6 +49,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-raw, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"format = (string) " GST_AUDIO_NE (S16) ", "
|
"format = (string) " GST_AUDIO_NE (S16) ", "
|
||||||
|
"layout = (string) interleaved, "
|
||||||
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
|
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
|
||||||
);
|
);
|
||||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
@ -55,6 +57,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("audio/x-raw, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"format = (string) " GST_AUDIO_NE (S16) ", "
|
"format = (string) " GST_AUDIO_NE (S16) ", "
|
||||||
|
"layout = (string) interleaved, "
|
||||||
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
|
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue