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

Unified Diff: media/filters/audio_renderer_impl.h

Issue 384543002: Move bulk of media::AudioRendererImpl::Render() logic to media thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/filters/audio_renderer_impl.cc » ('j') | media/filters/audio_renderer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_impl.h
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index 2e29a9e82110adce8bccd546adcb3992a1323247..c3c00fba9a0152f230dacf9661195e0edbd8945a 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -153,13 +153,24 @@ class MEDIA_EXPORT AudioRendererImpl
int audio_delay_milliseconds) OVERRIDE;
virtual void OnRenderError() OVERRIDE;
+ // Contains result of the last call to Render(). Used to update |audio_clock_|
+ // and changes in buffering state.
+ struct RenderResult {
+ RenderResult();
+
+ int requested_frames;
+ int delay_frames;
+ int frames_written;
+ float playback_rate;
+ base::TimeDelta endpoint_timestamp;
+ };
+ void DidRender(RenderResult result);
DaleCurtis 2014/07/10 23:37:00 const&
+
// Helper methods that schedule an asynchronous read from the decoder as long
// as there isn't a pending read.
//
// Must be called on |task_runner_|.
- void AttemptRead();
void AttemptRead_Locked();
- bool CanRead_Locked();
void ChangeState_Locked(State new_state);
// Returns true if the data in the buffer is all before |start_timestamp_|.
@@ -188,7 +199,7 @@ class MEDIA_EXPORT AudioRendererImpl
void OnConfigChange();
// Updates |buffering_state_| and fires |buffering_state_cb_|.
- void SetBufferingState_Locked(BufferingState buffering_state);
+ void SetBufferingState(BufferingState buffering_state);
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
« no previous file with comments | « no previous file | media/filters/audio_renderer_impl.cc » ('j') | media/filters/audio_renderer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698