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

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

Issue 2103043005: media/cast/sender: Rename deadline_utilization to encoder_utilization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « media/cast/sender/fake_software_video_encoder.cc ('k') | media/cast/sender/h264_vt_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_sender.h" 5 #include "media/cast/sender/frame_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 std::unique_ptr<FrameEvent> encode_event(new FrameEvent()); 266 std::unique_ptr<FrameEvent> encode_event(new FrameEvent());
267 encode_event->timestamp = encoded_frame->encode_completion_time; 267 encode_event->timestamp = encoded_frame->encode_completion_time;
268 encode_event->type = FRAME_ENCODED; 268 encode_event->type = FRAME_ENCODED;
269 encode_event->media_type = is_audio_ ? AUDIO_EVENT : VIDEO_EVENT; 269 encode_event->media_type = is_audio_ ? AUDIO_EVENT : VIDEO_EVENT;
270 encode_event->rtp_timestamp = encoded_frame->rtp_timestamp; 270 encode_event->rtp_timestamp = encoded_frame->rtp_timestamp;
271 encode_event->frame_id = frame_id; 271 encode_event->frame_id = frame_id;
272 encode_event->size = base::checked_cast<uint32_t>(encoded_frame->data.size()); 272 encode_event->size = base::checked_cast<uint32_t>(encoded_frame->data.size());
273 encode_event->key_frame = encoded_frame->dependency == EncodedFrame::KEY; 273 encode_event->key_frame = encoded_frame->dependency == EncodedFrame::KEY;
274 encode_event->target_bitrate = requested_bitrate_before_encode; 274 encode_event->target_bitrate = requested_bitrate_before_encode;
275 encode_event->encoder_cpu_utilization = encoded_frame->deadline_utilization; 275 encode_event->encoder_cpu_utilization = encoded_frame->encoder_utilization;
276 encode_event->idealized_bitrate_utilization = 276 encode_event->idealized_bitrate_utilization =
277 encoded_frame->lossy_utilization; 277 encoded_frame->lossy_utilization;
278 cast_environment_->logger()->DispatchFrameEvent(std::move(encode_event)); 278 cast_environment_->logger()->DispatchFrameEvent(std::move(encode_event));
279 279
280 RecordLatestFrameTimestamps(frame_id, 280 RecordLatestFrameTimestamps(frame_id,
281 encoded_frame->reference_time, 281 encoded_frame->reference_time,
282 encoded_frame->rtp_timestamp); 282 encoded_frame->rtp_timestamp);
283 283
284 if (!is_audio_) { 284 if (!is_audio_) {
285 // Used by chrome/browser/extension/api/cast_streaming/performance_test.cc 285 // Used by chrome/browser/extension/api/cast_streaming/performance_test.cc
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 VLOG(1) << SENDER_SSRC << "Dropping: In-flight duration would be too high."; 460 VLOG(1) << SENDER_SSRC << "Dropping: In-flight duration would be too high.";
461 return true; 461 return true;
462 } 462 }
463 463
464 // Next frame is accepted. 464 // Next frame is accepted.
465 return false; 465 return false;
466 } 466 }
467 467
468 } // namespace cast 468 } // namespace cast
469 } // namespace media 469 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/fake_software_video_encoder.cc ('k') | media/cast/sender/h264_vt_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698