OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Joint encoder and decoder testing. | 5 // Joint encoder and decoder testing. |
6 // These tests operate directly on the VP8 encoder and decoder, not the | 6 // These tests operate directly on the VP8 encoder and decoder, not the |
7 // transport layer, and are targeted at validating the bit stream. | 7 // transport layer, and are targeted at validating the bit stream. |
8 | 8 |
9 #include <gtest/gtest.h> | 9 #include <gtest/gtest.h> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 scoped_ptr<Vp8Encoder> encoder_; | 70 scoped_ptr<Vp8Encoder> encoder_; |
71 scoped_ptr<Vp8Decoder> decoder_; | 71 scoped_ptr<Vp8Decoder> decoder_; |
72 scoped_ptr<I420VideoFrame> video_frame_; | 72 scoped_ptr<I420VideoFrame> video_frame_; |
73 }; | 73 }; |
74 | 74 |
75 TEST_F(EncodeDecodeTest, BasicEncodeDecode) { | 75 TEST_F(EncodeDecodeTest, BasicEncodeDecode) { |
76 EncodedVideoFrame encoded_frame; | 76 EncodedVideoFrame encoded_frame; |
77 I420VideoFrame decoded_frame; | 77 I420VideoFrame decoded_frame; |
78 // Encode frame. | 78 // Encode frame. |
79 encoder_->Encode(*(video_frame_.get()), &encoded_frame); | 79 encoder_->Encode(*(video_frame_.get()), &encoded_frame); |
| 80 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0)); |
80 // Decode frame. | 81 // Decode frame. |
81 decoder_->Decode(encoded_frame, &decoded_frame); | 82 decoder_->Decode(encoded_frame, &decoded_frame); |
82 // Validate data. | 83 // Validate data. |
83 Compare(*(video_frame_.get()), decoded_frame); | 84 Compare(*(video_frame_.get()), decoded_frame); |
84 } | 85 } |
85 | 86 |
86 } // namespace cast | 87 } // namespace cast |
87 } // namespace media | 88 } // namespace media |
OLD | NEW |