Skip to content

Commit

Permalink
Merge branch 'main' into alexanderahn-patch-2-1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderahn authored Oct 28, 2023
2 parents 7c1d4c1 + 25e3f63 commit 8ad818b
Show file tree
Hide file tree
Showing 24 changed files with 216 additions and 218 deletions.
2 changes: 1 addition & 1 deletion .github/config/linux-modular.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"docker_service": "build-linux",
"on_host_test": true,
"on_host_test_shards": ["0", "1", "2", "3", "wpt"],
"on_host_test_shards": ["0", "1", "2", "3", "blackbox", "wpt"],
"platforms": [
"linux-x64x11-modular"
],
Expand Down
28 changes: 0 additions & 28 deletions .github/config/raspi-2-modular.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/config/raspi-2-skia.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"platform":"raspi-2-skia",
"target_platform":"raspi-2-skia",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "is_clang=false"
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false"
}
]
}
24 changes: 2 additions & 22 deletions .github/config/raspi-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
},
"platforms": [
"raspi-2",
"raspi-2-sbversion-13",
"raspi-2-sbversion-14",
"raspi-2-sbversion-15"
],
"includes": [
Expand All @@ -24,33 +22,15 @@
"platform":"raspi-2",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments": "is_clang=false",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-13",
"platform":"raspi-2-sbversion-13",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"is_clang=false",
"sb_api_version": "sb_api_version=13",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-14",
"platform":"raspi-2-sbversion-14",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"is_clang=false",
"sb_api_version": "sb_api_version=14",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false",
"dimension": "release_version=regex:10.*"
},
{
"name":"sbversion-15",
"platform":"raspi-2-sbversion-15",
"target_platform":"raspi-2",
"target_cpu":"target_cpu=\\\"arm\\\"",
"extra_gn_arguments":"is_clang=false",
"extra_gn_arguments": "build_with_separate_cobalt_toolchain=true use_asan=false",
"sb_api_version": "sb_api_version=15",
"dimension": "release_version=regex:10.*"
}
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/raspi-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,3 @@ jobs:
with:
platform: raspi-2-skia
nightly: ${{ github.event.inputs.nightly }}
raspi-2-modular:
uses: ./.github/workflows/main.yaml
permissions:
packages: write
pull-requests: write
with:
platform: raspi-2-modular
nightly: ${{ github.event.inputs.nightly }}
modular: true
4 changes: 4 additions & 0 deletions cobalt/dom/html_media_element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1755,6 +1755,10 @@ void HTMLMediaElement::SetMaxVideoCapabilities(
exception_state);
return;
}

LOG(INFO) << "max video capabilities is changed from \""
<< max_video_capabilities_ << "\" to \"" << max_video_capabilities
<< "\"";
max_video_capabilities_ = max_video_capabilities;
}

