Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SourceBufferWriteHead to Cobalt location #4851

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions third_party/blink/renderer/bindings/idl_in_modules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,7 @@ if (is_cobalt) {
"//third_party/blink/renderer/modules/cobalt/window_h_5_vcc.idl",
"//third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.idl",
"//third_party/blink/renderer/modules/cobalt/h5vcc_runtime/h_5_vcc_runtime.idl",
"//third_party/blink/renderer/modules/cobalt/mediasource/source_buffer_extensions.idl",
],
"abspath")
}
Expand Down Expand Up @@ -1295,15 +1296,6 @@ if (target_os != "android") {
"abspath")
}

# SourceBufferWriteHead
# An extension to the SourceBuffer interface that allows web apps to check the
# highest presentation timestamp written to the Renderer.
if (is_cobalt && use_starboard_media) {
static_idl_files_in_modules += get_path_info(
[ "//third_party/blink/renderer/modules/mediasource/source_buffer_write_head.idl" ],
"abspath")
}

# Statically-defined (not runtime-generated) IDL files in 'modules' component.
# These IDL definitions are used only for testing.
static_idl_files_in_modules_for_testing = get_path_info(
Expand Down
1 change: 1 addition & 0 deletions third_party/blink/renderer/modules/cobalt/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ blink_modules_sources("h_5_vcc") {
"//third_party/blink/renderer/modules/cobalt/crash_annotator",
"//third_party/blink/renderer/modules/cobalt/h5vcc_runtime",
"//third_party/blink/renderer/modules/cobalt/h5vcc_system",
"//third_party/blink/renderer/modules/cobalt/mediasource",
]
}
24 changes: 24 additions & 0 deletions third_party/blink/renderer/modules/cobalt/mediasource/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2025 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("//third_party/blink/renderer/modules/modules.gni")

blink_modules_sources("mediasource") {
sources = [
"source_buffer_write_head.cc",
"source_buffer_write_head.h",
]

deps = [ "//third_party/blink/renderer/modules/mediasource:mediasource" ]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 The Cobalt Authors. All Rights Reserved.
// Copyright 2025 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.
Expand All @@ -21,4 +21,4 @@
ImplementedAs=SourceBufferWriteHead
] partial interface SourceBuffer {
[RaisesException] readonly attribute double writeHead;
};
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 The Cobalt Authors. All Rights Reserved.
// Copyright 2025 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.
Expand All @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "third_party/blink/renderer/modules/mediasource/source_buffer_write_head.h"
#include "third_party/blink/renderer/modules/cobalt/mediasource/source_buffer_write_head.h"

#include "third_party/blink/renderer/modules/mediasource/source_buffer.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 The Cobalt Authors. All Rights Reserved.
// Copyright 2025 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.
Expand All @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASOURCE_SOURCE_BUFFER_WRITE_HEAD_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASOURCE_SOURCE_BUFFER_WRITE_HEAD_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_COBALT_MEDIASOURCE_SOURCE_BUFFER_WRITE_HEAD_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_COBALT_MEDIASOURCE_SOURCE_BUFFER_WRITE_HEAD_H_

#include "build/build_config.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
Expand All @@ -36,4 +36,4 @@ class SourceBufferWriteHead {

} // namespace blink

#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_MEDIASOURCE_SOURCE_BUFFER_WRITE_HEAD_H_
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_COBALT_MEDIASOURCE_SOURCE_BUFFER_WRITE_HEAD_H_
4 changes: 0 additions & 4 deletions third_party/blink/renderer/modules/mediasource/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ blink_modules_sources("mediasource") {
"//third_party/blink/renderer/modules/webcodecs:webcodecs",
]
if (is_cobalt && use_starboard_media) {
sources += [
"source_buffer_write_head.cc",
"source_buffer_write_head.h",
]
deps += [ "//starboard($starboard_toolchain)" ]
}
}
Loading