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

Unified Diff: media/base/pipeline_impl.h

Issue 149500: More media::PipelineImpl cleanup, this time focusing on not taking down the render process. (Closed)
Patch Set: Cleanup Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/base/pipeline_impl.cc » ('j') | media/base/pipeline_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.h
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index 2d6b9887d1606559ba9cb502d4608e0e6f07f25f..6a4ef035202db364fd9b08fa516f64f251a3ad1c 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -73,7 +73,6 @@ class PipelineImpl : public Pipeline {
void SetBufferedBytes(int64 buffered_bytes);
void SetVideoSize(size_t width, size_t height);
void SetTime(base::TimeDelta time);
- void InternalSetPlaybackRate(float rate);
// Sets the error to the new error code only if the current error state is
// PIPELINE_OK. Returns true if error set, otherwise leaves current error
@@ -121,17 +120,14 @@ class PipelineImpl : public Pipeline {
size_t video_width_;
size_t video_height_;
- // Current volume level (from 0.0f to 1.0f). The volume reflects the last
- // value the audio filter was called with SetVolume, so there will be a short
- // period of time between the client calling SetVolume on the pipeline and
- // this value being updated. Set by the PipelineInternal just prior to
- // calling the audio renderer.
+ // Current volume level (from 0.0f to 1.0f). This value is set immediately
+ // via SetVolume() and a task is dispatched on the message loop to notify the
+ // filters.
float volume_;
- // Current playback rate (>= 0.0f). This member reflects the last value
- // that the filters in the pipeline were called with, so there will be a short
- // period of time between the client calling SetPlaybackRate and this value
- // being updated. Set by the PipelineInternal just prior to calling filters.
+ // Current playback rate (>= 0.0f). This value is set immediately via
+ // SetPlaybackRate() and a task is dispatched on the message loop to notify
+ // the filters.
float playback_rate_;
// Current playback time. Set by a FilterHostImpl object on behalf of the
@@ -187,8 +183,10 @@ class PipelineInternal : public base::RefCountedThreadSafe<PipelineInternal> {
PipelineCallback* start_callback);
void Stop(PipelineCallback* stop_callback);
void Seek(base::TimeDelta time, PipelineCallback* seek_callback);
- void SetPlaybackRate(float rate);
- void SetVolume(float volume);
+
+ // Notifications that the client has changed the playback rate/volume.
Alpha Left Google 2009/07/11 02:05:36 Notifies?
scherkus (not reviewing) 2009/07/11 02:39:58 Done.
+ void PlaybackRateChanged(float playback_rate);
+ void VolumeChanged(float volume);
// Methods called by a FilterHostImpl object. These methods may be called
// on any thread, either the pipeline's thread or any other.
@@ -270,9 +268,12 @@ class PipelineInternal : public base::RefCountedThreadSafe<PipelineInternal> {
void StopTask(PipelineCallback* stop_callback);
void ErrorTask(PipelineError error);
- void SetPlaybackRateTask(float rate);
+ // Carries out notifying filters that the playback rate/volume has changed,
+ void PlaybackRateChangedTask(float playback_rate);
+ void VolumeChangedTask(float volume);
+
+ // Carries out notifying filters that we are seeking to a new timestamp.
void SeekTask(base::TimeDelta time, PipelineCallback* seek_callback);
- void SetVolumeTask(float volume);
// Internal methods used in the implementation of the pipeline thread. All
// of these methods are only called on the pipeline thread.
« no previous file with comments | « no previous file | media/base/pipeline_impl.cc » ('j') | media/base/pipeline_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698