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 #include <stdint.h> | 5 #include <stdint.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.h" | 10 #include "base/callback.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void CallInitialize(const PipelineStatusCB& status_cb, | 115 void CallInitialize(const PipelineStatusCB& status_cb, |
116 bool low_delay, | 116 bool low_delay, |
117 bool expect_to_success) { | 117 bool expect_to_success) { |
118 if (low_delay) | 118 if (low_delay) |
119 demuxer_stream_.set_liveness(DemuxerStream::LIVENESS_LIVE); | 119 demuxer_stream_.set_liveness(DemuxerStream::LIVENESS_LIVE); |
120 EXPECT_CALL(*decoder_, Initialize(_, _, _, _, _)) | 120 EXPECT_CALL(*decoder_, Initialize(_, _, _, _, _)) |
121 .WillOnce( | 121 .WillOnce( |
122 DoAll(SaveArg<4>(&output_cb_), RunCallback<3>(expect_to_success))); | 122 DoAll(SaveArg<4>(&output_cb_), RunCallback<3>(expect_to_success))); |
123 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); | 123 EXPECT_CALL(*this, OnWaitingForDecryptionKey()).Times(0); |
124 renderer_->Initialize( | 124 renderer_->Initialize( |
125 &demuxer_stream_, status_cb, SetCdmReadyCB(), | 125 &demuxer_stream_, status_cb, nullptr, |
126 base::Bind(&VideoRendererImplTest::OnStatisticsUpdate, | 126 base::Bind(&VideoRendererImplTest::OnStatisticsUpdate, |
127 base::Unretained(this)), | 127 base::Unretained(this)), |
128 base::Bind(&StrictMock<MockCB>::BufferingStateChange, | 128 base::Bind(&StrictMock<MockCB>::BufferingStateChange, |
129 base::Unretained(&mock_cb_)), | 129 base::Unretained(&mock_cb_)), |
130 ended_event_.GetClosure(), error_event_.GetPipelineStatusCB(), | 130 ended_event_.GetClosure(), error_event_.GetPipelineStatusCB(), |
131 base::Bind(&WallClockTimeSource::GetWallClockTimes, | 131 base::Bind(&WallClockTimeSource::GetWallClockTimes, |
132 base::Unretained(&time_source_)), | 132 base::Unretained(&time_source_)), |
133 base::Bind(&VideoRendererImplTest::OnWaitingForDecryptionKey, | 133 base::Bind(&VideoRendererImplTest::OnWaitingForDecryptionKey, |
134 base::Unretained(this))); | 134 base::Unretained(this))); |
135 } | 135 } |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 QueueFrames("0 10 20 30"); | 777 QueueFrames("0 10 20 30"); |
778 StartPlayingFrom(0); | 778 StartPlayingFrom(0); |
779 Flush(); | 779 Flush(); |
780 ASSERT_EQ(1u, frame_ready_cbs_.size()); | 780 ASSERT_EQ(1u, frame_ready_cbs_.size()); |
781 // This frame will be discarded. | 781 // This frame will be discarded. |
782 frame_ready_cbs_.front().Run(); | 782 frame_ready_cbs_.front().Run(); |
783 Destroy(); | 783 Destroy(); |
784 } | 784 } |
785 | 785 |
786 } // namespace media | 786 } // namespace media |
OLD | NEW |