代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/multimedia_player_framework 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (C) 2022-2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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/config/python.gni")
import("//build/ohos.gni")
template("ohos_prebuilt_seccomp") {
assert(defined(invoker.sources), "source must be defined for ${target_name}.")
assert(defined(invoker.filtername),
"source must be defined for ${target_name}.")
assert(
defined(invoker.process_type) &&
(invoker.process_type == "app" || invoker.process_type == "system"),
"process_type must be defined for ${target_name}, and the type must be app or system")
_seccomp_filter_target = "gen_${target_name}"
_output_name = "${invoker.filtername}_filter"
_seccomp_filter_file = target_gen_dir + "/${_output_name}.c"
_syscall_to_nr_arm_name = "${target_name}_syscall_to_nr_arm"
_syscall_to_nr_arm64_name = "${target_name}_syscall_to_nr_arm64"
_syscall_to_nr_riscv64_name = "${target_name}_syscall_to_nr_riscv64"
_blocklist_file_name = "//base/startup/init/services/modules/seccomp/seccomp_policy/${invoker.process_type}.blocklist.seccomp.policy"
_key_process_file_name = "//base/startup/init/services/modules/seccomp/seccomp_policy/privileged_process.seccomp.policy"
action(_syscall_to_nr_arm_name) {
script = "${clang_base_path}/bin/clang"
output_dir =
target_gen_dir + "/${_seccomp_filter_target}/libsyscall_to_nr_arm"
args = [
"-I",
rebase_path(
"//kernel/linux/patches/${linux_kernel_version}/prebuilts/usr/include/asm-arm"),
"-I",
rebase_path(
"//kernel/linux/patches/${linux_kernel_version}/prebuilts/usr/include"),
"-dD",
"-E",
"-Wall",
"-nostdinc",
"-o",
rebase_path(output_dir),
rebase_path(
"//base/startup/init/services/modules/seccomp/gen_syscall_name_nrs.c"),
]
outputs = [ output_dir ]
}
action(_syscall_to_nr_arm64_name) {
script = "${clang_base_path}/bin/clang"
output_dir =
target_gen_dir + "/${_seccomp_filter_target}/libsyscall_to_nr_arm64"
args = [
"-I",
rebase_path(
"//kernel/linux/patches/${linux_kernel_version}/prebuilts/usr/include/asm-arm64"),
"-I",
rebase_path(
"//kernel/linux/patches/${linux_kernel_version}/prebuilts/usr/include"),
"-dD",
"-E",
"-Wall",
"-nostdinc",
"-o",
rebase_path(output_dir),
rebase_path(
"//base/startup/init/services/modules/seccomp/gen_syscall_name_nrs.c"),
]
outputs = [ output_dir ]
}
action(_syscall_to_nr_riscv64_name) {
script = "${clang_base_path}/bin/clang"
output_dir =
target_gen_dir + "/${_seccomp_filter_target}/libsyscall_to_nr_riscv64"
args = [
"-I",
rebase_path(
"//kernel/linux/patches/${linux_kernel_version}/prebuilts/usr/include/asm-riscv"),
"-I",
rebase_path(
"//kernel/linux/patches/${linux_kernel_version}/prebuilts/usr/include"),
"-dD",
"-E",
"-Wall",
"-nostdinc",
"-o",
rebase_path(output_dir),
rebase_path(
"//base/startup/init/services/modules/seccomp/gen_syscall_name_nrs.c"),
]
outputs = [ output_dir ]
}
action(_seccomp_filter_target) {
script = "//base/startup/init/services/modules/seccomp/scripts/generate_code_from_policy.py"
sources = invoker.sources
sources += get_target_outputs(":${_syscall_to_nr_arm_name}")
sources += get_target_outputs(":${_syscall_to_nr_arm64_name}")
sources += get_target_outputs(":${_syscall_to_nr_riscv64_name}")
uid_is_root = false
if (defined(invoker.uid_is_root)) {
uid_is_root = invoker.uid_is_root
} else {
uid_is_root = false
}
if (invoker.process_type == "system" && invoker.filtername != "appspawn" &&
invoker.filtername != "nwebspawn" && uid_is_root == false) {
sources += [ "//base/startup/init/services/modules/seccomp/seccomp_policy/system_uid_filter.seccomp.policy" ]
}
deps = [
":${_syscall_to_nr_arm64_name}",
":${_syscall_to_nr_arm_name}",
":${_syscall_to_nr_riscv64_name}",
]
if (build_variant == "root") {
seccomp_is_debug = "true"
} else {
seccomp_is_debug = "false"
}
args = []
foreach(source, sources) {
args += [
"--src-files",
rebase_path(source),
]
}
args += [
"--blocklist-file",
rebase_path(_blocklist_file_name),
"--dst-file",
rebase_path(_seccomp_filter_file),
"--filter-name",
invoker.filtername,
"--target-cpu",
invoker.target_cpu,
"--keyprocess-file",
rebase_path(_key_process_file_name),
"--is-debug",
seccomp_is_debug,
]
outputs = [ _seccomp_filter_file ]
}
ohos_shared_library(target_name) {
output_name = _output_name
deps = [ ":${_seccomp_filter_target}" ]
sources = get_target_outputs(":${_seccomp_filter_target}")
relative_install_dir = "seccomp"
if (defined(invoker.include_dirs)) {
include_dirs = invoker.include_dirs
}
if (defined(invoker.install_enable)) {
install_enable = invoker.install_enable
}
if (defined(invoker.part_name)) {
part_name = invoker.part_name
}
if (defined(invoker.subsystem_name)) {
subsystem_name = invoker.subsystem_name
}
if (defined(invoker.install_images)) {
install_images = invoker.install_images
}
}
}
declare_args() {
multimedia_player_framework_support_player = true
multimedia_player_framework_support_recorder = true
multimedia_player_framework_support_player_js_api9 = true
multimedia_player_framework_support_recorder_js_api9 = true
multimedia_player_framework_support_metadata = true
multimedia_player_framework_support_histreamer = true
multimedia_player_framework_support_video = true
multimedia_player_framework_support_jsapi = true
multimedia_player_framework_support_capi = true
multimedia_player_framework_support_test = true
multimedia_player_framework_support_xcollie = true
multimedia_player_framework_support_jsstack = true
multimedia_player_framework_support_seccomp = false
multimedia_player_framework_support_screen_capture = true
multimedia_player_framework_support_screen_capture_stopbycall = true
multimedia_player_framework_support_screen_capture_controller = false
multimedia_player_framework_support_jssoundpool = true
multimedia_player_framework_support_mediasource = true
multimedia_player_framework_check_video_is_hdr_vivid = false
if (defined(build_seccomp) && build_seccomp) {
multimedia_player_framework_support_seccomp = true
}
multimedia_player_framework_support_monitor = true
use_memmgr_plugin = false
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_memmgr_override)) {
use_memmgr_plugin = true
}
use_memmgr = false
if (defined(global_parts_info) &&
defined(global_parts_info.resourceschedule_memmgr)) {
use_memmgr = true
}
multimedia_player_framework_support_avsession_background = false
if (defined(global_parts_info) &&
defined(global_parts_info.multimedia_av_session)) {
multimedia_player_framework_support_avsession_background = true
}
multimedia_player_framework_support_drm = false
if (defined(global_parts_info) &&
defined(global_parts_info.multimedia_drm_framework)) {
multimedia_player_framework_support_drm = true
}
multimedia_player_framework_support_vibrator = false
if (defined(global_parts_info) &&
defined(global_parts_info.sensors_miscdevice)) {
multimedia_player_framework_support_vibrator = true
}
multimedia_player_framework_support_power_manager = false
if (defined(global_parts_info) &&
defined(global_parts_info.powermgr_power_manager)) {
multimedia_player_framework_support_power_manager = true
}
multimedia_player_framework_support_json = false
if (defined(global_parts_info) &&
defined(global_parts_info.third_party_json)) {
multimedia_player_framework_support_json = true
}
}
player_framework_defines = []
if (multimedia_player_framework_support_player) {
player_framework_defines += [ "SUPPORT_PLAYER" ]
} else {
player_framework_defines += [ "UNSUPPORT_PLAYER" ]
}
if (multimedia_player_framework_support_player_js_api9) {
player_framework_defines += [ "SUPPORT_PLAYER_API9" ]
}
if (multimedia_player_framework_support_avsession_background) {
player_framework_defines += [ "SUPPORT_AVSESSION" ]
}
if (multimedia_player_framework_support_recorder_js_api9) {
player_framework_defines += [ "SUPPORT_RECORDER_API9" ]
}
if (multimedia_player_framework_support_recorder) {
player_framework_defines += [ "SUPPORT_RECORDER" ]
} else {
player_framework_defines += [ "UNSUPPORT_RECORDER" ]
}
if (multimedia_player_framework_support_metadata) {
player_framework_defines += [ "SUPPORT_METADATA" ]
} else {
player_framework_defines += [ "UNSUPPORT_METADATA" ]
}
if (multimedia_player_framework_support_video) {
player_framework_defines += [ "SUPPORT_VIDEO" ]
} else {
player_framework_defines += [ "SUPPORT_AUDIO_ONLY" ]
}
if (multimedia_player_framework_support_xcollie) {
player_framework_defines += [ "HICOLLIE_ENABLE" ]
}
if (multimedia_player_framework_support_jsstack) {
player_framework_defines += [ "SUPPORT_JSSTACK" ]
}
if (use_memmgr_plugin || use_memmgr) {
player_framework_defines += [ "PLAYER_USE_MEMORY_MANAGE" ]
}
if (multimedia_player_framework_support_monitor) {
player_framework_defines += [ "USE_MONITOR" ]
}
if (multimedia_player_framework_support_screen_capture) {
player_framework_defines += [ "SUPPORT_SCREEN_CAPTURE" ]
} else {
player_framework_defines += [ "UNSUPPORT_SCREEN_CAPTURE" ]
}
if (multimedia_player_framework_support_screen_capture_controller) {
player_framework_defines += [ "SUPPORT_SCREEN_CAPTURE_WINDOW_NOTIFICATION" ]
}
if (multimedia_player_framework_support_jssoundpool) {
player_framework_defines += [ "SUPPORT_SOUND_POOL" ]
} else {
player_framework_defines += [ "UNSUPPORT_SOUND_POOL" ]
}
if (multimedia_player_framework_support_drm) {
player_framework_defines += [ "SUPPORT_DRM" ]
} else {
player_framework_defines += [ "UNSUPPORT_DRM" ]
}
if (multimedia_player_framework_support_vibrator) {
player_framework_defines += [ "SUPPORT_VIBRATOR" ]
} else {
player_framework_defines += [ "UNSUPPORT_VIBRATOR" ]
}
if (multimedia_player_framework_support_power_manager) {
player_framework_defines += [ "SUPPORT_POWER_MANAGER" ]
}
if (multimedia_player_framework_support_mediasource) {
player_framework_defines += [ "SUPPORT_MEDIA_SOURCE" ]
}
if (multimedia_player_framework_support_json) {
player_framework_defines += [ "SUPPORT_JSON" ]
}
# Config path
MEDIA_PLAYER_ROOT_DIR = "//foundation/multimedia/player_framework"
MEDIA_PLAYER_AVCODEC = "//foundation/multimedia/av_codec"
MEDIA_PLAYER_HISTREAMER = "//foundation/multimedia/media_foundation"
MEDIA_PLAYER_C_UTILS = "//commonlibrary/c_utils"
MEDIA_PLAYER_GRAPHIC = "//foundation/graphic/graphic_2d"
MEDIA_PLAYER_GRAPHIC_SURFACE = "//foundation/graphic/graphic_surface"
MEDIA_DRM_ROOT_DIR = "//foundation/multimedia/drm_framework"
# Fuzz test output path
MODULE_OUTPUT_PATH = "player_framework/player_framework"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。