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

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: Rebased 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') | no next file with comments »
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 5bc60215ac6a19c3c277f68c2c5814426e473809..dcd29e3a5088aa25fd7cb9941640ed78d75e6cce 100644
--- a/media/base/android/media_codec_decoder.h
+++ b/media/base/android/media_codec_decoder.h
@@ -193,9 +193,8 @@ class MediaCodecDecoder {
bool IsCompleted() const;
bool NotCompletedAndNeedsPreroll() const;
- // Requests an A/V sync mechanism that is similar to preroll, but stops at the
- // first available output frame rather than passing certain PTS.
- void SetDecodingUntilOutputIsPresent();
+ // Sets preroll timestamp and requests preroll.
+ void SetPrerollTimestamp(base::TimeDelta preroll_ts);
base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto();
@@ -207,8 +206,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.
@@ -348,12 +346,6 @@ class MediaCodecDecoder {
kError,
};
- enum PrerollMode {
- kNoPreroll = 0,
- kPrerollTillOutputIsPresent,
- kPrerollTillPTS,
- };
-
// Helper method that processes an error from MediaCodec.
void OnCodecError();
@@ -420,9 +412,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698