OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderers/audio_renderer_impl.h" | 5 #include "media/renderers/audio_renderer_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 last_statistics_.audio_memory_usage += stats.audio_memory_usage; | 119 last_statistics_.audio_memory_usage += stats.audio_memory_usage; |
120 } | 120 } |
121 | 121 |
122 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); | 122 MOCK_METHOD1(OnBufferingStateChange, void(BufferingState)); |
123 MOCK_METHOD1(OnError, void(PipelineStatus)); | 123 MOCK_METHOD1(OnError, void(PipelineStatus)); |
124 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); | 124 MOCK_METHOD0(OnWaitingForDecryptionKey, void(void)); |
125 | 125 |
126 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) { | 126 void InitializeRenderer(const PipelineStatusCB& pipeline_status_cb) { |
127 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); | 127 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); |
128 renderer_->Initialize( | 128 renderer_->Initialize( |
129 &demuxer_stream_, pipeline_status_cb, SetCdmReadyCB(), | 129 &demuxer_stream_, pipeline_status_cb, nullptr, |
130 base::Bind(&AudioRendererImplTest::OnStatistics, | 130 base::Bind(&AudioRendererImplTest::OnStatistics, |
131 base::Unretained(this)), | 131 base::Unretained(this)), |
132 base::Bind(&AudioRendererImplTest::OnBufferingStateChange, | 132 base::Bind(&AudioRendererImplTest::OnBufferingStateChange, |
133 base::Unretained(this)), | 133 base::Unretained(this)), |
134 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)), | 134 base::Bind(&AudioRendererImplTest::OnEnded, base::Unretained(this)), |
135 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)), | 135 base::Bind(&AudioRendererImplTest::OnError, base::Unretained(this)), |
136 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey, | 136 base::Bind(&AudioRendererImplTest::OnWaitingForDecryptionKey, |
137 base::Unretained(this))); | 137 base::Unretained(this))); |
138 } | 138 } |
139 | 139 |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 // Advance far enough that we shouldn't be clamped to current time (tested | 885 // Advance far enough that we shouldn't be clamped to current time (tested |
886 // already above). | 886 // already above). |
887 tick_clock_->Advance(kOneSecond); | 887 tick_clock_->Advance(kOneSecond); |
888 EXPECT_EQ( | 888 EXPECT_EQ( |
889 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), | 889 current_time + timestamp_helper.GetFrameDuration(frames_to_consume.value), |
890 CurrentMediaWallClockTime(&is_time_moving)); | 890 CurrentMediaWallClockTime(&is_time_moving)); |
891 EXPECT_TRUE(is_time_moving); | 891 EXPECT_TRUE(is_time_moving); |
892 } | 892 } |
893 | 893 |
894 } // namespace media | 894 } // namespace media |
OLD | NEW |