Deprecate write-only member CodecInfo::is_hardware_accelerated
This member of the CodecInfo struct was set in several places, but not used for anything. To aid deletion, this cl defines a default implementation of VideoEncoderFactory::QueryVideoEncoder. The next step is to delete almost all downstream implementations of that method, since the only classes that have to implement it are the few factories that produce "internal source" encoders, e.g., for Chromium remoting. Bug: None Change-Id: I1f0dbf0d302933004ebdc779460cb2cb3a894e02 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179520 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31844}
This commit is contained in:
@ -33,7 +33,6 @@ class ObjCVideoEncoderFactory : public VideoEncoderFactory {
|
||||
std::vector<SdpVideoFormat> GetImplementations() const override;
|
||||
std::unique_ptr<VideoEncoder> CreateVideoEncoder(
|
||||
const SdpVideoFormat& format) override;
|
||||
CodecInfo QueryVideoEncoder(const SdpVideoFormat& format) const override;
|
||||
std::unique_ptr<EncoderSelectorInterface> GetEncoderSelector() const override;
|
||||
|
||||
private:
|
||||
|
||||
@ -174,19 +174,6 @@ std::vector<SdpVideoFormat> ObjCVideoEncoderFactory::GetImplementations() const
|
||||
return GetSupportedFormats();
|
||||
}
|
||||
|
||||
VideoEncoderFactory::CodecInfo ObjCVideoEncoderFactory::QueryVideoEncoder(
|
||||
const SdpVideoFormat &format) const {
|
||||
// TODO(andersc): This is a hack until we figure out how this should be done properly.
|
||||
NSString *formatName = [NSString stringForStdString:format.name];
|
||||
NSSet *wrappedSoftwareFormats =
|
||||
[NSSet setWithObjects:kRTCVideoCodecVp8Name, kRTCVideoCodecVp9Name, nil];
|
||||
|
||||
CodecInfo codec_info;
|
||||
codec_info.is_hardware_accelerated = ![wrappedSoftwareFormats containsObject:formatName];
|
||||
codec_info.has_internal_source = false;
|
||||
return codec_info;
|
||||
}
|
||||
|
||||
std::unique_ptr<VideoEncoder> ObjCVideoEncoderFactory::CreateVideoEncoder(
|
||||
const SdpVideoFormat &format) {
|
||||
RTC_OBJC_TYPE(RTCVideoCodecInfo) *info =
|
||||
|
||||
Reference in New Issue
Block a user