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

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

Issue 215783002: Fix an issue that audio and video may run out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing acolwell's comments Created 6 years, 8 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_bridge.cc ('k') | media/base/android/media_decoder_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_decoder_job.h
diff --git a/media/base/android/media_decoder_job.h b/media/base/android/media_decoder_job.h
index 77caa9feec7f059b52c0fe8896dfc7bc63b66a08..77fe1af3b4aa19c7364c65012df32ab1a29dc502 100644
--- a/media/base/android/media_decoder_job.h
+++ b/media/base/android/media_decoder_job.h
@@ -29,15 +29,16 @@ class MediaDecoderJob {
};
// Callback when a decoder job finishes its work. Args: whether decode
- // finished successfully, presentation time, audio output bytes.
- // If the presentation time is equal to kNoTimestamp(), the decoder job
- // skipped rendering of the decoded output and the callback target should
+ // finished successfully, current presentation time, max presentation time.
+ // If the current presentation time is equal to kNoTimestamp(), the decoder
+ // job skipped rendering of the decoded output and the callback target should
// update its clock to avoid introducing extra delays to the next frame.
typedef base::Callback<void(MediaCodecStatus, base::TimeDelta,
- size_t)> DecoderCallback;
+ base::TimeDelta)> DecoderCallback;
// Callback when a decoder job finishes releasing the output buffer.
- // Args: audio output bytes, must be 0 for video.
- typedef base::Callback<void(size_t)> ReleaseOutputCompletionCallback;
+ // Args: current presentation time, max presentation time.
+ typedef base::Callback<void(base::TimeDelta, base::TimeDelta)>
+ ReleaseOutputCompletionCallback;
virtual ~MediaDecoderJob();
@@ -95,6 +96,7 @@ class MediaDecoderJob {
int output_buffer_index,
size_t size,
bool render_output,
+ base::TimeDelta current_presentation_timestamp,
const ReleaseOutputCompletionCallback& callback) = 0;
// Returns true if the "time to render" needs to be computed for frames in
@@ -137,8 +139,8 @@ class MediaDecoderJob {
// Completes any pending job destruction or any pending decode stop. If
// destruction was not pending, passes its arguments to |decode_cb_|.
void OnDecodeCompleted(MediaCodecStatus status,
- base::TimeDelta presentation_timestamp,
- size_t audio_output_bytes);
+ base::TimeDelta current_presentation_timestamp,
+ base::TimeDelta max_presentation_timestamp);
// Helper function to get the current access unit that is being decoded.
const AccessUnit& CurrentAccessUnit() const;
« no previous file with comments | « media/base/android/media_codec_bridge.cc ('k') | media/base/android/media_decoder_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698