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

Unified Diff: media/base/android/media_codec_decoder.h

Issue 1312103006: MediaCodecPlayer - preroll and reconfiguration fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-reconfig
Patch Set: Addressed Min's comments, small changes in stop sequence Created 5 years, 3 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
« no previous file with comments | « no previous file | media/base/android/media_codec_decoder.cc » ('j') | media/base/android/media_codec_decoder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_decoder.h
diff --git a/media/base/android/media_codec_decoder.h b/media/base/android/media_codec_decoder.h
index c47d922657a0c55ee1f8e37cdfb2d2db89c7b04c..3127932d862e56928e5e93427de53540f1ed9edf 100644
--- a/media/base/android/media_codec_decoder.h
+++ b/media/base/android/media_codec_decoder.h
@@ -197,6 +197,9 @@ class MediaCodecDecoder {
// first available output frame rather than passing certain PTS.
void SetDecodingUntilOutputIsPresent();
liberato (no reviews please) 2015/09/04 21:59:13 did you mean to delete this?
Tima Vaisburd 2015/09/04 23:17:35 Yes, thank you, I will delete it.
+ // Sets preroll timestamp and requests preroll.
+ void SetPrerollTimestamp(base::TimeDelta preroll_ts);
+
base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto();
// Starts prefetching: accumulates enough data in AccessUnitQueue.
@@ -207,8 +210,7 @@ class MediaCodecDecoder {
ConfigStatus Configure();
// Starts the decoder for prerolling. This method starts the decoder thread.
- bool Preroll(base::TimeDelta preroll_timestamp,
- const base::Closure& preroll_done_cb);
+ bool Preroll(const base::Closure& preroll_done_cb);
// Starts the decoder after preroll is not needed, starting decoder thread
// if it has not started yet.
@@ -342,12 +344,6 @@ class MediaCodecDecoder {
kError,
};
- enum PrerollMode {
- kNoPreroll = 0,
- kPrerollTillOutputIsPresent,
- kPrerollTillPTS,
- };
-
// Helper method that processes an error from MediaCodec.
void OnCodecError();
@@ -414,9 +410,8 @@ class MediaCodecDecoder {
// Preroll timestamp is set if we need preroll and cleared after we done it.
base::TimeDelta preroll_timestamp_;
- // The preroll mode. If not |kNoPreroll|, the playback should start with
- // preroll.
- PrerollMode preroll_mode_;
+ // Set to true when MediaCodec internal buffers are filled up.
+ bool is_prepared_;
// Flag is set when the EOS is enqueued into MediaCodec. Reset by Flush.
bool eos_enqueued_;
« no previous file with comments | « no previous file | media/base/android/media_codec_decoder.cc » ('j') | media/base/android/media_codec_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698