mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +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) {
|
||||
GstMapInfo map;
|
||||
gdouble *data;
|
||||
gfloat *data;
|
||||
|
||||
gst_buffer_map (buffer, &map, GST_MAP_READ);
|
||||
data = (gdouble *) map.data;
|
||||
fail_unless (gst_buffer_map (buffer, &map, GST_MAP_READ));
|
||||
data = (gfloat *) map.data;
|
||||
|
||||
fail_unless (map.size > 5 * sizeof (gdouble));
|
||||
fail_unless (data[0] == 0.0);
|
||||
|
|
|
@ -38,9 +38,10 @@ GstPad *mysrcpad, *mysinkpad;
|
|||
|
||||
|
||||
#define INVERT_CAPS_STRING \
|
||||
"audio/x-raw, " \
|
||||
"audio/x-raw, " \
|
||||
"format = (string) "GST_AUDIO_NE(S16)", " \
|
||||
"channels = (int) 1, " \
|
||||
"layout = (string) interleaved, " \
|
||||
"channels = (int) 1, " \
|
||||
"rate = (int) 44100"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
|
@ -48,6 +49,7 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("audio/x-raw, "
|
||||
"format = (string) " GST_AUDIO_NE (S16) ", "
|
||||
"layout = (string) interleaved, "
|
||||
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
|
||||
);
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
|
@ -55,6 +57,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("audio/x-raw, "
|
||||
"format = (string) " GST_AUDIO_NE (S16) ", "
|
||||
"layout = (string) interleaved, "
|
||||
"channels = (int) 1, " "rate = (int) [ 1, MAX ]")
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue