OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/buffers.h" | 5 #include "media/base/buffers.h" |
6 #include "media/base/mock_media_filters.h" | 6 #include "media/base/mock_media_filters.h" |
7 #include "media/base/video_frame_impl.h" | 7 #include "media/base/video_frame_impl.h" |
8 #include "media/base/yuv_convert.h" | 8 #include "media/base/yuv_convert.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 frame->SetDuration(kDurationB); | 91 frame->SetDuration(kDurationB); |
92 EXPECT_TRUE(kTimestampB == frame->GetTimestamp()); | 92 EXPECT_TRUE(kTimestampB == frame->GetTimestamp()); |
93 EXPECT_TRUE(kDurationB == frame->GetDuration()); | 93 EXPECT_TRUE(kDurationB == frame->GetDuration()); |
94 EXPECT_FALSE(frame->IsEndOfStream()); | 94 EXPECT_FALSE(frame->IsEndOfStream()); |
95 frame->SetDiscontinuous(true); | 95 frame->SetDiscontinuous(true); |
96 EXPECT_TRUE(frame->IsDiscontinuous()); | 96 EXPECT_TRUE(frame->IsDiscontinuous()); |
97 frame->SetDiscontinuous(false); | 97 frame->SetDiscontinuous(false); |
98 EXPECT_FALSE(frame->IsDiscontinuous()); | 98 EXPECT_FALSE(frame->IsDiscontinuous()); |
99 | 99 |
100 // Test VideoFrame implementation. | 100 // Test VideoFrame implementation. |
101 media::MockVideoDecoder::InitializeYV12Frame(frame, 0.0f); | 101 media::old_mocks::MockVideoDecoder::InitializeYV12Frame(frame, 0.0f); |
102 ExpectFrameColor(frame, 0xFF000000); | 102 ExpectFrameColor(frame, 0xFF000000); |
103 media::MockVideoDecoder::InitializeYV12Frame(frame, 1.0f); | 103 media::old_mocks::MockVideoDecoder::InitializeYV12Frame(frame, 1.0f); |
104 ExpectFrameColor(frame, 0xFFFFFFFF); | 104 ExpectFrameColor(frame, 0xFFFFFFFF); |
105 | 105 |
106 // Test an empty frame. | 106 // Test an empty frame. |
107 media::VideoFrameImpl::CreateEmptyFrame(&frame); | 107 media::VideoFrameImpl::CreateEmptyFrame(&frame); |
108 EXPECT_TRUE(frame->IsEndOfStream()); | 108 EXPECT_TRUE(frame->IsEndOfStream()); |
109 } | 109 } |
OLD | NEW |