From 5f324db7fa83174f312019ba5c74c1b49039eaf1 Mon Sep 17 00:00:00 2001 From: Byoungchan Lee Date: Wed, 23 Oct 2024 12:19:39 +0900 Subject: [PATCH] Cleanup unused Obj-C VideoFrame constructors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These interfaces were deprecated 6 years ago and have not been functional for a long time. It is safe to remove them. Bug: None Change-Id: Icbc85758551a96b8da10fbf16a1771c3641d1ac3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366500 Reviewed-by: Kári Helgason Auto-Submit: Daniel.L (Byoungchan) Lee Commit-Queue: Kári Helgason Cr-Commit-Position: refs/heads/main@{#43291} --- sdk/objc/base/RTCVideoFrame.h | 23 ----------------------- sdk/objc/base/RTCVideoFrame.mm | 20 -------------------- 2 files changed, 43 deletions(-) diff --git a/sdk/objc/base/RTCVideoFrame.h b/sdk/objc/base/RTCVideoFrame.h index b004e211f5..5e8ee143a1 100644 --- a/sdk/objc/base/RTCVideoFrame.h +++ b/sdk/objc/base/RTCVideoFrame.h @@ -47,29 +47,6 @@ RTC_OBJC_EXPORT - (instancetype)init NS_UNAVAILABLE; - (instancetype)new NS_UNAVAILABLE; -/** Initialize an RTCVideoFrame from a pixel buffer, rotation, and timestamp. - * Deprecated - initialize with a RTCCVPixelBuffer instead - */ -- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer - rotation:(RTCVideoRotation)rotation - timeStampNs:(int64_t)timeStampNs - DEPRECATED_MSG_ATTRIBUTE("use initWithBuffer instead"); - -/** Initialize an RTCVideoFrame from a pixel buffer combined with cropping and - * scaling. Cropping will be applied first on the pixel buffer, followed by - * scaling to the final resolution of scaledWidth x scaledHeight. - */ -- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer - scaledWidth:(int)scaledWidth - scaledHeight:(int)scaledHeight - cropWidth:(int)cropWidth - cropHeight:(int)cropHeight - cropX:(int)cropX - cropY:(int)cropY - rotation:(RTCVideoRotation)rotation - timeStampNs:(int64_t)timeStampNs - DEPRECATED_MSG_ATTRIBUTE("use initWithBuffer instead"); - /** Initialize an RTCVideoFrame from a frame buffer, rotation, and timestamp. */ - (instancetype)initWithBuffer:(id)frameBuffer diff --git a/sdk/objc/base/RTCVideoFrame.mm b/sdk/objc/base/RTCVideoFrame.mm index a5d23bb4b8..cf73ca5df8 100644 --- a/sdk/objc/base/RTCVideoFrame.mm +++ b/sdk/objc/base/RTCVideoFrame.mm @@ -43,26 +43,6 @@ timeStampNs:_timeStampNs]; } -- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer - rotation:(RTCVideoRotation)rotation - timeStampNs:(int64_t)timeStampNs { - // Deprecated. - return nil; -} - -- (instancetype)initWithPixelBuffer:(CVPixelBufferRef)pixelBuffer - scaledWidth:(int)scaledWidth - scaledHeight:(int)scaledHeight - cropWidth:(int)cropWidth - cropHeight:(int)cropHeight - cropX:(int)cropX - cropY:(int)cropY - rotation:(RTCVideoRotation)rotation - timeStampNs:(int64_t)timeStampNs { - // Deprecated. - return nil; -} - - (instancetype)initWithBuffer:(id)buffer rotation:(RTCVideoRotation)rotation timeStampNs:(int64_t)timeStampNs {