diff --git a/BUILD.gn b/BUILD.gn index b3c04f98c5a46178712c27dc0eada9ec1ee0fa60..20d81b0ca48fa9ee4bbc62f23c23cb53046720be 100755 --- a/BUILD.gn +++ b/BUILD.gn @@ -105,7 +105,6 @@ shared_library("ui") { "frameworks/components/ui_texture_mapper.cpp", "frameworks/components/ui_time_picker.cpp", "frameworks/components/ui_toggle_button.cpp", - "frameworks/components/ui_video.cpp", "frameworks/components/ui_view.cpp", "frameworks/components/ui_view_group.cpp", "frameworks/core/render_manager.cpp", @@ -162,13 +161,13 @@ shared_library("ui") { "frameworks/engines/gfx/gfx_engine_manager.cpp", "frameworks/engines/gfx/hi3516/hi3516_engine.cpp", ] + include_dirs = [ "//foundation/graphic/ui/frameworks" ] deps = [ "//build/lite/config/component/cJSON:cjson_shared", "//foundation/graphic/surface:lite_surface", "//foundation/graphic/utils:lite_graphic_hals", "//foundation/graphic/wms:lite_wms", - "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite", "//third_party/bounds_checking_function:libsec_shared", "//third_party/freetype:freetype", "//third_party/giflib:libgif", @@ -178,6 +177,17 @@ shared_library("ui") { "//third_party/qrcodegen:qrcodegen", ] + if (enable_video_component) { + defines += [ "ENABLE_VIDEO_COMPONENT=1" ] + source += [ + "frameworks/components/ui_video.cpp", + ] + + deps += [ + "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite", + ] + } + public_deps = [ "//foundation/graphic/utils:lite_graphic_utils" ] public_configs = [ ":graphic_define_config" ] cflags = [ diff --git a/test/framework/BUILD.gn b/test/framework/BUILD.gn index 8dc6cd469b06382d9e73c5915c97b19fedae18ea..d84b85228292bb5c37445c038d0dbfd27fdc0468 100755 --- a/test/framework/BUILD.gn +++ b/test/framework/BUILD.gn @@ -61,7 +61,6 @@ test_sources = [ "../uitest/test_ui_scroll_view/ui_test_ui_scroll_view.cpp", "../uitest/test_ui_swipe_view/ui_test_ui_swipe_view.cpp", "../uitest/test_vector_font/ui_test_vector_font.cpp", - "../uitest/test_video/ui_test_video.cpp", "../uitest/test_view_bitmap/ui_test_view_bitmap.cpp", "../uitest/test_view_bounds/ui_test_view_bounds.cpp", "../uitest/test_view_group/ui_test_view_group.cpp", @@ -75,6 +74,12 @@ test_sources = [ "src/ui_test_group.cpp", ] +if (enable_video_component) { + test_sources += [ + "../uitest/test_video/ui_test_video.cpp", + ] +} + auto_test_sources = [ "../uitest/test_layout/ui_auto_test_basic_layout.cpp", "../uitest/test_render/ui_auto_test_render.cpp", diff --git a/test/framework/src/ui_test_group.cpp b/test/framework/src/ui_test_group.cpp index d921097e46c86842b70e2c5beb1d7c3b0cf394b1..a24125edd9d7d1e550a4db1c29b8bebbe22cc7ae 100755 --- a/test/framework/src/ui_test_group.cpp +++ b/test/framework/src/ui_test_group.cpp @@ -142,8 +142,10 @@ void UITestGroup::SetUpTestCase() testCaseList_.PushBack(TestCaseInfo{"UIViewGroup", new UITestViewGroup()}); testCaseList_.PushBack(TestCaseInfo{"View Bitmap", new UITestViewBitmap()}); #ifndef VERSION_LITE +#if ENABLE_VIDEO_COMPONENT testCaseList_.PushBack(TestCaseInfo{"Video", new UITestVideo()}); #endif +#endif #if ENABLE_FOCUS_MANAGER testCaseList_.PushBack(TestCaseInfo{"FocusManager", new UITestFocusManager()}); #endif diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index af236ced45ba2806322d10c1528992ec509de702..ed0595e6e0690be7460ae70308c29a90251e9cd5 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -8,7 +8,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +import("//build/lite/config/subsystem/graphic/config.gni") import("//build/lite/config/test.gni") group("lite_graphic_ui_test") { @@ -76,7 +76,6 @@ if (ohos_build_type == "debug") { "components/ui_swipe_view_unit_test.cpp", "components/ui_time_picker_unit_test.cpp", "components/ui_toggle_button_unit_test.cpp", - "components/ui_video_unit_test.cpp", "components/ui_view_group_unit_test.cpp", "components/ui_view_unit_test.cpp", "dfx/event_injector_unit_test.cpp", @@ -98,6 +97,11 @@ if (ohos_build_type == "debug") { "rotate/ui_rotate_input_unit_test.cpp", "themes/theme_manager_unit_test.cpp", ] + if (enable_video_component) { + sources += [ + "components/ui_video_unit_test.cpp", + ] + } deps = [ "//foundation/graphic/ui:ui", "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite",