1# Copyright (c) 2020 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. 13import("//build/lite/config/component/lite_component.gni") 14import("//foundation/multimedia/media_utils_lite/config.gni") 15 16executable("camera_sample") { 17 sources = [ "camera_sample.cpp" ] 18 cflags = [ "-Wall" ] 19 cflags_cc = cflags 20 include_dirs = [] 21 22 ldflags = [ "-lstdc++" ] 23 ldflags += [ "-lpthread" ] 24 ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ] 25 26 deps = [ 27 "//foundation/multimedia/camera_lite/frameworks:camera_lite", 28 "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite", 29 ] 30 output_dir = "$root_out_dir/dev_tools" 31} 32 33executable("audio_capture_sample") { 34 sources = [ "audio_capture_sample.cpp" ] 35 cflags = [ "-Wall" ] 36 cflags_cc = cflags 37 38 include_dirs = [ "//foundation/multimedia/audio_lite/interfaces/kits" ] 39 include_dirs += [ "//foundation/multimedia/media_utils_lite/interfaces/kits" ] 40 41 ldflags = [ "-lstdc++" ] 42 ldflags += [ "-lpthread" ] 43 ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ] 44 deps = [ 45 "//foundation/multimedia/audio_lite/frameworks:audio_capturer_lite", 46 "//third_party/bounds_checking_function:libsec_shared", 47 ] 48 output_dir = "$root_out_dir/dev_tools" 49} 50 51executable("player_sample") { 52 if (enable_media_passthrough_mode == true) { 53 defines = [ "ENABLE_PASSTHROUGH_SAMPLE" ] 54 } 55 sources = [ "player_sample.cpp" ] 56 cflags = [ "-Wall" ] 57 cflags_cc = cflags 58 include_dirs = [] 59 ldflags = [ "-lstdc++" ] 60 ldflags += [ "-lpthread" ] 61 ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ] 62 deps = [ 63 "//foundation/multimedia/media_lite/frameworks/player_lite:player_lite", 64 "//third_party/bounds_checking_function:libsec_shared", 65 ] 66 output_dir = "$root_out_dir/dev_tools" 67} 68 69lite_component("media_sample") { 70 features = [ 71 ":camera_sample", 72 ":player_sample", 73 ":audio_capture_sample", 74 ] 75} 76