mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 13:50:40 +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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
|
||||||
numberOfCores:(int)numberOfCores {
|
|
||||||
RTC_NOTREACHED();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger)releaseDecoder {
|
- (NSInteger)releaseDecoder {
|
||||||
RTC_NOTREACHED();
|
RTC_NOTREACHED();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -26,9 +26,7 @@ RTC_OBJC_EXPORT
|
||||||
@protocol RTCVideoDecoder <NSObject>
|
@protocol RTCVideoDecoder <NSObject>
|
||||||
|
|
||||||
- (void)setCallback:(RTCVideoDecoderCallback)callback;
|
- (void)setCallback:(RTCVideoDecoderCallback)callback;
|
||||||
- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores;
|
||||||
numberOfCores:(int)numberOfCores
|
|
||||||
DEPRECATED_MSG_ATTRIBUTE("use startDecodeWithNumberOfCores: instead");
|
|
||||||
- (NSInteger)releaseDecoder;
|
- (NSInteger)releaseDecoder;
|
||||||
- (NSInteger)decode:(RTCEncodedImage *)encodedImage
|
- (NSInteger)decode:(RTCEncodedImage *)encodedImage
|
||||||
missingFrames:(BOOL)missingFrames
|
missingFrames:(BOOL)missingFrames
|
||||||
|
@ -36,10 +34,6 @@ RTC_OBJC_EXPORT
|
||||||
renderTimeMs:(int64_t)renderTimeMs;
|
renderTimeMs:(int64_t)renderTimeMs;
|
||||||
- (NSString *)implementationName;
|
- (NSString *)implementationName;
|
||||||
|
|
||||||
// TODO(andersc): Make non-optional when `startDecodeWithSettings:numberOfCores:` is removed.
|
|
||||||
@optional
|
|
||||||
- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|
|
@ -96,11 +96,6 @@ void decompressionOutputCallback(void *decoderRef,
|
||||||
return WEBRTC_VIDEO_CODEC_OK;
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
|
|
||||||
numberOfCores:(int)numberOfCores {
|
|
||||||
return WEBRTC_VIDEO_CODEC_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger)decode:(RTCEncodedImage *)inputImage
|
- (NSInteger)decode:(RTCEncodedImage *)inputImage
|
||||||
missingFrames:(BOOL)missingFrames
|
missingFrames:(BOOL)missingFrames
|
||||||
codecSpecificInfo:(nullable id<RTCCodecSpecificInfo>)info
|
codecSpecificInfo:(nullable id<RTCCodecSpecificInfo>)info
|
||||||
|
|
|
@ -38,15 +38,7 @@ class ObjCVideoDecoder : public VideoDecoder {
|
||||||
: decoder_(decoder), implementation_name_([decoder implementationName].stdString) {}
|
: decoder_(decoder), implementation_name_([decoder implementationName].stdString) {}
|
||||||
|
|
||||||
int32_t InitDecode(const VideoCodec *codec_settings, int32_t number_of_cores) override {
|
int32_t InitDecode(const VideoCodec *codec_settings, int32_t number_of_cores) override {
|
||||||
if ([decoder_ respondsToSelector:@selector(startDecodeWithNumberOfCores:)]) {
|
return [decoder_ startDecodeWithNumberOfCores:number_of_cores];
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Decode(const EncodedImage &input_image,
|
int32_t Decode(const EncodedImage &input_image,
|
||||||
|
|
Loading…
Reference in a new issue