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

Side by Side Diff: media/filters/chunk_demuxer.h

Issue 2199913002: Notify demux stream clients when a stream is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't pass DemuxerStream into the status callback Created 4 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 unified diff | Download patch
« no previous file with comments | « media/base/mock_filters.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // DemuxerStream methods. 106 // DemuxerStream methods.
107 void Read(const ReadCB& read_cb) override; 107 void Read(const ReadCB& read_cb) override;
108 Type type() const override; 108 Type type() const override;
109 Liveness liveness() const override; 109 Liveness liveness() const override;
110 AudioDecoderConfig audio_decoder_config() override; 110 AudioDecoderConfig audio_decoder_config() override;
111 VideoDecoderConfig video_decoder_config() override; 111 VideoDecoderConfig video_decoder_config() override;
112 bool SupportsConfigChanges() override; 112 bool SupportsConfigChanges() override;
113 VideoRotation video_rotation() override; 113 VideoRotation video_rotation() override;
114 bool enabled() const override; 114 bool enabled() const override;
115 void set_enabled(bool enabled, base::TimeDelta timestamp) override; 115 void set_enabled(bool enabled, base::TimeDelta timestamp) override;
116 void SetStreamRestartedCB(const StreamRestartedCB& cb) override; 116 void SetStreamStatusChangeCB(const StreamStatusChangeCB& cb) override;
117 117
118 // Returns the text track configuration. It is an error to call this method 118 // Returns the text track configuration. It is an error to call this method
119 // if type() != TEXT. 119 // if type() != TEXT.
120 TextTrackConfig text_track_config(); 120 TextTrackConfig text_track_config();
121 121
122 // Sets the memory limit, in bytes, on the SourceBufferStream. 122 // Sets the memory limit, in bytes, on the SourceBufferStream.
123 void SetStreamMemoryLimit(size_t memory_limit); 123 void SetStreamMemoryLimit(size_t memory_limit);
124 124
125 bool supports_partial_append_window_trimming() const { 125 bool supports_partial_append_window_trimming() const {
126 return partial_append_window_trimming_enabled_; 126 return partial_append_window_trimming_enabled_;
(...skipping 24 matching lines...) Expand all
151 std::unique_ptr<SourceBufferStream> stream_; 151 std::unique_ptr<SourceBufferStream> stream_;
152 152
153 const MediaTrack::Id media_track_id_; 153 const MediaTrack::Id media_track_id_;
154 154
155 mutable base::Lock lock_; 155 mutable base::Lock lock_;
156 State state_; 156 State state_;
157 ReadCB read_cb_; 157 ReadCB read_cb_;
158 bool splice_frames_enabled_; 158 bool splice_frames_enabled_;
159 bool partial_append_window_trimming_enabled_; 159 bool partial_append_window_trimming_enabled_;
160 bool is_enabled_; 160 bool is_enabled_;
161 StreamRestartedCB stream_restarted_cb_; 161 StreamStatusChangeCB stream_status_change_cb_;
162 162
163 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream); 163 DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream);
164 }; 164 };
165 165
166 // Demuxer implementation that allows chunks of media data to be passed 166 // Demuxer implementation that allows chunks of media data to be passed
167 // from JavaScript to the media stack. 167 // from JavaScript to the media stack.
168 class MEDIA_EXPORT ChunkDemuxer : public Demuxer { 168 class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
169 public: 169 public:
170 enum Status { 170 enum Status {
171 kOk, // ID added w/o error. 171 kOk, // ID added w/o error.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 int detected_text_track_count_; 445 int detected_text_track_count_;
446 446
447 std::map<MediaTrack::Id, const DemuxerStream*> track_id_to_demux_stream_map_; 447 std::map<MediaTrack::Id, const DemuxerStream*> track_id_to_demux_stream_map_;
448 448
449 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 449 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
450 }; 450 };
451 451
452 } // namespace media 452 } // namespace media
453 453
454 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 454 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698