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

Side by Side Diff: media/base/pipeline.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, 1 month 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/fake_audio_renderer_sink.h ('k') | media/base/run_all_perftests.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_BASE_PIPELINE_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // playing the media. 72 // playing the media.
73 // 73 //
74 // If any error ever happens, this object will transition to the "Error" state 74 // If any error ever happens, this object will transition to the "Error" state
75 // from any state. If Stop() is ever called, this object will transition to 75 // from any state. If Stop() is ever called, this object will transition to
76 // "Stopped" state. 76 // "Stopped" state.
77 class MEDIA_EXPORT Pipeline : public DemuxerHost { 77 class MEDIA_EXPORT Pipeline : public DemuxerHost {
78 public: 78 public:
79 // Constructs a media pipeline that will execute on |task_runner|. 79 // Constructs a media pipeline that will execute on |task_runner|.
80 Pipeline(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 80 Pipeline(const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
81 MediaLog* media_log); 81 MediaLog* media_log);
82 virtual ~Pipeline(); 82 ~Pipeline() override;
83 83
84 // Build a pipeline to using the given |demuxer| and |renderer| to construct 84 // Build a pipeline to using the given |demuxer| and |renderer| to construct
85 // a filter chain, executing |seek_cb| when the initial seek has completed. 85 // a filter chain, executing |seek_cb| when the initial seek has completed.
86 // 86 //
87 // The following permanent callbacks will be executed as follows up until 87 // The following permanent callbacks will be executed as follows up until
88 // Stop() has completed: 88 // Stop() has completed:
89 // |ended_cb| will be executed whenever the media reaches the end. 89 // |ended_cb| will be executed whenever the media reaches the end.
90 // |error_cb| will be executed whenever an error occurs but hasn't been 90 // |error_cb| will be executed whenever an error occurs but hasn't been
91 // reported already through another callback. 91 // reported already through another callback.
92 // |metadata_cb| will be executed when the content duration, container video 92 // |metadata_cb| will be executed when the content duration, container video
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 void SetState(State next_state); 196 void SetState(State next_state);
197 197
198 static const char* GetStateString(State state); 198 static const char* GetStateString(State state);
199 State GetNextState() const; 199 State GetNextState() const;
200 200
201 // Helper method that runs & resets |seek_cb_| and resets |seek_timestamp_| 201 // Helper method that runs & resets |seek_cb_| and resets |seek_timestamp_|
202 // and |seek_pending_|. 202 // and |seek_pending_|.
203 void FinishSeek(); 203 void FinishSeek();
204 204
205 // DemuxerHost implementaion. 205 // DemuxerHost implementaion.
206 virtual void AddBufferedTimeRange(base::TimeDelta start, 206 void AddBufferedTimeRange(base::TimeDelta start,
207 base::TimeDelta end) override; 207 base::TimeDelta end) override;
208 virtual void SetDuration(base::TimeDelta duration) override; 208 void SetDuration(base::TimeDelta duration) override;
209 virtual void OnDemuxerError(PipelineStatus error) override; 209 void OnDemuxerError(PipelineStatus error) override;
210 virtual void AddTextStream(DemuxerStream* text_stream, 210 void AddTextStream(DemuxerStream* text_stream,
211 const TextTrackConfig& config) override; 211 const TextTrackConfig& config) override;
212 virtual void RemoveTextStream(DemuxerStream* text_stream) override; 212 void RemoveTextStream(DemuxerStream* text_stream) override;
213 213
214 // Callback executed when a rendering error happened, initiating the teardown 214 // Callback executed when a rendering error happened, initiating the teardown
215 // sequence. 215 // sequence.
216 void OnError(PipelineStatus error); 216 void OnError(PipelineStatus error);
217 217
218 // Callback executed by filters to update statistics. 218 // Callback executed by filters to update statistics.
219 void OnUpdateStatistics(const PipelineStatistics& stats); 219 void OnUpdateStatistics(const PipelineStatistics& stats);
220 220
221 // The following "task" methods correspond to the public methods, but these 221 // The following "task" methods correspond to the public methods, but these
222 // methods are run as the result of posting a task to the Pipeline's 222 // methods are run as the result of posting a task to the Pipeline's
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 // NOTE: Weak pointers must be invalidated before all other member variables. 362 // NOTE: Weak pointers must be invalidated before all other member variables.
363 base::WeakPtrFactory<Pipeline> weak_factory_; 363 base::WeakPtrFactory<Pipeline> weak_factory_;
364 364
365 DISALLOW_COPY_AND_ASSIGN(Pipeline); 365 DISALLOW_COPY_AND_ASSIGN(Pipeline);
366 }; 366 };
367 367
368 } // namespace media 368 } // namespace media
369 369
370 #endif // MEDIA_BASE_PIPELINE_H_ 370 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/fake_audio_renderer_sink.h ('k') | media/base/run_all_perftests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698