Reland "Use the factory instead of using the builtin code path in VideoCodecInitializer
"
Compared the original CL: https://webrtc-review.googlesource.com/c/src/+/94782 This new CL added backward compatible functions to WebRtcMediaEngineFactory so that internal projects will not be broken. Because of that, now we can revert all the changes to SDK and PeerConnection and do it in following CLs. This makes this CL cleaner. One temporary disadvantage of this is the media engine now need to take a dependency onto builtin video bitrate factory, but practically it just moved code around and should not result in a large binary size change. We can remove this dependency later if needed. Bug: webrtc:9513 Change-Id: I38708762ff365e4ca05974b99fac71edc739a756 Reviewed-on: https://webrtc-review.googlesource.com/c/109040 Commit-Queue: Jiawei Ou <ouj@fb.com> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Reviewed-by: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25574}
This commit is contained in:
@ -30,15 +30,9 @@ class VideoCodecInitializer {
|
||||
// type used. For instance, VP8 will create an allocator than can handle
|
||||
// simulcast and temporal layering.
|
||||
// GetBitrateAllocator is called implicitly from here, no need to call again.
|
||||
static bool SetupCodec(
|
||||
const VideoEncoderConfig& config,
|
||||
const std::vector<VideoStream>& streams,
|
||||
VideoCodec* codec,
|
||||
std::unique_ptr<VideoBitrateAllocator>* bitrate_allocator = nullptr);
|
||||
|
||||
// Create a bitrate allocator for the specified codec.
|
||||
static std::unique_ptr<VideoBitrateAllocator> CreateBitrateAllocator(
|
||||
const VideoCodec& codec);
|
||||
static bool SetupCodec(const VideoEncoderConfig& config,
|
||||
const std::vector<VideoStream>& streams,
|
||||
VideoCodec* codec);
|
||||
|
||||
private:
|
||||
static VideoCodec VideoEncoderConfigToVideoCodec(
|
||||
|
Reference in New Issue
Block a user