| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 class Vp8UnitTestDecodeCompleteCallback : public webrtc::DecodedImageCallback { | 91 class Vp8UnitTestDecodeCompleteCallback : public webrtc::DecodedImageCallback { |
| 92 public: | 92 public: |
| 93 explicit Vp8UnitTestDecodeCompleteCallback(rtc::Optional<VideoFrame>* frame) | 93 explicit Vp8UnitTestDecodeCompleteCallback(rtc::Optional<VideoFrame>* frame) |
| 94 : decoded_frame_(frame), decode_complete(false) {} | 94 : decoded_frame_(frame), decode_complete(false) {} |
| 95 int32_t Decoded(VideoFrame& frame) override; | 95 int32_t Decoded(VideoFrame& frame) override; |
| 96 int32_t Decoded(VideoFrame& frame, int64_t decode_time_ms) override { | 96 int32_t Decoded(VideoFrame& frame, int64_t decode_time_ms) override { |
| 97 RTC_NOTREACHED(); | 97 RTC_NOTREACHED(); |
| 98 return -1; | 98 return -1; |
| 99 } | 99 } |
| 100 int32_t DecodedWithQp(VideoFrame& frame, int qp) override { |
| 101 RTC_NOTREACHED(); |
| 102 return -1; |
| 103 } |
| 104 int32_t DecodedWithQp(VideoFrame& frame, |
| 105 int64_t decode_time_ms, |
| 106 int qp) override { |
| 107 RTC_NOTREACHED(); |
| 108 return -1; |
| 109 } |
| 100 bool DecodeComplete(); | 110 bool DecodeComplete(); |
| 101 | 111 |
| 102 private: | 112 private: |
| 103 rtc::Optional<VideoFrame>* decoded_frame_; | 113 rtc::Optional<VideoFrame>* decoded_frame_; |
| 104 bool decode_complete; | 114 bool decode_complete; |
| 105 }; | 115 }; |
| 106 | 116 |
| 107 bool Vp8UnitTestDecodeCompleteCallback::DecodeComplete() { | 117 bool Vp8UnitTestDecodeCompleteCallback::DecodeComplete() { |
| 108 if (decode_complete) { | 118 if (decode_complete) { |
| 109 decode_complete = false; | 119 decode_complete = false; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 decoder_->Decode(encoded_frame_, false, NULL)); | 291 decoder_->Decode(encoded_frame_, false, NULL)); |
| 282 // Now setting a key frame. | 292 // Now setting a key frame. |
| 283 encoded_frame_._frameType = kVideoFrameKey; | 293 encoded_frame_._frameType = kVideoFrameKey; |
| 284 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, | 294 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, |
| 285 decoder_->Decode(encoded_frame_, false, NULL)); | 295 decoder_->Decode(encoded_frame_, false, NULL)); |
| 286 ASSERT_TRUE(decoded_frame_); | 296 ASSERT_TRUE(decoded_frame_); |
| 287 EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36); | 297 EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36); |
| 288 } | 298 } |
| 289 | 299 |
| 290 } // namespace webrtc | 300 } // namespace webrtc |
| OLD | NEW |