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

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

Issue 257323003: Remove the IPC to request DemuxerConfigs when config changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 7 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
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 9dbbd00fceaba8c1a222fabfd6e95c0fce8749b1..7d676cf07339cda2364c018ed4340ecbaa7e806d 100644
--- a/media/base/android/media_decoder_job.h
+++ b/media/base/android/media_decoder_job.h
@@ -54,13 +54,16 @@ class MediaDecoderJob {
// Called by MediaSourcePlayer to decode some data.
// |callback| - Run when decode operation has completed.
//
- // Returns true if the next decode was started and |callback| will be
- // called when the decode operation is complete.
- // Returns false if a config change is needed. |callback| is ignored
- // and will not be called.
- bool Decode(base::TimeTicks start_time_ticks,
- base::TimeDelta start_presentation_timestamp,
- const DecoderCallback& callback);
+ // Returns a scoped pointer to a DemuxerConfig if a config change is detected,
+ // or an empty scoped pointer otherwise. In the case of requiring further data
+ // before commencing decode, an empty scoped pointer will also be returned
+ // although config change may be the next received access unit. |callback|
+ // will be called when the decode operation is complete. If a config change
+ // is detected, |callback| is ignored and will not be called.
+ scoped_ptr<DemuxerConfigs> Decode(
+ base::TimeTicks start_time_ticks,
+ base::TimeDelta start_presentation_timestamp,
+ const DecoderCallback& callback);
// Called to stop the last Decode() early.
// If the decoder is in the process of decoding the next frame, then
@@ -147,6 +150,9 @@ class MediaDecoderJob {
// Helper function to get the current access unit that is being decoded.
const AccessUnit& CurrentAccessUnit() const;
+ // Helper function to get the current data chunk index that is being decoded.
+ size_t CurrentReceivedDataChunkIndex() const;
+
// Check whether a chunk has no remaining access units to decode. If
// |is_active_chunk| is true, this function returns whether decoder has
// consumed all data in |received_data_[current_demuxer_data_index_]|.

Powered by Google App Engine
This is Rietveld 408576698