Delete objc RTCRtpFragmentationHeader

Bug: webrtc:6471
Change-Id: I1d5f4fc2484c4f37ff8556ac660a1c0d070875f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191443
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32640}
This commit is contained in:
Niels Möller
2020-11-17 15:38:33 +01:00
committed by Commit Bot
parent f08db1be94
commit a805dd8b81
7 changed files with 3 additions and 65 deletions

View File

@ -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",

View File

@ -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_

View File

@ -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 <Foundation/Foundation.h>
#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<NSNumber *> *fragmentationOffset;
@property(nonatomic, strong) NSArray<NSNumber *> *fragmentationLength;
@property(nonatomic, strong) NSArray<NSNumber *> *fragmentationTimeDiff;
@property(nonatomic, strong) NSArray<NSNumber *> *fragmentationPlType;
@end
NS_ASSUME_NONNULL_END

View File

@ -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

View File

@ -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<RTC_OBJC_TYPE(RTCCodecSpecificInfo)> info,
RTC_OBJC_TYPE(RTCRtpFragmentationHeader) * header);
id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)> info);
/** Protocol for encoder implementations. */
RTC_OBJC_EXPORT

View File

@ -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;

View File

@ -50,8 +50,7 @@ class ObjCVideoEncoder : public VideoEncoder {
int32_t RegisterEncodeCompleteCallback(EncodedImageCallback *callback) override {
[encoder_ setCallback:^BOOL(RTC_OBJC_TYPE(RTCEncodedImage) * _Nonnull frame,
id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)> _Nonnull info,
RTC_OBJC_TYPE(RTCRtpFragmentationHeader) * _Nonnull header) {
id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)> _Nonnull info) {
EncodedImage encodedImage = [frame nativeEncodedImage];
// Handle types that can be converted into one of CodecSpecificInfo's hard coded cases.