tests: camerabin: skip checks if we don't have encoders for the default format

https://bugzilla.gnome.org/show_bug.cgi?id=767863
This commit is contained in:
Tim-Philipp Müller 2018-01-20 15:49:35 +00:00
parent e62eb34bfc
commit 92400a3b69

View file

@ -1921,15 +1921,18 @@ TestCaseDef tests[] = {
static Suite * static Suite *
camerabin_suite (void) camerabin_suite (void)
{ {
GstElementFactory *jpegenc_factory; GstRegistry *reg = gst_registry_get ();
Suite *s = suite_create ("camerabin"); Suite *s = suite_create ("camerabin");
gint i; gint i;
TCase *tc_generic = tcase_create ("generic"); TCase *tc_generic = tcase_create ("generic");
TCase *tc_phography_iface = tcase_create ("photography-iface"); TCase *tc_phography_iface = tcase_create ("photography-iface");
jpegenc_factory = gst_element_factory_find ("jpegenc"); if (!gst_registry_check_feature_version (reg, "jpegenc", 1, 0, 0)
if (jpegenc_factory == NULL) { || !gst_registry_check_feature_version (reg, "theoraenc", 1, 0, 0)
GST_WARNING ("Skipping camerabin tests because jpegenc is missing"); || !gst_registry_check_feature_version (reg, "vorbisenc", 1, 0, 0)
|| !gst_registry_check_feature_version (reg, "oggmux", 1, 0, 0)) {
GST_WARNING ("Skipping camerabin tests because some required element is "
" missing (jpegenc, theoraenc, vorbisenc, oggmux)");
goto end; goto end;
} }