| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM 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 #ifndef TEST_IVF_VIDEO_SOURCE_H_ | 10 #ifndef TEST_IVF_VIDEO_SOURCE_H_ |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 << "Frame is too big for allocated code buffer"; | 87 << "Frame is too big for allocated code buffer"; |
| 88 ASSERT_EQ(frame_sz_, | 88 ASSERT_EQ(frame_sz_, |
| 89 fread(compressed_frame_buf_, 1, frame_sz_, input_file_)) | 89 fread(compressed_frame_buf_, 1, frame_sz_, input_file_)) |
| 90 << "Failed to read complete frame"; | 90 << "Failed to read complete frame"; |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 virtual const uint8_t *cxdata() const { | 94 virtual const uint8_t *cxdata() const { |
| 95 return end_of_file_ ? NULL : compressed_frame_buf_; | 95 return end_of_file_ ? NULL : compressed_frame_buf_; |
| 96 } | 96 } |
| 97 virtual const unsigned int frame_size() const { return frame_sz_; } | 97 virtual size_t frame_size() const { return frame_sz_; } |
| 98 virtual const unsigned int frame_number() const { return frame_; } | 98 virtual unsigned int frame_number() const { return frame_; } |
| 99 | 99 |
| 100 protected: | 100 protected: |
| 101 std::string file_name_; | 101 std::string file_name_; |
| 102 FILE *input_file_; | 102 FILE *input_file_; |
| 103 uint8_t *compressed_frame_buf_; | 103 uint8_t *compressed_frame_buf_; |
| 104 unsigned int frame_sz_; | 104 size_t frame_sz_; |
| 105 unsigned int frame_; | 105 unsigned int frame_; |
| 106 bool end_of_file_; | 106 bool end_of_file_; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace libvpx_test | 109 } // namespace libvpx_test |
| 110 | 110 |
| 111 #endif // TEST_IVF_VIDEO_SOURCE_H_ | 111 #endif // TEST_IVF_VIDEO_SOURCE_H_ |
| OLD | NEW |