libvpx-vp8: Migrate to default member initializations.

Bug: webrtc:11436
Change-Id: I9c7751e63efc51f2bdc3490e014c36e6b35b4b54
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170634
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30835}
This commit is contained in:
Rasmus Brandt
2020-03-19 13:56:42 +01:00
committed by Commit Bot
parent 45cb8f65ba
commit 9ce14e8c50
2 changed files with 11 additions and 21 deletions

View File

@ -281,22 +281,12 @@ LibvpxVp8Encoder::LibvpxVp8Encoder(
rate_control_settings_(RateControlSettings::ParseFromFieldTrials()),
screenshare_max_qp_(
ExperimentalScreenshareSettings::ParseFromFieldTrials().MaxQp()),
encoded_complete_callback_(nullptr),
inited_(false),
timestamp_(0),
qp_max_(56), // Setting for max quantizer.
cpu_speed_default_(-6),
number_of_cores_(0),
rc_max_intra_target_(0),
num_active_streams_(0),
frame_buffer_controller_factory_(
std::move(frame_buffer_controller_factory)),
key_frame_request_(kMaxSimulcastStreams, false),
variable_framerate_experiment_(ParseVariableFramerateConfig(
"WebRTC-VP8VariableFramerateScreenshare")),
framerate_controller_(variable_framerate_experiment_.framerate_limit),
num_steady_state_frames_(0),
fec_controller_override_(nullptr) {
framerate_controller_(variable_framerate_experiment_.framerate_limit) {
// TODO(eladalon/ilnik): These reservations might be wasting memory.
// InitEncode() is resizing to the actual size, which might be smaller.
raw_images_.reserve(kMaxSimulcastStreams);

View File

@ -105,15 +105,15 @@ class LibvpxVp8Encoder : public VideoEncoder {
const RateControlSettings rate_control_settings_;
const absl::optional<int> screenshare_max_qp_;
EncodedImageCallback* encoded_complete_callback_;
EncodedImageCallback* encoded_complete_callback_ = nullptr;
VideoCodec codec_;
bool inited_;
int64_t timestamp_;
int qp_max_;
int cpu_speed_default_;
int number_of_cores_;
uint32_t rc_max_intra_target_;
int num_active_streams_;
bool inited_ = false;
int64_t timestamp_ = 0;
int qp_max_ = 56;
int cpu_speed_default_ = -6;
int number_of_cores_ = 0;
uint32_t rc_max_intra_target_ = 0;
int num_active_streams_ = 0;
const std::unique_ptr<Vp8FrameBufferControllerFactory>
frame_buffer_controller_factory_;
std::unique_ptr<Vp8FrameBufferController> frame_buffer_controller_;
@ -141,9 +141,9 @@ class LibvpxVp8Encoder : public VideoEncoder {
static VariableFramerateExperiment ParseVariableFramerateConfig(
std::string group_name);
FramerateController framerate_controller_;
int num_steady_state_frames_;
int num_steady_state_frames_ = 0;
FecControllerOverride* fec_controller_override_;
FecControllerOverride* fec_controller_override_ = nullptr;
};
} // namespace webrtc