• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//foundation/multimedia/player_framework/config.gni")
16
17ohos_executable("media_demo") {
18  include_dirs = [
19    "./include",
20    "./player",
21    "./player/data_source",
22    "./recorder",
23    "./avmetadatahelper",
24    "./avcodeclist",
25    "./recorder_profiles",
26    "./avcodecvenc",
27    "./avcodecvdec",
28    "./avmuxer",
29    "//foundation/multimedia/player_framework/interfaces/inner_api/native",
30    "//foundation/multimedia/player_framework/services/utils/include",
31    "//graphic/graphic_2d/interfaces/innerkits/surface",
32    "//foundation/graphic/graphic_2d/utils/sync_fence/export",
33    "//drivers/peripheral/display/interfaces/include",
34    "//foundation/multimedia/image_framework/interfaces/innerkits/include",
35    "//foundation/window/window_manager/interfaces/innerkits/wm",
36    "//third_party/libjpeg-turbo",
37  ]
38
39  cflags = [
40    "-Wall",
41    "-std=c++17",
42    "-fno-rtti",
43    "-fno-exceptions",
44    "-fno-common",
45    "-fstack-protector-strong",
46    "-Wshadow",
47    "-FPIC",
48    "-FS",
49    "-O2",
50    "-D_FORTIFY_SOURCE=2",
51    "-fvisibility=hidden",
52    "-Wformat=2",
53    "-Wdate-time",
54    "-Werror",
55    "-Wextra",
56    "-Wimplicit-fallthrough",
57    "-Wsign-compare",
58    "-Wunused-parameter",
59    "-Wno-deprecated-declarations",
60  ]
61
62  sources = [ "./media_demo.cpp" ]
63
64  if (multimedia_player_framework_support_player) {
65    sources += [
66      "./player/data_source/media_data_source_demo_noseek.cpp",
67      "./player/data_source/media_data_source_demo_seekable.cpp",
68      "./player/player_demo.cpp",
69    ]
70  }
71
72  if (multimedia_player_framework_support_recorder) {
73    sources += [
74      "./recorder/recorder_demo.cpp",
75      "./recorder_profiles/recorder_profiles_demo.cpp",
76    ]
77  }
78
79  if (multimedia_player_framework_support_codec) {
80    sources += [
81      "./avcodeclist/avcodeclist_demo.cpp",
82      "./avcodecvdec/avcodec_vdec_demo.cpp",
83      "./avcodecvenc/avcodec_venc_demo.cpp",
84    ]
85  }
86
87  if (multimedia_player_framework_support_muxer) {
88    sources += [ "./avmuxer/avmuxer_demo.cpp" ]
89  }
90
91  if (multimedia_player_framework_support_metadata) {
92    sources += [ "./avmetadatahelper/avmetadatahelper_demo.cpp" ]
93  }
94
95  deps = [
96    "//foundation/graphic/graphic_2d:libsurface",
97    "//foundation/graphic/graphic_2d/frameworks/surface:surface",
98    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
99    "//foundation/graphic/graphic_2d/utils:sync_fence",
100    "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
101    "//foundation/multimedia/player_framework/services/utils:media_service_utils",
102    "//foundation/window/window_manager/wm:libwm",
103    "//third_party/libjpeg-turbo:turbojpeg_static",
104  ]
105
106  external_deps = [
107    "c_utils:utils",
108    "hiviewdfx_hilog_native:libhilog",
109    "ipc:ipc_core",
110    "multimedia_player_framework:media_client",
111  ]
112  install_enable = false
113
114  part_name = "multimedia_player_framework"
115  subsystem_name = "multimedia"
116}
117