Expand Down
38 changes: 20 additions & 18 deletions cobalt/media/base/sbplayer_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace media {

namespace {

using starboard::FormatString;
using starboard::GetPlayerOutputModeName;

class StatisticsWrapper {
Expand Down Expand Up @@ -707,9 +708,9 @@ void SbPlayerBridge::CreateUrlPlayer(const std::string& url) {
// a method of querying that texture.
decode_target_provider_->SetGetCurrentSbDecodeTargetFunction(base::Bind(
&SbPlayerBridge::GetCurrentSbDecodeTarget, base::Unretained(this)));
SB_LOG(INFO) << "Playing in decode-to-texture mode.";
LOG(INFO) << "Playing in decode-to-texture mode.";
} else {
SB_LOG(INFO) << "Playing in punch-out mode.";
LOG(INFO) << "Playing in punch-out mode.";
}

decode_target_provider_->SetOutputMode(
Expand Down Expand Up @@ -777,9 +778,9 @@ void SbPlayerBridge::CreatePlayer() {
// a method of querying that texture.
decode_target_provider_->SetGetCurrentSbDecodeTargetFunction(base::Bind(
&SbPlayerBridge::GetCurrentSbDecodeTarget, base::Unretained(this)));
SB_LOG(INFO) << "Playing in decode-to-texture mode.";
LOG(INFO) << "Playing in decode-to-texture mode.";
} else {
SB_LOG(INFO) << "Playing in punch-out mode.";
LOG(INFO) << "Playing in punch-out mode.";
}

decode_target_provider_->SetOutputMode(
Expand Down Expand Up @@ -1237,8 +1238,8 @@ SbPlayerOutputMode SbPlayerBridge::ComputeSbPlayerOutputMode(

if (default_output_mode != kSbPlayerOutputModeDecodeToTexture &&
video_stream_info_.codec != kSbMediaVideoCodecNone) {
SB_DCHECK(video_stream_info_.mime);
SB_DCHECK(video_stream_info_.max_video_capabilities);
DCHECK(video_stream_info_.mime);
DCHECK(video_stream_info_.max_video_capabilities);

// Set the `default_output_mode` to `kSbPlayerOutputModeDecodeToTexture` if
// any of the mime associated with it has `decode-to-texture=true` set.
Expand All @@ -1250,13 +1251,12 @@ SbPlayerOutputMode SbPlayerBridge::ComputeSbPlayerOutputMode(
"decode-to-texture=true");

if (is_decode_to_texture_preferred) {
SB_LOG(INFO) << "Setting `default_output_mode` from \""
<< GetPlayerOutputModeName(default_output_mode) << "\" to \""
<< GetPlayerOutputModeName(
kSbPlayerOutputModeDecodeToTexture)
<< "\" because mime is set to \"" << video_stream_info_.mime
<< "\", and max_video_capabilities is set to \""
<< video_stream_info_.max_video_capabilities << "\"";
LOG(INFO) << "Setting `default_output_mode` from \""
<< GetPlayerOutputModeName(default_output_mode) << "\" to \""
<< GetPlayerOutputModeName(kSbPlayerOutputModeDecodeToTexture)
<< "\" because mime is set to \"" << video_stream_info_.mime
<< "\", and max_video_capabilities is set to \""
<< video_stream_info_.max_video_capabilities << "\"";
default_output_mode = kSbPlayerOutputModeDecodeToTexture;
}
}
Expand All @@ -1265,22 +1265,24 @@ SbPlayerOutputMode SbPlayerBridge::ComputeSbPlayerOutputMode(

auto output_mode =
sbplayer_interface_->GetPreferredOutputMode(&creation_param);

LOG(INFO) << "Output mode is set to " << GetPlayerOutputModeName(output_mode);

CHECK_NE(kSbPlayerOutputModeInvalid, output_mode);
return output_mode;
}

void SbPlayerBridge::LogStartupLatency() const {
std::string first_events_str;
if (set_drm_system_ready_cb_time_ == -1) {
first_events_str =
starboard::FormatString("%-40s0 us", "SbPlayerCreate() called");
first_events_str = FormatString("%-40s0 us", "SbPlayerCreate() called");
} else if (set_drm_system_ready_cb_time_ < player_creation_time_) {
first_events_str = starboard::FormatString(
first_events_str = FormatString(
"%-40s0 us\n%-40s%" PRId64 " us", "set_drm_system_ready_cb called",
"SbPlayerCreate() called",
player_creation_time_ - set_drm_system_ready_cb_time_);
} else {
first_events_str = starboard::FormatString(
first_events_str = FormatString(
"%-40s0 us\n%-40s%" PRId64 " us", "SbPlayerCreate() called",
"set_drm_system_ready_cb called",
set_drm_system_ready_cb_time_ - player_creation_time_);
Expand All @@ -1305,7 +1307,7 @@ void SbPlayerBridge::LogStartupLatency() const {
1);

// clang-format off
LOG(INFO) << starboard::FormatString(
LOG(INFO) << FormatString(
"\nSbPlayer startup latencies: %" PRId64 " us\n"
" Event name time since last event\n"
" %s\n" // |first_events_str| populated above
Expand Down
42 changes: 0 additions & 42 deletions cobalt/site/docs/blog/index.md

This file was deleted.

8 changes: 4 additions & 4 deletions cobalt/site/docs/communication.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: doc
title: "How to Communicate with the Cobalt Team"
---
Project: /youtube/cobalt/_project.yaml
Book: /youtube/cobalt/_book.yaml

# How to Communicate with the Cobalt Team

We have several communication channels that we actively support, each for
different purposes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,10 @@ CobaltService openCobaltService(long nativeService, String serviceName) {
return service;
}

public CobaltService getOpenedCobaltService(String serviceName) {
return cobaltServices.get(serviceName);
}

@SuppressWarnings("unused")
@UsedByNative
void closeCobaltService(String serviceName) {
Expand Down
9 changes: 9 additions & 0 deletions starboard/android/shared/video_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "starboard/android/shared/media_common.h"
#include "starboard/android/shared/video_render_algorithm.h"
#include "starboard/android/shared/window_internal.h"
#include "starboard/common/media.h"
#include "starboard/common/player.h"
#include "starboard/common/string.h"
#include "starboard/configuration.h"
#include "starboard/decode_target.h"
Expand Down Expand Up @@ -395,6 +397,13 @@ VideoDecoder::VideoDecoder(const VideoStreamInfo& video_stream_info,
TeardownCodec();
}
}

SB_LOG(INFO) << "Created VideoDecoder for codec "
<< GetMediaVideoCodecName(video_codec_) << ", with output mode "
<< GetPlayerOutputModeName(output_mode_)
<< ", max video capabilities \"" << max_video_capabilities_
<< "\", and tunnel mode audio session id "
<< tunnel_mode_audio_session_id_;
}

VideoDecoder::~VideoDecoder() {
Expand Down
50 changes: 26 additions & 24 deletions starboard/elf_loader/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if (sb_is_evergreen_compatible) {
}
}

if (current_toolchain == starboard_toolchain) {
if (current_toolchain == starboard_toolchain && sb_is_evergreen_compatible) {
target(starboard_level_final_executable_type, "elf_loader_sandbox") {
data_deps = [ "//third_party/icu:icudata" ]
if (cobalt_font_package == "empty") {
Expand Down Expand Up @@ -155,31 +155,33 @@ if (sb_is_evergreen_compatible) {
}
}

target(gtest_target_type, "elf_loader_test") {
testonly = true
sources = [ "//starboard/common/test_main.cc" ]
deps = [
"//starboard",
"//testing/gmock",
"//testing/gtest",
]

if (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" ||
target_cpu == "arm64") {
sources += [
"dynamic_section_test.cc",
"elf_header_test.cc",
"elf_loader_test.cc",
"lz4_file_impl_test.cc",
"program_table_test.cc",
"relocations_test.cc",
]
deps += [
":copy_elf_loader_testdata",
":elf_loader",
if (sb_is_evergreen_compatible) {
target(gtest_target_type, "elf_loader_test") {
testonly = true
sources = [ "//starboard/common/test_main.cc" ]
deps = [
"//starboard",
"//testing/gmock",
"//testing/gtest",
]

data_deps = [ ":copy_elf_loader_testdata" ]
if (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" ||
target_cpu == "arm64") {
sources += [
"dynamic_section_test.cc",
"elf_header_test.cc",
"elf_loader_test.cc",
"lz4_file_impl_test.cc",
"program_table_test.cc",
"relocations_test.cc",
]
deps += [
":copy_elf_loader_testdata",
":elf_loader",
]

data_deps = [ ":copy_elf_loader_testdata" ]
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion starboard/elf_loader/sandbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void LoadLibraryAndInitialize(const std::string& library_path,
GetEvergreenInfo(&evergreen_info);
if (!third_party::crashpad::wrapper::AddEvergreenInfoToCrashpad(
evergreen_info)) {
SB_LOG(ERROR) << "Could not send Cobalt library information into Crashapd.";
SB_LOG(ERROR) << "Could not send Cobalt library information into Crashpad.";
} else {
SB_LOG(INFO) << "Loaded Cobalt library information into Crashpad.";
}
Expand Down
Loading

0 comments on commit 8ad818b

Please sign in to comment.