| 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("//media/media_options.gni") | 5 import("//media/media_options.gni") |
| 6 import("//services/catalog/public/tools/catalog.gni") | 6 import("//services/catalog/public/tools/catalog.gni") |
| 7 import("//services/service_manager/public/cpp/service.gni") | 7 import("//services/service_manager/public/cpp/service.gni") |
| 8 import("//services/service_manager/public/service_manifest.gni") | 8 import("//services/service_manager/public/service_manifest.gni") |
| 9 import("//services/service_manager/public/tools/test/service_test.gni") | 9 import("//services/service_manager/public/tools/test/service_test.gni") |
| 10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| 11 | 11 |
| 12 config("mojo_media_config") { | |
| 13 if (!enable_mojo_media) { | |
| 14 assert(mojo_media_services == [], "Mojo media is not enabled") | |
| 15 assert(mojo_media_host == "none", "Mojo media is not enabled") | |
| 16 assert(!enable_test_mojo_media_client, "Mojo media is not enabled") | |
| 17 } else { | |
| 18 defines = [ "ENABLE_MOJO_MEDIA" ] | |
| 19 | |
| 20 assert(mojo_media_services != [], "No mojo media service specified") | |
| 21 mojo_renderer_enabled = false | |
| 22 foreach(service, mojo_media_services) { | |
| 23 if (service == "renderer") { | |
| 24 defines += [ "ENABLE_MOJO_RENDERER" ] | |
| 25 mojo_renderer_enabled = true | |
| 26 } else if (service == "cdm") { | |
| 27 defines += [ "ENABLE_MOJO_CDM" ] | |
| 28 } else if (service == "audio_decoder") { | |
| 29 defines += [ "ENABLE_MOJO_AUDIO_DECODER" ] | |
| 30 } else if (service == "video_decoder") { | |
| 31 defines += [ "ENABLE_MOJO_VIDEO_DECODER" ] | |
| 32 } else { | |
| 33 assert(false, "Invalid mojo media service: $service") | |
| 34 } | |
| 35 } | |
| 36 assert( | |
| 37 mojo_renderer_enabled || !enable_runtime_media_renderer_selection, | |
| 38 "The mojo renderer must be enabled to use runtime media renderer selecti
on.") | |
| 39 | |
| 40 if (mojo_media_host == "browser") { | |
| 41 defines += [ "ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS" ] | |
| 42 } else if (mojo_media_host == "gpu") { | |
| 43 defines += [ "ENABLE_MOJO_MEDIA_IN_GPU_PROCESS" ] | |
| 44 } else if (mojo_media_host == "utility") { | |
| 45 defines += [ "ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS" ] | |
| 46 } else { | |
| 47 assert(false, "Invalid mojo media host: $mojo_media_host") | |
| 48 } | |
| 49 | |
| 50 if (enable_test_mojo_media_client) { | |
| 51 defines += [ "ENABLE_TEST_MOJO_MEDIA_CLIENT" ] | |
| 52 } | |
| 53 } | |
| 54 } | |
| 55 | |
| 56 component("services") { | 12 component("services") { |
| 57 output_name = "media_mojo_services" | 13 output_name = "media_mojo_services" |
| 58 | 14 |
| 59 public_deps = [ | 15 public_deps = [ |
| 60 ":lib", | 16 ":lib", |
| 61 ] | 17 ] |
| 62 } | 18 } |
| 63 | 19 |
| 64 # TODO(xhwang): Add this intermediate target because ServiceTest doesn't support | 20 # TODO(xhwang): Add this intermediate target because ServiceTest doesn't support |
| 65 # services that depend on shared libraries in component build. | 21 # services that depend on shared libraries in component build. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 "mojo_video_decoder_service.cc", | 62 "mojo_video_decoder_service.cc", |
| 107 "mojo_video_decoder_service.h", | 63 "mojo_video_decoder_service.h", |
| 108 "test_mojo_media_client.cc", | 64 "test_mojo_media_client.cc", |
| 109 "test_mojo_media_client.h", | 65 "test_mojo_media_client.h", |
| 110 ] | 66 ] |
| 111 | 67 |
| 112 defines = [ "MEDIA_MOJO_IMPLEMENTATION" ] | 68 defines = [ "MEDIA_MOJO_IMPLEMENTATION" ] |
| 113 | 69 |
| 114 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 70 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 115 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 71 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
| 116 public_configs = [ ":mojo_media_config" ] | |
| 117 | 72 |
| 118 public_deps = [ | 73 public_deps = [ |
| 119 "//base", | 74 "//base", |
| 120 "//media", | 75 "//media", |
| 76 "//media/mojo:features", |
| 121 "//media/mojo/interfaces", | 77 "//media/mojo/interfaces", |
| 122 "//mojo/public/cpp/bindings", | 78 "//mojo/public/cpp/bindings", |
| 123 "//mojo/public/cpp/system", | 79 "//mojo/public/cpp/system", |
| 124 "//services/service_manager/public/cpp", | 80 "//services/service_manager/public/cpp", |
| 125 "//url", | 81 "//url", |
| 126 ] | 82 ] |
| 127 | 83 |
| 128 deps = [ | 84 deps = [ |
| 129 "//media:cdm_api", | 85 "//media:cdm_api", |
| 130 "//media:cdm_manager", | 86 "//media:cdm_manager", |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 187 |
| 232 catalog("media_service_unittests_catalog") { | 188 catalog("media_service_unittests_catalog") { |
| 233 embedded_services = [ ":test_manifest" ] | 189 embedded_services = [ ":test_manifest" ] |
| 234 standalone_services = [ ":media_manifest" ] | 190 standalone_services = [ ":media_manifest" ] |
| 235 } | 191 } |
| 236 | 192 |
| 237 catalog("media_pipeline_integration_unittests_catalog") { | 193 catalog("media_pipeline_integration_unittests_catalog") { |
| 238 embedded_services = [ ":pipeline_test_manifest" ] | 194 embedded_services = [ ":pipeline_test_manifest" ] |
| 239 standalone_services = [ ":media_manifest" ] | 195 standalone_services = [ ":media_manifest" ] |
| 240 } | 196 } |
| OLD | NEW |