Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: media/cast/sender/size_adaptable_video_encoder_base.cc

Issue 1143363005: Revert of [Cast] Compute utilization metrics and add performance overlay. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/sender/size_adaptable_video_encoder_base.h" 5 #include "media/cast/sender/size_adaptable_video_encoder_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "media/base/video_frame.h" 9 #include "media/base/video_frame.h"
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 status == STATUS_INITIALIZED) { 149 status == STATUS_INITIALIZED) {
150 // Begin using the replacement encoder. 150 // Begin using the replacement encoder.
151 frames_in_encoder_ = 0; 151 frames_in_encoder_ = 0;
152 OnEncoderReplaced(encoder_.get()); 152 OnEncoderReplaced(encoder_.get());
153 } 153 }
154 status_change_cb_.Run(status); 154 status_change_cb_.Run(status);
155 } 155 }
156 156
157 void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame( 157 void SizeAdaptableVideoEncoderBase::OnEncodedVideoFrame(
158 const FrameEncodedCallback& frame_encoded_callback, 158 const FrameEncodedCallback& frame_encoded_callback,
159 scoped_ptr<SenderEncodedFrame> encoded_frame) { 159 scoped_ptr<EncodedFrame> encoded_frame) {
160 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 160 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
161 --frames_in_encoder_; 161 --frames_in_encoder_;
162 DCHECK_GE(frames_in_encoder_, 0); 162 DCHECK_GE(frames_in_encoder_, 0);
163 last_frame_id_ = encoded_frame->frame_id; 163 last_frame_id_ = encoded_frame->frame_id;
164 frame_encoded_callback.Run(encoded_frame.Pass()); 164 frame_encoded_callback.Run(encoded_frame.Pass());
165 } 165 }
166 166
167 } // namespace cast 167 } // namespace cast
168 } // namespace media 168 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/size_adaptable_video_encoder_base.h ('k') | media/cast/sender/software_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698