mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Remove deprecated method from video decoder interface.
Bug: webrtc:9107 Change-Id: Ice022ff5887d27516eef38f9a0db7391c8acbaef Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133905 Reviewed-by: Anders Carlsson <andersc@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27732}
This commit is contained in:
parent
7e2f6b7d92
commit
d4ea8c90cd
4 changed files with 2 additions and 27 deletions
|
@ -40,12 +40,6 @@
|
|||
return 0;
|
||||
}
|
||||
|
||||
- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
||||
numberOfCores:(int)numberOfCores {
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSInteger)releaseDecoder {
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
|
|
|
@ -26,9 +26,7 @@ RTC_OBJC_EXPORT
|
|||
@protocol RTCVideoDecoder <NSObject>
|
||||
|
||||
- (void)setCallback:(RTCVideoDecoderCallback)callback;
|
||||
- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
||||
numberOfCores:(int)numberOfCores
|
||||
DEPRECATED_MSG_ATTRIBUTE("use startDecodeWithNumberOfCores: instead");
|
||||
- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores;
|
||||
- (NSInteger)releaseDecoder;
|
||||
- (NSInteger)decode:(RTCEncodedImage *)encodedImage
|
||||
missingFrames:(BOOL)missingFrames
|
||||
|
@ -36,10 +34,6 @@ RTC_OBJC_EXPORT
|
|||
renderTimeMs:(int64_t)renderTimeMs;
|
||||
- (NSString *)implementationName;
|
||||
|
||||
// TODO(andersc): Make non-optional when `startDecodeWithSettings:numberOfCores:` is removed.
|
||||
@optional
|
||||
- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
|
|
@ -96,11 +96,6 @@ void decompressionOutputCallback(void *decoderRef,
|
|||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
||||
numberOfCores:(int)numberOfCores {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
- (NSInteger)decode:(RTCEncodedImage *)inputImage
|
||||
missingFrames:(BOOL)missingFrames
|
||||
codecSpecificInfo:(nullable id<RTCCodecSpecificInfo>)info
|
||||
|
|
|
@ -38,15 +38,7 @@ class ObjCVideoDecoder : public VideoDecoder {
|
|||
: decoder_(decoder), implementation_name_([decoder implementationName].stdString) {}
|
||||
|
||||
int32_t InitDecode(const VideoCodec *codec_settings, int32_t number_of_cores) override {
|
||||
if ([decoder_ respondsToSelector:@selector(startDecodeWithNumberOfCores:)]) {
|
||||
return [decoder_ startDecodeWithNumberOfCores:number_of_cores];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
RTCVideoEncoderSettings *settings = [[RTCVideoEncoderSettings alloc] init];
|
||||
return [decoder_ startDecodeWithSettings:settings numberOfCores:number_of_cores];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
return [decoder_ startDecodeWithNumberOfCores:number_of_cores];
|
||||
}
|
||||
|
||||
int32_t Decode(const EncodedImage &input_image,
|
||||
|
|
Loading…
Reference in a new issue