| 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 d0133bf80752249a476272d8c4e94b06dc270e84..714009ea8a7467f4eb62c42ee14e3545f3bf91ab 100644
|
| --- a/content/renderer/media/gpu/rtc_video_encoder.cc
|
| +++ b/content/renderer/media/gpu/rtc_video_encoder.cc
|
| @@ -207,6 +207,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_;
|
| @@ -409,6 +412,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);
|
| @@ -426,6 +430,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,
|
| @@ -511,7 +520,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();
|
|
|