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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 void UnmarkEndOfStream(); | 98 void UnmarkEndOfStream(); |
99 | 99 |
100 // DemuxerStream methods. | 100 // DemuxerStream methods. |
101 void Read(const ReadCB& read_cb) override; | 101 void Read(const ReadCB& read_cb) override; |
102 Type type() const override; | 102 Type type() const override; |
103 Liveness liveness() const override; | 103 Liveness liveness() const override; |
104 AudioDecoderConfig audio_decoder_config() override; | 104 AudioDecoderConfig audio_decoder_config() override; |
105 VideoDecoderConfig video_decoder_config() override; | 105 VideoDecoderConfig video_decoder_config() override; |
106 bool SupportsConfigChanges() override; | 106 bool SupportsConfigChanges() override; |
107 VideoRotation video_rotation() override; | 107 VideoRotation video_rotation() override; |
| 108 bool enabled() const override; |
| 109 void set_enabled(bool enabled, base::TimeDelta timestamp) override; |
108 | 110 |
109 // Returns the text track configuration. It is an error to call this method | 111 // Returns the text track configuration. It is an error to call this method |
110 // if type() != TEXT. | 112 // if type() != TEXT. |
111 TextTrackConfig text_track_config(); | 113 TextTrackConfig text_track_config(); |
112 | 114 |
113 // Sets the memory limit, in bytes, on the SourceBufferStream. | 115 // Sets the memory limit, in bytes, on the SourceBufferStream. |
114 void SetStreamMemoryLimit(size_t memory_limit); | 116 void SetStreamMemoryLimit(size_t memory_limit); |
115 | 117 |
116 bool supports_partial_append_window_trimming() const { | 118 bool supports_partial_append_window_trimming() const { |
117 return partial_append_window_trimming_enabled_; | 119 return partial_append_window_trimming_enabled_; |
(...skipping 19 matching lines...) Expand all Loading... |
137 | 139 |
138 Liveness liveness_; | 140 Liveness liveness_; |
139 | 141 |
140 std::unique_ptr<SourceBufferStream> stream_; | 142 std::unique_ptr<SourceBufferStream> stream_; |
141 | 143 |
142 mutable base::Lock lock_; | 144 mutable base::Lock lock_; |
143 State state_; | 145 State state_; |
144 ReadCB read_cb_; | 146 ReadCB read_cb_; |
145 bool splice_frames_enabled_; | 147 bool splice_frames_enabled_; |
146 bool partial_append_window_trimming_enabled_; | 148 bool partial_append_window_trimming_enabled_; |
| 149 bool is_enabled_ = true; |
147 | 150 |
148 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); | 151 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); |
149 }; | 152 }; |
150 | 153 |
151 // Demuxer implementation that allows chunks of media data to be passed | 154 // Demuxer implementation that allows chunks of media data to be passed |
152 // from JavaScript to the media stack. | 155 // from JavaScript to the media stack. |
153 class MEDIA_EXPORT ChunkDemuxer : public Demuxer { | 156 class MEDIA_EXPORT ChunkDemuxer : public Demuxer { |
154 public: | 157 public: |
155 enum Status { | 158 enum Status { |
156 kOk, // ID added w/o error. | 159 kOk, // ID added w/o error. |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 int detected_audio_track_count_; | 428 int detected_audio_track_count_; |
426 int detected_video_track_count_; | 429 int detected_video_track_count_; |
427 int detected_text_track_count_; | 430 int detected_text_track_count_; |
428 | 431 |
429 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); | 432 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); |
430 }; | 433 }; |
431 | 434 |
432 } // namespace media | 435 } // namespace media |
433 | 436 |
434 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ | 437 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ |
OLD | NEW |