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

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

Issue 1287423004: MediaCodecPlayer implementation (stage 5 - reconfiguration) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-cleanuptest
Patch Set: Fixed AdvanceAccessUnitQueue() Created 5 years, 4 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 | « media/base/android/media_codec_decoder_unittest.cc ('k') | media/base/android/media_codec_player.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_player.h
diff --git a/media/base/android/media_codec_player.h b/media/base/android/media_codec_player.h
index 458ed749c6da0414664424e02aa8bbe3e5f0718c..edc17da00145944f6d1c3204423ddbebb5f6b9a2 100644
--- a/media/base/android/media_codec_player.h
+++ b/media/base/android/media_codec_player.h
@@ -162,6 +162,9 @@ class MEDIA_EXPORT MediaCodecPlayer : public MediaPlayerAndroid,
base::TimeDelta,
base::TimeDelta)> DecodersTimeCallback;
+ // For testing only.
+ typedef base::Callback<void(DemuxerStream::Type)> CodecCreatedCallback;
+
// Constructs a player with the given ID and demuxer. |manager| must outlive
// the lifetime of this object.
MediaCodecPlayer(int player_id,
@@ -201,6 +204,8 @@ class MEDIA_EXPORT MediaCodecPlayer : public MediaPlayerAndroid,
// For testing only.
void SetDecodersTimeCallbackForTests(DecodersTimeCallback cb);
+ void SetCodecCreatedCallbackForTests(CodecCreatedCallback cb);
+ void SetAlwaysReconfigureForTests(DemuxerStream::Type type);
bool IsPrerollingForTests(DemuxerStream::Type type) const;
private:
@@ -249,7 +254,8 @@ class MEDIA_EXPORT MediaCodecPlayer : public MediaPlayerAndroid,
void RequestDemuxerData(DemuxerStream::Type stream_type);
void OnPrefetchDone();
void OnPrerollDone();
- void OnStopDone();
+ void OnDecoderDrained(DemuxerStream::Type type);
+ void OnStopDone(DemuxerStream::Type type);
void OnError();
void OnStarvation(DemuxerStream::Type stream_type);
void OnTimeIntervalUpdate(DemuxerStream::Type stream_type,
« no previous file with comments | « media/base/android/media_codec_decoder_unittest.cc ('k') | media/base/android/media_codec_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698