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

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

Issue 1640123004: Propagate media session id into MediaPlayerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-media-session-id-over-ipc
Patch Set: Rebase Created 4 years, 10 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
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 "media/base/android/media_codec_player.h" 5 #include "media/base/android/media_codec_player.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 } 637 }
638 } 638 }
639 639
640 void MediaCodecPlayerTest::CreatePlayer() { 640 void MediaCodecPlayerTest::CreatePlayer() {
641 DCHECK(demuxer_); 641 DCHECK(demuxer_);
642 player_ = new MediaCodecPlayer( 642 player_ = new MediaCodecPlayer(
643 0, // player_id 643 0, // player_id
644 manager_.GetWeakPtr(), 644 manager_.GetWeakPtr(),
645 base::Bind(&MockMediaPlayerManager::OnMediaResourcesRequested, 645 base::Bind(&MockMediaPlayerManager::OnMediaResourcesRequested,
646 base::Unretained(&manager_)), 646 base::Unretained(&manager_)),
647 scoped_ptr<MockDemuxerAndroid>(demuxer_), GURL()); 647 scoped_ptr<MockDemuxerAndroid>(demuxer_), GURL(), 0);
davve 2016/02/25 09:57:32 I have the constant problem here as well (as in th
mlamouri (slow - plz ping) 2016/02/25 14:13:55 Hmm, maybe you should have version of the constant
whywhat 2016/02/29 16:26:29 What is 0? The default session? Is it used anywher
davve 2016/03/01 05:42:22 Yes, the default session. Not used much yet, but I
648 648
649 DCHECK(player_); 649 DCHECK(player_);
650 } 650 }
651 651
652 void MediaCodecPlayerTest::SetVideoSurface() { 652 void MediaCodecPlayerTest::SetVideoSurface() {
653 surface_texture_a_ = gfx::SurfaceTexture::Create(0); 653 surface_texture_a_ = gfx::SurfaceTexture::Create(0);
654 gfx::ScopedJavaSurface surface(surface_texture_a_.get()); 654 gfx::ScopedJavaSurface surface(surface_texture_a_.get());
655 655
656 ASSERT_NE(nullptr, player_); 656 ASSERT_NE(nullptr, player_);
657 player_->SetVideoSurface(std::move(surface)); 657 player_->SetVideoSurface(std::move(surface));
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 // TODO(timav): maybe we should not call the testing callback for 2275 // TODO(timav): maybe we should not call the testing callback for
2276 // kRenderAfterPreroll for video (for audio we already do not call). 2276 // kRenderAfterPreroll for video (for audio we already do not call).
2277 // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO), 2277 // EXPECT_TRUE(AlmostEqual(manager_.FirstFrameTime(DemuxerStream::AUDIO),
2278 // manager_.FirstFrameTime(DemuxerStream::VIDEO), 50)); 2278 // manager_.FirstFrameTime(DemuxerStream::VIDEO), 50));
2279 2279
2280 // The playback should start at |seek_position| 2280 // The playback should start at |seek_position|
2281 EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25)); 2281 EXPECT_TRUE(AlmostEqual(seek_position, manager_.pts_stat_.min(), 25));
2282 } 2282 }
2283 2283
2284 } // namespace media 2284 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698