Chromium Code Reviews| 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_; |