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

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

Issue 655713003: Standardize usage of virtual/override/final in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/filters/blocking_url_protocol.h ('k') | media/filters/clockless_video_frame_scheduler.h » ('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 <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 namespace media { 21 namespace media {
22 22
23 class FFmpegURLProtocol; 23 class FFmpegURLProtocol;
24 class SourceState; 24 class SourceState;
25 25
26 class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream { 26 class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
27 public: 27 public:
28 typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue; 28 typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue;
29 29
30 explicit ChunkDemuxerStream(Type type, bool splice_frames_enabled); 30 explicit ChunkDemuxerStream(Type type, bool splice_frames_enabled);
31 virtual ~ChunkDemuxerStream(); 31 ~ChunkDemuxerStream() override;
32 32
33 // ChunkDemuxerStream control methods. 33 // ChunkDemuxerStream control methods.
34 void StartReturningData(); 34 void StartReturningData();
35 void AbortReads(); 35 void AbortReads();
36 void CompletePendingReadIfPossible(); 36 void CompletePendingReadIfPossible();
37 void Shutdown(); 37 void Shutdown();
38 38
39 // SourceBufferStream manipulation methods. 39 // SourceBufferStream manipulation methods.
40 void Seek(base::TimeDelta time); 40 void Seek(base::TimeDelta time);
41 bool IsSeekWaitingForData() const; 41 bool IsSeekWaitingForData() const;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Returns true if the new config is accepted. 73 // Returns true if the new config is accepted.
74 // Returns false if the new config should trigger an error. 74 // Returns false if the new config should trigger an error.
75 bool UpdateAudioConfig(const AudioDecoderConfig& config, const LogCB& log_cb); 75 bool UpdateAudioConfig(const AudioDecoderConfig& config, const LogCB& log_cb);
76 bool UpdateVideoConfig(const VideoDecoderConfig& config, const LogCB& log_cb); 76 bool UpdateVideoConfig(const VideoDecoderConfig& config, const LogCB& log_cb);
77 void UpdateTextConfig(const TextTrackConfig& config, const LogCB& log_cb); 77 void UpdateTextConfig(const TextTrackConfig& config, const LogCB& log_cb);
78 78
79 void MarkEndOfStream(); 79 void MarkEndOfStream();
80 void UnmarkEndOfStream(); 80 void UnmarkEndOfStream();
81 81
82 // DemuxerStream methods. 82 // DemuxerStream methods.
83 virtual void Read(const ReadCB& read_cb) override; 83 void Read(const ReadCB& read_cb) override;
84 virtual Type type() override; 84 Type type() override;
85 virtual AudioDecoderConfig audio_decoder_config() override; 85 AudioDecoderConfig audio_decoder_config() override;
86 virtual VideoDecoderConfig video_decoder_config() override; 86 VideoDecoderConfig video_decoder_config() override;
87 virtual bool SupportsConfigChanges() override; 87 bool SupportsConfigChanges() override;
88 virtual VideoRotation video_rotation() override; 88 VideoRotation video_rotation() override;
89 89
90 // Returns the text track configuration. It is an error to call this method 90 // Returns the text track configuration. It is an error to call this method
91 // if type() != TEXT. 91 // if type() != TEXT.
92 TextTrackConfig text_track_config(); 92 TextTrackConfig text_track_config();
93 93
94 // Sets the memory limit, in bytes, on the SourceBufferStream. 94 // Sets the memory limit, in bytes, on the SourceBufferStream.
95 void set_memory_limit(int memory_limit) { 95 void set_memory_limit(int memory_limit) {
96 stream_->set_memory_limit(memory_limit); 96 stream_->set_memory_limit(memory_limit);
97 } 97 }
98 98
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // otherwise ignore them. 147 // otherwise ignore them.
148 // |log_cb| Run when parsing error messages need to be logged to the error 148 // |log_cb| Run when parsing error messages need to be logged to the error
149 // console. 149 // console.
150 // |splice_frames_enabled| Indicates that it's okay to generate splice frames 150 // |splice_frames_enabled| Indicates that it's okay to generate splice frames
151 // per the MSE specification. Renderers must understand DecoderBuffer's 151 // per the MSE specification. Renderers must understand DecoderBuffer's
152 // splice_timestamp() field. 152 // splice_timestamp() field.
153 ChunkDemuxer(const base::Closure& open_cb, 153 ChunkDemuxer(const base::Closure& open_cb,
154 const NeedKeyCB& need_key_cb, 154 const NeedKeyCB& need_key_cb,
155 const LogCB& log_cb, 155 const LogCB& log_cb,
156 bool splice_frames_enabled); 156 bool splice_frames_enabled);
157 virtual ~ChunkDemuxer(); 157 ~ChunkDemuxer() override;
158 158
159 // Demuxer implementation. 159 // Demuxer implementation.
160 virtual void Initialize(DemuxerHost* host, 160 void Initialize(DemuxerHost* host,
161 const PipelineStatusCB& cb, 161 const PipelineStatusCB& cb,
162 bool enable_text_tracks) override; 162 bool enable_text_tracks) override;
163 virtual void Stop() override; 163 void Stop() override;
164 virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) override; 164 void Seek(base::TimeDelta time, const PipelineStatusCB& cb) override;
165 virtual base::Time GetTimelineOffset() const override; 165 base::Time GetTimelineOffset() const override;
166 virtual DemuxerStream* GetStream(DemuxerStream::Type type) override; 166 DemuxerStream* GetStream(DemuxerStream::Type type) override;
167 virtual base::TimeDelta GetStartTime() const override; 167 base::TimeDelta GetStartTime() const override;
168 virtual Liveness GetLiveness() const override; 168 Liveness GetLiveness() const override;
169 169
170 // Methods used by an external object to control this demuxer. 170 // Methods used by an external object to control this demuxer.
171 // 171 //
172 // Indicates that a new Seek() call is on its way. Any pending Reads on the 172 // Indicates that a new Seek() call is on its way. Any pending Reads on the
173 // DemuxerStream objects should be aborted immediately inside this call and 173 // DemuxerStream objects should be aborted immediately inside this call and
174 // future Read calls should return kAborted until the Seek() call occurs. 174 // future Read calls should return kAborted until the Seek() call occurs.
175 // This method MUST ALWAYS be called before Seek() is called to signal that 175 // This method MUST ALWAYS be called before Seek() is called to signal that
176 // the next Seek() call represents the seek point we actually want to return 176 // the next Seek() call represents the seek point we actually want to return
177 // data for. 177 // data for.
178 // |seek_time| - The presentation timestamp for the seek that triggered this 178 // |seek_time| - The presentation timestamp for the seek that triggered this
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 // Indicates that splice frame generation is enabled. 393 // Indicates that splice frame generation is enabled.
394 const bool splice_frames_enabled_; 394 const bool splice_frames_enabled_;
395 395
396 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer); 396 DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
397 }; 397 };
398 398
399 } // namespace media 399 } // namespace media
400 400
401 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_ 401 #endif // MEDIA_FILTERS_CHUNK_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/filters/blocking_url_protocol.h ('k') | media/filters/clockless_video_frame_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698