[core] fix "--disable-libyuv"

Recent changes made it impossible to compile freeswitch without libyuv
support.

src/switch_core_video.c: In function 'switch_img_read_from_file':
src/switch_core_video.c:3139:4: error: implicit declaration of function 'RAWToI420' [-Werror=implicit-function-declaration]
RAWToI420(data, width * 3,
^
src/switch_core_video.c:3148:4: error: implicit declaration of function 'ABGRToARGB' [-Werror=implicit-function-declaration]
ABGRToARGB(data, width * 4, img->planes[SWITCH_PLANE_PACKED], img->stride[SWITCH_PLANE_PACKED], width, height);
^

Fix this my adding/moving the checks for "SWITCH_HAVE_YUV".

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper
2021-11-01 09:59:09 +01:00
committed by Andrey Volk
parent 9f26a15220
commit a2ce46c6fd
2 changed files with 16 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ FST_CORE_BEGIN("./conf")
}
FST_TEARDOWN_END()
#ifdef SWITCH_HAVE_YUV
FST_TEST_BEGIN(data_url_test)
{
char *data_url = NULL;
@@ -88,6 +89,7 @@ FST_CORE_BEGIN("./conf")
unlink(argb_filename);
}
FST_TEST_END()
#endif /* SWITCH_HAVE_YUV */
FST_TEST_BEGIN(img_patch)
{
@@ -239,6 +241,7 @@ FST_CORE_BEGIN("./conf")
}
FST_TEST_END()
#ifdef SWITCH_HAVE_YUV
FST_TEST_BEGIN(stb_data_url)
{
switch_image_t *img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 120, 60, 1);
@@ -321,6 +324,7 @@ FST_CORE_BEGIN("./conf")
unlink(jpg_write_filename);
}
FST_TEST_END()
#endif /* SWITCH_HAVE_YUV */
}
FST_SUITE_END()
}