Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: media/base/android/media_codec_player_unittest.cc

Issue 1472943002: Refactor MediaCodecBridge to add support for NDK APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
12 #include "media/base/android/media_codec_player.h" 11 #include "media/base/android/media_codec_player.h"
13 #include "media/base/android/media_player_manager.h" 12 #include "media/base/android/media_player_manager.h"
14 #include "media/base/android/media_task_runner.h" 13 #include "media/base/android/media_task_runner.h"
14 #include "media/base/android/sdk_media_codec_bridge.h"
15 #include "media/base/android/test_data_factory.h" 15 #include "media/base/android/test_data_factory.h"
16 #include "media/base/android/test_statistics.h" 16 #include "media/base/android/test_statistics.h"
17 #include "media/base/timestamp_constants.h" 17 #include "media/base/timestamp_constants.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "ui/gl/android/surface_texture.h" 19 #include "ui/gl/android/surface_texture.h"
20 20
21 namespace media { 21 namespace media {
22 22
23 // Helper macro to skip the test if MediaCodecBridge isn't available. 23 // Helper macro to skip the test if MediaCodecBridge isn't available.
24 #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
2274 // TODO(timav): maybe we should not call the testing callback for 2274 // TODO(timav): maybe we should not call the testing callback for
2275 // kRenderAfterPreroll for video (for audio we already do not call). 2275 // kRenderAfterPreroll for video (for audio we already do not call).
2276 // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO), 2276 // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO),
2277 // manager_.FirstFrameTime(DemuxerStream::VIDEO), 50)); 2277 // manager_.FirstFrameTime(DemuxerStream::VIDEO), 50));
2278 2278
2279 // The playback should start at |seek_position| 2279 // The playback should start at |seek_position|
2280 EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25)); 2280 EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25));
2281 } 2281 }
2282 2282
2283 } // namespace media 2283 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698