OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//mojo/public/mojo_application.gni") | 5 import("//mojo/public/mojo_application.gni") |
6 | 6 |
7 # Things needed by multiple targets, like renderer_impl and renderer_app. | 7 # Naming conventions: |
8 # GYP version: media/media.gyp:media_mojo_lib | 8 # - common: Utility helpers shared by multiple targets. |
9 source_set("lib") { | 9 # - proxy: C++ implementations supported by mojo services. |
10 # - service: Mojo interface implementations. | |
11 # - app: Mojo app providing one or more services. | |
12 # - unittests: Unit tests for a particular class/file. | |
13 # - apptest: Tests for a particular app. | |
14 | |
15 # Common helpers needed by multiple targets. | |
16 # GYP version: media/media.gyp:mojo_common | |
17 source_set("common") { | |
jamesr
2014/12/04 23:45:38
we call converters 'converters' in other parts of
xhwang
2014/12/05 06:23:29
Done.
| |
10 deps = [ | 18 deps = [ |
11 "//base", | 19 "//base", |
12 "//media", | 20 "//media", |
13 "//media/mojo/interfaces", | 21 "//media/mojo/interfaces", |
14 "//mojo/common", | 22 "//mojo/common", |
15 "//mojo/converters/geometry", | 23 "//mojo/converters/geometry", |
16 "//mojo/environment:chromium", | 24 "//mojo/environment:chromium", |
17 "//mojo/public/c/system:for_component", | 25 "//mojo/public/c/system:for_component", |
18 "//mojo/services/public/interfaces/geometry", | 26 "//mojo/services/public/interfaces/geometry", |
19 "//skia", | 27 "//skia", |
20 ] | 28 ] |
21 | 29 |
22 sources = [ | 30 sources = [ |
jamesr
2014/12/04 23:45:38
sources should go before deps
xhwang
2014/12/05 06:23:29
Done.
| |
23 "media_type_converters.cc", | 31 "media_type_converters.cc", |
24 "media_type_converters.h", | 32 "media_type_converters.h", |
25 "mojo_demuxer_stream_adapter.cc", | |
26 "mojo_demuxer_stream_adapter.h", | |
27 ] | 33 ] |
28 } | 34 } |
29 | 35 |
30 # mojo media::Renderer proxy (to a renderer_app) implementation. | 36 # mojo media::Renderer proxy (to a renderer_app) implementation. |
31 source_set("renderer_impl_lib") { | 37 source_set("renderer_proxy") { |
32 deps = [ | 38 deps = [ |
33 ":lib", | |
34 "//base", | 39 "//base", |
35 "//media", | 40 "//media", |
36 "//media/mojo/interfaces", | 41 "//media/mojo/interfaces", |
37 "//mojo/public/interfaces/application", | 42 "//mojo/public/interfaces/application", |
38 "//mojo/common", | 43 "//mojo/common", |
39 "//mojo/environment:chromium", | 44 "//mojo/environment:chromium", |
40 "//mojo/public/c/system:for_component", | 45 "//mojo/public/c/system:for_component", |
41 "//mojo/public/cpp/application", | 46 "//mojo/public/cpp/application", |
47 ":common", | |
jamesr
2014/12/04 23:45:38
run 'gn format' - local deps should go before abso
xhwang
2014/12/05 06:23:29
Thanks for the info!
However, "gn format" doesn't
| |
42 ] | 48 ] |
43 | 49 |
44 sources = [ | 50 sources = [ |
45 "mojo_demuxer_stream_impl.cc", | 51 "mojo_demuxer_stream_impl.cc", |
46 "mojo_demuxer_stream_impl.h", | 52 "mojo_demuxer_stream_impl.h", |
47 "mojo_renderer_impl.cc", | 53 "mojo_renderer_impl.cc", |
48 "mojo_renderer_impl.h", | 54 "mojo_renderer_impl.h", |
xhwang
2014/12/03 23:22:03
Should we actually move these to a "cpp" folder, s
jamesr
2014/12/04 23:45:38
I don't think so (that pattern is useful if you wa
xhwang
2014/12/05 06:23:29
Acknowledged.
| |
49 ] | 55 ] |
50 } | 56 } |
51 | 57 |
52 # mojo media::Renderer application. | 58 # mojo media::Renderer service. |
53 # GYP version: media/media.gyp:mojo_media_renderer_app | 59 source_set("renderer_service") { |
54 mojo_native_application("renderer_app") { | |
55 output_name = "mojo_media_renderer_app" | |
56 | |
57 deps = [ | 60 deps = [ |
58 "//base", | 61 "//base", |
59 "//media", | 62 "//media", |
60 "//media:shared_memory_support", | 63 "//media:shared_memory_support", |
61 "//media/mojo/interfaces", | 64 "//media/mojo/interfaces", |
62 "//mojo/common", | 65 "//mojo/common", |
63 "//mojo/application", | 66 ":common", |
64 "//mojo/public/c/system:for_shared_library", | |
65 ":lib", | |
66 ] | 67 ] |
67 | 68 |
68 sources = [ | 69 sources = [ |
69 "demuxer_stream_provider_shim.cc", | 70 "demuxer_stream_provider_shim.cc", |
70 "demuxer_stream_provider_shim.h", | 71 "demuxer_stream_provider_shim.h", |
72 "mojo_demuxer_stream_adapter.cc", | |
73 "mojo_demuxer_stream_adapter.h", | |
71 "mojo_renderer_service.cc", | 74 "mojo_renderer_service.cc", |
72 "mojo_renderer_service.h", | 75 "mojo_renderer_service.h", |
73 "renderer_config.cc", | 76 "renderer_config.cc", |
74 "renderer_config.h", | 77 "renderer_config.h", |
75 "renderer_config_default.cc", | 78 "renderer_config_default.cc", |
76 ] | 79 ] |
77 } | 80 } |
78 | 81 |
79 test("mojo_media_lib_unittests") { | 82 # GYP version: media/media.gyp:mojo_media_app |
80 sources = [ | 83 mojo_native_application("media_app") { |
81 "media_type_converters_unittest.cc", | 84 output_name = "media" |
jamesr
2014/12/04 23:45:38
it's kind of weird to have mojo_native_application
xhwang
2014/12/05 06:23:29
Done.
| |
85 | |
86 deps = [ | |
87 "//mojo/application", | |
88 "//mojo/public/c/system:for_shared_library", | |
89 ":renderer_service", | |
82 ] | 90 ] |
83 | 91 |
92 sources = [ | |
93 "mojo_media_application.cc", | |
94 ] | |
95 } | |
96 | |
97 # GYP version: media/media.gyp:media_mojo_unittests | |
98 test("unittests") { | |
99 output_name = "media_mojo_unittests" | |
84 deps = [ | 100 deps = [ |
85 "//base", | 101 "//base", |
86 "//base/test:test_support", | 102 "//base/test:test_support", |
87 "//media", | 103 "//media", |
88 "//media/mojo/interfaces", | 104 "//media/mojo/interfaces", |
89 "//mojo/edk/system", | 105 "//mojo/edk/system", |
90 "//mojo/edk/test:run_all_unittests", | 106 "//mojo/edk/test:run_all_unittests", |
91 "//mojo/environment:chromium", | 107 "//mojo/environment:chromium", |
92 "//testing/gtest", | 108 "//testing/gtest", |
93 ":lib" | 109 ":common" |
110 ] | |
111 | |
112 sources = [ | |
113 "media_type_converters_unittest.cc", | |
94 ] | 114 ] |
95 } | 115 } |
96 | 116 |
97 # Not a 'test' because this is loaded via mojo_shell as an app. | 117 # Not a 'test' because this is loaded via mojo_shell as an app. |
98 # To run the test: | 118 # To run the test: |
99 # out/Debug/mojo_shell mojo:mojo_media_renderer_apptest | 119 # out/Debug/mojo_shell mojo:media_apptest |
100 # You may need to get "mojo_shell" from a mojo checkout and symlink all required | 120 # You can get "mojo_shell" using mojo/public/tools/download_shell_binary.py |
101 # libraries. | 121 # GYP version: N/A |
102 # TODO(msw): Fix GYP build for ApplicationTestBase so that we can add a GYP | 122 # TODO(msw): Fix GYP build for ApplicationTestBase so that we can add a GYP |
103 # version of this test. | 123 # version of this test. |
jamesr
2014/12/04 23:45:38
you can delete this comment now
xhwang
2014/12/05 06:23:29
Done.
| |
104 mojo_native_application("media_renderer_apptest") { | 124 mojo_native_application("apptest") { |
105 testonly = true | 125 testonly = true |
106 output_name = "mojo_media_renderer_apptest" | 126 output_name = "media_apptest" |
107 | 127 |
108 deps = [ | 128 deps = [ |
109 "//base", | 129 "//base", |
110 "//media", | 130 "//media", |
111 "//media:shared_memory_support", | 131 "//media:shared_memory_support", |
112 "//media/mojo/interfaces", | 132 "//media/mojo/interfaces", |
113 "//mojo/application", | 133 "//mojo/application", |
114 "//mojo/application:test_support", | 134 "//mojo/application:test_support", |
115 "//mojo/common", | 135 "//mojo/common", |
116 "//mojo/environment:chromium", | 136 "//mojo/environment:chromium", |
117 ":renderer_impl_lib", | |
118 ":renderer_app", | |
119 ":lib", | |
120 "//mojo/public/c/system:for_shared_library", | 137 "//mojo/public/c/system:for_shared_library", |
138 ":media_app", | |
139 ":renderer_proxy", | |
121 ] | 140 ] |
122 | 141 |
123 sources = [ | 142 sources = [ |
124 "media_renderer_apptest.cc", | 143 "media_renderer_apptest.cc", |
125 ] | 144 ] |
126 } | 145 } |
127 | 146 |
128 group("services") { | 147 group("services") { |
129 deps = [ | 148 deps = [ |
130 ":lib", | 149 ":media_app", |
131 ":renderer_impl_lib", | 150 ":renderer_proxy", |
132 ":renderer_app", | |
133 ] | 151 ] |
134 } | 152 } |
135 | 153 |
136 group("tests") { | 154 group("tests") { |
137 testonly = true | 155 testonly = true |
138 deps = [ | 156 deps = [ |
139 ":mojo_media_lib_unittests", | 157 ":apptest", |
140 ":media_renderer_apptest", | 158 ":unittests", |
141 ] | 159 ] |
142 } | 160 } |
OLD | NEW |