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

Unified Diff: media/base/android/media_codec_decoder_unittest.cc

Issue 1254293003: MediaCodecPlayer implementation (stage 4 - preroll) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-browserseek
Patch Set: Save the first post-preroll audio buffer and replay it when preroll is done Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: media/base/android/media_codec_decoder_unittest.cc
diff --git a/media/base/android/media_codec_decoder_unittest.cc b/media/base/android/media_codec_decoder_unittest.cc
index d32c8aea182f73102333eb43383a744baf07c909..c29cbbff9c614959c407ca0941c2db2a8073a884 100644
--- a/media/base/android/media_codec_decoder_unittest.cc
+++ b/media/base/android/media_codec_decoder_unittest.cc
@@ -149,6 +149,7 @@ class MediaCodecDecoderTest : public testing::Test {
// Decoder callbacks.
void OnDataRequested();
void OnStarvation() { is_starved_ = true; }
+ void OnPrerollDone() {}
void OnStopDone() { is_stopped_ = true; }
void OnError() {}
void OnUpdateCurrentTime(base::TimeDelta now_playing,
@@ -231,6 +232,7 @@ void MediaCodecDecoderTest::CreateAudioDecoder() {
task_runner_, base::Bind(&MediaCodecDecoderTest::OnDataRequested,
base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnStarvation, base::Unretained(this)),
+ base::Bind(&MediaCodecDecoderTest::OnPrerollDone, base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnStopDone, base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnError, base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnUpdateCurrentTime,
@@ -245,6 +247,7 @@ void MediaCodecDecoderTest::CreateVideoDecoder() {
task_runner_, base::Bind(&MediaCodecDecoderTest::OnDataRequested,
base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnStarvation, base::Unretained(this)),
+ base::Bind(&MediaCodecDecoderTest::OnPrerollDone, base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnStopDone, base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnError, base::Unretained(this)),
base::Bind(&MediaCodecDecoderTest::OnUpdateCurrentTime,

Powered by Google App Engine
This is Rietveld 408576698