Fix testsuite to enable videohole properly 34/288634/2
authorJeongyoon Nam <just.nam@samsung.com>
Tue, 21 Feb 2023 01:40:54 +0000 (10:40 +0900)
committerJeongyoon Nam <just.nam@samsung.com>
Tue, 21 Feb 2023 08:37:45 +0000 (17:37 +0900)
Change-Id: Id766197c51324a75a4003a7ba45f66c6551e90e0

test/esplusplayer_test.c

index 8fd1412..f820dac 100644 (file)
@@ -1243,7 +1243,18 @@ static void __test_enable_video_hole(bool value)
                return;
        }
 
-       int ret = esplusplayer_enable_video_hole(g_test_h->espp_h, value);
+       int ret;
+
+       if (value && (esplusplayer_get_state(g_test_h->espp_h) <= ESPLUSPLAYER_STATE_READY)) {
+               ret = esplusplayer_set_video_frame_buffer_type(g_test_h->espp_h,
+                       ESPLUSPLAYER_DECODED_VIDEO_FRAME_BUFFER_TYPE_COPY);
+               if (ret != ESPLUSPLAYER_ERROR_TYPE_NONE)
+                       g_print("                       => failed to esplusplayer_set_video_frame_buffer_type\n");
+               else
+                       g_print("                       => esplusplayer_set_video_frame_buffer_type() success\n");
+       }
+
+       ret = esplusplayer_enable_video_hole(g_test_h->espp_h, value);
        if (ret != ESPLUSPLAYER_ERROR_TYPE_NONE)
                g_print("                       => failed to esplusplayer_enable_video_hole\n");
        else