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

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.cc

Issue 2514553003: Change rtc::TimeNanos and rtc::TimeMicros return value from uint64_t to int64_t. (Closed)
Patch Set: Rebased, on top of fixed BoringSSL TimeCallback.' Created 4 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 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 bool write_success = frame_writer_->WriteFrame(image_buffer.get()); 378 bool write_success = frame_writer_->WriteFrame(image_buffer.get());
379 RTC_DCHECK(write_success); 379 RTC_DCHECK(write_success);
380 if (!write_success) { 380 if (!write_success) {
381 fprintf(stderr, "Failed to write frame %d to disk!", frame_number); 381 fprintf(stderr, "Failed to write frame %d to disk!", frame_number);
382 } 382 }
383 } 383 }
384 } 384 }
385 385
386 int VideoProcessorImpl::GetElapsedTimeMicroseconds(int64_t start, 386 int VideoProcessorImpl::GetElapsedTimeMicroseconds(int64_t start,
387 int64_t stop) { 387 int64_t stop) {
388 uint64_t encode_time = (stop - start) / rtc::kNumNanosecsPerMicrosec; 388 int64_t encode_time = (stop - start) / rtc::kNumNanosecsPerMicrosec;
389 RTC_DCHECK_LT(encode_time, 389 RTC_DCHECK_GE(encode_time, std::numeric_limits<int>::min());
390 static_cast<unsigned int>(std::numeric_limits<int>::max())); 390 RTC_DCHECK_LE(encode_time, std::numeric_limits<int>::max());
391 return static_cast<int>(encode_time); 391 return static_cast<int>(encode_time);
392 } 392 }
393 393
394 const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e) { 394 const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e) {
395 switch (e) { 395 switch (e) {
396 case kExcludeOnlyFirstKeyFrame: 396 case kExcludeOnlyFirstKeyFrame:
397 return "ExcludeOnlyFirstKeyFrame"; 397 return "ExcludeOnlyFirstKeyFrame";
398 case kExcludeAllKeyFrames: 398 case kExcludeAllKeyFrames:
399 return "ExcludeAllKeyFrames"; 399 return "ExcludeAllKeyFrames";
400 default: 400 default:
(...skipping 17 matching lines...) Expand all
418 } 418 }
419 int32_t VideoProcessorImpl::VideoProcessorDecodeCompleteCallback::Decoded( 419 int32_t VideoProcessorImpl::VideoProcessorDecodeCompleteCallback::Decoded(
420 VideoFrame& image) { 420 VideoFrame& image) {
421 // Forward to parent class. 421 // Forward to parent class.
422 video_processor_->FrameDecoded(image); 422 video_processor_->FrameDecoded(image);
423 return 0; 423 return 0;
424 } 424 }
425 425
426 } // namespace test 426 } // namespace test
427 } // namespace webrtc 427 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_capture/test/video_capture_unittest.cc ('k') | webrtc/stats/rtcstatsreport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698