Make AudioEncoder::GetFrameLengthRange() pure virtual.
In order for WebRTC to be able to include packet overhead in its bitrate calculations, the AudioEncoder::GetFrameLengthRange() function must be implemented by all audio encoders. Making this member function pure virtual as per the following PSA: https://groups.google.com/forum/#!topic/discuss-webrtc/qscwYr38je0 Bug: webrtc:11427 Change-Id: I30d297ef05f57453bfc257624729559057cad118 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171517 Commit-Queue: Ali Tofigh <alito@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31127}
This commit is contained in:
@ -110,9 +110,4 @@ ANAStats AudioEncoder::GetANAStats() const {
|
||||
return ANAStats();
|
||||
}
|
||||
|
||||
absl::optional<std::pair<TimeDelta, TimeDelta>>
|
||||
AudioEncoder::GetFrameLengthRange() const {
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -244,7 +244,7 @@ class AudioEncoder {
|
||||
// information. This is used to calculated the full bitrate range, including
|
||||
// overhead.
|
||||
virtual absl::optional<std::pair<TimeDelta, TimeDelta>> GetFrameLengthRange()
|
||||
const;
|
||||
const = 0;
|
||||
|
||||
protected:
|
||||
// Subclasses implement this to perform the actual encoding. Called by
|
||||
|
||||
Reference in New Issue
Block a user