mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
tests: make tests compile
This commit is contained in:
parent
00d22402a2
commit
6651c908a1
3 changed files with 13 additions and 9 deletions
|
@ -139,8 +139,10 @@ run_check_for_file (const gchar * filename)
|
||||||
GST_START_TEST (test_low_sample_rate_adpcm)
|
GST_START_TEST (test_low_sample_rate_adpcm)
|
||||||
{
|
{
|
||||||
#define MIN_VERSION GST_VERSION_MAJOR, GST_VERSION_MINOR, 0
|
#define MIN_VERSION GST_VERSION_MAJOR, GST_VERSION_MINOR, 0
|
||||||
if (!gst_default_registry_check_feature_version ("wavparse", MIN_VERSION) ||
|
if (!gst_registry_check_feature_version (gst_registry_get (), "wavparse",
|
||||||
!gst_default_registry_check_feature_version ("decodebin", MIN_VERSION)) {
|
MIN_VERSION)
|
||||||
|
|| !gst_registry_check_feature_version (gst_registry_get (), "decodebin",
|
||||||
|
MIN_VERSION)) {
|
||||||
g_printerr ("skipping test_low_sample_rate_adpcm: required element "
|
g_printerr ("skipping test_low_sample_rate_adpcm: required element "
|
||||||
"wavparse or element decodebin not found\n");
|
"wavparse or element decodebin not found\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -52,11 +52,10 @@ error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPadProbeReturn
|
static GstPadProbeReturn
|
||||||
event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
event_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
GstTagList **p_tags = user_data;
|
GstTagList **p_tags = user_data;
|
||||||
GstEvent *event = type_data;
|
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
||||||
|
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) {
|
||||||
GST_INFO ("tag event: %" GST_PTR_FORMAT, event);
|
GST_INFO ("tag event: %" GST_PTR_FORMAT, event);
|
||||||
|
@ -113,7 +112,8 @@ read_tags_from_file (const gchar * file, gboolean push_mode)
|
||||||
/* we want to make sure there's a tag event coming out of ffdemux_ape
|
/* we want to make sure there's a tag event coming out of ffdemux_ape
|
||||||
* (ie. the one apedemux generated) */
|
* (ie. the one apedemux generated) */
|
||||||
pad = gst_element_get_static_pad (sink, "sink");
|
pad = gst_element_get_static_pad (sink, "sink");
|
||||||
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT, event_probe, &tags, NULL);
|
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, event_probe,
|
||||||
|
&tags, NULL);
|
||||||
gst_object_unref (pad);
|
gst_object_unref (pad);
|
||||||
|
|
||||||
state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
state_ret = gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
||||||
|
@ -177,8 +177,10 @@ GST_START_TEST (test_tag_caching)
|
||||||
{
|
{
|
||||||
#define MIN_VERSION GST_VERSION_MAJOR, GST_VERSION_MINOR, 0
|
#define MIN_VERSION GST_VERSION_MAJOR, GST_VERSION_MINOR, 0
|
||||||
|
|
||||||
if (!gst_default_registry_check_feature_version ("apedemux", MIN_VERSION) ||
|
if (!gst_registry_check_feature_version (gst_registry_get (), "apedemux",
|
||||||
!gst_default_registry_check_feature_version ("decodebin", MIN_VERSION)) {
|
MIN_VERSION)
|
||||||
|
|| !gst_registry_check_feature_version (gst_registry_get (), "decodebin",
|
||||||
|
MIN_VERSION)) {
|
||||||
g_printerr ("Skipping test_tag_caching: required element apedemux or "
|
g_printerr ("Skipping test_tag_caching: required element apedemux or "
|
||||||
"decodebin element not found\n");
|
"decodebin element not found\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -147,7 +147,7 @@ simple_launch_lines_suite (void)
|
||||||
|
|
||||||
#ifndef GST_DISABLE_PARSE
|
#ifndef GST_DISABLE_PARSE
|
||||||
/* only run this if we haven't been configured with --disable-encoders */
|
/* only run this if we haven't been configured with --disable-encoders */
|
||||||
if (gst_default_registry_check_feature_version ("ffenc_mpeg4",
|
if (gst_registry_check_feature_version (gst_registry_get (), "ffenc_mpeg4",
|
||||||
GST_VERSION_MAJOR, GST_VERSION_MINOR, 0)) {
|
GST_VERSION_MAJOR, GST_VERSION_MINOR, 0)) {
|
||||||
tcase_add_test (tc_chain, test_libavcodec_locks);
|
tcase_add_test (tc_chain, test_libavcodec_locks);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue