Add move operations to EncoderSettings EncoderSettings declares a copy constructor and a copy assignment operator, so it has no implicit move operations, and std::move on an EncoderSettings copies it, including its VideoEncoderConfig and EncoderInfo. For example, SetEncoderSettings() in VideoStreamEncoderResourceManager and OnEncoderSettingsUpdated() in BitrateConstraint take the settings by value and move them into a member, which made a copy. Add a defaulted move constructor and move assignment operator. Like the existing copy operations, they are defined out of line. Also avoid the two copies made in VideoStreamEncoder::OnEncoderSettingsChanged(): VideoStreamInputStateProvider only reads the settings, so take them by const reference in its OnEncoderSettingsChanged(). Call that before SetEncoderSettings(), which neither reads from nor writes to the input state provider, so that the settings can be moved into SetEncoderSettings(). Read the screenshare and zero-hertz flags from `encoder_config_`, which the settings' config is a copy of. An encoder settings change now copies EncoderSettings once, into BitrateConstraint, instead of five times. Bug: webrtc:374845009 Change-Id: I06419eda299836ae282ef88b95a1a1c6c8a4bb1f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/507860 Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#48821}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.