0

Move media/blink/ to Blink

media/blink/ files are being moved to public/platform/media/ and
renderer/platform/media/, depending on the private/public status of the
file as mentioned in this table:
https://docs.google.com/document/d/1p0OuzArDNZHT_aOm75oOWh3qR-mT6Zq-qKxxKYT-jYI/edit#bookmark=kix.2v0uvunkva0g

The move includes renaming files as described in the first table at
https://docs.google.com/document/d/1p0OuzArDNZHT_aOm75oOWh3qR-mT6Zq-qKxxKYT-jYI/edit#heading=h.jqrzzxjh40df
where underscores are added to be consistent with the camel-case naming
of the classes defined in the renamed files.

//media/blink:media_blink_unittests is split with all files but one
being moved to blink_platform_unittests.
web_media_player_impl_unittest.cc uses WebView, so it requires a
Platform object and, as such, should be moved into
//third_party/blink/renderer/platform:unit_tests which is part of
blink_unittests. This makes the android bots fail, as they find no tests
to run. Because of this, this CL leaves this test in place, which will
be removed in a follow-up, together with all of media/blink/.

Only the header guards and the export macros are updated. Namespace
changes and other Blink coding conventions (GURL => KURL, Blink mojom
includes, etc.) are left for follow-ups. Because of the latter, this CL
fails the Blink-variant mojom presubmit check.

No-Presubmit: true
Bug: 1198341
Change-Id: I66e46c970db1baae453d16da738fa3507578a4f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2847359
Reviewed-by: Will Cassella <cassew@google.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#890853}
This commit is contained in:
Henrique Ferreiro
2021-06-09 17:53:59 +00:00
committed by Chromium LUCI CQ
parent d92d117939
commit b56c921dc8
96 changed files with 684 additions and 493 deletions
WATCHLISTS
content/renderer
media
third_party/blink
public
renderer
platform
BUILD.gn
media
BUILD.gnDEPSbuffered_data_source_host_impl.ccbuffered_data_source_host_impl_unittest.cccache_util.cccache_util.hcache_util_unittest.cccdm_result_promise.hcdm_result_promise_helper.cccdm_result_promise_helper.hcdm_session_adapter.cccdm_session_adapter.hinterval_map_unittest.cckey_system_config_selector.cckey_system_config_selector_unittest.cclearning_experiment_helper.cclearning_experiment_helper_unittest.cclru_unittest.ccmulti_buffer.ccmulti_buffer_data_source.ccmulti_buffer_data_source_unittest.ccmulti_buffer_reader.ccmulti_buffer_reader.hmulti_buffer_unittest.ccnew_session_cdm_result_promise.ccnew_session_cdm_result_promise.hpower_status_helper.ccpower_status_helper_unittest.ccremote_playback_client_wrapper_impl.ccresource_multi_buffer_data_provider.ccresource_multi_buffer_data_provider.hresource_multi_buffer_data_provider_unittest.ccsmoothness_helper.ccsmoothness_helper_unittest.cc
testing
text_track_impl.cctext_track_impl.hurl_index.ccurl_index_unittest.ccvideo_decode_stats_reporter.ccvideo_decode_stats_reporter.hvideo_decode_stats_reporter_unittest.ccvideo_frame_compositor.ccvideo_frame_compositor_unittest.ccwatch_time_reporter_unittest.ccweb_content_decryption_module_access_impl.ccweb_content_decryption_module_access_impl.hweb_content_decryption_module_impl.ccweb_content_decryption_module_impl.hweb_content_decryption_module_session_impl.ccweb_content_decryption_module_session_impl.hweb_encrypted_media_client_impl.ccweb_inband_text_track_impl.ccweb_inband_text_track_impl.hweb_media_player_impl.ccweb_media_player_params.ccweb_media_source_impl.ccweb_media_source_impl.hweb_source_buffer_impl.ccweb_source_buffer_impl.h

