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

Side by Side Diff: media/cast/test/simulator.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 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 // Simulate end to end streaming. 5 // Simulate end to end streaming.
6 // 6 //
7 // Input: 7 // Input:
8 // --source= 8 // --source=
9 // WebM used as the source of video and audio frames. 9 // WebM used as the source of video and audio frames.
10 // --output= 10 // --output=
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // * Total video frames captured. 521 // * Total video frames captured.
522 // * Total video frames encoded. 522 // * Total video frames encoded.
523 // * Total video frames dropped. 523 // * Total video frames dropped.
524 // * Total video frames received late. 524 // * Total video frames received late.
525 // * Average target bitrate. 525 // * Average target bitrate.
526 // * Average encoded bitrate. 526 // * Average encoded bitrate.
527 int total_video_frames = 0; 527 int total_video_frames = 0;
528 int encoded_video_frames = 0; 528 int encoded_video_frames = 0;
529 int dropped_video_frames = 0; 529 int dropped_video_frames = 0;
530 int late_video_frames = 0; 530 int late_video_frames = 0;
531 int64 total_delay_of_late_frames_ms = 0; 531 int64_t total_delay_of_late_frames_ms = 0;
532 int64 encoded_size = 0; 532 int64_t encoded_size = 0;
533 int64 target_bitrate = 0; 533 int64_t target_bitrate = 0;
534 for (size_t i = 0; i < video_frame_events.size(); ++i) { 534 for (size_t i = 0; i < video_frame_events.size(); ++i) {
535 const media::cast::proto::AggregatedFrameEvent& event = 535 const media::cast::proto::AggregatedFrameEvent& event =
536 *video_frame_events[i]; 536 *video_frame_events[i];
537 ++total_video_frames; 537 ++total_video_frames;
538 if (event.has_encoded_frame_size()) { 538 if (event.has_encoded_frame_size()) {
539 ++encoded_video_frames; 539 ++encoded_video_frames;
540 encoded_size += event.encoded_frame_size(); 540 encoded_size += event.encoded_frame_size();
541 target_bitrate += event.target_bitrate(); 541 target_bitrate += event.target_bitrate();
542 } else { 542 } else {
543 ++dropped_video_frames; 543 ++dropped_video_frames;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 values.SetString("sim-id", sim_id); 722 values.SetString("sim-id", sim_id);
723 723
724 std::string extra_data; 724 std::string extra_data;
725 base::JSONWriter::Write(values, &extra_data); 725 base::JSONWriter::Write(values, &extra_data);
726 726
727 // Run. 727 // Run.
728 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, 728 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path,
729 yuv_output_path, extra_data, model); 729 yuv_output_path, extra_data, model);
730 return 0; 730 return 0;
731 } 731 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698