Commit 8d117e78 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Remove CreateRTCVideoDecoderAdapter() from Blink API

After [1], the factory method CreateRTCVideoDecoderAdapter() declared
in [2] is not needed anymore: [3] can refer to RTCVideoDecoderAdapter
ctor directly.

CL removes [2] altogether.

[1] https://crrev.com/c/1778665
[2] //third_party/blink/public/platform/modules/peerconnection/web_rtc_video_frame_adapter_factory.h
[3] //third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_factory.cc

BUG=787254
R=guidou@chromium.org, haraken@chromium.org

Change-Id: I223b97999f49ea5c84a7ebc2d0c6aab87dd911be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1779268
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692353}
parent 82630b11
......@@ -161,7 +161,6 @@ source_set("blink_headers") {
"platform/modules/peerconnection/rtc_video_decoder_factory.h",
"platform/modules/peerconnection/two_keys_adapter_map.h",
"platform/modules/peerconnection/web_rtc_video_encoder_factory.h",
"platform/modules/peerconnection/web_rtc_video_frame_adapter_factory.h",
"platform/modules/peerconnection/webrtc_audio_sink.h",
"platform/modules/peerconnection/webrtc_util.h",
"platform/modules/peerconnection/webrtc_video_track_source.h",
......
// Copyright 2019 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 THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_PEERCONNECTION_WEB_RTC_VIDEO_FRAME_ADAPTER_FACTORY_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_PEERCONNECTION_WEB_RTC_VIDEO_FRAME_ADAPTER_FACTORY_H_
#include <memory>
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/webrtc/api/video_codecs/sdp_video_format.h"
namespace media {
class GpuVideoAcceleratorFactories;
}
namespace webrtc {
class VideoDecoder;
}
namespace blink {
// Creates and initializes an RTCVideoDecoderAdapter. Returns nullptr if
// |format| cannot be supported.
// Called on the worker thread.
//
// TODO(crbug.com/787254): Remove this API when its clients are Onion souped.
BLINK_PLATFORM_EXPORT std::unique_ptr<webrtc::VideoDecoder>
CreateRTCVideoDecoderAdapter(media::GpuVideoAcceleratorFactories* gpu_factories,
const webrtc::SdpVideoFormat& format);
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_PEERCONNECTION_WEB_RTC_VIDEO_FRAME_ADAPTER_FACTORY_H_
......@@ -28,7 +28,6 @@
#include "media/base/video_types.h"
#include "media/video/gpu_video_accelerator_factories.h"
#include "media/video/video_decode_accelerator.h"
#include "third_party/blink/public/platform/modules/peerconnection/web_rtc_video_frame_adapter_factory.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/platform/webrtc/webrtc_video_frame_adapter.h"
#include "third_party/blink/renderer/platform/webrtc/webrtc_video_utils.h"
......@@ -122,12 +121,6 @@ void OnRequestOverlayInfo(bool decoder_requires_restart_for_overlay,
} // namespace
std::unique_ptr<webrtc::VideoDecoder> CreateRTCVideoDecoderAdapter(
media::GpuVideoAcceleratorFactories* gpu_factories,
const webrtc::SdpVideoFormat& format) {
return RTCVideoDecoderAdapter::Create(gpu_factories, format);
}
// static
std::unique_ptr<RTCVideoDecoderAdapter> RTCVideoDecoderAdapter::Create(
media::GpuVideoAcceleratorFactories* gpu_factories,
......
......@@ -10,7 +10,7 @@
#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "media/video/gpu_video_accelerator_factories.h"
#include "third_party/blink/public/platform/modules/peerconnection/web_rtc_video_frame_adapter_factory.h"
#include "third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_adapter.h"
namespace blink {
namespace {
......@@ -79,7 +79,7 @@ RTCVideoDecoderFactory::CreateVideoDecoder(
const webrtc::SdpVideoFormat& format) {
DVLOG(2) << __func__;
std::unique_ptr<webrtc::VideoDecoder> decoder =
blink::CreateRTCVideoDecoderAdapter(gpu_factories_, format);
RTCVideoDecoderAdapter::Create(gpu_factories_, format);
// ScopedVideoDecoder uses the task runner to make sure the decoder is
// destructed on the correct thread.
return decoder ? std::make_unique<ScopedVideoDecoder>(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment