Update ObjCVideoEncoder to use GetEncoderInfo()
This method replaces GetScalingSettings(), GetImpementationName() and SupportsNativeHandle(). Bug: webrtc:9890 Change-Id: I8a4b13414f66c41f6697ed84854424ab2d8e18e4 Reviewed-on: https://webrtc-review.googlesource.com/c/109460 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25538}
This commit is contained in:
@ -90,16 +90,17 @@ class ObjCVideoEncoder : public VideoEncoder {
|
||||
return [encoder_ setBitrate:bitrate framerate:framerate];
|
||||
}
|
||||
|
||||
bool SupportsNativeHandle() const { return true; }
|
||||
VideoEncoder::EncoderInfo GetEncoderInfo() const {
|
||||
EncoderInfo info;
|
||||
info.supports_native_handle = true;
|
||||
info.implementation_name = implementation_name_;
|
||||
|
||||
VideoEncoder::ScalingSettings GetScalingSettings() const {
|
||||
RTCVideoEncoderQpThresholds *qp_thresholds = [encoder_ scalingSettings];
|
||||
return qp_thresholds ? ScalingSettings(qp_thresholds.low, qp_thresholds.high) :
|
||||
ScalingSettings::kOff;
|
||||
info.scaling_settings = qp_thresholds ? ScalingSettings(qp_thresholds.low, qp_thresholds.high) :
|
||||
ScalingSettings::kOff;
|
||||
return info;
|
||||
}
|
||||
|
||||
const char *ImplementationName() const { return implementation_name_.c_str(); }
|
||||
|
||||
private:
|
||||
id<RTCVideoEncoder> encoder_;
|
||||
const std::string implementation_name_;
|
||||
|
||||
Reference in New Issue
Block a user