| 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 <stdint.h> | 5 #include <stdint.h> | 
| 6 | 6 | 
| 7 #include "base/bind.h" | 7 #include "base/bind.h" | 
| 8 #include "base/logging.h" | 8 #include "base/logging.h" | 
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" | 
| 10 #include "media/base/android/demuxer_android.h" | 10 #include "media/base/android/demuxer_android.h" | 
| 11 #include "media/base/android/media_codec_bridge.h" | 11 #include "media/base/android/media_codec_bridge.h" | 
| 12 #include "media/base/android/media_codec_player.h" | 12 #include "media/base/android/media_codec_player.h" | 
| 13 #include "media/base/android/media_player_manager.h" | 13 #include "media/base/android/media_player_manager.h" | 
|  | 14 #include "media/base/android/media_task_runner.h" | 
| 14 #include "media/base/android/test_data_factory.h" | 15 #include "media/base/android/test_data_factory.h" | 
| 15 #include "media/base/android/test_statistics.h" | 16 #include "media/base/android/test_statistics.h" | 
| 16 #include "media/base/timestamp_constants.h" | 17 #include "media/base/timestamp_constants.h" | 
| 17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" | 
| 18 #include "ui/gl/android/surface_texture.h" | 19 #include "ui/gl/android/surface_texture.h" | 
| 19 | 20 | 
| 20 namespace media { | 21 namespace media { | 
| 21 | 22 | 
| 22 // Helper macro to skip the test if MediaCodecBridge isn't available. | 23 // Helper macro to skip the test if MediaCodecBridge isn't available. | 
| 23 #define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE()        \ | 24 #define SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE()        \ | 
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2273   // TODO(timav): maybe we should not call the testing callback for | 2274   // TODO(timav): maybe we should not call the testing callback for | 
| 2274   // kRenderAfterPreroll for video (for audio we already do not call). | 2275   // kRenderAfterPreroll for video (for audio we already do not call). | 
| 2275   // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO), | 2276   // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO), | 
| 2276   //                        manager_.FirstFrameTime(DemuxerStream::VIDEO), 50)); | 2277   //                        manager_.FirstFrameTime(DemuxerStream::VIDEO), 50)); | 
| 2277 | 2278 | 
| 2278   // The playback should start at |seek_position| | 2279   // The playback should start at |seek_position| | 
| 2279   EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25)); | 2280   EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25)); | 
| 2280 } | 2281 } | 
| 2281 | 2282 | 
| 2282 }  // namespace media | 2283 }  // namespace media | 
| OLD | NEW | 
|---|