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

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

Issue 1254293003: MediaCodecPlayer implementation (stage 4 - preroll) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-browserseek
Patch Set: Rebased 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_audio_decoder.cc ('k') | media/base/android/media_codec_bridge.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_bridge.h
diff --git a/media/base/android/media_codec_bridge.h b/media/base/android/media_codec_bridge.h
index 045e59c7c793e6d251905dc6e1689b77f4e2a27b..99ac6e8e9994c9963f950766cac643c9182d83ed 100644
--- a/media/base/android/media_codec_bridge.h
+++ b/media/base/android/media_codec_bridge.h
@@ -238,10 +238,18 @@ class AudioCodecBridge : public MediaCodecBridge {
int64 codec_delay_ns, int64 seek_preroll_ns,
bool play_audio, jobject media_crypto) WARN_UNUSED_RESULT;
- // Play the output buffer. This call must be called after
- // DequeueOutputBuffer() and before ReleaseOutputBuffer. Returns the playback
- // head position expressed in frames.
- int64 PlayOutputBuffer(int index, size_t size, size_t offset);
+ // Plays the output buffer right away or save for later playback if |postpone|
+ // is set to true. This call must be called after DequeueOutputBuffer() and
+ // before ReleaseOutputBuffer. The data is extracted from the output buffers
+ // using |index|, |size| and |offset|. Returns the playback head position
+ // expressed in frames.
+ // When |postpone| is set to true, the next PlayOutputBuffer() should have
+ // postpone == false, and it will play two buffers: the postponed one and
+ // the one identified by |index|.
+ int64 PlayOutputBuffer(int index,
+ size_t size,
+ size_t offset,
+ bool postpone = false);
// Set the volume of the audio output.
void SetVolume(double volume);
« no previous file with comments | « media/base/android/media_codec_audio_decoder.cc ('k') | media/base/android/media_codec_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698