| Index: content/renderer/media/gpu/rtc_video_encoder.cc
|
| diff --git a/content/renderer/media/gpu/rtc_video_encoder.cc b/content/renderer/media/gpu/rtc_video_encoder.cc
|
| index df1fe60c8d19ce59c17cb5d18b9475598e053892..211984142ad76d3894166412b669e694c24b1a68 100644
|
| --- a/content/renderer/media/gpu/rtc_video_encoder.cc
|
| +++ b/content/renderer/media/gpu/rtc_video_encoder.cc
|
| @@ -208,6 +208,9 @@ class RTCVideoEncoder::Impl
|
|
|
| void SetStatus(int32_t status);
|
|
|
| + // Records |failed_timestamp_match_| value after a session.
|
| + void RecordTimestampMatchUMA() const;
|
| +
|
| // This is attached to |gpu_task_runner_|, not the thread class is constructed
|
| // on.
|
| base::ThreadChecker thread_checker_;
|
| @@ -410,6 +413,7 @@ void RTCVideoEncoder::Impl::RequestEncodingParametersChange(
|
| void RTCVideoEncoder::Impl::Destroy(base::WaitableEvent* async_waiter) {
|
| DVLOG(3) << "Impl::Destroy()";
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| + RecordTimestampMatchUMA();
|
| if (video_encoder_) {
|
| video_encoder_.reset();
|
| SetStatus(WEBRTC_VIDEO_CODEC_UNINITIALIZED);
|
| @@ -427,6 +431,11 @@ void RTCVideoEncoder::Impl::SetStatus(int32_t status) {
|
| status_ = status;
|
| }
|
|
|
| +void RTCVideoEncoder::Impl::RecordTimestampMatchUMA() const {
|
| + UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoEncoderTimestampMatchSuccess",
|
| + failed_timestamp_match_ == false);
|
| +}
|
| +
|
| void RTCVideoEncoder::Impl::RequireBitstreamBuffers(
|
| unsigned int input_count,
|
| const gfx::Size& input_coded_size,
|
| @@ -512,7 +521,7 @@ void RTCVideoEncoder::Impl::BitstreamBufferReady(int32_t bitstream_buffer_id,
|
| // Find RTP timestamp by going through |pending_timestamps_|. Derive it from
|
| // capture time otherwise.
|
| base::Optional<uint32_t> rtp_timestamp;
|
| - if (!timestamp.is_zero() && !failed_timestamp_match_) {
|
| + if (!failed_timestamp_match_) {
|
| // Pop timestamps until we have a match.
|
| while (!pending_timestamps_.empty()) {
|
| const auto& front_timestamps = pending_timestamps_.front();
|
|
|