OLD | NEW |
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 Loading... |
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 } | 436 } |
437 int32_t VideoProcessorImpl::VideoProcessorDecodeCompleteCallback::Decoded( | 437 int32_t VideoProcessorImpl::VideoProcessorDecodeCompleteCallback::Decoded( |
438 VideoFrame& image) { | 438 VideoFrame& image) { |
439 // Forward to parent class. | 439 // Forward to parent class. |
440 video_processor_->FrameDecoded(image); | 440 video_processor_->FrameDecoded(image); |
441 return 0; | 441 return 0; |
442 } | 442 } |
443 | 443 |
444 } // namespace test | 444 } // namespace test |
445 } // namespace webrtc | 445 } // namespace webrtc |
OLD | NEW |