OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "media/base/video_frame.h" | 5 #include "media/base/video_frame.h" |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/scoped_ptr.h" |
8 #include "base/string_util.h" | 9 #include "base/string_util.h" |
9 #include "media/base/buffers.h" | 10 #include "media/base/buffers.h" |
10 #include "media/base/mock_filters.h" | 11 #include "media/base/mock_filters.h" |
11 #include "media/base/yuv_convert.h" | 12 #include "media/base/yuv_convert.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 | 14 |
14 namespace media { | 15 namespace media { |
15 | 16 |
16 // Helper function that initializes a YV12 frame with white and black scan | 17 // Helper function that initializes a YV12 frame with white and black scan |
17 // lines based on the |white_to_black| parameter. If 0, then the entire | 18 // lines based on the |white_to_black| parameter. If 0, then the entire |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // Test frame properties. | 210 // Test frame properties. |
210 EXPECT_EQ(1, frame->stride(VideoFrame::kRGBPlane)); | 211 EXPECT_EQ(1, frame->stride(VideoFrame::kRGBPlane)); |
211 EXPECT_EQ(memory.get(), frame->data(VideoFrame::kRGBPlane)); | 212 EXPECT_EQ(memory.get(), frame->data(VideoFrame::kRGBPlane)); |
212 | 213 |
213 // Delete |memory| and then |frame|. | 214 // Delete |memory| and then |frame|. |
214 memory.reset(); | 215 memory.reset(); |
215 frame = NULL; | 216 frame = NULL; |
216 } | 217 } |
217 | 218 |
218 } // namespace media | 219 } // namespace media |
OLD | NEW |