| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 13 matching lines...) Expand all Loading... |
| 24 config_ = *config; | 24 config_ = *config; |
| 25 return WEBRTC_VIDEO_CODEC_OK; | 25 return WEBRTC_VIDEO_CODEC_OK; |
| 26 } | 26 } |
| 27 | 27 |
| 28 int32_t FakeDecoder::Decode(const EncodedImage& input, | 28 int32_t FakeDecoder::Decode(const EncodedImage& input, |
| 29 bool missing_frames, | 29 bool missing_frames, |
| 30 const RTPFragmentationHeader* fragmentation, | 30 const RTPFragmentationHeader* fragmentation, |
| 31 const CodecSpecificInfo* codec_specific_info, | 31 const CodecSpecificInfo* codec_specific_info, |
| 32 int64_t render_time_ms) { | 32 int64_t render_time_ms) { |
| 33 VideoFrame frame(I420Buffer::Create(config_.width, config_.height), | 33 VideoFrame frame(I420Buffer::Create(config_.width, config_.height), |
| 34 webrtc::kVideoRotation_0, | 34 webrtc::kVideoRotation_0, webrtc::kVideoContent_Default, |
| 35 render_time_ms * rtc::kNumMicrosecsPerMillisec); | 35 render_time_ms * rtc::kNumMicrosecsPerMillisec); |
| 36 frame.set_timestamp(input._timeStamp); | 36 frame.set_timestamp(input._timeStamp); |
| 37 frame.set_ntp_time_ms(input.ntp_time_ms_); | 37 frame.set_ntp_time_ms(input.ntp_time_ms_); |
| 38 | 38 |
| 39 callback_->Decoded(frame); | 39 callback_->Decoded(frame); |
| 40 | 40 |
| 41 return WEBRTC_VIDEO_CODEC_OK; | 41 return WEBRTC_VIDEO_CODEC_OK; |
| 42 } | 42 } |
| 43 | 43 |
| 44 int32_t FakeDecoder::RegisterDecodeCompleteCallback( | 44 int32_t FakeDecoder::RegisterDecodeCompleteCallback( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 return FakeDecoder::Decode(input, | 78 return FakeDecoder::Decode(input, |
| 79 missing_frames, | 79 missing_frames, |
| 80 fragmentation, | 80 fragmentation, |
| 81 codec_specific_info, | 81 codec_specific_info, |
| 82 render_time_ms); | 82 render_time_ms); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace test | 85 } // namespace test |
| 86 } // namespace webrtc | 86 } // namespace webrtc |
| OLD | NEW |