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

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

Issue 160005: Implemented proper pause-then-seek behaviour for the media pipeline. (Closed)
Patch Set: yay Created 11 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 | « no previous file | media/base/pipeline.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // Filters are connected in a strongly typed manner, with downstream filters 5 // Filters are connected in a strongly typed manner, with downstream filters
6 // always reading data from upstream filters. Upstream filters have no clue 6 // always reading data from upstream filters. Upstream filters have no clue
7 // who is actually reading from them, and return the results via callbacks. 7 // who is actually reading from them, and return the results via callbacks.
8 // 8 //
9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer 9 // DemuxerStream(Video) <- VideoDecoder <- VideoRenderer
10 // DataSource <- Demuxer < 10 // DataSource <- Demuxer <
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual void set_message_loop(MessageLoop* message_loop) { 81 virtual void set_message_loop(MessageLoop* message_loop) {
82 DCHECK(message_loop); 82 DCHECK(message_loop);
83 DCHECK(!message_loop_); 83 DCHECK(!message_loop_);
84 message_loop_ = message_loop; 84 message_loop_ = message_loop;
85 } 85 }
86 86
87 virtual MessageLoop* message_loop() { 87 virtual MessageLoop* message_loop() {
88 return message_loop_; 88 return message_loop_;
89 } 89 }
90 90
91 // The pipeline has resumed playback. Filters can continue requesting reads.
92 // Filters may implement this method if they need to respond to this call.
93 virtual void Play(FilterCallback* callback) {
94 if (callback) {
95 callback->Run();
96 delete callback;
97 }
98 }
99
100 // The pipeline has paused playback. Filters should fulfill any existing read
101 // requests and then idle. Filters may implement this method if they need to
102 // respond to this call.
103 virtual void Pause(FilterCallback* callback) {
104 if (callback) {
105 callback->Run();
106 delete callback;
107 }
108 }
109
91 // The pipeline is being stopped either as a result of an error or because 110 // The pipeline is being stopped either as a result of an error or because
92 // the client called Stop(). 111 // the client called Stop().
93 virtual void Stop() = 0; 112 virtual void Stop() = 0;
94 113
95 // The pipeline playback rate has been changed. Filters may implement this 114 // The pipeline playback rate has been changed. Filters may implement this
96 // method if they need to respond to this call. 115 // method if they need to respond to this call.
97 virtual void SetPlaybackRate(float playback_rate) {} 116 virtual void SetPlaybackRate(float playback_rate) {}
98 117
99 // Carry out any actions required to seek to the given time, executing the 118 // Carry out any actions required to seek to the given time, executing the
100 // callback upon completion. 119 // callback upon completion.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // callback upon completion. 318 // callback upon completion.
300 virtual void Initialize(AudioDecoder* decoder, FilterCallback* callback) = 0; 319 virtual void Initialize(AudioDecoder* decoder, FilterCallback* callback) = 0;
301 320
302 // Sets the output volume. 321 // Sets the output volume.
303 virtual void SetVolume(float volume) = 0; 322 virtual void SetVolume(float volume) = 0;
304 }; 323 };
305 324
306 } // namespace media 325 } // namespace media
307 326
308 #endif // MEDIA_BASE_FILTERS_H_ 327 #endif // MEDIA_BASE_FILTERS_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698