Prepare function for deprecation

The `FrameToRender` function is considered a part of WebRTC's API so it cannot just be removed all at once. Since it is a pure virtual function it needs some preparation for the deprecation. This CL implements a default implementation. It will now be possible to not implement the function, but it will kill the process in that case.

Bug: webrtc:358039777
Change-Id: Ia83c63ab035abda76beb30ba98b23f9cc835a6a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365500
Commit-Queue: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43235}
This commit is contained in:
Fanny Linderborg 2024-10-14 12:04:49 +02:00 committed by WebRTC LUCI CQ
parent 01a9264959
commit 41d9a01f6a
2 changed files with 6 additions and 1 deletions

View File

@ -300,6 +300,7 @@ rtc_library("video_codec_interface") {
"../../common_video",
"../../common_video:frame_instrumentation_data",
"../../common_video/generic_frame_descriptor",
"../../rtc_base:checks",
"../../rtc_base/system:rtc_export",
"//third_party/abseil-cpp/absl/types:variant",
]

View File

@ -22,6 +22,7 @@
#include "api/video/video_frame_type.h"
#include "api/video/video_timing.h"
#include "api/video_codecs/video_decoder.h"
#include "rtc_base/checks.h"
namespace webrtc {
@ -67,7 +68,10 @@ class VCMReceiveCallback {
std::optional<uint8_t> qp,
TimeDelta decode_time,
VideoContentType content_type,
VideoFrameType frame_type) = 0;
VideoFrameType frame_type) {
RTC_CHECK_NOTREACHED();
return 0;
}
// TODO: bugs.webrtc.org/358039777 - Make this pure virtual.
virtual int32_t OnFrameToRender(const struct FrameToRender& arguments) {