OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "base/timer/timer.h" | 8 #include "base/timer/timer.h" |
9 #include "media/base/android/media_codec_audio_decoder.h" | 9 #include "media/base/android/media_codec_audio_decoder.h" |
10 #include "media/base/android/media_codec_bridge.h" | 10 #include "media/base/android/media_codec_bridge.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 task_runner_, base::Bind(&MediaCodecDecoderTest::OnDataRequested, | 288 task_runner_, base::Bind(&MediaCodecDecoderTest::OnDataRequested, |
289 base::Unretained(this)), | 289 base::Unretained(this)), |
290 base::Bind(&MediaCodecDecoderTest::OnStarvation, base::Unretained(this)), | 290 base::Bind(&MediaCodecDecoderTest::OnStarvation, base::Unretained(this)), |
291 base::Bind(&MediaCodecDecoderTest::OnDecoderDrained, | 291 base::Bind(&MediaCodecDecoderTest::OnDecoderDrained, |
292 base::Unretained(this)), | 292 base::Unretained(this)), |
293 base::Bind(&MediaCodecDecoderTest::OnStopDone, base::Unretained(this)), | 293 base::Bind(&MediaCodecDecoderTest::OnStopDone, base::Unretained(this)), |
294 base::Bind(&MediaCodecDecoderTest::OnError, base::Unretained(this)), | 294 base::Bind(&MediaCodecDecoderTest::OnError, base::Unretained(this)), |
295 base::Bind(&MediaCodecDecoderTest::OnUpdateCurrentTime, | 295 base::Bind(&MediaCodecDecoderTest::OnUpdateCurrentTime, |
296 base::Unretained(this)), | 296 base::Unretained(this)), |
297 base::Bind(&MediaCodecDecoderTest::OnVideoSizeChanged, | 297 base::Bind(&MediaCodecDecoderTest::OnVideoSizeChanged, |
298 base::Unretained(this)), | |
299 base::Bind(&MediaCodecDecoderTest::OnVideoCodecCreated, | |
300 base::Unretained(this)))); | 298 base::Unretained(this)))); |
301 | 299 |
302 data_available_cb_ = base::Bind(&MediaCodecDecoder::OnDemuxerDataAvailable, | 300 data_available_cb_ = base::Bind(&MediaCodecDecoder::OnDemuxerDataAvailable, |
303 base::Unretained(decoder_.get())); | 301 base::Unretained(decoder_.get())); |
304 } | 302 } |
305 | 303 |
306 void MediaCodecDecoderTest::OnDataRequested() { | 304 void MediaCodecDecoderTest::OnDataRequested() { |
307 if (!data_factory_) | 305 if (!data_factory_) |
308 return; | 306 return; |
309 | 307 |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 750 |
753 EXPECT_TRUE(decoder_->IsStopped()); | 751 EXPECT_TRUE(decoder_->IsStopped()); |
754 EXPECT_TRUE(decoder_->IsCompleted()); | 752 EXPECT_TRUE(decoder_->IsCompleted()); |
755 EXPECT_EQ(data_factory_->last_pts(), pts_stat_.max()); | 753 EXPECT_EQ(data_factory_->last_pts(), pts_stat_.max()); |
756 | 754 |
757 // Check that the reported video size is the one from the in-stream configs. | 755 // Check that the reported video size is the one from the in-stream configs. |
758 EXPECT_EQ(data_factory_->GetConfigs().video_size, video_size_); | 756 EXPECT_EQ(data_factory_->GetConfigs().video_size, video_size_); |
759 } | 757 } |
760 | 758 |
761 } // namespace media | 759 } // namespace media |
OLD | NEW |