[Overuse] Setting encoder configurations through the interface.
This squashes together several input signals that were spread out through several calls into a single method and calling place: SetEncoderSettings(), invoked from ReconfigureEncoder(). This is added to the abstract interface. This makes the following methods obsolete which are removed: - SetEncoder(): The VideoEncoder was only used for GetEncoderInfo(); the VideoEncoder::EncoderInfo is now part of the EncoderSettings. - SetEncoderConfig(): The VideoEncoderConfig is part of EncoderSettings. The config is used for its codec_type and content_type enums. - SetCodecMaxFrameRate(): The max frame rate was the same as VideoCodec::maxFramerate. VideoCodec is now part of EncoderSettings. There may be some overlap in information between EncoderConfig and VideoCodec, but that is outside the scope of this CL, which only makes sure to bundle encoder settings-like information into one input signal. Bug: webrtc:11222 Change-Id: I67c49c49c0a859cb7d5051939a461593c695a789 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166602 Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Evan Shrubsole <eshr@google.com> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30332}
This commit is contained in:
committed by
Commit Bot
parent
b7dc45f8e8
commit
4bab2fcf6b
@ -48,7 +48,6 @@ const int kHeight = 240;
|
||||
const int kNumCores = 2;
|
||||
const uint32_t kFramerate = 30;
|
||||
const size_t kMaxPayloadSize = 800;
|
||||
const int kDefaultMinPixelsPerFrame = 320 * 180;
|
||||
const int kLowThreshold = 10;
|
||||
const int kHighThreshold = 20;
|
||||
|
||||
|
||||
@ -34,6 +34,8 @@ class RTPFragmentationHeader;
|
||||
// TODO(pbos): Expose these through a public (root) header or change these APIs.
|
||||
struct CodecSpecificInfo;
|
||||
|
||||
constexpr int kDefaultMinPixelsPerFrame = 320 * 180;
|
||||
|
||||
class EncodedImageCallback {
|
||||
public:
|
||||
virtual ~EncodedImageCallback() {}
|
||||
@ -115,7 +117,7 @@ class RTC_EXPORT VideoEncoder {
|
||||
// TODO(kthelgason): Lower this limit when better testing
|
||||
// on MediaCodec and fallback implementations are in place.
|
||||
// See https://bugs.chromium.org/p/webrtc/issues/detail?id=7206
|
||||
int min_pixels_per_frame = 320 * 180;
|
||||
int min_pixels_per_frame = kDefaultMinPixelsPerFrame;
|
||||
|
||||
private:
|
||||
// Private constructor; to get an object without thresholds, use
|
||||
|
||||
Reference in New Issue
Block a user