| # Copyright 2014 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Implementations of media C++ interfaces using corresponding mojo services. |
| source_set("clients") { |
| visibility = [ |
| "//chromecast/*", |
| |
| # Mirroring Service needs the video accelerated encoder mojom interfaces. |
| "//components/mirroring/service:mirroring_service", |
| |
| "//content/renderer:*", |
| |
| # TODO(xhwang): Only allow //media/mojo/services:unit_tests |
| "//media/mojo/services:*", |
| |
| "//media/mojo:test_support", |
| |
| "//media/test/*", |
| |
| "//content/browser:*", |
| "//chrome/browser:*", |
| |
| "//chrome/browser/thumbnail/generator", |
| |
| "//content/gpu:*", |
| |
| # TODO(liberato): can we avoid this? |
| "//content/test/*", |
| |
| "//third_party/blink/renderer/modules/webcodecs", |
| ] |
| |
| sources = [ |
| "mojo_audio_decoder.cc", |
| "mojo_audio_decoder.h", |
| "mojo_cdm.cc", |
| "mojo_cdm.h", |
| "mojo_cdm_factory.cc", |
| "mojo_cdm_factory.h", |
| "mojo_decoder_factory.cc", |
| "mojo_decoder_factory.h", |
| "mojo_decryptor.cc", |
| "mojo_decryptor.h", |
| "mojo_demuxer_stream_impl.cc", |
| "mojo_demuxer_stream_impl.h", |
| "mojo_media_log_service.cc", |
| "mojo_media_log_service.h", |
| "mojo_renderer.cc", |
| "mojo_renderer.h", |
| "mojo_renderer_factory.cc", |
| "mojo_renderer_factory.h", |
| "mojo_renderer_wrapper.cc", |
| "mojo_renderer_wrapper.h", |
| "mojo_video_decoder.cc", |
| "mojo_video_decoder.h", |
| "mojo_video_encode_accelerator.cc", |
| "mojo_video_encode_accelerator.h", |
| ] |
| |
| if (is_android) { |
| sources += [ |
| "mojo_android_overlay.cc", |
| "mojo_android_overlay.h", |
| ] |
| } |
| |
| public_deps = [ |
| "//base", |
| "//media", |
| "//media/mojo:buildflags", |
| "//media/mojo/mojom", |
| "//mojo/public/cpp/bindings", |
| "//mojo/public/cpp/system", |
| "//services/service_manager/public/mojom", |
| ] |
| |
| deps = [ |
| "//build:chromeos_buildflags", |
| "//media/gpu", |
| "//media/mojo/common", |
| "//media/mojo/common:mojo_shared_buffer_video_frame", |
| "//services/service_manager/public/cpp", |
| ] |
| |
| if (is_android) { |
| deps += [ |
| "//gpu/ipc/common:common", |
| "//ui/gl:gl", |
| ] |
| } |
| if (is_win) { |
| sources += [ |
| "win/media_foundation_renderer_client.cc", |
| "win/media_foundation_renderer_client.h", |
| "win/media_foundation_renderer_client_factory.cc", |
| "win/media_foundation_renderer_client_factory.h", |
| ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ |
| "mojo_audio_decoder_unittest.cc", |
| "mojo_cdm_unittest.cc", |
| "mojo_decryptor_unittest.cc", |
| "mojo_renderer_unittest.cc", |
| "mojo_video_encode_accelerator_unittest.cc", |
| ] |
| |
| deps = [ |
| "//base", |
| "//base/test:test_support", |
| "//media:test_support", |
| "//media/mojo:test_support", |
| "//testing/gmock", |
| "//testing/gtest", |
| ] |
| |
| if (is_android) { |
| sources += [ "mojo_android_overlay_unittest.cc" ] |
| |
| deps += [ |
| "//media/mojo/mojom:test_interfaces", |
| "//ui/gfx:test_support", |
| "//ui/gl", |
| ] |
| } |
| } |