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

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

Issue 1122393004: Add support for switching the audio output device for HTMLMediaElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to MediaPlayers so that they invoke callbacks in the correct threads. First complete implem… Created 5 years, 6 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
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_LOCAL_AUDIO_RENDERER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_
7 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "base/message_loop/message_loop_proxy.h" 13 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
14 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
15 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
16 #include "content/public/renderer/media_stream_audio_sink.h" 17 #include "content/public/renderer/media_stream_audio_sink.h"
17 #include "content/renderer/media/media_stream_audio_renderer.h" 18 #include "content/renderer/media/media_stream_audio_renderer.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int session_id, 56 int session_id,
56 int frames_per_buffer); 57 int frames_per_buffer);
57 58
58 // MediaStreamAudioRenderer implementation. 59 // MediaStreamAudioRenderer implementation.
59 // Called on the main thread. 60 // Called on the main thread.
60 void Start() override; 61 void Start() override;
61 void Stop() override; 62 void Stop() override;
62 void Play() override; 63 void Play() override;
63 void Pause() override; 64 void Pause() override;
64 void SetVolume(float volume) override; 65 void SetVolume(float volume) override;
66 void SwitchOutputDevice(const std::string& device_id,
67 const GURL& security_origin,
68 const base::Callback<void(int)>& callback) override;
65 base::TimeDelta GetCurrentRenderTime() const override; 69 base::TimeDelta GetCurrentRenderTime() const override;
66 bool IsLocalRenderer() const override; 70 bool IsLocalRenderer() const override;
67 71
68 const base::TimeDelta& total_render_time() const { 72 const base::TimeDelta& total_render_time() const {
69 return total_render_time_; 73 return total_render_time_;
70 } 74 }
71 75
72 protected: 76 protected:
73 ~WebRtcLocalAudioRenderer() override; 77 ~WebRtcLocalAudioRenderer() override;
74 78
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 162
159 // Used to DCHECK that some methods are called on the capture audio thread. 163 // Used to DCHECK that some methods are called on the capture audio thread.
160 base::ThreadChecker capture_thread_checker_; 164 base::ThreadChecker capture_thread_checker_;
161 165
162 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer); 166 DISALLOW_COPY_AND_ASSIGN(WebRtcLocalAudioRenderer);
163 }; 167 };
164 168
165 } // namespace content 169 } // namespace content
166 170
167 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_ 171 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_LOCAL_AUDIO_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698