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

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

Issue 1341883003: Prepare MediaDrmBridge to work with MediaCodecPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bug526755
Patch Set: Fixed MediaDrmBridgeTest unit tests Created 5 years, 2 months 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
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_drm_bridge.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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" 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
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
OLDNEW
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_drm_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698