Commit 38a7abe5 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

tests/check/pipelines/theoraenc.c: Turn these functions into macros so we can...

tests/check/pipelines/theoraenc.c: Turn these functions into macros so we can see right away where the failure occured.

Original commit message from CVS:
* tests/check/pipelines/theoraenc.c: (check_buffer_is_header),
(check_buffer_timestamp), (check_buffer_duration):
Turn these functions into macros so we can see right away
where the failure occured.
parent 54f25e11
2008-01-06 Tim-Philipp Müller <tim at centricular dot net>
* tests/check/pipelines/theoraenc.c: (check_buffer_is_header),
(check_buffer_timestamp), (check_buffer_duration):
Turn these functions into macros so we can see right away
where the failure occured.
2008-01-05 Julien Moutte <julien@fluendo.com> 2008-01-05 Julien Moutte <julien@fluendo.com>
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new): Add * sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new): Add
...@@ -31,32 +31,24 @@ ...@@ -31,32 +31,24 @@
/* I know all of these have a shift of 6 bits */ /* I know all of these have a shift of 6 bits */
#define GRANULEPOS_SHIFT 6 #define GRANULEPOS_SHIFT 6
static void
check_buffer_is_header (GstBuffer * buffer, gboolean is_header)
{
fail_unless (GST_BUFFER_FLAG_IS_SET (buffer,
GST_BUFFER_FLAG_IN_CAPS) == is_header,
"GST_BUFFER_IN_CAPS is set to %d but expected %d",
GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS), is_header);
}
static void
check_buffer_timestamp (GstBuffer * buffer, GstClockTime timestamp)
{
fail_unless (GST_BUFFER_TIMESTAMP (buffer) == timestamp,
"expected timestamp %" GST_TIME_FORMAT
", but got timestamp %" GST_TIME_FORMAT,
GST_TIME_ARGS (timestamp), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
}
static void #define check_buffer_is_header(buffer,is_header) \
check_buffer_duration (GstBuffer * buffer, GstClockTime duration) fail_unless (GST_BUFFER_FLAG_IS_SET (buffer, \
{ GST_BUFFER_FLAG_IN_CAPS) == is_header, \
fail_unless (GST_BUFFER_DURATION (buffer) == duration, "GST_BUFFER_IN_CAPS is set to %d but expected %d", \
"expected duration %" GST_TIME_FORMAT GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS), is_header)
", but got duration %" GST_TIME_FORMAT,
GST_TIME_ARGS (duration), GST_TIME_ARGS (GST_BUFFER_DURATION (buffer))); #define check_buffer_timestamp(buffer,timestamp) \
} fail_unless (GST_BUFFER_TIMESTAMP (buffer) == timestamp, \
"expected timestamp %" GST_TIME_FORMAT \
", but got timestamp %" GST_TIME_FORMAT, \
GST_TIME_ARGS (timestamp), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)))
#define check_buffer_duration(buffer,duration) \
fail_unless (GST_BUFFER_DURATION (buffer) == duration, \
"expected duration %" GST_TIME_FORMAT \
", but got duration %" GST_TIME_FORMAT, \
GST_TIME_ARGS (duration), GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)))
static void static void
check_buffer_granulepos (GstBuffer * buffer, gint64 granulepos) check_buffer_granulepos (GstBuffer * buffer, gint64 granulepos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment