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 Decoded(VideoFrame& frame, int64_t decode_time_ms, int qp) override { |
| 101 RTC_NOTREACHED(); |
| 102 return -1; |
| 103 } |
100 bool DecodeComplete(); | 104 bool DecodeComplete(); |
101 | 105 |
102 private: | 106 private: |
103 rtc::Optional<VideoFrame>* decoded_frame_; | 107 rtc::Optional<VideoFrame>* decoded_frame_; |
104 bool decode_complete; | 108 bool decode_complete; |
105 }; | 109 }; |
106 | 110 |
107 bool Vp8UnitTestDecodeCompleteCallback::DecodeComplete() { | 111 bool Vp8UnitTestDecodeCompleteCallback::DecodeComplete() { |
108 if (decode_complete) { | 112 if (decode_complete) { |
109 decode_complete = false; | 113 decode_complete = false; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 decoder_->Decode(encoded_frame_, false, NULL)); | 285 decoder_->Decode(encoded_frame_, false, NULL)); |
282 // Now setting a key frame. | 286 // Now setting a key frame. |
283 encoded_frame_._frameType = kVideoFrameKey; | 287 encoded_frame_._frameType = kVideoFrameKey; |
284 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, | 288 EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, |
285 decoder_->Decode(encoded_frame_, false, NULL)); | 289 decoder_->Decode(encoded_frame_, false, NULL)); |
286 ASSERT_TRUE(decoded_frame_); | 290 ASSERT_TRUE(decoded_frame_); |
287 EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36); | 291 EXPECT_GT(I420PSNR(input_frame_.get(), &*decoded_frame_), 36); |
288 } | 292 } |
289 | 293 |
290 } // namespace webrtc | 294 } // namespace webrtc |
OLD | NEW |