| # Copyright 2021 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//starboard/shared/starboard/player/testdata/sha_files.gni") |
| |
| static_library("player") { |
| check_includes = false |
| sources = [ |
| "//starboard/shared/starboard/player/decoded_audio_internal.cc", |
| "//starboard/shared/starboard/player/decoded_audio_internal.h", |
| "//starboard/shared/starboard/player/input_buffer_internal.cc", |
| "//starboard/shared/starboard/player/input_buffer_internal.h", |
| "//starboard/shared/starboard/player/job_queue.cc", |
| "//starboard/shared/starboard/player/job_queue.h", |
| "//starboard/shared/starboard/player/job_thread.cc", |
| "//starboard/shared/starboard/player/job_thread.h", |
| "//starboard/shared/starboard/player/player_create.cc", |
| "//starboard/shared/starboard/player/player_destroy.cc", |
| "//starboard/shared/starboard/player/player_get_current_frame.cc", |
| "//starboard/shared/starboard/player/player_get_info2.cc", |
| "//starboard/shared/starboard/player/player_get_maximum_number_of_samples_per_write.cc", |
| "//starboard/shared/starboard/player/player_get_preferred_output_mode_prefer_punchout.cc", |
| "//starboard/shared/starboard/player/player_internal.cc", |
| "//starboard/shared/starboard/player/player_internal.h", |
| "//starboard/shared/starboard/player/player_seek2.cc", |
| "//starboard/shared/starboard/player/player_set_bounds.cc", |
| "//starboard/shared/starboard/player/player_set_playback_rate.cc", |
| "//starboard/shared/starboard/player/player_set_volume.cc", |
| "//starboard/shared/starboard/player/player_worker.cc", |
| "//starboard/shared/starboard/player/player_worker.h", |
| "//starboard/shared/starboard/player/player_write_end_of_stream.cc", |
| "//starboard/shared/starboard/player/player_write_sample2.cc", |
| ] |
| configs += [ "//starboard/build/config:starboard_implementation" ] |
| } |
| |
| static_library("video_dmp") { |
| sources = [ |
| "//starboard/shared/starboard/player/file_cache_reader.cc", |
| "//starboard/shared/starboard/player/file_cache_reader.h", |
| "//starboard/shared/starboard/player/video_dmp_common.cc", |
| "//starboard/shared/starboard/player/video_dmp_common.h", |
| "//starboard/shared/starboard/player/video_dmp_reader.cc", |
| "//starboard/shared/starboard/player/video_dmp_reader.h", |
| ] |
| |
| public_deps = [ "//starboard/common" ] |
| configs += [ "//starboard/build/config:starboard_implementation" ] |
| } |
| |
| action("player_download_test_data") { |
| script = "//tools/download_from_gcs.py" |
| |
| sha_sources = [] |
| foreach(sha_file, sha1_files) { |
| sha_sources += [ string_join("/", |
| [ |
| "testdata", |
| sha_file, |
| ]) ] |
| } |
| |
| sha_outputs = [] |
| subdir = "starboard/shared/starboard/player/testdata" |
| outdir = "$sb_static_contents_output_data_dir/test/$subdir" |
| foreach(sha_source, sha_sources) { |
| sha_outputs += |
| [ string_join("/", |
| [ |
| outdir, |
| string_replace(sha_source, ".dmp.sha1", ".dmp"), |
| ]) ] |
| } |
| |
| sources = sha_sources |
| outputs = sha_outputs |
| |
| sha1_dir = rebase_path("testdata", root_build_dir) |
| |
| args = [ |
| "--bucket", |
| "cobalt-static-storage", |
| "--sha1", |
| sha1_dir, |
| "--output", |
| rebase_path(outdir, root_build_dir), |
| ] |
| } |