Currently, webrtc::VideoEncoders are supposed to be deleted through the factory that created them with the WebRtcVideoEncoderFactory::DestroyVideoEncoder method. In practice, we sometimes use this method and sometimes we just call delete on the webrtc::VideoEncoder pointer. We want to be able to consistently use the normal destructor of webrtc::VideoEncoder instead of having to call DestroyVideoEncoder so that we can put webrtc::VideoEncoder inside an std::unique_ptr and make ownership more clear. As part of webrtc:7925 we also want to make a new encoder factory class that does not have the DestroyVideoEncoder() method, and this CL is a step in that direction. This CL introduces a helper function CreateScopedVideoEncoder that takes a webrtc::VideoEncoder and a WebRtcVideoEncoderFactory pointer, and returns a new webrtc::VideoEncoder instance that can be deleted through the regular destructor. This CL also removes WebRtcSimulcastEncoderFactory that almost only contains logic for handling the DestroyVideoEncoder calls that we no longer need, and inlines the rest of the logic inside the WebRtcVideoChannel::WebRtcVideoSendStream::CreateVideoEncoder method. BUG=webrtc:7925 Review-Url: https://codereview.webrtc.org/3007643002 Cr-Commit-Position: refs/heads/master@{#19564}
Name: WebRTC URL: http://www.webrtc.org Version: 90 License: BSD License File: LICENSE Description: WebRTC provides real time voice and video processing functionality to enable the implementation of PeerConnection/MediaStream. Third party code used in this project is described in the file LICENSE_THIRD_PARTY.