mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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.
This commit is contained in:
parent
54f25e1158
commit
38a7abe545
2 changed files with 23 additions and 24 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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 @@
|
||||||
/* 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
|
#define check_buffer_is_header(buffer,is_header) \
|
||||||
check_buffer_timestamp (GstBuffer * buffer, GstClockTime timestamp)
|
fail_unless (GST_BUFFER_FLAG_IS_SET (buffer, \
|
||||||
{
|
GST_BUFFER_FLAG_IN_CAPS) == is_header, \
|
||||||
fail_unless (GST_BUFFER_TIMESTAMP (buffer) == timestamp,
|
"GST_BUFFER_IN_CAPS is set to %d but expected %d", \
|
||||||
"expected timestamp %" GST_TIME_FORMAT
|
GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS), is_header)
|
||||||
", but got timestamp %" GST_TIME_FORMAT,
|
|
||||||
GST_TIME_ARGS (timestamp), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
#define check_buffer_timestamp(buffer,timestamp) \
|
||||||
check_buffer_duration (GstBuffer * buffer, GstClockTime duration)
|
fail_unless (GST_BUFFER_TIMESTAMP (buffer) == timestamp, \
|
||||||
{
|
"expected timestamp %" GST_TIME_FORMAT \
|
||||||
fail_unless (GST_BUFFER_DURATION (buffer) == duration,
|
", but got timestamp %" GST_TIME_FORMAT, \
|
||||||
"expected duration %" GST_TIME_FORMAT
|
GST_TIME_ARGS (timestamp), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)))
|
||||||
", but got duration %" GST_TIME_FORMAT,
|
|
||||||
GST_TIME_ARGS (duration), GST_TIME_ARGS (GST_BUFFER_DURATION (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)
|
||||||
|
|
Loading…
Reference in a new issue