@ -1273,7 +1273,9 @@
'filepath': 'chrome/browser/media/cast_remoting'\
'|media/blink/webmediaplayer_'\
'|media/mojo/mojom/remoting.mojom'\
'|media/remoting/',
'|media/remoting/'\
'|third_party/blink/public/platform/media/web_media_player_'\
'|third_party/blink/renderer/platform/media/web_media_player_',
},
'media_router': {
'filepath': 'chrome/app/media_router_strings.grdp' \
@ -1604,10 +1606,11 @@
'filepath': 'chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/FlingingController' \
'|chrome/android/java/src/org/chromium/chrome/browser/media/remote/' \
'|chrome/browser/media/android/remote/' \
'|media/blink/remote_playback' \
'|media/renderers/remote_playback' \
'|third_party/blink/public/platform/media/remote_playback' \
'|third_party/blink/public/platform/modules/remoteplayback/' \
'|third_party/blink/renderer/core/html/media/remote_playback' \
'|third_party/blink/renderer/platform/media/remote_playback' \
'|third_party/blink/renderer/modules/remoteplayback/' \
'|third_party/blink/web_tests/media/remoteplayback/' \
'|third_party/blink/web_tests/virtual/new-remote-playback-pipeline/'

@ -278,7 +278,6 @@ target(link_target_type, "renderer") {
"//gpu/command_buffer/client:webgpu_interface",
"//media",
"//media:media_buildflags",
"//media/blink",
"//media/capture",
"//media/gpu",
"//media/gpu/ipc/client",
@ -313,6 +312,7 @@ target(link_target_type, "renderer") {
"//third_party/blink/public:blink",
"//third_party/blink/public:buildflags",
"//third_party/blink/public/common",
"//third_party/blink/public/platform/media",
"//third_party/blink/public/strings:strings_grit",
"//third_party/boringssl",
"//third_party/icu",

@ -36,13 +36,6 @@
#include "media/base/demuxer.h"
#include "media/base/media_switches.h"
#include "media/base/renderer_factory_selector.h"
#include "media/blink/power_status_helper.h"
#include "media/blink/remote_playback_client_wrapper_impl.h"
#include "media/blink/resource_fetch_context.h"
#include "media/blink/url_index.h"
#include "media/blink/webencryptedmediaclient_impl.h"
#include "media/blink/webmediaplayer_impl.h"
#include "media/blink/webmediaplayer_params.h"
#include "media/media_buildflags.h"
#include "media/mojo/buildflags.h"
#include "media/renderers/decrypting_renderer_factory.h"
@ -55,6 +48,15 @@
#include "services/viz/public/cpp/gpu/context_provider_command_buffer.h"
#include "third_party/blink/public/common/browser_interface_broker_proxy.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/media/key_system_config_selector.h"
#include "third_party/blink/public/platform/media/power_status_helper.h"
#include "third_party/blink/public/platform/media/remote_playback_client_wrapper_impl.h"
#include "third_party/blink/public/platform/media/resource_fetch_context.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include "third_party/blink/public/platform/media/video_frame_compositor.h"
#include "third_party/blink/public/platform/media/web_encrypted_media_client_impl.h"
#include "third_party/blink/public/platform/media/web_media_player_impl.h"
#include "third_party/blink/public/platform/media/web_media_player_params.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_surface_layer_bridge.h"
#include "third_party/blink/public/platform/web_video_frame_submitter.h"

@ -106,9 +106,9 @@ pipeline.
As a case study we'll consider the playback of a video through the `<video>` tag.
`<video>` (and `<audio>`) starts in `blink::HTMLMediaElement` in
third_party/WebKit/ and reaches media/blink in `media::WebMediaPlayerImpl`
after a brief hop through `content::MediaFactory`. Each
`blink::HTMLMediaElement` owns a `media::WebMediaPlayerImpl` for handling
third_party/blink/ and reaches third_party/blink/public/platform/media/ in
`media::WebMediaPlayerImpl` after a brief hop through `content::MediaFactory`.
Each `blink::HTMLMediaElement` owns a `media::WebMediaPlayerImpl` for handling
things like play, pause, seeks, and volume changes (among other things).
`media::WebMediaPlayerImpl` handles or delegates media loading over the network

@ -7,107 +7,10 @@ import("//media/media_options.gni")
import("//testing/test.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
component("blink") {
output_name = "media_blink"
sources = [
"buffered_data_source_host_impl.cc",
"buffered_data_source_host_impl.h",
"cache_util.cc",
"cache_util.h",
"cdm_result_promise.h",
"cdm_result_promise_helper.cc",
"cdm_result_promise_helper.h",
"cdm_session_adapter.cc",
"cdm_session_adapter.h",
"interval_map.h",
"key_system_config_selector.cc",
"key_system_config_selector.h",
"learning_experiment_helper.cc",
"learning_experiment_helper.h",
"lru.h",
"media_blink_export.h",
"multibuffer.cc",
"multibuffer.h",
"multibuffer_data_source.cc",
"multibuffer_data_source.h",
"multibuffer_reader.cc",
"multibuffer_reader.h",
"new_session_cdm_result_promise.cc",
"new_session_cdm_result_promise.h",
"power_status_helper.cc",
"power_status_helper.h",
"remote_playback_client_wrapper_impl.cc",
"remote_playback_client_wrapper_impl.h",
"resource_fetch_context.h",
"resource_multibuffer_data_provider.cc",
"resource_multibuffer_data_provider.h",
"smoothness_helper.cc",
"smoothness_helper.h",
"texttrack_impl.cc",
"texttrack_impl.h",
"url_index.cc",
"url_index.h",
"video_decode_stats_reporter.cc",
"video_decode_stats_reporter.h",
"video_frame_compositor.cc",
"video_frame_compositor.h",
"webcontentdecryptionmodule_impl.cc",
"webcontentdecryptionmodule_impl.h",
"webcontentdecryptionmoduleaccess_impl.cc",
"webcontentdecryptionmoduleaccess_impl.h",
"webcontentdecryptionmodulesession_impl.cc",
"webcontentdecryptionmodulesession_impl.h",
"webencryptedmediaclient_impl.cc",
"webencryptedmediaclient_impl.h",
"webinbandtexttrack_impl.cc",
"webinbandtexttrack_impl.h",
"webmediaplayer_params.cc",
"webmediaplayer_params.h",
"webmediasource_impl.cc",
"webmediasource_impl.h",
"websourcebuffer_impl.cc",
"websourcebuffer_impl.h",
]
defines = [ "MEDIA_BLINK_IMPLEMENTATION" ]
deps = [
"//base",
"//cc",
"//components/viz/common",
"//gpu",
"//media",
"//media:shared_memory_support",
"//media/learning/common",
"//media/learning/mojo/public/cpp:cpp",
"//media/mojo/mojom",
"//net",
"//services/device/public/mojom",
"//services/network/public/cpp:cpp",
"//services/service_manager/public/cpp:cpp",
"//third_party/blink/public:blink",
"//third_party/blink/public/strings:strings_grit",
"//ui/gfx",
"//ui/gfx/geometry",
"//url",
]
if (media_use_ffmpeg || !is_android) {
sources += [
"webmediaplayer_impl.cc",
"webmediaplayer_impl.h",
]
deps += [ "//media/remoting:remoting_constants" ]
}
}
test("media_blink_unittests") {
use_xvfb = use_xvfb_in_this_config
deps = [
":blink",
"//base",
"//base/test:test_support",
"//cc",
@ -123,6 +26,9 @@ test("media_blink_unittests") {
"//testing/gtest",
"//third_party/blink/public:blink",
"//third_party/blink/public:test_support",
"//third_party/blink/public/platform/media",
"//third_party/blink/renderer/platform/media",
"//third_party/blink/renderer/platform/media:test_support",
"//tools/v8_context_snapshot",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
@ -140,28 +46,7 @@ test("media_blink_unittests") {
sources = [
"blink_platform_with_task_environment.cc",
"blink_platform_with_task_environment.h",
"buffered_data_source_host_impl_unittest.cc",
"cache_util_unittest.cc",
"interval_map_unittest.cc",
"key_system_config_selector_unittest.cc",
"learning_experiment_helper_unittest.cc",
"lru_unittest.cc",
"mock_resource_fetch_context.cc",
"mock_resource_fetch_context.h",
"mock_webassociatedurlloader.cc",
"mock_webassociatedurlloader.h",
"multibuffer_data_source_unittest.cc",
"multibuffer_unittest.cc",
"power_status_helper_unittest.cc",
"resource_multibuffer_data_provider_unittest.cc",
"run_all_unittests.cc",
"smoothness_helper_unittest.cc",
"test_response_generator.cc",
"test_response_generator.h",
"url_index_unittest.cc",
"video_decode_stats_reporter_unittest.cc",
"video_frame_compositor_unittest.cc",
"watch_time_reporter_unittest.cc",
"webmediaplayer_impl_unittest.cc",
]

@ -23,6 +23,9 @@ include_rules = [
"+third_party/blink/public/platform",
"+third_party/blink/public/strings/grit/blink_strings.h",
"+third_party/blink/public/web",
# TODO(https://crbug.com/1198341): remove once
# webmediaplayer_impl_unittest.cc is moved to Blink.
"+third_party/blink/renderer/platform/media",
# media/mojo is not part of "media" target and should not use MEDIA_EXPORT.
"-media/base/media_export.h"

@ -1,32 +0,0 @@
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_MEDIA_BLINK_EXPORT_H_
#define MEDIA_BLINK_MEDIA_BLINK_EXPORT_H_
// Define MEDIA_BLINK_EXPORT so that functionality implemented by the
// media/blink module can be exported to consumers.
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(MEDIA_BLINK_IMPLEMENTATION)
#define MEDIA_BLINK_EXPORT __declspec(dllexport)
#else
#define MEDIA_BLINK_EXPORT __declspec(dllimport)
#endif // defined(MEDIA_IMPLEMENTATION)
#else // defined(WIN32)
#if defined(MEDIA_BLINK_IMPLEMENTATION)
#define MEDIA_BLINK_EXPORT __attribute__((visibility("default")))
#else
#define MEDIA_BLINK_EXPORT
#endif
#endif
#else // defined(COMPONENT_BUILD)
#define MEDIA_BLINK_EXPORT
#endif
#endif // MEDIA_BLINK_MEDIA_BLINK_EXPORT_H_

@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webmediaplayer_impl.h"
#include "third_party/blink/public/platform/media/web_media_player_impl.h"
#include <stdint.h>
#include <memory>
#include <string>
#include "base/bind.h"
#include "base/callback_helpers.h"
@ -40,12 +41,6 @@
#include "media/base/mock_media_log.h"
#include "media/base/test_data_util.h"
#include "media/base/test_helpers.h"
#include "media/blink/mock_resource_fetch_context.h"
#include "media/blink/mock_webassociatedurlloader.h"
#include "media/blink/resource_multibuffer_data_provider.h"
#include "media/blink/video_decode_stats_reporter.h"
#include "media/blink/webcontentdecryptionmodule_impl.h"
#include "media/blink/webmediaplayer_params.h"
#include "media/filters/pipeline_controller.h"
#include "media/mojo/services/media_metrics_provider.h"
#include "media/mojo/services/video_decode_stats_recorder.h"
@ -58,6 +53,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/platform/media/web_media_player_params.h"
#include "third_party/blink/public/platform/media/webmediaplayer_delegate.h"
#include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
#include "third_party/blink/public/platform/web_fullscreen_video_status.h"
@ -73,6 +69,11 @@
#include "third_party/blink/public/web/web_testing_support.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/public/web/web_widget.h"
#include "third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.h"
#include "third_party/blink/renderer/platform/media/testing/mock_resource_fetch_context.h"
#include "third_party/blink/renderer/platform/media/testing/mock_web_associated_url_loader.h"
#include "third_party/blink/renderer/platform/media/video_decode_stats_reporter.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_impl.h"
#include "ui/gfx/geometry/size.h"
#include "url/gurl.h"

@ -14,8 +14,9 @@ component("common") {
"//media/learning/common:unit_tests",
# Actual client code
"//media/blink",
"//media/capabilities",
"//third_party/blink/public/platform/media",
"//third_party/blink/renderer/platform/media:*",
# Test code
"//media/mojo/services:unit_tests",

@ -6,7 +6,7 @@ component("cpp") {
visibility = [
"//media/learning/mojo:impl",
"//media/learning/mojo/public/cpp:unit_tests",
"//media/blink",
"//third_party/blink/renderer/platform/media",
]
sources = [

@ -7,7 +7,7 @@
namespace blink {
// TODO(https://crbug.com/1116920): Move back into WebMediaPlayer after
// TODO(https://crbug.com/1198341): Move back into WebMediaPlayer after
// onion-souping media/blink.
enum class DisplayType {
// Playback is happening inline.

@ -25,7 +25,7 @@ namespace blink {
// time, flip the actual value, and then start recording from that previous
// finalize time. They may also clear the pending value flip if the value
// changes back to the previous value.
// TODO(https://crbug.com/1116920): Move to renderer/platform/media once its
// TODO(https://crbug.com/1198341): Move to renderer/platform/media once its
// dependencies are moved to Blink.
template <typename T>
class WatchTimeComponent {

@ -0,0 +1,57 @@
# Copyright 2021 The Chromium 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("//media/media_options.gni")
# TODO(https://crbug.com/1198341): once this code is ported to Blink code
# conventions, this target should be merged into
# //third_party/blink/public:blink_headers and
# //third_party/blink/renderer/platform/media should be a dep of
# //third_party/blink/renderer/platform.
source_set("media") {
sources = [
"buffered_data_source_host_impl.h",
"interval_map.h",
"key_system_config_selector.h",
"lru.h",
"multi_buffer.h",
"power_status_helper.h",
"remote_playback_client_wrapper_impl.h",
"resource_fetch_context.h",
"url_index.h",
"video_frame_compositor.h",
"web_encrypted_media_client_impl.h",
"web_media_player_params.h",
]
public_deps = [
"//base",
"//cc",
"//components/viz/common",
"//media",
"//media/mojo/mojom",
"//mojo/public/cpp/bindings",
"//services/device/public/mojom",
"//third_party/blink/public:blink",
"//third_party/blink/public:blink_headers",
"//ui/gfx/geometry",
"//url",
]
allow_circular_includes_from =
[ "//third_party/blink/renderer/platform/media" ]
deps = [ "//third_party/blink/renderer/platform/media" ]
if (media_use_ffmpeg || !is_android) {
sources += [
"learning_experiment_helper.h",
"multi_buffer_data_source.h",
"smoothness_helper.h",
"web_media_player_impl.h",
]
public_deps += [
"//media/learning/common",
"//services/media_session/public/cpp:base_cpp",
]
}
}

@ -0,0 +1,20 @@
include_rules = [
"+base/bind.h",
"+base/cancelable_callback.h",
"+base/compiler_specific.h",
"+base/containers/circular_deque.h",
"+base/feature_list.h",
"+base/gtest_prod_util.h",
"+base/hash/hash.h",
"+base/sequence_checker.h",
"+base/thread_annotations.h",
"+base/timer/elapsed_timer.h",
"+base/timer/timer.h",
"+media/base",
"+media/learning/common",
"+media/mojo/mojom",
"+media/renderers",
"+services/device/public/mojom",
"+services/media_session/public/cpp",
"+third_party/blink/public/web",
]

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
#define MEDIA_BLINK_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
#include <stdint.h>
@ -14,13 +14,13 @@
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "media/base/ranges.h"
#include "media/blink/interval_map.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/media/interval_map.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
// Interface for testing purposes.
class MEDIA_BLINK_EXPORT BufferedDataSourceHost {
class BLINK_PLATFORM_EXPORT BufferedDataSourceHost {
public:
// Notify the host of the total size of the media file.
virtual void SetTotalBytes(int64_t total_bytes) = 0;
@ -36,7 +36,7 @@ class MEDIA_BLINK_EXPORT BufferedDataSourceHost {
// Provides an implementation of BufferedDataSourceHost that translates the
// buffered byte ranges into estimated time ranges.
class MEDIA_BLINK_EXPORT BufferedDataSourceHostImpl
class BLINK_PLATFORM_EXPORT BufferedDataSourceHostImpl
: public BufferedDataSourceHost {
public:
BufferedDataSourceHostImpl(base::RepeatingClosure progress_cb,
@ -98,4 +98,4 @@ class MEDIA_BLINK_EXPORT BufferedDataSourceHostImpl
} // namespace media
#endif // MEDIA_BLINK_BUFFERED_DATA_SOURCE_HOST_IMPL_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_BUFFERED_DATA_SOURCE_HOST_IMPL_H_

@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_INTERVAL_MAP_H_
#define MEDIA_BLINK_INTERVAL_MAP_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_INTERVAL_MAP_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_INTERVAL_MAP_H_
#include <algorithm>
#include <limits>
#include <map>
#include "base/check.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
@ -55,7 +56,7 @@ namespace media {
// Interval ends are always non-inclusive.
// Please note that end <= begin is a valid (but empty) interval.
template <typename T>
struct Interval {
struct BLINK_PLATFORM_EXPORT Interval {
public:
Interval(const T& begin, const T& end) : begin(begin), end(end) {}
@ -78,7 +79,7 @@ template <typename KeyType,
typename ValueType,
class Compare = std::less<KeyType>,
class NumericLimits = std::numeric_limits<KeyType>>
class IntervalMapConstIterator {
class BLINK_PLATFORM_EXPORT IntervalMapConstIterator {
public:
typedef std::map<KeyType, ValueType, Compare> MapType;
IntervalMapConstIterator() {}
@ -159,7 +160,7 @@ template <typename KeyType,
typename ValueType,
class Compare = std::less<KeyType>,
class NumericLimits = std::numeric_limits<KeyType>>
class IntervalMap {
class BLINK_PLATFORM_EXPORT IntervalMap {
public:
typedef std::map<KeyType, ValueType, Compare> MapType;
typedef IntervalMapConstIterator<KeyType, ValueType, Compare, NumericLimits>
@ -286,4 +287,4 @@ class IntervalMap {
} // namespace media
#endif // MEDIA_BLINK_INTERVAL_MAP_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_INTERVAL_MAP_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_KEY_SYSTEM_CONFIG_SELECTOR_H_
#define MEDIA_BLINK_KEY_SYSTEM_CONFIG_SELECTOR_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_KEY_SYSTEM_CONFIG_SELECTOR_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_KEY_SYSTEM_CONFIG_SELECTOR_H_
#include <memory>
#include <string>
@ -14,7 +14,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "media/base/eme_constants.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_content_settings_client.h"
#include "third_party/blink/public/platform/web_media_key_system_media_capability.h"
#include "third_party/blink/public/platform/web_vector.h"
@ -33,12 +33,12 @@ struct CdmConfig;
class KeySystems;
class MediaPermission;
class MEDIA_BLINK_EXPORT KeySystemConfigSelector {
class BLINK_PLATFORM_EXPORT KeySystemConfigSelector {
public:
// This is to facilitate testing, it abstracts the calls we are making into
// blink::WebLocalFrame so we can override them for testing without
// implementing the entire interface for blink::WebLocalFrame.
class MEDIA_BLINK_EXPORT WebLocalFrameDelegate {
class BLINK_PLATFORM_EXPORT WebLocalFrameDelegate {
public:
explicit WebLocalFrameDelegate(blink::WebLocalFrame* web_frame)
: web_frame_(web_frame) {}
@ -157,4 +157,4 @@ class MEDIA_BLINK_EXPORT KeySystemConfigSelector {
} // namespace media
#endif // MEDIA_BLINK_KEY_SYSTEM_CONFIG_SELECTOR_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_KEY_SYSTEM_CONFIG_SELECTOR_H_

@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_LEARNING_EXPERIMENT_HELPER_H_
#define MEDIA_BLINK_LEARNING_EXPERIMENT_HELPER_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_LEARNING_EXPERIMENT_HELPER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_LEARNING_EXPERIMENT_HELPER_H_
#include <memory>
#include "base/macros.h"
#include "media/blink/media_blink_export.h"
#include "media/learning/common/feature_dictionary.h"
#include "media/learning/common/labelled_example.h"
#include "media/learning/common/learning_task.h"
#include "media/learning/common/learning_task_controller.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
// Helper for adding a learning experiment to existing code.
class MEDIA_BLINK_EXPORT LearningExperimentHelper {
class BLINK_PLATFORM_EXPORT LearningExperimentHelper {
public:
// If |controller| is null, then everything else no-ops.
LearningExperimentHelper(
@ -49,4 +49,4 @@ class MEDIA_BLINK_EXPORT LearningExperimentHelper {
} // namespace media
#endif // MEDIA_BLINK_LEARNING_EXPERIMENT_HELPER_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_LEARNING_EXPERIMENT_HELPER_H_

@ -2,15 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_LRU_H_
#define MEDIA_BLINK_LRU_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_LRU_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_LRU_H_
#include <stddef.h>
#include <list>
#include <unordered_map>
#include "base/check.h"
#include "base/macros.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
@ -26,7 +28,7 @@ namespace media {
// lru.Use(1);
// cout << lru.Pop(); // this will print "2"
template <typename T>
class LRU {
class BLINK_PLATFORM_EXPORT LRU {
public:
LRU() {}
@ -92,4 +94,4 @@ class LRU {
} // namespace media
#endif // MEDIA_BLINK_LRU_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_LRU_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_MULTIBUFFER_H_
#define MEDIA_BLINK_MULTIBUFFER_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_MULTI_BUFFER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_MULTI_BUFFER_H_
#include <stddef.h>
#include <stdint.h>
@ -24,9 +24,9 @@
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "media/base/data_buffer.h"
#include "media/blink/interval_map.h"
#include "media/blink/lru.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/media/interval_map.h"
#include "third_party/blink/public/platform/media/lru.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
@ -84,7 +84,7 @@ const int kMaxWaitForReaderOffset = 50;
//
// Users should inherit this class and implement CreateWriter().
// TODO(hubbe): Make the multibuffer respond to memory pressure.
class MEDIA_BLINK_EXPORT MultiBuffer {
class BLINK_PLATFORM_EXPORT MultiBuffer {
public:
// Interface for clients wishing to read data out of this cache.
// Note: It might look tempting to replace this with a callback,
@ -135,7 +135,7 @@ class MEDIA_BLINK_EXPORT MultiBuffer {
// MultiBuffers use a global shared LRU to free memory.
// This effectively means that recently used multibuffers can
// borrow memory from less recently used ones.
class MEDIA_BLINK_EXPORT GlobalLRU : public base::RefCounted<GlobalLRU> {
class BLINK_PLATFORM_EXPORT GlobalLRU : public base::RefCounted<GlobalLRU> {
public:
typedef MultiBufferGlobalBlockId GlobalBlockId;
explicit GlobalLRU(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
@ -386,4 +386,4 @@ class MEDIA_BLINK_EXPORT MultiBuffer {
} // namespace media
#endif // MEDIA_BLINK_MULTIBUFFER_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_MULTI_BUFFER_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_
#define MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_MULTI_BUFFER_DATA_SOURCE_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_MULTI_BUFFER_DATA_SOURCE_H_
#include <stdint.h>
@ -17,8 +17,8 @@
#include "media/base/data_source.h"
#include "media/base/ranges.h"
#include "media/base/tuneable.h"
#include "media/blink/media_blink_export.h"
#include "media/blink/url_index.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include "third_party/blink/public/platform/web_common.h"
class GURL;
@ -36,7 +36,7 @@ class MultiBufferReader;
//
// MultiBufferDataSource must be created and destroyed on the thread associated
// with the |task_runner| passed in the constructor.
class MEDIA_BLINK_EXPORT MultiBufferDataSource : public DataSource {
class BLINK_PLATFORM_EXPORT MultiBufferDataSource : public DataSource {
public:
using DownloadingCB = base::RepeatingCallback<void(bool)>;
using RedirectCB = base::RepeatingCallback<void()>;
@ -294,4 +294,4 @@ class MEDIA_BLINK_EXPORT MultiBufferDataSource : public DataSource {
} // namespace media
#endif // MEDIA_BLINK_MULTIBUFFER_DATA_SOURCE_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_MULTI_BUFFER_DATA_SOURCE_H_

@ -2,25 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_POWER_STATUS_HELPER_H_
#define MEDIA_BLINK_POWER_STATUS_HELPER_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_POWER_STATUS_HELPER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_POWER_STATUS_HELPER_H_
#include "base/callback.h"
#include "base/sequence_checker.h"
#include "base/time/time.h"
#include "media/base/video_codecs.h"
#include "media/blink/media_blink_export.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/device/public/mojom/battery_monitor.mojom.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/platform/web_common.h"
#include "ui/gfx/geometry/size.h"
namespace media {
struct PipelineMetadata;
// Class to monitor for power events during playback and record them to UMA/UKM.
class MEDIA_BLINK_EXPORT PowerStatusHelper {
class BLINK_PLATFORM_EXPORT PowerStatusHelper {
public:
using CreateBatteryMonitorCB = base::RepeatingCallback<
mojo::PendingRemote<device::mojom::BatteryMonitor>()>;
@ -145,4 +145,4 @@ class MEDIA_BLINK_EXPORT PowerStatusHelper {
} // namespace media
#endif // MEDIA_BLINK_POWER_STATUS_HELPER_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_POWER_STATUS_HELPER_H_

@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_REMOTE_PLAYBACK_CLIENT_WRAPPER_IMPL_H_
#define MEDIA_BLINK_REMOTE_PLAYBACK_CLIENT_WRAPPER_IMPL_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_REMOTE_PLAYBACK_CLIENT_WRAPPER_IMPL_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_REMOTE_PLAYBACK_CLIENT_WRAPPER_IMPL_H_
#include <string>
#include "media/blink/media_blink_export.h"
#include "media/renderers/remote_playback_client_wrapper.h"
#include "third_party/blink/public/platform/web_common.h"
namespace blink {
class WebMediaPlayerClient;
@ -19,7 +19,7 @@ namespace media {
// Wraps a WebRemotePlaybackClient to expose only the methods used by the
// FlingingRendererClientFactory. This avoids dependencies on the blink layer.
class MEDIA_BLINK_EXPORT RemotePlaybackClientWrapperImpl
class BLINK_PLATFORM_EXPORT RemotePlaybackClientWrapperImpl
: public RemotePlaybackClientWrapper {
public:
explicit RemotePlaybackClientWrapperImpl(blink::WebMediaPlayerClient* client);
@ -33,4 +33,4 @@ class MEDIA_BLINK_EXPORT RemotePlaybackClientWrapperImpl
} // namespace media
#endif // MEDIA_BLINK_REMOTE_PLAYBACK_CLIENT_WRAPPER_IMPL_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_REMOTE_PLAYBACK_CLIENT_WRAPPER_IMPL_H_

@ -2,19 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_RESOURCE_FETCH_CONTEXT_H_
#define MEDIA_BLINK_RESOURCE_FETCH_CONTEXT_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_RESOURCE_FETCH_CONTEXT_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_RESOURCE_FETCH_CONTEXT_H_
#include <memory>
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_associated_url_loader.h"
#include "third_party/blink/public/web/web_associated_url_loader_options.h"
namespace media {
class MEDIA_BLINK_EXPORT ResourceFetchContext {
class BLINK_PLATFORM_EXPORT ResourceFetchContext {
public:
virtual ~ResourceFetchContext() {}
@ -24,4 +24,4 @@ class MEDIA_BLINK_EXPORT ResourceFetchContext {
} // namespace media
#endif // MEDIA_BLINK_RESOURCE_FETCH_CONTEXT_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_RESOURCE_FETCH_CONTEXT_H_

@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_SMOOTHNESS_HELPER_H_
#define MEDIA_BLINK_SMOOTHNESS_HELPER_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_SMOOTHNESS_HELPER_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_SMOOTHNESS_HELPER_H_
#include <memory>
#include "media/base/buffering_state.h"
#include "media/base/pipeline_status.h"
#include "media/blink/media_blink_export.h"
#include "media/learning/common/labelled_example.h"
#include "third_party/blink/public/platform/web_common.h"
namespace media {
@ -21,7 +21,7 @@ class LearningTaskController;
// Helper class to construct learning observations about the smoothness of a
// video playback. Currently measures the worst-case frame drop ratio observed
// among fixed-length segments.
class MEDIA_BLINK_EXPORT SmoothnessHelper {
class BLINK_PLATFORM_EXPORT SmoothnessHelper {
public:
// Callback that provides the number of dropped / decoded frames since some
// point in the past. We assume that these values are comparable during
@ -64,4 +64,4 @@ class MEDIA_BLINK_EXPORT SmoothnessHelper {
} // namespace media
#endif // MEDIA_BLINK_SMOOTHNESS_HELPER_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_SMOOTHNESS_HELPER_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_URL_INDEX_H_
#define MEDIA_BLINK_URL_INDEX_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_URL_INDEX_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_URL_INDEX_H_
#include <stddef.h>
#include <stdint.h>
@ -17,8 +17,8 @@
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "media/blink/media_blink_export.h"
#include "media/blink/multibuffer.h"
#include "third_party/blink/public/platform/media/multi_buffer.h"
#include "third_party/blink/public/platform/web_common.h"
#include "url/gurl.h"
namespace base {
@ -36,7 +36,7 @@ class UrlIndexTest;
// A multibuffer for loading media resources which knows
// how to create MultiBufferDataProviders to load data
// into the cache.
class MEDIA_BLINK_EXPORT ResourceMultiBuffer : public MultiBuffer {
class BLINK_PLATFORM_EXPORT ResourceMultiBuffer : public MultiBuffer {
public:
ResourceMultiBuffer(UrlData* url_data_,
int block_shift,
@ -61,7 +61,7 @@ class UrlIndex;
// All the data & metadata for a single resource.
// Data is cached using a MultiBuffer instance.
class MEDIA_BLINK_EXPORT UrlData : public base::RefCounted<UrlData> {
class BLINK_PLATFORM_EXPORT UrlData : public base::RefCounted<UrlData> {
public:
// Keep in sync with WebMediaPlayer::CorsMode.
enum CorsMode { CORS_UNSPECIFIED, CORS_ANONYMOUS, CORS_USE_CREDENTIALS };
@ -231,7 +231,7 @@ class MEDIA_BLINK_EXPORT UrlData : public base::RefCounted<UrlData> {
};
// The UrlIndex lets you look up UrlData instances by url.
class MEDIA_BLINK_EXPORT UrlIndex {
class BLINK_PLATFORM_EXPORT UrlIndex {
public:
UrlIndex(ResourceFetchContext* fetch_context,
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
@ -306,4 +306,4 @@ class MEDIA_BLINK_EXPORT UrlIndex {
};
} // namespace media
#endif // MEDIA_BLINK_URL_INDEX_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_URL_INDEX_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
#define MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_VIDEO_FRAME_COMPOSITOR_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_VIDEO_FRAME_COMPOSITOR_H_
#include <utility>
@ -20,7 +20,7 @@
#include "cc/layers/surface_layer.h"
#include "cc/layers/video_frame_provider.h"
#include "media/base/video_renderer_sink.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/web_video_frame_submitter.h"
@ -60,8 +60,9 @@ class VideoFrame;
//
// VideoFrameCompositor must live on the same thread as the compositor, though
// it may be constructed on any thread.
class MEDIA_BLINK_EXPORT VideoFrameCompositor : public VideoRendererSink,
public cc::VideoFrameProvider {
class BLINK_PLATFORM_EXPORT VideoFrameCompositor
: public VideoRendererSink,
public cc::VideoFrameProvider {
public:
// Used to report back the time when the new frame has been processed.
using OnNewProcessedFrameCB = base::OnceCallback<void(base::TimeTicks)>;
@ -293,4 +294,4 @@ class MEDIA_BLINK_EXPORT VideoFrameCompositor : public VideoRendererSink,
} // namespace media
#endif // MEDIA_BLINK_VIDEO_FRAME_COMPOSITOR_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_VIDEO_FRAME_COMPOSITOR_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
#define MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_ENCRYPTED_MEDIA_CLIENT_IMPL_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_ENCRYPTED_MEDIA_CLIENT_IMPL_H_
#include <memory>
#include <string>
@ -12,8 +12,8 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "media/blink/key_system_config_selector.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/media/key_system_config_selector.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_encrypted_media_client.h"
namespace blink {
@ -30,7 +30,7 @@ struct CdmConfig;
class CdmFactory;
class MediaPermission;
class MEDIA_BLINK_EXPORT WebEncryptedMediaClientImpl
class BLINK_PLATFORM_EXPORT WebEncryptedMediaClientImpl
: public blink::WebEncryptedMediaClient {
public:
WebEncryptedMediaClientImpl(
@ -82,4 +82,4 @@ class MEDIA_BLINK_EXPORT WebEncryptedMediaClientImpl
} // namespace media
#endif // MEDIA_BLINK_WEBENCRYPTEDMEDIACLIENT_IMPL_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_ENCRYPTED_MEDIA_CLIENT_IMPL_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
#define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_MEDIA_PLAYER_IMPL_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_MEDIA_PLAYER_IMPL_H_
#include <stdint.h>
@ -32,20 +32,20 @@
#include "media/base/renderer_factory_selector.h"
#include "media/base/simple_watch_timer.h"
#include "media/base/text_track.h"
#include "media/blink/buffered_data_source_host_impl.h"
#include "media/blink/learning_experiment_helper.h"
#include "media/blink/media_blink_export.h"
#include "media/blink/multibuffer_data_source.h"
#include "media/blink/smoothness_helper.h"
#include "media/blink/video_frame_compositor.h"
#include "media/blink/webmediaplayer_params.h"
#include "media/mojo/mojom/playback_events_recorder.mojom.h"
#include "media/renderers/paint_canvas_video_renderer.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/media_session/public/cpp/media_position.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
#include "third_party/blink/public/platform/media/learning_experiment_helper.h"
#include "third_party/blink/public/platform/media/multi_buffer_data_source.h"
#include "third_party/blink/public/platform/media/smoothness_helper.h"
#include "third_party/blink/public/platform/media/video_frame_compositor.h"
#include "third_party/blink/public/platform/media/web_media_player_params.h"
#include "third_party/blink/public/platform/media/webmediaplayer_delegate.h"
#include "third_party/blink/public/platform/web_audio_source_provider.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_content_decryption_module_result.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/web_surface_layer_bridge.h"
@ -95,7 +95,7 @@ class VideoFrameCompositor;
// The canonical implementation of blink::WebMediaPlayer that's backed by
// Pipeline. Handles normal resource loading, Media Source, and
// Encrypted Media.
class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
class BLINK_PLATFORM_EXPORT WebMediaPlayerImpl
: public blink::WebMediaPlayer,
public blink::WebMediaPlayerDelegate::Observer,
public Pipeline::Client,
@ -1037,4 +1037,4 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
} // namespace media
#endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_MEDIA_PLAYER_IMPL_H_

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
#define MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_MEDIA_PLAYER_PARAMS_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_MEDIA_PLAYER_PARAMS_H_
#include <stdint.h>
@ -18,10 +18,10 @@
#include "media/base/media_observer.h"
#include "media/base/media_switches.h"
#include "media/base/routing_token_callback.h"
#include "media/blink/media_blink_export.h"
#include "media/blink/power_status_helper.h"
#include "media/mojo/mojom/media_metrics_provider.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/platform/media/power_status_helper.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/web_video_frame_submitter.h"
@ -48,7 +48,7 @@ class SwitchableAudioRendererSink;
// Holds parameters for constructing WebMediaPlayerImpl without having
// to plumb arguments through various abstraction layers.
class MEDIA_BLINK_EXPORT WebMediaPlayerParams {
class BLINK_PLATFORM_EXPORT WebMediaPlayerParams {
public:
// Returns true if load will deferred. False if it will run immediately.
using DeferLoadCB = base::RepeatingCallback<bool(base::OnceClosure)>;
@ -213,4 +213,4 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerParams {
} // namespace media
#endif // MEDIA_BLINK_WEBMEDIAPLAYER_PARAMS_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MEDIA_WEB_MEDIA_PLAYER_PARAMS_H_

@ -1938,6 +1938,7 @@ static_library("test_support") {
"//third_party/blink/renderer/platform/blob:test_support",
"//third_party/blink/renderer/platform/heap:test_support",
"//third_party/blink/renderer/platform/loader:test_support",
"//third_party/blink/renderer/platform/media:test_support",
"//third_party/blink/renderer/platform/scheduler:test_support",
]
@ -1969,6 +1970,12 @@ test("blink_platform_unittests") {
additional_manifest_fragments =
[ "//build/config/fuchsia/test/jit_capabilities.test-cmx" ]
}
if (is_android) {
# Required because of an indirect dependency on //media/base/android via
# platform/media:unit_tests.
deps += [ "//media/base/android:media_java" ]
}
}
source_set("blink_platform_unittests_sources") {
@ -2259,6 +2266,7 @@ source_set("blink_platform_unittests_sources") {
"//third_party/blink/renderer/platform/blob:unit_tests",
"//third_party/blink/renderer/platform/instrumentation:unit_tests",
"//third_party/blink/renderer/platform/loader:unit_tests",
"//third_party/blink/renderer/platform/media:unit_tests",
"//third_party/blink/renderer/platform/network:unit_tests",
"//third_party/blink/renderer/platform/scheduler:unit_tests",
"//third_party/blink/renderer/platform/wtf",

@ -0,0 +1,184 @@
# Copyright 2021 The Chromium 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("//media/media_options.gni")
# TODO(https://crbug.com/1198341): use blink_platform_sources once the code is
# ported to Blink code conventions.
component("media") {
visibility = [
# TODO(https://crbug.com/1198341): remove once
# webmediaplayer_impl_unittest.cc is moved to Blink.
"//media/blink:*",
"//third_party/blink/public/platform/media",
"//third_party/blink/renderer/platform/*",
]
output_name = "blink_platform_media"
sources = [
"buffered_data_source_host_impl.cc",
"cache_util.cc",
"cache_util.h",
"cdm_result_promise.h",
"cdm_result_promise_helper.cc",
"cdm_result_promise_helper.h",
"cdm_session_adapter.cc",
"cdm_session_adapter.h",
"key_system_config_selector.cc",
"multi_buffer.cc",
"multi_buffer_reader.cc",
"multi_buffer_reader.h",
"new_session_cdm_result_promise.cc",
"new_session_cdm_result_promise.h",
"power_status_helper.cc",
"remote_playback_client_wrapper_impl.cc",
"resource_multi_buffer_data_provider.cc",
"resource_multi_buffer_data_provider.h",
"text_track_impl.cc",
"text_track_impl.h",
"url_index.cc",
"video_decode_stats_reporter.cc",
"video_decode_stats_reporter.h",
"video_frame_compositor.cc",
"web_content_decryption_module_access_impl.cc",
"web_content_decryption_module_access_impl.h",
"web_content_decryption_module_impl.cc",
"web_content_decryption_module_impl.h",
"web_content_decryption_module_session_impl.cc",
"web_content_decryption_module_session_impl.h",
"web_encrypted_media_client_impl.cc",
"web_inband_text_track_impl.cc",
"web_inband_text_track_impl.h",
"web_media_player_params.cc",
"web_media_source_impl.cc",
"web_media_source_impl.h",
"web_source_buffer_impl.cc",
"web_source_buffer_impl.h",
]
data = [ "//media/test/data/" ]
configs +=
[ "//third_party/blink/renderer/platform:blink_platform_implementation" ]
public_deps = [
"//base",
"//media",
"//media/mojo/mojom",
"//mojo/public/cpp/bindings",
"//services/device/public/mojom",
"//third_party/blink/public:blink",
"//third_party/blink/renderer/platform:platform_export",
"//ui/gfx/geometry",
"//url",
]
deps = [
"//cc",
"//components/viz/common",
"//media:media_buildflags",
"//media:shared_memory_support",
"//net",
"//services/network/public/cpp",
"//third_party/blink/public/common",
"//third_party/blink/public/mojom:mojom_platform",
]
if (media_use_ffmpeg || !is_android) {
sources += [
"learning_experiment_helper.cc",
"multi_buffer_data_source.cc",
"smoothness_helper.cc",
"web_media_player_impl.cc",
]
deps += [
"//media/learning/common",
"//media/learning/mojo/public/cpp",
"//media/remoting:remoting_constants",
"//third_party/blink/public/strings:strings_grit",
]
}
}
source_set("unit_tests") {
visibility = [ "//third_party/blink/renderer/platform:*" ]
testonly = true
# TODO(https://crbug.com/1198341): enable this config once the code is ported
# to Blink code conventions.
#configs += [ "//third_party/blink/renderer/platform:blink_platform_config" ]
sources = [
"buffered_data_source_host_impl_unittest.cc",
"cache_util_unittest.cc",
"interval_map_unittest.cc",
"key_system_config_selector_unittest.cc",
"lru_unittest.cc",
"multi_buffer_unittest.cc",
"power_status_helper_unittest.cc",
"resource_multi_buffer_data_provider_unittest.cc",
"url_index_unittest.cc",
"video_decode_stats_reporter_unittest.cc",
"video_frame_compositor_unittest.cc",
"watch_time_reporter_unittest.cc",
]
deps = [
":media",
"//base",
"//base/test:test_support",
"//components/viz/common",
"//media",
"//media:test_support",
"//media/mojo/mojom",
"//mojo/public/cpp/bindings",
"//net",
"//services/device/public/mojom",
"//testing/gmock",
"//testing/gtest",
"//third_party/blink/public:blink",
"//third_party/blink/public:test_headers",
"//third_party/blink/public/platform/media",
"//third_party/blink/renderer/platform:test_support",
]
if (media_use_ffmpeg || !is_android) {
sources += [
"learning_experiment_helper_unittest.cc",
"multi_buffer_data_source_unittest.cc",
"smoothness_helper_unittest.cc",
]
deps += [
"//media/learning/common",
"//services/network/public/mojom",
]
}
}
source_set("test_support") {
visibility = [
# TODO(https://crbug.com/1198341): remove once
# webmediaplayer_impl_unittest.cc is moved to Blink.
"//media/blink:*",
"//third_party/blink/renderer/platform:test_support",
]
testonly = true
configs += [
"//third_party/blink/renderer:non_test_config",
# TODO(https://crbug.com/1198341): enable this config once the code is
# ported to Blink code conventions.
#"//third_party/blink/renderer/platform:blink_platform_config",
]
sources = [
"testing/mock_resource_fetch_context.cc",
"testing/mock_resource_fetch_context.h",
"testing/mock_web_associated_url_loader.cc",
"testing/mock_web_associated_url_loader.h",
"testing/test_response_generator.cc",
"testing/test_response_generator.h",
]
public_deps = [
"//base",
"//testing/gmock",
"//third_party/blink/public:blink_headers",
"//third_party/blink/public/platform/media",
"//url",
]
deps = [ "//net" ]
}

@ -1,15 +1,53 @@
include_rules = [
"+media/base/audio_timestamp_helper.h",
"+media/base/bind_to_current_loop.h",
"+media/base/media_log.h",
# Don't depend on platform/ and ./testing/.
"-third_party/blink/renderer/platform",
"-third_party/blink/renderer/platform/media/testing",
# Module.
"+third_party/blink/renderer/platform/media",
# Dependencies.
"+base/bind_post_task.h",
"+base/containers/circular_deque.h",
"+base/strings/string_number_conversions.h",
"+base/strings/utf_string_conversions.h",
"+base/task_runner.h",
"+base/task_runner_util.h",
"+cc/layers",
"+components/viz/common",
"+media/audio/null_audio_sink.h",
"+media/base",
"+media/capabilities/bucket_utility.h",
"+media/cdm",
"+media/filters",
"+media/learning/common",
"+media/learning/mojo/public/cpp",
"+media/media_buildflags.h",
"+media/mojo/mojom",
"+media/remoting/remoting_constants.h",
"+net/base/data_url.h",
"+net/base/net_errors.h",
"+net/http/http_byte_range.h",
"+net/http/http_version.h",
"+services/device/public/mojom",
"+third_party/blink/renderer/platform/platform_export.h",
"+third_party/blink/renderer/platform/weborigin",
"+third_party/blink/renderer/platform/wtf",
]
specific_include_rules = {
"webaudiosourceprovider_impl_test.cc": [
"+media/base/audio_parameters.h",
"+media/base/fake_audio_render_callback.h",
"+media/base/media_util.h",
"+media/base/mock_audio_renderer_sink.h",
],
".*_unittest.*": [
"+base/strings/string_split.h",
"+base/task/current_thread.h",
"+base/threading/thread.h",
"+components/viz/test",
"+media/mojo/services",
"+media/renderers",
"+gin/v8_initializer.h",
"+mojo/core/embedder/embedder.h",
# Allow test support dependencies.
"+third_party/blink/renderer/platform/media/testing",
],
}

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/buffered_data_source_host_impl.h"
#include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
#include "media/base/timestamp_constants.h"

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/buffered_data_source_host_impl.h"
#include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
#include "base/bind.h"
#include "base/macros.h"

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/cache_util.h"
#include "third_party/blink/renderer/platform/media/cache_util.h"
#include <stddef.h>

@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_CACHE_UTIL_H_
#define MEDIA_BLINK_CACHE_UTIL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CACHE_UTIL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CACHE_UTIL_H_
#include <stdint.h>
#include "base/time/time.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace blink {
class WebURLResponse;
@ -33,16 +33,16 @@ enum UncacheableReason {
// Return the logical OR of the reasons "response" cannot be used for a future
// request (using the disk cache), or 0 if it might be useful.
uint32_t MEDIA_BLINK_EXPORT
PLATFORM_EXPORT uint32_t
GetReasonsForUncacheability(const blink::WebURLResponse& response);
// Returns when we should evict data from this response from our
// memory cache. Note that we may still cache data longer if
// a audio/video tag is currently using it. Returns a TimeDelta
// which is should be added to base::Time::Now() or base::TimeTicks::Now().
base::TimeDelta MEDIA_BLINK_EXPORT
GetCacheValidUntil(const blink::WebURLResponse& response);
PLATFORM_EXPORT base::TimeDelta GetCacheValidUntil(
const blink::WebURLResponse& response);
} // namespace media
#endif // MEDIA_BLINK_CACHE_UTIL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CACHE_UTIL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/cache_util.h"
#include "third_party/blink/renderer/platform/media/cache_util.h"
#include <stddef.h>
#include <stdint.h>

@ -2,17 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_H_
#define MEDIA_BLINK_CDM_RESULT_PROMISE_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_RESULT_PROMISE_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_RESULT_PROMISE_H_
#include <stdint.h>
#include "base/macros.h"
#include "base/metrics/histogram_functions.h"
#include "base/time/time.h"
#include "media/blink/cdm_result_promise_helper.h"
#include "third_party/blink/public/platform/web_content_decryption_module_result.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise_helper.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
@ -26,7 +27,7 @@ const char kTimeUMAPrefix[] = "TimeTo.";
// If constructed with a |uma_name|, CdmResultPromise will report the promise
// result (success or rejection code) to UMA.
template <typename... T>
class CdmResultPromise : public CdmPromiseTemplate<T...> {
class PLATFORM_EXPORT CdmResultPromise : public CdmPromiseTemplate<T...> {
public:
CdmResultPromise(const blink::WebContentDecryptionModuleResult& result,
const std::string& key_system_uma_prefix,
@ -116,4 +117,4 @@ void CdmResultPromise<T...>::reject(CdmPromise::Exception exception_code,
} // namespace media
#endif // MEDIA_BLINK_CDM_RESULT_PROMISE_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_RESULT_PROMISE_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/cdm_result_promise_helper.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise_helper.h"
#include "base/metrics/histogram_functions.h"
#include "base/notreached.h"

@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
#define MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_RESULT_PROMISE_HELPER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_RESULT_PROMISE_HELPER_H_
#include <string>
#include "media/base/cdm_key_information.h"
#include "media/base/cdm_promise.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_content_decryption_module_result.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
@ -32,19 +32,19 @@ enum CdmResultForUMA {
NUM_RESULT_CODES // Must be last.
};
MEDIA_BLINK_EXPORT CdmResultForUMA
PLATFORM_EXPORT CdmResultForUMA
ConvertCdmExceptionToResultForUMA(CdmPromise::Exception exception_code);
MEDIA_BLINK_EXPORT blink::WebContentDecryptionModuleException
ConvertCdmException(CdmPromise::Exception exception_code);
PLATFORM_EXPORT blink::WebContentDecryptionModuleException ConvertCdmException(
CdmPromise::Exception exception_code);
MEDIA_BLINK_EXPORT blink::WebEncryptedMediaKeyInformation::KeyStatus
PLATFORM_EXPORT blink::WebEncryptedMediaKeyInformation::KeyStatus
ConvertCdmKeyStatus(media::CdmKeyInformation::KeyStatus key_status);
MEDIA_BLINK_EXPORT void ReportCdmResultUMA(const std::string& uma_name,
uint32_t system_code,
CdmResultForUMA result);
PLATFORM_EXPORT void ReportCdmResultUMA(const std::string& uma_name,
uint32_t system_code,
CdmResultForUMA result);
} // namespace media
#endif // MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_RESULT_PROMISE_HELPER_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/cdm_session_adapter.h"
#include "third_party/blink/renderer/platform/media/cdm_session_adapter.h"
#include <memory>
#include <utility>
@ -18,8 +18,8 @@
#include "media/base/cdm_key_information.h"
#include "media/base/cdm_promise.h"
#include "media/base/key_systems.h"
#include "media/blink/webcontentdecryptionmodulesession_impl.h"
#include "media/cdm/cdm_context_ref_impl.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_session_impl.h"
namespace media {

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
#define MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_SESSION_ADAPTER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_SESSION_ADAPTER_H_
#include <stdint.h>
@ -18,8 +18,9 @@
#include "base/memory/weak_ptr.h"
#include "media/base/cdm_config.h"
#include "media/base/content_decryption_module.h"
#include "media/blink/webcontentdecryptionmodule_impl.h"
#include "third_party/blink/public/platform/web_content_decryption_module_session.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_impl.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
@ -32,7 +33,8 @@ class WebContentDecryptionModuleSessionImpl;
// Forwards the session ID-based callbacks of the ContentDecryptionModule
// interface to the appropriate session object. Callers should hold references
// to this class as long as they need the CDM instance.
class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
class PLATFORM_EXPORT CdmSessionAdapter
: public base::RefCounted<CdmSessionAdapter> {
public:
CdmSessionAdapter();
@ -165,4 +167,4 @@ class CdmSessionAdapter : public base::RefCounted<CdmSessionAdapter> {
} // namespace media
#endif // MEDIA_BLINK_CDM_SESSION_ADAPTER_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_CDM_SESSION_ADAPTER_H_

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/platform/media/interval_map.h"
#include <stdint.h>
#include <string>
@ -9,7 +11,6 @@
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "media/base/test_random.h"
#include "media/blink/interval_map.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/key_system_config_selector.h"
#include "third_party/blink/public/platform/media/key_system_config_selector.h"
#include <stddef.h>
#include <utility>

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/platform/media/key_system_config_selector.h"
#include <string>
#include <vector>
@ -14,7 +16,6 @@
#include "media/base/key_systems.h"
#include "media/base/media_permission.h"
#include "media/base/mime_util.h"
#include "media/blink/key_system_config_selector.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_content_settings_client.h"
#include "third_party/blink/public/platform/web_encrypted_media_types.h"
@ -428,7 +429,7 @@ class KeySystemConfigSelectorTest : public testing::Test {
EXPECT_EQ(0, media_permission_->requests);
EXPECT_EQ(1, succeeded_count_);
EXPECT_EQ(0, not_supported_count_);
ASSERT_TRUE(succeeded_count_ != 0);
ASSERT_NE(succeeded_count_, 0);
}
void SelectConfigReturnsError() {
@ -436,7 +437,7 @@ class KeySystemConfigSelectorTest : public testing::Test {
EXPECT_EQ(0, media_permission_->requests);
EXPECT_EQ(0, succeeded_count_);
EXPECT_EQ(1, not_supported_count_);
ASSERT_TRUE(not_supported_count_ != 0);
ASSERT_NE(not_supported_count_, 0);
}
void SelectConfigRequestsPermissionAndReturnsConfig() {
@ -444,7 +445,8 @@ class KeySystemConfigSelectorTest : public testing::Test {
EXPECT_EQ(1, media_permission_->requests);
EXPECT_EQ(1, succeeded_count_);
EXPECT_EQ(0, not_supported_count_);
ASSERT_TRUE(media_permission_->requests != 0 && succeeded_count_ != 0);
ASSERT_NE(media_permission_->requests, 0);
ASSERT_NE(succeeded_count_, 0);
}
void SelectConfigRequestsPermissionAndReturnsError() {
@ -452,7 +454,8 @@ class KeySystemConfigSelectorTest : public testing::Test {
EXPECT_EQ(1, media_permission_->requests);
EXPECT_EQ(0, succeeded_count_);
EXPECT_EQ(1, not_supported_count_);
ASSERT_TRUE(media_permission_->requests != 0 && not_supported_count_ != 0);
ASSERT_NE(media_permission_->requests, 0);
ASSERT_NE(not_supported_count_, 0);
}
void OnConfigSelected(KeySystemConfigSelector::Status status,

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/learning_experiment_helper.h"
#include "third_party/blink/public/platform/media/learning_experiment_helper.h"
namespace media {

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/learning_experiment_helper.h"
#include "third_party/blink/public/platform/media/learning_experiment_helper.h"
#include <memory>

@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/platform/media/lru.h"
#include <stddef.h>
#include <list>
#include "base/logging.h"
#include "media/base/test_random.h"
#include "media/blink/lru.h"
#include "testing/gtest/include/gtest/gtest.h"
// Range of integer used in tests below.

@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <utility>
#include "third_party/blink/public/platform/media/multi_buffer.h"
#include "media/blink/multibuffer.h"
#include <utility>
#include "base/bind.h"
#include "base/location.h"

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/multibuffer_data_source.h"
#include "third_party/blink/public/platform/media/multi_buffer_data_source.h"
#include <utility>
@ -14,9 +14,9 @@
#include "base/numerics/safe_conversions.h"
#include "base/single_thread_task_runner.h"
#include "media/base/media_log.h"
#include "media/blink/buffered_data_source_host_impl.h"
#include "media/blink/multibuffer_reader.h"
#include "net/base/net_errors.h"
#include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
#include "third_party/blink/renderer/platform/media/multi_buffer_reader.h"
#include "url/gurl.h"
namespace {

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/platform/media/multi_buffer_data_source.h"
#include <stddef.h>
#include <stdint.h>
@ -19,17 +21,15 @@
#include "media/base/media_util.h"
#include "media/base/mock_filters.h"
#include "media/base/test_helpers.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "media/blink/buffered_data_source_host_impl.h"
#include "media/blink/mock_resource_fetch_context.h"
#include "media/blink/mock_webassociatedurlloader.h"
#include "media/blink/multibuffer_data_source.h"
#include "media/blink/multibuffer_reader.h"
#include "media/blink/resource_multibuffer_data_provider.h"
#include "media/blink/test_response_generator.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "third_party/blink/public/platform/media/buffered_data_source_host_impl.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/renderer/platform/media/multi_buffer_reader.h"
#include "third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.h"
#include "third_party/blink/renderer/platform/media/testing/mock_resource_fetch_context.h"
#include "third_party/blink/renderer/platform/media/testing/mock_web_associated_url_loader.h"
#include "third_party/blink/renderer/platform/media/testing/test_response_generator.h"
using ::testing::_;
using ::testing::Assign;
@ -480,11 +480,11 @@ class MultiBufferDataSourceTest : public testing::Test {
}
protected:
base::test::SingleThreadTaskEnvironment task_environment_;
MultiBufferDataSource::Preload preload_;
NiceMock<MockResourceFetchContext> fetch_context_;
const scoped_refptr<base::SingleThreadTaskRunner> task_runner_ =
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()
->GetMainThreadTaskRunner();
task_environment_.GetMainThreadTaskRunner();
TestUrlIndex url_index_{&fetch_context_, task_runner_};
std::unique_ptr<MockMultiBufferDataSource> data_source_;

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/platform/media/multi_buffer_reader.h"
#include <stddef.h>
#include <utility>
@ -10,7 +12,6 @@
#include "base/callback_helpers.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "media/blink/multibuffer_reader.h"
#include "net/base/net_errors.h"
namespace media {

@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_MULTIBUFFER_READER_H_
#define MEDIA_BLINK_MULTIBUFFER_READER_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_MULTI_BUFFER_READER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_MULTI_BUFFER_READER_H_
#include <stdint.h>
#include "base/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "media/blink/media_blink_export.h"
#include "media/blink/multibuffer.h"
#include "third_party/blink/public/platform/media/multi_buffer.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace base {
class SingleThreadTaskRunner;
@ -21,7 +21,7 @@ namespace media {
// Wrapper for MultiBuffer that offers a simple byte-reading
// interface with prefetch.
class MEDIA_BLINK_EXPORT MultiBufferReader : public MultiBuffer::Reader {
class PLATFORM_EXPORT MultiBufferReader : public MultiBuffer::Reader {
public:
// Note that |progress_callback| is guaranteed to be called if
// a redirect happens and the url_data is updated. Otherwise
@ -193,4 +193,4 @@ class MEDIA_BLINK_EXPORT MultiBufferReader : public MultiBuffer::Reader {
} // namespace media
#endif // MEDIA_BLINK_MULTIBUFFER_READER_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_MULTI_BUFFER_READER_H_

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/platform/media/multi_buffer.h"
#include <stddef.h>
#include <stdint.h>
@ -17,9 +19,8 @@
#include "base/test/simple_test_tick_clock.h"
#include "media/base/fake_single_thread_task_runner.h"
#include "media/base/test_random.h"
#include "media/blink/multibuffer.h"
#include "media/blink/multibuffer_reader.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/media/multi_buffer_reader.h"
const int kBlockSizeShift = 8;
const size_t kBlockSize = 1UL << kBlockSizeShift;

@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/new_session_cdm_result_promise.h"
#include "third_party/blink/renderer/platform/media/new_session_cdm_result_promise.h"
#include "base/containers/contains.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "media/blink/cdm_result_promise_helper.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise_helper.h"
namespace media {

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
#define MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_NEW_SESSION_CDM_RESULT_PROMISE_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_NEW_SESSION_CDM_RESULT_PROMISE_H_
#include <stdint.h>
@ -13,8 +13,8 @@
#include "base/macros.h"
#include "base/time/time.h"
#include "media/base/cdm_promise.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_content_decryption_module_result.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
@ -43,7 +43,7 @@ using SessionInitializedCB =
// SessionStatus by calling |new_session_created_cb|. The value returned by
// |new_session_created_cb| must be in |expected_statuses| for the promise to
// be resolved. If it's not in the list, the promise will be rejected.
class MEDIA_BLINK_EXPORT NewSessionCdmResultPromise
class PLATFORM_EXPORT NewSessionCdmResultPromise
: public CdmPromiseTemplate<std::string> {
public:
NewSessionCdmResultPromise(
@ -81,4 +81,4 @@ class MEDIA_BLINK_EXPORT NewSessionCdmResultPromise
} // namespace media
#endif // MEDIA_BLINK_NEW_SESSION_CDM_RESULT_PROMISE_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_NEW_SESSION_CDM_RESULT_PROMISE_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/power_status_helper.h"
#include "third_party/blink/public/platform/media/power_status_helper.h"
#include <utility>

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/power_status_helper.h"
#include "third_party/blink/public/platform/media/power_status_helper.h"
#include <memory>
#include <tuple>
@ -14,7 +14,6 @@
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "media/base/pipeline_metadata.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "services/device/public/mojom/battery_status.mojom.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@ -143,8 +142,7 @@ class PowerStatusHelperTest : public testing::Test {
}
void FastForward(base::TimeDelta delta) {
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()->FastForwardBy(
delta);
task_environment_.FastForwardBy(delta);
}
// Verify that we've added |battery_delta| and |time_delta| to |bucket| in
@ -161,6 +159,10 @@ class PowerStatusHelperTest : public testing::Test {
total_time_delta);
}
protected:
base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
// Previous total histogram counts. Note that we record the total in msec,
// rather than as a TimeDelta, so that we round the same way as the helper.
int total_battery_delta = 0;

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/remote_playback_client_wrapper_impl.h"
#include "third_party/blink/public/platform/media/remote_playback_client_wrapper_impl.h"
#include "third_party/blink/public/platform/modules/remoteplayback/web_remote_playback_client.h"
#include "third_party/blink/public/platform/web_media_player_client.h"

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/resource_multibuffer_data_provider.h"
#include "third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.h"
#include <stddef.h>
#include <utility>
@ -15,19 +15,19 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "media/blink/cache_util.h"
#include "media/blink/resource_fetch_context.h"
#include "media/blink/url_index.h"
#include "net/http/http_byte_range.h"
#include "net/http/http_request_headers.h"
#include "services/network/public/cpp/cors/cors.h"
#include "third_party/blink/public/common/loader/previews_state.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/platform/media/resource_fetch_context.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include "third_party/blink/public/platform/web_network_state_notifier.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_error.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/public/web/web_associated_url_loader.h"
#include "third_party/blink/renderer/platform/media/cache_util.h"
using blink::WebAssociatedURLLoader;
using blink::WebString;

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_
#define MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_RESOURCE_MULTI_BUFFER_DATA_PROVIDER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_RESOURCE_MULTI_BUFFER_DATA_PROVIDER_H_
#include <stdint.h>
@ -13,12 +13,12 @@
#include "base/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "media/blink/media_blink_export.h"
#include "media/blink/multibuffer.h"
#include "media/blink/url_index.h"
#include "third_party/blink/public/platform/media/multi_buffer.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/public/web/web_associated_url_loader_client.h"
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "url/gurl.h"
namespace base {
@ -31,7 +31,7 @@ class WebAssociatedURLLoader;
namespace media {
class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider
class PLATFORM_EXPORT ResourceMultiBufferDataProvider
: public MultiBuffer::DataProvider,
public blink::WebAssociatedURLLoaderClient {
public:
@ -137,4 +137,4 @@ class MEDIA_BLINK_EXPORT ResourceMultiBufferDataProvider
} // namespace media
#endif // MEDIA_BLINK_RESOURCE_MULTIBUFFER_DATA_PROVIDER_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_RESOURCE_MULTI_BUFFER_DATA_PROVIDER_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/resource_multibuffer_data_provider.h"
#include "third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.h"
#include <stdint.h>
#include <algorithm>
@ -19,20 +19,19 @@
#include "base/test/task_environment.h"
#include "media/base/media_log.h"
#include "media/base/seekable_buffer.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "media/blink/mock_resource_fetch_context.h"
#include "media/blink/mock_webassociatedurlloader.h"
#include "media/blink/url_index.h"
#include "net/base/net_errors.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include "third_party/blink/public/platform/web_network_state_notifier.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_url_error.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/public/platform/web_url_response.h"
#include "third_party/blink/renderer/platform/media/testing/mock_resource_fetch_context.h"
#include "third_party/blink/renderer/platform/media/testing/mock_web_associated_url_loader.h"
using ::testing::_;
using ::testing::InSequence;
@ -106,8 +105,7 @@ class ResourceMultiBufferDataProviderTest : public testing::Test {
new ResourceMultiBufferDataProvider(
url_data_.get(), first_position_,
false /* is_client_audio_element */,
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()
->GetMainThreadTaskRunner()));
task_environment_.GetMainThreadTaskRunner()));
loader_ = loader.get();
url_data_->multibuffer()->AddProvider(std::move(loader));
}
@ -223,13 +221,13 @@ class ResourceMultiBufferDataProviderTest : public testing::Test {
return url_loader;
}
base::test::SingleThreadTaskEnvironment task_environment_;
GURL gurl_;
int64_t first_position_;
NiceMock<MockResourceFetchContext> fetch_context_;
UrlIndex url_index_{&fetch_context_, 0,
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()
->GetMainThreadTaskRunner()};
task_environment_.GetMainThreadTaskRunner()};
scoped_refptr<UrlData> url_data_;
scoped_refptr<UrlData> redirected_to_;
// The loader is owned by the UrlData above.

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/smoothness_helper.h"
#include "third_party/blink/public/platform/media/smoothness_helper.h"
#include "base/bind.h"
#include "base/timer/timer.h"

@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/smoothness_helper.h"
#include "third_party/blink/public/platform/media/smoothness_helper.h"
#include "base/run_loop.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "base/test/task_environment.h"
#include "media/learning/common/labelled_example.h"
#include "media/learning/common/learning_task_controller.h"
#include "testing/gmock/include/gmock/gmock.h"
@ -92,8 +92,7 @@ class SmoothnessHelperTest : public testing::Test {
}
void FastForwardBy(base::TimeDelta amount) {
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()->FastForwardBy(
amount);
task_environment_.FastForwardBy(amount);
}
// Set the dropped / decoded totals that will be returned by the mock client.
@ -102,6 +101,10 @@ class SmoothnessHelperTest : public testing::Test {
ON_CALL(client_, DecodedFrameCount()).WillByDefault(Return(decoded));
}
protected:
base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
// Helper under test
std::unique_ptr<SmoothnessHelper> helper_;

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/mock_resource_fetch_context.h"
#include "third_party/blink/renderer/platform/media/testing/mock_resource_fetch_context.h"
namespace media {

@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_MOCK_RESOURCE_FETCH_CONTEXT_H_
#define MEDIA_BLINK_MOCK_RESOURCE_FETCH_CONTEXT_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_MOCK_RESOURCE_FETCH_CONTEXT_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_MOCK_RESOURCE_FETCH_CONTEXT_H_
#include "base/macros.h"
#include "media/blink/resource_fetch_context.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/platform/media/resource_fetch_context.h"
namespace media {
@ -26,4 +26,4 @@ class MockResourceFetchContext : public ResourceFetchContext {
} // namespace media
#endif // MEDIA_BLINK_MOCK_RESOURCE_FETCH_CONTEXT_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_MOCK_RESOURCE_FETCH_CONTEXT_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/mock_webassociatedurlloader.h"
#include "third_party/blink/renderer/platform/media/testing/mock_web_associated_url_loader.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_url_error.h"

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_MOCK_WEBASSOCIATEDURLLOADER_H_
#define MEDIA_BLINK_MOCK_WEBASSOCIATEDURLLOADER_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_MOCK_WEB_ASSOCIATED_URL_LOADER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_MOCK_WEB_ASSOCIATED_URL_LOADER_H_
#include "base/macros.h"
#include "base/single_thread_task_runner.h"
@ -31,4 +31,4 @@ class MockWebAssociatedURLLoader : public blink::WebAssociatedURLLoader {
} // namespace media
#endif // MEDIA_BLINK_MOCK_WEBASSOCIATEDURLLOADER_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_MOCK_WEB_ASSOCIATED_URL_LOADER_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/test_response_generator.h"
#include "third_party/blink/renderer/platform/media/testing/test_response_generator.h"
#include "base/format_macros.h"
#include "base/strings/string_number_conversions.h"

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_
#define MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_TEST_RESPONSE_GENERATOR_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_TEST_RESPONSE_GENERATOR_H_
#include <stdint.h>
@ -80,4 +80,4 @@ class TestResponseGenerator {
} // namespace media
#endif // MEDIA_BLINK_TEST_RESPONSE_GENERATOR_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TESTING_TEST_RESPONSE_GENERATOR_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/texttrack_impl.h"
#include "third_party/blink/renderer/platform/media/text_track_impl.h"
#include <utility>
@ -10,9 +10,9 @@
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "media/base/bind_to_current_loop.h"
#include "media/blink/webinbandtexttrack_impl.h"
#include "third_party/blink/public/platform/web_inband_text_track_client.h"
#include "third_party/blink/public/platform/web_media_player_client.h"
#include "third_party/blink/renderer/platform/media/web_inband_text_track_impl.h"
namespace media {

@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_TEXTTRACK_IMPL_H_
#define MEDIA_BLINK_TEXTTRACK_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TEXT_TRACK_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TEXT_TRACK_IMPL_H_
#include <memory>
#include <string>
#include "base/macros.h"
#include "media/base/text_track.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace base {
class SingleThreadTaskRunner;
@ -23,7 +24,7 @@ namespace media {
class WebInbandTextTrackImpl;
class TextTrackImpl : public TextTrack {
class PLATFORM_EXPORT TextTrackImpl : public TextTrack {
public:
// Constructor assumes ownership of the |text_track| object.
TextTrackImpl(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
@ -57,4 +58,4 @@ class TextTrackImpl : public TextTrack {
} // namespace media
#endif // MEDIA_BLINK_TEXTTRACK_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_TEXT_TRACK_IMPL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/url_index.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include <set>
#include <utility>
@ -13,7 +13,7 @@
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "media/base/media_switches.h"
#include "media/blink/resource_multibuffer_data_provider.h"
#include "third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.h"
namespace media {

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/public/platform/media/url_index.h"
#include <stdint.h>
#include <list>
@ -13,8 +15,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/test/task_environment.h"
#include "media/base/media_switches.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "media/blink/url_index.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
@ -33,9 +33,8 @@ class UrlIndexTest : public testing::Test {
}
protected:
UrlIndex url_index_{nullptr,
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()
->GetMainThreadTaskRunner()};
base::test::SingleThreadTaskEnvironment task_environment_;
UrlIndex url_index_{nullptr, task_environment_.GetMainThreadTaskRunner()};
};
TEST_F(UrlIndexTest, SimpleTest) {

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/video_decode_stats_reporter.h"
#include "third_party/blink/renderer/platform/media/video_decode_stats_reporter.h"
#include <cmath>
#include <limits>

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_VIDEO_DECODE_STATS_REPORTER_H_
#define MEDIA_BLINK_VIDEO_DECODE_STATS_REPORTER_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_VIDEO_DECODE_STATS_REPORTER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_VIDEO_DECODE_STATS_REPORTER_H_
#include <memory>
#include <string>
@ -18,11 +18,11 @@
#include "media/base/cdm_config.h"
#include "media/base/pipeline_status.h"
#include "media/base/video_codecs.h"
#include "media/blink/media_blink_export.h"
#include "media/mojo/mojom/video_decode_stats_recorder.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "ui/gfx/geometry/size.h"
namespace media {
@ -31,7 +31,7 @@ namespace media {
// size, and fps. When these properties change the current report will be
// finalized and a new report will be started. Ongoing reports are also
// finalized at destruction and process tear-down.
class MEDIA_BLINK_EXPORT VideoDecodeStatsReporter {
class PLATFORM_EXPORT VideoDecodeStatsReporter {
public:
using GetPipelineStatsCB = base::RepeatingCallback<PipelineStatistics(void)>;
@ -241,4 +241,4 @@ class MEDIA_BLINK_EXPORT VideoDecodeStatsReporter {
} // namespace media
#endif // MEDIA_BLINK_VIDEO_DECODE_STATS_REPORTER_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_VIDEO_DECODE_STATS_REPORTER_H_

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/platform/media/video_decode_stats_reporter.h"
#include <memory>
#include "base/bind.h"
@ -15,8 +17,6 @@
#include "media/base/media_util.h"
#include "media/base/video_codecs.h"
#include "media/base/video_types.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "media/blink/video_decode_stats_reporter.h"
#include "media/capabilities/bucket_utility.h"
#include "media/mojo/mojom/media_types.mojom.h"
#include "media/mojo/mojom/video_decode_stats_recorder.mojom.h"
@ -124,7 +124,7 @@ class VideoDecodeStatsReporterTest : public ::testing::Test {
reporter_.reset();
// Run task runner to have Mojo cleanup interceptor_.
task_environment_->RunUntilIdle();
task_environment_.RunUntilIdle();
}
PipelineStatistics MakeAdvancingDecodeStats() {
@ -185,13 +185,13 @@ class VideoDecodeStatsReporterTest : public ::testing::Test {
base::BindRepeating(&VideoDecodeStatsReporterTest::GetPipelineStatsCB,
base::Unretained(this)),
profile, natural_size, key_system, cdm_config,
task_environment_->GetMainThreadTaskRunner(),
task_environment_->GetMockTickClock());
task_environment_.GetMainThreadTaskRunner(),
task_environment_.GetMockTickClock());
}
// Fast forward the task runner (and associated tick clock) by |milliseconds|.
void FastForward(base::TimeDelta delta) {
task_environment_->FastForwardBy(delta);
task_environment_.FastForwardBy(delta);
}
bool ShouldBeReporting() const { return reporter_->ShouldBeReporting(); }
@ -345,8 +345,8 @@ class VideoDecodeStatsReporterTest : public ::testing::Test {
// expectations and return behavior.
MOCK_METHOD0(GetPipelineStatsCB, PipelineStatistics());
base::test::TaskEnvironment* task_environment_ =
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment();
base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
// These track the last values returned by MakeAdvancingDecodeStats(). See
// SetUp() for initialization.

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/video_frame_compositor.h"
#include "third_party/blink/public/platform/media/video_frame_compositor.h"
#include <memory>

@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/video_frame_compositor.h"
#include "third_party/blink/public/platform/media/video_frame_compositor.h"
#include "base/bind.h"
#include "base/macros.h"
#include "base/memory/scoped_refptr.h"
@ -15,7 +16,6 @@
#include "components/viz/common/frame_sinks/begin_frame_args.h"
#include "components/viz/common/surfaces/frame_sink_id.h"
#include "media/base/video_frame.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/web_video_frame_submitter.h"
@ -137,14 +137,14 @@ class VideoFrameCompositorTest : public VideoRendererSink::RenderCallback,
compositor()->PutCurrentFrame();
}
base::test::SingleThreadTaskEnvironment task_environment_;
base::TimeDelta preferred_render_interval_;
base::SimpleTestTickClock tick_clock_;
StrictMock<MockWebVideoFrameSubmitter>* submitter_;
std::unique_ptr<StrictMock<MockWebVideoFrameSubmitter>> client_;
std::unique_ptr<VideoFrameCompositor> compositor_;
const scoped_refptr<base::SingleThreadTaskRunner> task_runner_ =
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment()
->GetMainThreadTaskRunner();
task_environment_.GetMainThreadTaskRunner();
private:
DISALLOW_COPY_AND_ASSIGN(VideoFrameCompositorTest);

@ -14,7 +14,6 @@
#include "media/base/mock_media_log.h"
#include "media/base/pipeline_status.h"
#include "media/base/watch_time_keys.h"
#include "media/blink/blink_platform_with_task_environment.h"
#include "media/mojo/mojom/media_metrics_provider.mojom.h"
#include "media/mojo/mojom/watch_time_recorder.mojom.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
@ -316,7 +315,7 @@ class WatchTimeReporterTest
base::Unretained(this)),
&fake_metrics_provider_,
blink::scheduler::GetSequencedTaskRunnerForTesting(),
task_environment_->GetMockTickClock());
task_environment_.GetMockTickClock());
reporting_interval_ = wtr_->reporting_interval_;
// Most tests don't care about this.
@ -327,7 +326,7 @@ class WatchTimeReporterTest
}
void CycleReportingTimer() {
task_environment_->FastForwardBy(reporting_interval_);
task_environment_.FastForwardBy(reporting_interval_);
}
bool IsMonitoring() const { return wtr_->reporting_timer_.IsRunning(); }
@ -632,8 +631,8 @@ class WatchTimeReporterTest
MOCK_METHOD2(OnUpdateVideoDecodeStats, void(uint32_t, uint32_t));
MOCK_METHOD1(OnCurrentTimestampChanged, void(base::TimeDelta));
base::test::TaskEnvironment* task_environment_ =
BlinkPlatformWithTaskEnvironment::GetTaskEnvironment();
base::test::SingleThreadTaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
const bool has_video_;
const bool has_audio_;

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webcontentdecryptionmoduleaccess_impl.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_access_impl.h"
#include <memory>
#include <utility>
@ -10,7 +10,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "media/blink/webencryptedmediaclient_impl.h"
#include "third_party/blink/public/platform/media/web_encrypted_media_client_impl.h"
namespace media {

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_
#define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_ACCESS_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_ACCESS_IMPL_H_
#include <memory>
@ -15,12 +15,13 @@
#include "third_party/blink/public/platform/web_media_key_system_configuration.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
class WebEncryptedMediaClientImpl;
class WebContentDecryptionModuleAccessImpl
class PLATFORM_EXPORT WebContentDecryptionModuleAccessImpl
: public blink::WebContentDecryptionModuleAccess {
public:
// Allow typecasting from blink type as this is the only implementation.
@ -63,4 +64,4 @@ class WebContentDecryptionModuleAccessImpl
} // namespace media
#endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULEACCESS_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_ACCESS_IMPL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webcontentdecryptionmodule_impl.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_impl.h"
#include <utility>
@ -16,12 +16,12 @@
#include "media/base/cdm_promise.h"
#include "media/base/content_decryption_module.h"
#include "media/base/key_systems.h"
#include "media/blink/cdm_result_promise.h"
#include "media/blink/cdm_session_adapter.h"
#include "media/blink/webcontentdecryptionmodulesession_impl.h"
#include "third_party/blink/public/platform/url_conversion.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise.h"
#include "third_party/blink/renderer/platform/media/cdm_session_adapter.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_session_impl.h"
#include "url/origin.h"
namespace media {

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
#define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_IMPL_H_
#include <stddef.h>
#include <stdint.h>
@ -15,8 +15,8 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "media/base/cdm_config.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_content_decryption_module.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace blink {
class WebSecurityOrigin;
@ -33,7 +33,7 @@ using WebCdmCreatedCB =
base::OnceCallback<void(blink::WebContentDecryptionModule* cdm,
const std::string& error_message)>;
class MEDIA_BLINK_EXPORT WebContentDecryptionModuleImpl
class PLATFORM_EXPORT WebContentDecryptionModuleImpl
: public blink::WebContentDecryptionModule {
public:
static void Create(CdmFactory* cdm_factory,
@ -73,6 +73,7 @@ class MEDIA_BLINK_EXPORT WebContentDecryptionModuleImpl
};
// Allow typecasting from blink type as this is the only implementation.
PLATFORM_EXPORT
inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
blink::WebContentDecryptionModule* cdm) {
return static_cast<WebContentDecryptionModuleImpl*>(cdm);
@ -80,4 +81,4 @@ inline WebContentDecryptionModuleImpl* ToWebContentDecryptionModuleImpl(
} // namespace media
#endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULE_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_IMPL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "webcontentdecryptionmodulesession_impl.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_session_impl.h"
#include <memory>
@ -20,9 +20,6 @@
#include "media/base/key_system_names.h"
#include "media/base/key_systems.h"
#include "media/base/limits.h"
#include "media/blink/cdm_result_promise.h"
#include "media/blink/cdm_result_promise_helper.h"
#include "media/blink/cdm_session_adapter.h"
#include "media/cdm/cenc_utils.h"
#include "media/cdm/json_web_key.h"
#include "third_party/blink/public/platform/web_data.h"
@ -31,6 +28,9 @@
#include "third_party/blink/public/platform/web_url.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/modules/media/webmediaplayer_util.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise.h"
#include "third_party/blink/renderer/platform/media/cdm_result_promise_helper.h"
#include "third_party/blink/renderer/platform/media/cdm_session_adapter.h"
namespace media {

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
#define MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_SESSION_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_SESSION_IMPL_H_
#include <stddef.h>
#include <stdint.h>
@ -17,15 +17,16 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "media/base/content_decryption_module.h"
#include "media/blink/new_session_cdm_result_promise.h"
#include "third_party/blink/public/platform/web_content_decryption_module_session.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/new_session_cdm_result_promise.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
class CdmSessionAdapter;
class WebContentDecryptionModuleSessionImpl
class PLATFORM_EXPORT WebContentDecryptionModuleSessionImpl
: public blink::WebContentDecryptionModuleSession {
public:
WebContentDecryptionModuleSessionImpl(
@ -101,4 +102,4 @@ class WebContentDecryptionModuleSessionImpl
} // namespace media
#endif // MEDIA_BLINK_WEBCONTENTDECRYPTIONMODULESESSION_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_CONTENT_DECRYPTION_MODULE_SESSION_IMPL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webencryptedmediaclient_impl.h"
#include "third_party/blink/public/platform/media/web_encrypted_media_client_impl.h"
#include <memory>
#include <utility>
@ -13,13 +13,13 @@
#include "base/strings/utf_string_conversions.h"
#include "media/base/key_systems.h"
#include "media/base/media_permission.h"
#include "media/blink/webcontentdecryptionmodule_impl.h"
#include "media/blink/webcontentdecryptionmoduleaccess_impl.h"
#include "third_party/blink/public/platform/web_content_decryption_module_result.h"
#include "third_party/blink/public/platform/web_encrypted_media_request.h"
#include "third_party/blink/public/platform/web_media_key_system_configuration.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_access_impl.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_impl.h"
namespace media {

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webinbandtexttrack_impl.h"
#include "third_party/blink/renderer/platform/media/web_inband_text_track_impl.h"
#include "base/check.h"

@ -2,16 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBINBANDTEXTTRACK_IMPL_H_
#define MEDIA_BLINK_WEBINBANDTEXTTRACK_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_INBAND_TEXT_TRACK_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_INBAND_TEXT_TRACK_IMPL_H_
#include "base/macros.h"
#include "third_party/blink/public/platform/web_inband_text_track.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
class WebInbandTextTrackImpl : public blink::WebInbandTextTrack {
class PLATFORM_EXPORT WebInbandTextTrackImpl
: public blink::WebInbandTextTrack {
public:
WebInbandTextTrackImpl(Kind kind,
const blink::WebString& label,
@ -39,4 +41,4 @@ class WebInbandTextTrackImpl : public blink::WebInbandTextTrack {
} // namespace media
#endif // MEDIA_BLINK_WEBINBANDTEXTTRACK_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_INBAND_TEXT_TRACK_IMPL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webmediaplayer_impl.h"
#include "third_party/blink/public/platform/media/web_media_player_impl.h"
#include <algorithm>
#include <cmath>
@ -45,13 +45,6 @@
#include "media/base/text_renderer.h"
#include "media/base/timestamp_constants.h"
#include "media/base/video_frame.h"
#include "media/blink/power_status_helper.h"
#include "media/blink/texttrack_impl.h"
#include "media/blink/url_index.h"
#include "media/blink/video_decode_stats_reporter.h"
#include "media/blink/webcontentdecryptionmodule_impl.h"
#include "media/blink/webinbandtexttrack_impl.h"
#include "media/blink/webmediasource_impl.h"
#include "media/filters/chunk_demuxer.h"
#include "media/filters/ffmpeg_demuxer.h"
#include "media/filters/memory_data_source.h"
@ -65,6 +58,8 @@
#include "net/base/data_url.h"
#include "third_party/blink/public/common/media/display_type.h"
#include "third_party/blink/public/common/media/watch_time_reporter.h"
#include "third_party/blink/public/platform/media/power_status_helper.h"
#include "third_party/blink/public/platform/media/url_index.h"
#include "third_party/blink/public/platform/web_encrypted_media_types.h"
#include "third_party/blink/public/platform/web_fullscreen_video_status.h"
#include "third_party/blink/public/platform/web_media_player_client.h"
@ -84,6 +79,11 @@
#include "third_party/blink/public/web/web_frame.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_view.h"
#include "third_party/blink/renderer/platform/media/text_track_impl.h"
#include "third_party/blink/renderer/platform/media/video_decode_stats_reporter.h"
#include "third_party/blink/renderer/platform/media/web_content_decryption_module_impl.h"
#include "third_party/blink/renderer/platform/media/web_inband_text_track_impl.h"
#include "third_party/blink/renderer/platform/media/web_media_source_impl.h"
#include "ui/gfx/geometry/size.h"
#if defined(OS_ANDROID)
@ -92,7 +92,6 @@
using blink::WebMediaPlayer;
using blink::WebString;
using gpu::gles2::GLES2Interface;
#define STATIC_ASSERT_ENUM(a, b) \
static_assert(static_cast<int>(a) == static_cast<int>(b), \

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webmediaplayer_params.h"
#include "third_party/blink/public/platform/media/web_media_player_params.h"
#include "base/single_thread_task_runner.h"
#include "base/task_runner.h"

@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/webmediasource_impl.h"
#include "third_party/blink/renderer/platform/media/web_media_source_impl.h"
#include "base/guid.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/mime_util.h"
#include "media/base/video_decoder_config.h"
#include "media/blink/websourcebuffer_impl.h"
#include "media/filters/chunk_demuxer.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/platform/media/web_source_buffer_impl.h"
using ::blink::WebString;
using ::blink::WebMediaSource;

@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
#define MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_MEDIA_SOURCE_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_MEDIA_SOURCE_IMPL_H_
#include <vector>
#include "base/macros.h"
#include "media/blink/media_blink_export.h"
#include "third_party/blink/public/platform/web_media_source.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
class AudioDecoderConfig;
class ChunkDemuxer;
class VideoDecoderConfig;
class MEDIA_BLINK_EXPORT WebMediaSourceImpl : public blink::WebMediaSource {
class PLATFORM_EXPORT WebMediaSourceImpl : public blink::WebMediaSource {
public:
WebMediaSourceImpl(ChunkDemuxer* demuxer);
~WebMediaSourceImpl() override;
@ -45,4 +45,4 @@ class MEDIA_BLINK_EXPORT WebMediaSourceImpl : public blink::WebMediaSource {
} // namespace media
#endif // MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_MEDIA_SOURCE_IMPL_H_

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/blink/websourcebuffer_impl.h"
#include "third_party/blink/renderer/platform/media/web_source_buffer_impl.h"
#include <stdint.h>

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_
#define MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_SOURCE_BUFFER_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_SOURCE_BUFFER_IMPL_H_
#include <stddef.h>
@ -14,13 +14,14 @@
#include "base/macros.h"
#include "base/time/time.h"
#include "third_party/blink/public/platform/web_source_buffer.h"
#include "third_party/blink/renderer/platform/platform_export.h"
namespace media {
class ChunkDemuxer;
class MediaTracks;
enum class SourceBufferParseWarning;
class WebSourceBufferImpl : public blink::WebSourceBuffer {
class PLATFORM_EXPORT WebSourceBufferImpl : public blink::WebSourceBuffer {
public:
WebSourceBufferImpl(const std::string& id, ChunkDemuxer* demuxer);
~WebSourceBufferImpl() override;
@ -76,4 +77,4 @@ class WebSourceBufferImpl : public blink::WebSourceBuffer {
} // namespace media
#endif // MEDIA_BLINK_WEBSOURCEBUFFER_IMPL_H_
#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIA_WEB_SOURCE_BUFFER_IMPL_H_