| # Copyright 2018 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//common-mk/pkg_config.gni") |
| |
| group("all") { |
| deps = [ |
| ":arcvideodecoder_test", |
| ":arcvideoencoder_test", |
| ] |
| } |
| |
| pkg_config("dep_libs") { |
| pkg_deps = [ |
| "cutils", |
| "mediandk", |
| ] |
| } |
| |
| # For ARC++ test, we do not install Gtest library into the Android |
| # container. Instead, we build the binary with static library. |
| config("arc_gtest") { |
| gtest_config = getenv("GTEST_CONFIG") |
| lib_dirs = exec_script("//common-mk/args_generator_wrapper.py", |
| [ |
| gtest_config, |
| "--libdir", |
| ], |
| "list lines") |
| libs = exec_script("//common-mk/arg_prefix_filter_wrapper.py", |
| [ |
| "--prefix=-l", |
| gtest_config, |
| "--libs", |
| ], |
| "list lines") |
| include_dirs = exec_script("//common-mk/args_generator_wrapper.py", |
| [ |
| gtest_config, |
| "--includedir", |
| ], |
| "list lines") |
| cflags_cc = exec_script("//common-mk/args_generator_wrapper.py", |
| [ |
| gtest_config, |
| "--cxxflags", |
| ], |
| "list lines") |
| } |
| |
| executable("arcvideoencoder_test") { |
| sources = [ |
| "arc_video_encoder_e2e_test.cc", |
| "common.cc", |
| "mediacodec_encoder.cc", |
| ] |
| |
| configs += [ |
| ":arc_gtest", |
| ":dep_libs", |
| ] |
| |
| # In Android N branch, off_t is 32-bit. Therefore we cannot compile the binary |
| # with _FILE_OFFSET_BITS=64. However, we already add the variable at |
| # //common-mk/compiler_defaults. Therefore we undefine the variable here. |
| # (crbug.com/945197) |
| cflags_cc = [ "-U_FILE_OFFSET_BITS" ] |
| } |
| |
| executable("arcvideodecoder_test") { |
| sources = [ |
| "arc_video_decoder_e2e_test.cc", |
| "common.cc", |
| "encoded_data_helper.cc", |
| "md5.cc", |
| "mediacodec_decoder.cc", |
| "video_frame.cc", |
| ] |
| |
| configs += [ |
| ":arc_gtest", |
| ":dep_libs", |
| ] |
| |
| # In Android N branch, off_t is 32-bit. Therefore we cannot compile the binary |
| # with _FILE_OFFSET_BITS=64. However, we already add the variable at |
| # //common-mk/compiler_defaults. Therefore we undefine the variable here. |
| # (crbug.com/945197) |
| cflags_cc = [ "-U_FILE_OFFSET_BITS" ] |
| } |