1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
media / mojo / BUILD.gn [blame]
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/cast.gni")
import("//media/media_options.gni")
import("//testing/test.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
enable_mojo_renderer = false
enable_mojo_cdm = false
enable_mojo_audio_decoder = false
enable_mojo_audio_encoder = false
enable_mojo_video_decoder = false
enable_mojo_media_in_browser_process = false
enable_mojo_media_in_gpu_process = false
foreach(service, mojo_media_services) {
if (service == "renderer") {
enable_mojo_renderer = true
} else if (service == "cdm") {
# Fuchsia communicates directly with the platform CDM via FIDL instead of
# the mojo service.
if (!is_fuchsia) {
enable_mojo_cdm = true
}
} else if (service == "audio_decoder") {
enable_mojo_audio_decoder = true
} else if (service == "audio_encoder") {
enable_mojo_audio_encoder = true
} else if (service == "video_decoder") {
enable_mojo_video_decoder = true
} else {
assert(false, "Invalid mojo media service: $service")
}
}
if (mojo_media_host == "browser") {
enable_mojo_media_in_browser_process = true
} else if (mojo_media_host == "gpu") {
enable_mojo_media_in_gpu_process = true
} else if (mojo_media_host != "") {
assert(false, "Invalid mojo media host: $mojo_media_host")
}
flags = [
"ENABLE_CAST_RENDERER=$enable_cast_renderer",
"ENABLE_MOJO_RENDERER=$enable_mojo_renderer",
"ENABLE_MOJO_CDM=$enable_mojo_cdm",
"ENABLE_MOJO_AUDIO_DECODER=$enable_mojo_audio_decoder",
"ENABLE_MOJO_AUDIO_ENCODER=$enable_mojo_audio_encoder",
"ENABLE_MOJO_VIDEO_DECODER=$enable_mojo_video_decoder",
"ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS=$enable_mojo_media_in_browser_process",
"ENABLE_MOJO_MEDIA_IN_GPU_PROCESS=$enable_mojo_media_in_gpu_process",
]
}
source_set("test_support") {
testonly = true
public_deps = [
"//media/mojo/clients",
"//media/mojo/clients:test_support",
"//media/mojo/common",
"//media/mojo/mojom",
"//media/mojo/mojom:test_interfaces",
"//media/mojo/services",
]
}
source_set("unit_tests") {
testonly = true
deps = [
"//media/learning/mojo:unit_tests",
"//media/mojo/clients:unit_tests",
"//media/mojo/common:unit_tests",
"//media/mojo/mojom:unit_tests",
"//media/mojo/mojom/stable:unit_tests",
"//media/mojo/services:unit_tests",
"//media/mojo/test:unit_tests",
]
}
test("media_mojo_unittests") {
deps = [
":unit_tests",
"//mojo/core/test:run_all_unittests",
]
}