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

Side by Side Diff: remoting/host/ipc_audio_capturer.h

Issue 866863004: Replace AudioScheduler with AudioPump. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mouse_cursor_pipe
Patch Set: Created 5 years, 10 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 REMOTING_HOST_IPC_AUDIO_CAPTURER_H_ 5 #ifndef REMOTING_HOST_IPC_AUDIO_CAPTURER_H_
6 #define REMOTING_HOST_IPC_AUDIO_CAPTURER_H_ 6 #define REMOTING_HOST_IPC_AUDIO_CAPTURER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "remoting/host/audio_capturer.h" 12 #include "remoting/host/audio_capturer.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 class AudioPacket; 16 class AudioPacket;
17 class DesktopSessionProxy; 17 class DesktopSessionProxy;
18 18
19 class IpcAudioCapturer : public AudioCapturer { 19 class IpcAudioCapturer : public AudioCapturer {
20 public: 20 public:
21 explicit IpcAudioCapturer( 21 explicit IpcAudioCapturer(
22 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); 22 scoped_refptr<DesktopSessionProxy> desktop_session_proxy);
23 ~IpcAudioCapturer() override; 23 ~IpcAudioCapturer() override;
24 24
25 // AudioCapturer interface. 25 // AudioCapturer interface.
26 bool Start(const PacketCapturedCallback& callback) override; 26 bool Start(const PacketCapturedCallback& callback) override;
27 void Stop() override;
28 bool IsStarted() override;
29 27
30 // Called by DesktopSessionProxy when an audio packet is received. 28 // Called by DesktopSessionProxy when an audio packet is received.
31 void OnAudioPacket(scoped_ptr<AudioPacket> packet); 29 void OnAudioPacket(scoped_ptr<AudioPacket> packet);
32 30
33 private: 31 private:
34 // Invoked when an audio packet was received. 32 // Invoked when an audio packet was received.
35 PacketCapturedCallback callback_; 33 PacketCapturedCallback callback_;
36 34
37 // Wraps the IPC channel to the desktop session agent. 35 // Wraps the IPC channel to the desktop session agent.
38 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; 36 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_;
39 37
40 // Used to cancel tasks pending on the capturer when it is stopped. 38 // Used to cancel tasks pending on the capturer when it is stopped.
41 base::WeakPtrFactory<IpcAudioCapturer> weak_factory_; 39 base::WeakPtrFactory<IpcAudioCapturer> weak_factory_;
42 40
43 DISALLOW_COPY_AND_ASSIGN(IpcAudioCapturer); 41 DISALLOW_COPY_AND_ASSIGN(IpcAudioCapturer);
44 }; 42 };
45 43
46 } // namespace remoting 44 } // namespace remoting
47 45
48 #endif // REMOTING_HOST_IPC_AUDIO_CAPTURER_H_ 46 #endif // REMOTING_HOST_IPC_AUDIO_CAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698