The current ObjC HW encoder is implemented as a C++ webrtc::VideoEncoder. We then wrap it two times in the following way: webrtc::VideoEncoder -> RTCVideoEncoder -> webrtc::VideoEncoder. This was originally done to minimize the code diff when landing the injectable encoder. This CL removes the first wrapping and implements the ObjC HW encoder as a RTCVideoEncoder directly. Similarly, the decoder is implemented as a RTCVideoDecoder directly. Based on andersc@ CL: https://codereview.webrtc.org/2978623002/. BUG=webrtc:7924 Review-Url: https://codereview.webrtc.org/2987413002 Cr-Commit-Position: refs/heads/master@{#19255}
38 lines
994 B
Objective-C
38 lines
994 B
Objective-C
/*
|
|
* 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 <WebRTC/RTCMacros.h>
|
|
#import <WebRTC/RTCVideoCodecFactory.h>
|
|
|
|
/** Encoder. */
|
|
RTC_EXPORT
|
|
@interface RTCVideoEncoderH264 : NSObject<RTCVideoEncoder>
|
|
|
|
- (instancetype)initWithCodecInfo:(RTCVideoCodecInfo *)codecInfo;
|
|
|
|
@end
|
|
|
|
/** Decoder. */
|
|
RTC_EXPORT
|
|
@interface RTCVideoDecoderH264 : NSObject<RTCVideoDecoder>
|
|
@end
|
|
|
|
/** Encoder factory. */
|
|
RTC_EXPORT
|
|
@interface RTCVideoEncoderFactoryH264 : NSObject<RTCVideoEncoderFactory>
|
|
@end
|
|
|
|
/** Decoder factory. */
|
|
RTC_EXPORT
|
|
@interface RTCVideoDecoderFactoryH264 : NSObject<RTCVideoDecoderFactory>
|
|
@end
|