| # Copyright 2015 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//remoting/remoting_options.gni") |
| |
| source_set("encoder") { |
| sources = [ |
| "encoder_bitrate_filter.cc", |
| "encoder_bitrate_filter.h", |
| "utils.cc", |
| "utils.h", |
| "video_encoder_active_map.cc", |
| "video_encoder_active_map.h", |
| "webrtc_video_encoder.cc", |
| "webrtc_video_encoder_av1.cc", |
| "webrtc_video_encoder_av1.h", |
| "webrtc_video_encoder_vpx.cc", |
| "webrtc_video_encoder_vpx.h", |
| ] |
| |
| configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| |
| public_deps = [ "//third_party/libaom" ] |
| |
| deps = [ |
| ":vpx_codec", |
| "//remoting/base", |
| "//remoting/proto", |
| "//remoting/signaling", |
| "//third_party/libvpx", |
| "//third_party/libyuv", |
| "//third_party/webrtc_overrides:webrtc_component", |
| "//ui/gfx:color_space", |
| "//ui/gfx/geometry", |
| ] |
| |
| # Currently, building WebrtcVideoEncoderGpu is only supported on Windows and |
| # Linux, and encoding with WebrtcVideoEncoderGpu is only supported on Windows. |
| if (remoting_enable_h264 && (is_win || is_linux || is_chromeos)) { |
| public_configs = [ "//skia:skia_config" ] |
| sources += [ |
| "webrtc_video_encoder_gpu.cc", |
| "webrtc_video_encoder_gpu.h", |
| ] |
| deps += [ |
| "//gpu/command_buffer/service", |
| "//media/gpu", |
| ] |
| } |
| } |
| |
| source_set("vpx_codec") { |
| sources = [ |
| "scoped_vpx_codec.cc", |
| "scoped_vpx_codec.h", |
| ] |
| |
| configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| |
| public_deps = [ "//third_party/libvpx" ] |
| |
| deps = [ |
| "//base", |
| "//remoting/proto", |
| "//third_party/libyuv", |
| "//third_party/webrtc_overrides:webrtc_component", |
| ] |
| } |
| |
| if (!is_component_build && (is_win || is_linux)) { |
| executable("webrtc_video_encoder_benchmark") { |
| testonly = true |
| |
| sources = [ "webrtc_video_encoder_benchmark.cc" ] |
| |
| deps = [ |
| ":encoder", |
| "//base", |
| "//base/test:test_support", |
| "//remoting/test/frame_generator:frame_generator_test_support", |
| "//third_party/webrtc_overrides:webrtc_component", |
| ] |
| } |
| } |
| |
| source_set("unit_tests") { |
| testonly = true |
| |
| sources = [ "encoder_bitrate_filter_unittest.cc" ] |
| |
| deps = [ |
| ":encoder", |
| "//base", |
| "//remoting/base", |
| "//remoting/proto", |
| "//testing/gtest", |
| "//third_party/webrtc_overrides:webrtc_component", |
| "//ui/gfx:color_space", |
| ] |
| } |