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

Side by Side Diff: content/renderer/media/webrtc_audio_renderer.h

Issue 539453003: Used 10ms native buffer size for webrtc audio renderer on Linux and Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: correct upload. Created 6 years, 3 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 | content/renderer/media/webrtc_audio_renderer.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 CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/threading/non_thread_safe.h" 10 #include "base/threading/non_thread_safe.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // is the usage pattern that WebRtcAudioRenderer requires. 92 // is the usage pattern that WebRtcAudioRenderer requires.
93 scoped_refptr<MediaStreamAudioRenderer> CreateSharedAudioRendererProxy( 93 scoped_refptr<MediaStreamAudioRenderer> CreateSharedAudioRendererProxy(
94 const scoped_refptr<webrtc::MediaStreamInterface>& media_stream); 94 const scoped_refptr<webrtc::MediaStreamInterface>& media_stream);
95 95
96 // Used to DCHECK on the expected state. 96 // Used to DCHECK on the expected state.
97 bool IsStarted() const; 97 bool IsStarted() const;
98 98
99 // Accessors to the sink audio parameters. 99 // Accessors to the sink audio parameters.
100 int channels() const { return sink_params_.channels(); } 100 int channels() const { return sink_params_.channels(); }
101 int sample_rate() const { return sink_params_.sample_rate(); } 101 int sample_rate() const { return sink_params_.sample_rate(); }
102 int frames_per_buffer() const { return sink_params_.frames_per_buffer(); }
102 103
103 private: 104 private:
104 // MediaStreamAudioRenderer implementation. This is private since we want 105 // MediaStreamAudioRenderer implementation. This is private since we want
105 // callers to use proxy objects. 106 // callers to use proxy objects.
106 // TODO(tommi): Make the MediaStreamAudioRenderer implementation a pimpl? 107 // TODO(tommi): Make the MediaStreamAudioRenderer implementation a pimpl?
107 virtual void Start() OVERRIDE; 108 virtual void Start() OVERRIDE;
108 virtual void Play() OVERRIDE; 109 virtual void Play() OVERRIDE;
109 virtual void Pause() OVERRIDE; 110 virtual void Pause() OVERRIDE;
110 virtual void Stop() OVERRIDE; 111 virtual void Stop() OVERRIDE;
111 virtual void SetVolume(float volume) OVERRIDE; 112 virtual void SetVolume(float volume) OVERRIDE;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // state objects lies with the renderers and they must leave the playing state 229 // state objects lies with the renderers and they must leave the playing state
229 // before being destructed (PlayingState object goes out of scope). 230 // before being destructed (PlayingState object goes out of scope).
230 SourcePlayingStates source_playing_states_; 231 SourcePlayingStates source_playing_states_;
231 232
232 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer); 233 DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioRenderer);
233 }; 234 };
234 235
235 } // namespace content 236 } // namespace content
236 237
237 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_ 238 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698