gstreamer/tests/check/ges/test-utils.h
Tim-Philipp Müller 426fffb6c3 Fix FSF address
2012-11-04 00:25:20 +00:00

59 lines
2.3 KiB
C

/**
* Gstreamer Editing Services
*
* Copyright (C) <2012> Thibault Saunier <thibault.saunier@collabora.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TEST_UTILS
#define _GES_TEST_UTILS
#include <ges/ges.h>
gchar * ges_test_get_audio_only_uri (void);
gchar * ges_test_get_audio_video_uri (void);
gchar * ges_test_file_uri (const gchar *filename);
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
"media-start", &pmstart, "media-duration", &pmdur, \
"priority", &pprio, "active", &pact, \
NULL); \
assert_equals_uint64 (pstart, start); \
assert_equals_uint64 (pdur, duration); \
assert_equals_uint64 (pmstart, mstart); \
assert_equals_uint64 (pmdur, mduration); \
assert_equals_int (pprio, priority); \
assert_equals_int (pact, active); \
}
#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
guint64 pstart, pdur, pmstart, pmdur, pprio, pact; \
g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
"media-start", &pmstart, "media-duration", &pmdur, \
"priority", &pprio, "active", &pact, \
NULL); \
assert_equals_uint64 (pstart, start); \
assert_equals_uint64 (pdur, duration); \
assert_equals_uint64 (pmstart, mstart); \
assert_equals_uint64 (pmdur, mduration); \
assert_equals_int (pprio, priority); \
assert_equals_int (pact, active); \
}
#endif /* _GES_TEST_UTILS */