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:
@ -28,8 +28,7 @@ class VideoEncoderFactory {
|
||||
public:
|
||||
// TODO(magjed): Try to get rid of this struct.
|
||||
struct CodecInfo {
|
||||
// |is_hardware_accelerated| is true if the encoders created by this factory
|
||||
// of the given codec will use hardware support.
|
||||
// TODO(nisse): Unused in webrtc, delete as soon as downstream use is fixed.
|
||||
bool is_hardware_accelerated = false;
|
||||
// |has_internal_source| is true if encoders created by this factory of the
|
||||
// given codec will use internal camera sources, meaning that they don't
|
||||
@ -73,8 +72,13 @@ class VideoEncoderFactory {
|
||||
|
||||
// Returns information about how this format will be encoded. The specified
|
||||
// format must be one of the supported formats by this factory.
|
||||
// TODO(magjed): Try to get rid of this method.
|
||||
virtual CodecInfo QueryVideoEncoder(const SdpVideoFormat& format) const = 0;
|
||||
|
||||
// TODO(magjed): Try to get rid of this method. Since is_hardware_accelerated
|
||||
// is unused, only factories producing internal source encoders (in itself a
|
||||
// deprecated feature) needs to override this method.
|
||||
virtual CodecInfo QueryVideoEncoder(const SdpVideoFormat& format) const {
|
||||
return CodecInfo();
|
||||
}
|
||||
|
||||
// Creates a VideoEncoder for the specified format.
|
||||
virtual std::unique_ptr<VideoEncoder> CreateVideoEncoder(
|
||||
|
||||
Reference in New Issue
Block a user