From a805dd8b81f0d40332c1330f49ed065d35576264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Tue, 17 Nov 2020 15:38:33 +0100 Subject: [PATCH] Delete objc RTCRtpFragmentationHeader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:6471 Change-Id: I1d5f4fc2484c4f37ff8556ac660a1c0d070875f6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191443 Reviewed-by: Kári Helgason Reviewed-by: Karl Wiberg Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#32640} --- sdk/BUILD.gn | 4 --- sdk/objc/base/RTCMacros.h | 5 ---- sdk/objc/base/RTCRtpFragmentationHeader.h | 28 ------------------- sdk/objc/base/RTCRtpFragmentationHeader.m | 20 ------------- sdk/objc/base/RTCVideoEncoder.h | 4 +-- .../video_codec/RTCVideoEncoderH264.mm | 4 +-- .../native/src/objc_video_encoder_factory.mm | 3 +- 7 files changed, 3 insertions(+), 65 deletions(-) delete mode 100644 sdk/objc/base/RTCRtpFragmentationHeader.h delete mode 100644 sdk/objc/base/RTCRtpFragmentationHeader.m diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index f793368671..c50c01dabd 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -101,8 +101,6 @@ if (is_ios || is_mac) { "objc/base/RTCMacros.h", "objc/base/RTCMutableI420Buffer.h", "objc/base/RTCMutableYUVPlanarBuffer.h", - "objc/base/RTCRtpFragmentationHeader.h", - "objc/base/RTCRtpFragmentationHeader.m", "objc/base/RTCVideoCapturer.h", "objc/base/RTCVideoCapturer.m", "objc/base/RTCVideoCodecInfo.h", @@ -1185,7 +1183,6 @@ if (is_ios || is_mac) { "objc/base/RTCMacros.h", "objc/base/RTCMutableI420Buffer.h", "objc/base/RTCMutableYUVPlanarBuffer.h", - "objc/base/RTCRtpFragmentationHeader.h", "objc/base/RTCVideoCapturer.h", "objc/base/RTCVideoCodecInfo.h", "objc/base/RTCVideoDecoder.h", @@ -1376,7 +1373,6 @@ if (is_ios || is_mac) { "objc/base/RTCMacros.h", "objc/base/RTCMutableI420Buffer.h", "objc/base/RTCMutableYUVPlanarBuffer.h", - "objc/base/RTCRtpFragmentationHeader.h", "objc/base/RTCVideoCapturer.h", "objc/base/RTCVideoCodecInfo.h", "objc/base/RTCVideoDecoder.h", diff --git a/sdk/objc/base/RTCMacros.h b/sdk/objc/base/RTCMacros.h index e1c46b23bb..e527ff6bc4 100644 --- a/sdk/objc/base/RTCMacros.h +++ b/sdk/objc/base/RTCMacros.h @@ -49,9 +49,4 @@ #define RTC_FWD_DECL_OBJC_CLASS(classname) typedef struct objc_object classname #endif -// TODO(bugs.webrtc.org/6471): This define is a transition aid. It will be -// deleted together with the RTCRtpFragmentationHeader argument to -// RTCVideoEncoderCallback, see RTCVideoEncoder.h. -#define RTC_OBJC_HAVE_LEGACY_RTC_RTP_FRAGMENTATION_HEADER 1 - #endif // SDK_OBJC_BASE_RTCMACROS_H_ diff --git a/sdk/objc/base/RTCRtpFragmentationHeader.h b/sdk/objc/base/RTCRtpFragmentationHeader.h deleted file mode 100644 index 001b4e9deb..0000000000 --- a/sdk/objc/base/RTCRtpFragmentationHeader.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2017 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. - */ - -#import - -#import "RTCMacros.h" - -NS_ASSUME_NONNULL_BEGIN - -/** Information for header. Corresponds to webrtc::RTPFragmentationHeader. */ -RTC_OBJC_EXPORT -@interface RTC_OBJC_TYPE (RTCRtpFragmentationHeader) : NSObject - -@property(nonatomic, strong) NSArray *fragmentationOffset; -@property(nonatomic, strong) NSArray *fragmentationLength; -@property(nonatomic, strong) NSArray *fragmentationTimeDiff; -@property(nonatomic, strong) NSArray *fragmentationPlType; - -@end - -NS_ASSUME_NONNULL_END diff --git a/sdk/objc/base/RTCRtpFragmentationHeader.m b/sdk/objc/base/RTCRtpFragmentationHeader.m deleted file mode 100644 index 60e2f5d1e6..0000000000 --- a/sdk/objc/base/RTCRtpFragmentationHeader.m +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2017 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. - */ - -#import "RTCRtpFragmentationHeader.h" - -@implementation RTC_OBJC_TYPE (RTCRtpFragmentationHeader) - -@synthesize fragmentationOffset = _fragmentationOffset; -@synthesize fragmentationLength = _fragmentationLength; -@synthesize fragmentationTimeDiff = _fragmentationTimeDiff; -@synthesize fragmentationPlType = _fragmentationPlType; - -@end diff --git a/sdk/objc/base/RTCVideoEncoder.h b/sdk/objc/base/RTCVideoEncoder.h index 7d1a7afd7f..29e8a89901 100644 --- a/sdk/objc/base/RTCVideoEncoder.h +++ b/sdk/objc/base/RTCVideoEncoder.h @@ -13,7 +13,6 @@ #import "RTCCodecSpecificInfo.h" #import "RTCEncodedImage.h" #import "RTCMacros.h" -#import "RTCRtpFragmentationHeader.h" #import "RTCVideoEncoderQpThresholds.h" #import "RTCVideoEncoderSettings.h" #import "RTCVideoFrame.h" @@ -22,8 +21,7 @@ NS_ASSUME_NONNULL_BEGIN /** Callback block for encoder. */ typedef BOOL (^RTCVideoEncoderCallback)(RTC_OBJC_TYPE(RTCEncodedImage) * frame, - id info, - RTC_OBJC_TYPE(RTCRtpFragmentationHeader) * header); + id info); /** Protocol for encoder implementations. */ RTC_OBJC_EXPORT diff --git a/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm b/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm index 7a853e8d44..03a792672c 100644 --- a/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm +++ b/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm @@ -807,9 +807,7 @@ NSUInteger GetMaxSampleRate(const webrtc::H264::ProfileLevelId &profile_level_id _h264BitstreamParser.GetLastSliceQp(&qp); frame.qp = @(qp); - RTC_OBJC_TYPE(RTCRtpFragmentationHeader) *header = - [[RTC_OBJC_TYPE(RTCRtpFragmentationHeader) alloc] init]; - BOOL res = _callback(frame, codecSpecificInfo, header); + BOOL res = _callback(frame, codecSpecificInfo); if (!res) { RTC_LOG(LS_ERROR) << "Encode callback failed"; return; diff --git a/sdk/objc/native/src/objc_video_encoder_factory.mm b/sdk/objc/native/src/objc_video_encoder_factory.mm index 7ef82f4a67..0175319530 100644 --- a/sdk/objc/native/src/objc_video_encoder_factory.mm +++ b/sdk/objc/native/src/objc_video_encoder_factory.mm @@ -50,8 +50,7 @@ class ObjCVideoEncoder : public VideoEncoder { int32_t RegisterEncodeCompleteCallback(EncodedImageCallback *callback) override { [encoder_ setCallback:^BOOL(RTC_OBJC_TYPE(RTCEncodedImage) * _Nonnull frame, - id _Nonnull info, - RTC_OBJC_TYPE(RTCRtpFragmentationHeader) * _Nonnull header) { + id _Nonnull info) { EncodedImage encodedImage = [frame nativeEncodedImage]; // Handle types that can be converted into one of CodecSpecificInfo's hard coded cases.