OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 5 #ifndef MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 6 #define MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 AudioDecoderConfig audio_decoder_config() override; | 87 AudioDecoderConfig audio_decoder_config() override; |
88 VideoDecoderConfig video_decoder_config() override; | 88 VideoDecoderConfig video_decoder_config() override; |
89 bool SupportsConfigChanges() override; | 89 bool SupportsConfigChanges() override; |
90 VideoRotation video_rotation() override; | 90 VideoRotation video_rotation() override; |
91 | 91 |
92 // Returns the text track configuration. It is an error to call this method | 92 // Returns the text track configuration. It is an error to call this method |
93 // if type() != TEXT. | 93 // if type() != TEXT. |
94 TextTrackConfig text_track_config(); | 94 TextTrackConfig text_track_config(); |
95 | 95 |
96 // Sets the memory limit, in bytes, on the SourceBufferStream. | 96 // Sets the memory limit, in bytes, on the SourceBufferStream. |
97 void set_memory_limit(int memory_limit) { | 97 void SetMemoryLimit(size_t memory_limit); |
98 stream_->set_memory_limit(memory_limit); | |
99 } | |
100 | 98 |
101 bool supports_partial_append_window_trimming() const { | 99 bool supports_partial_append_window_trimming() const { |
102 return partial_append_window_trimming_enabled_; | 100 return partial_append_window_trimming_enabled_; |
103 } | 101 } |
104 | 102 |
105 void SetLiveness(Liveness liveness); | 103 void SetLiveness(Liveness liveness); |
106 | 104 |
107 private: | 105 private: |
108 enum State { | 106 enum State { |
109 UNINITIALIZED, | 107 UNINITIALIZED, |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // state. UnmarkEndOfStream() must not be called if a matching | 268 // state. UnmarkEndOfStream() must not be called if a matching |
271 // MarkEndOfStream() has not come before it. | 269 // MarkEndOfStream() has not come before it. |
272 void MarkEndOfStream(PipelineStatus status); | 270 void MarkEndOfStream(PipelineStatus status); |
273 void UnmarkEndOfStream(); | 271 void UnmarkEndOfStream(); |
274 | 272 |
275 void Shutdown(); | 273 void Shutdown(); |
276 | 274 |
277 // Sets the memory limit on each stream of a specific type. | 275 // Sets the memory limit on each stream of a specific type. |
278 // |memory_limit| is the maximum number of bytes each stream of type |type| | 276 // |memory_limit| is the maximum number of bytes each stream of type |type| |
279 // is allowed to hold in its buffer. | 277 // is allowed to hold in its buffer. |
280 void SetMemoryLimits(DemuxerStream::Type type, int memory_limit); | 278 void SetMemoryLimits(DemuxerStream::Type type, size_t memory_limit); |
281 | 279 |
282 // Returns the ranges representing the buffered data in the demuxer. | 280 // Returns the ranges representing the buffered data in the demuxer. |
283 // TODO(wolenetz): Remove this method once MediaSourceDelegate no longer | 281 // TODO(wolenetz): Remove this method once MediaSourceDelegate no longer |
284 // requires it for doing hack browser seeks to I-frame on Android. See | 282 // requires it for doing hack browser seeks to I-frame on Android. See |
285 // http://crbug.com/304234. | 283 // http://crbug.com/304234. |
286 Ranges<base::TimeDelta> GetBufferedRanges() const; | 284 Ranges<base::TimeDelta> GetBufferedRanges() const; |
287 | 285 |
288 private: | 286 private: |
289 enum State { | 287 enum State { |
290 WAITING_FOR_INIT, | 288 WAITING_FOR_INIT, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 | 396 |
399 // Indicates that splice frame generation is enabled. | 397 // Indicates that splice frame generation is enabled. |
400 const bool splice_frames_enabled_; | 398 const bool splice_frames_enabled_; |
401 | 399 |
402 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 400 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
403 }; | 401 }; |
404 | 402 |
405 } // namespace media | 403 } // namespace media |
406 | 404 |
407 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 405 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |