| # Copyright 2019 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_overrides/build.gni") |
| import("../../gni/openscreen.gni") |
| import("../streaming/external_libraries.gni") |
| |
| visibility = [ "./*" ] |
| |
| # Define the executable target only when the build is configured to use the |
| # standalone platform implementation; since this is itself a standalone |
| # application. |
| # |
| # See [external_libraries.md](../../build/config/external_libraries.md) for more information. |
| |
| openscreen_source_set("cast_receiver_lib") { |
| testonly = true |
| public = [ "cast_service.h" ] |
| |
| sources = [ |
| "cast_service.cc", |
| "mirroring_application.cc", |
| "mirroring_application.h", |
| "simple_remoting_receiver.cc", |
| "simple_remoting_receiver.h", |
| "streaming_playback_controller.cc", |
| "streaming_playback_controller.h", |
| ] |
| |
| deps = [ |
| "../../discovery:dnssd", |
| "../../discovery:public", |
| "../../platform:api", |
| "../common:public", |
| "../receiver:agent", |
| "../receiver:channel", |
| "../streaming:receiver", |
| ] |
| |
| if (have_ffmpeg && have_libsdl2) { |
| defines = [ "CAST_STANDALONE_RECEIVER_HAVE_EXTERNAL_LIBS" ] |
| sources += [ |
| "decoder.cc", |
| "decoder.h", |
| "sdl_audio_player.cc", |
| "sdl_audio_player.h", |
| "sdl_glue.cc", |
| "sdl_glue.h", |
| "sdl_player_base.cc", |
| "sdl_player_base.h", |
| "sdl_video_player.cc", |
| "sdl_video_player.h", |
| ] |
| deps += [ "../standalone_common:ffmpeg_glue" ] |
| include_dirs = ffmpeg_include_dirs + libsdl2_include_dirs |
| lib_dirs = external_lib_dirs + ffmpeg_lib_dirs + libsdl2_lib_dirs |
| libs = ffmpeg_libs + libsdl2_libs |
| } else { |
| sources += [ |
| "dummy_player.cc", |
| "dummy_player.h", |
| ] |
| } |
| } |
| |
| openscreen_executable("cast_receiver") { |
| testonly = true |
| visibility += [ "../..:gn_all" ] |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":cast_receiver_lib", |
| "../../platform:standalone_impl", |
| "../../third_party/getopt", |
| "../common:certificate_boringssl", |
| "../common/certificate/proto:certificate_proto", |
| "../receiver:channel", |
| ] |
| configs = [ "../common:certificate_config" ] |
| } |