webrtc/api/frame_transformer_factory.cc
Harald Alvestrand 5c4509a604 Add a clone method to the video frame transformer API.
This will clone an encoded video frame into a sender frame,
preserving metadata as much as possible.

Bug: webrtc:14708
Change-Id: I6f68d2ee65ef85c32cc3c142a41346b81ba73533
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284701
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38733}
2022-11-25 11:18:22 +00:00

33 lines
1 KiB
C++

/*
* Copyright 2022 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/frame_transformer_factory.h"
#include "modules/rtp_rtcp/source/rtp_sender_video_frame_transformer_delegate.h"
namespace webrtc {
std::unique_ptr<TransformableVideoFrameInterface> CreateVideoSenderFrame() {
RTC_CHECK_NOTREACHED();
return nullptr;
}
std::unique_ptr<TransformableVideoFrameInterface> CreateVideoReceiverFrame() {
RTC_CHECK_NOTREACHED();
return nullptr;
}
std::unique_ptr<TransformableVideoFrameInterface> CloneVideoFrame(
TransformableVideoFrameInterface* original) {
// At the moment, only making sender frames from receiver frames is supported.
return CloneSenderVideoFrame(original);
}
} // namespace webrtc