-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[media] Implement SbPlayer based video playback (#4283)
The implementation was based on SbPlayerPipeline, with many features disabled (e.g. suspend/resume, UMA metrics) or unimplemented. The former are tracked by feature macros in //media/starboard/BUILD.gn linked with tracking bugs, the latters are marked with TODOs with tracking bugs. It also 1. Removed support of old Starboard versions (e.g. the EnhancedAudio starboard extension). 2. Worked around for incomplete type in SbPlayerBridge::CallbackHelper (see b/375665361). b/328305706
- Loading branch information
Showing
19 changed files
with
872 additions
and
1,813 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Copyright 2024 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. | ||
|
||
source_set("starboard") { | ||
visibility = [ "//media" ] | ||
|
||
defines = [ | ||
# TODO(b/326652276): Support audio write ahead | ||
"COBALT_MEDIA_ENABLE_AUDIO_DURATION=0", | ||
|
||
# TODO(b/326508279): Revisit background mode | ||
"COBALT_MEDIA_ENABLE_BACKGROUND_MODE=0", | ||
|
||
# TODO(b/375069564): Revisit CValStats | ||
"COBALT_MEDIA_ENABLE_CVAL=0", | ||
|
||
# TODO(b/374822966): Revisit DecoderBuffer budget | ||
"COBALT_MEDIA_ENABLE_DECODE_BUFFER_BUDGET=0", | ||
|
||
# TODO(b/375070492): Revisit decode-to-texture | ||
"COBALT_MEDIA_ENABLE_DECODE_TARGET_PROVIDER=0", | ||
|
||
# TODO(b/328305808): Enable encrypted playbacks | ||
"COBALT_MEDIA_ENABLE_ENCRYPTED_PLAYBACKS=0", | ||
|
||
# TODO(b/375218518): Revisit FormatSupportQueryMetrics | ||
"COBALT_MEDIA_ENABLE_FORMAT_SUPPORT_QUERY_METRICS=0", | ||
|
||
# TODO(b/375232937): Enable IAMF | ||
"COBALT_MEDIA_ENABLE_IAMF_SUPPORT=0", | ||
|
||
# TODO(b/326654546): Revisit max video input size | ||
"COBALT_MEDIA_ENABLE_PLAYER_SET_MAX_VIDEO_INPUT_SIZE=0", | ||
|
||
# TODO(b/375059645): Revisit side data (aka hdr10+) support | ||
"COBALT_MEDIA_ENABLE_SIDE_DATA=0", | ||
|
||
# TODO(b/375234428): Revisit startup latency tracking | ||
"COBALT_MEDIA_ENABLE_STARTUP_LATENCY_TRACKING=0", | ||
|
||
# TODO(b/326497953): Revisit suspend/resume support | ||
"COBALT_MEDIA_ENABLE_SUSPEND_RESUME=0", | ||
|
||
# TODO(b/375241265): Re-enable UMA metrics | ||
"COBALT_MEDIA_ENABLE_UMA_METRICS=0", | ||
] | ||
|
||
sources = [ | ||
"sbplayer_bridge.cc", | ||
"sbplayer_bridge.h", | ||
"sbplayer_interface.cc", | ||
"sbplayer_interface.h", | ||
"sbplayer_set_bounds_helper.cc", | ||
"sbplayer_set_bounds_helper.h", | ||
"starboard_renderer.cc", | ||
"starboard_renderer.h", | ||
"starboard_utils.cc", | ||
"starboard_utils.h", | ||
] | ||
|
||
deps = [ | ||
"//base", | ||
"//media:media_buildflags", | ||
"//media/base", | ||
"//starboard($starboard_toolchain)", | ||
"//starboard/common", | ||
] | ||
|
||
configs += [ "//media:subcomponent_config" ] | ||
} | ||
|
||
source_set("unit_tests") { | ||
testonly = true | ||
sources = [ "starboard_utils_test.cc" ] | ||
configs += [ "//media:media_config" ] | ||
deps = [ | ||
"//base", | ||
"//base/test:test_support", | ||
"//media:test_support", | ||
"//starboard($starboard_toolchain)", | ||
"//starboard/common", | ||
"//testing/gmock", | ||
"//testing/gtest", | ||
] | ||
} |
Oops, something went wrong.