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

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

Issue 1287423004: MediaCodecPlayer implementation (stage 5 - reconfiguration) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-cleanuptest
Patch Set: Notified another stream after the drain completed; emulated reconfig 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
Index: media/base/android/access_unit_queue.h
diff --git a/media/base/android/access_unit_queue.h b/media/base/android/access_unit_queue.h
index 9fae42000f4924ae59e3f532ac92abd49fe31e2a..a566fbc02e328993b89e4d905f5ef2f7fae16cc7 100644
--- a/media/base/android/access_unit_queue.h
+++ b/media/base/android/access_unit_queue.h
@@ -70,6 +70,10 @@ class AccessUnitQueue {
// There must be only one |Info| consumer at a time.
Info GetInfo() const;
+ // Request to emulate config changes for some key frames.
qinmin 2015/08/20 19:41:25 I don't understand this. Why is this function need
+ void EmulateConfigChanges(bool value);
+ void SetLastConfigs(const DemuxerConfigs& configs);
+
// For unit tests only. These methods are not thread safe.
size_t NumChunksForTesting() const { return chunks_.size(); }
void SetHistorySizeForTesting(size_t number_of_history_chunks);
@@ -79,6 +83,9 @@ class AccessUnitQueue {
// incuding current. Logically these are units that have not been consumed.
int GetUnconsumedAccessUnitLength() const;
+ // Clone and possibly split (when we emulate configs) the incoming data chunk.
+ std::vector<DemuxerData*> CloneData(const DemuxerData& data);
+
// The queue of data chunks. It owns the chunks.
typedef std::list<DemuxerData*> DataChunkQueue;
DataChunkQueue chunks_;
@@ -95,6 +102,12 @@ class AccessUnitQueue {
// Indicates that a unit with End Of Stream flag has been appended.
bool has_eos_;
+ // Flag to generate artificial |kConfigChanged| for some key frames.
+ bool emulate_config_changes_;
+
+ // Last config change for emulation
+ DemuxerConfigs last_configs_;
+
// The lock protects all fields together.
mutable base::Lock lock_;
« no previous file with comments | « no previous file | media/base/android/access_unit_queue.cc » ('j') | media/base/android/media_codec_video_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698