From 04e935455750978297e891f48a5d8d3ec4831058 Mon Sep 17 00:00:00 2001 From: philipel Date: Fri, 3 Feb 2023 14:42:32 +0100 Subject: [PATCH] Remove deprecated VideoStreamDecoderInterface and FrameBuffer2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:14875 Change-Id: I46ea21d9ed46283ad3f6c9005ad05ec116d841f2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291701 Reviewed-by: Rasmus Brandt Reviewed-by: Erik Språng Commit-Queue: Philip Eliasson Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#39304} --- api/BUILD.gn | 1 - api/video/BUILD.gn | 47 -- api/video/video_stream_decoder.h | 57 -- api/video/video_stream_decoder_create.cc | 32 - api/video/video_stream_decoder_create.h | 37 - .../video_stream_decoder_create_unittest.cc | 46 -- modules/video_coding/BUILD.gn | 38 - modules/video_coding/frame_buffer2.cc | 600 ---------------- modules/video_coding/frame_buffer2.h | 193 ----- .../video_coding/frame_buffer2_unittest.cc | 665 ------------------ modules/video_coding/g3doc/index.md | 2 +- test/fuzzers/BUILD.gn | 11 - test/fuzzers/frame_buffer2_fuzzer.cc | 116 --- video/BUILD.gn | 35 - video/video_stream_decoder_impl.cc | 293 -------- video/video_stream_decoder_impl.h | 128 ---- 16 files changed, 1 insertion(+), 2300 deletions(-) delete mode 100644 api/video/video_stream_decoder.h delete mode 100644 api/video/video_stream_decoder_create.cc delete mode 100644 api/video/video_stream_decoder_create.h delete mode 100644 api/video/video_stream_decoder_create_unittest.cc delete mode 100644 modules/video_coding/frame_buffer2.cc delete mode 100644 modules/video_coding/frame_buffer2.h delete mode 100644 modules/video_coding/frame_buffer2_unittest.cc delete mode 100644 test/fuzzers/frame_buffer2_fuzzer.cc delete mode 100644 video/video_stream_decoder_impl.cc delete mode 100644 video/video_stream_decoder_impl.h diff --git a/api/BUILD.gn b/api/BUILD.gn index 138d855b45..d1b2c23491 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -1437,7 +1437,6 @@ if (rtc_include_tests) { "units:units_unittests", "video:frame_buffer_unittest", "video:rtp_video_frame_assembler_unittests", - "video:video_unittests", ] absl_deps = [ "//third_party/abseil-cpp/absl/strings", diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index 5d1aa2a1a3..17277562e1 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -259,37 +259,6 @@ rtc_source_set("video_bitrate_allocator_factory") { ] } -rtc_source_set("video_stream_decoder") { - visibility = [ "*" ] - sources = [ "video_stream_decoder.h" ] - - deps = [ - ":encoded_frame", - ":video_frame", - ":video_rtp_headers", - "../task_queue", - "../units:time_delta", - "../video_codecs:video_codecs_api", - ] - absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] -} - -rtc_library("video_stream_decoder_create") { - visibility = [ "*" ] - sources = [ - "video_stream_decoder_create.cc", - "video_stream_decoder_create.h", - ] - - deps = [ - ":video_stream_decoder", - "../../api:field_trials_view", - "../../video:video_stream_decoder_impl", - "../task_queue", - "../video_codecs:video_codecs_api", - ] -} - rtc_library("video_adaptation") { visibility = [ "*" ] sources = [ @@ -403,19 +372,3 @@ rtc_library("frame_buffer_unittest") { "../../test:test_support", ] } - -if (rtc_include_tests) { - rtc_library("video_unittests") { - testonly = true - sources = [ "video_stream_decoder_create_unittest.cc" ] - deps = [ - ":video_frame_metadata", - ":video_frame_type", - ":video_stream_decoder_create", - "../../modules/rtp_rtcp:rtp_video_header", - "../../test:test_support", - "../task_queue:default_task_queue_factory", - "../video_codecs:builtin_video_decoder_factory", - ] - } -} diff --git a/api/video/video_stream_decoder.h b/api/video/video_stream_decoder.h deleted file mode 100644 index 8d71dd300c..0000000000 --- a/api/video/video_stream_decoder.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef API_VIDEO_VIDEO_STREAM_DECODER_H_ -#define API_VIDEO_VIDEO_STREAM_DECODER_H_ - -#include -#include -#include - -#include "api/units/time_delta.h" -#include "api/video/encoded_frame.h" -#include "api/video/video_content_type.h" -#include "api/video/video_frame.h" -#include "api/video_codecs/sdp_video_format.h" -#include "api/video_codecs/video_decoder_factory.h" - -namespace webrtc { -// NOTE: This class is still under development and may change without notice. -class VideoStreamDecoderInterface { - public: - class Callbacks { - public: - virtual ~Callbacks() = default; - - struct FrameInfo { - absl::optional qp; - VideoContentType content_type; - }; - - // Called when the VideoStreamDecoder enters a non-decodable state. - virtual void OnNonDecodableState() = 0; - - virtual void OnContinuousUntil(int64_t frame_id) {} - - virtual void OnDecodedFrame(VideoFrame frame, - const FrameInfo& frame_info) = 0; - }; - - virtual ~VideoStreamDecoderInterface() = default; - - virtual void OnFrame(std::unique_ptr frame) = 0; - - virtual void SetMinPlayoutDelay(TimeDelta min_delay) = 0; - virtual void SetMaxPlayoutDelay(TimeDelta max_delay) = 0; -}; - -} // namespace webrtc - -#endif // API_VIDEO_VIDEO_STREAM_DECODER_H_ diff --git a/api/video/video_stream_decoder_create.cc b/api/video/video_stream_decoder_create.cc deleted file mode 100644 index e14c3bc851..0000000000 --- a/api/video/video_stream_decoder_create.cc +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#include "api/video/video_stream_decoder_create.h" - -#include - -#include "video/video_stream_decoder_impl.h" - -namespace webrtc { - -std::unique_ptr CreateVideoStreamDecoder( - VideoStreamDecoderInterface::Callbacks* callbacks, - VideoDecoderFactory* decoder_factory, - TaskQueueFactory* task_queue_factory, - std::map> decoder_settings, - // TODO(jonaso, webrtc:10335): Consider what to do with factories - // vs. field trials. - const FieldTrialsView* field_trials) { - return std::make_unique( - callbacks, decoder_factory, task_queue_factory, - std::move(decoder_settings), field_trials); -} - -} // namespace webrtc diff --git a/api/video/video_stream_decoder_create.h b/api/video/video_stream_decoder_create.h deleted file mode 100644 index 974fd804ce..0000000000 --- a/api/video/video_stream_decoder_create.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ -#define API_VIDEO_VIDEO_STREAM_DECODER_CREATE_H_ - -#include -#include -#include - -#include "api/field_trials_view.h" -#include "api/task_queue/task_queue_factory.h" -#include "api/video/video_stream_decoder.h" -#include "api/video_codecs/sdp_video_format.h" - -namespace webrtc { -// The `decoder_settings` parameter is a map between: -// --> <