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

Side by Side Diff: remoting/protocol/audio_pump.h

Issue 2903153004: [Chromoting] Implement down mixing in AudioPump (Closed)
Patch Set: Add more comments to explain the downmix and layout selection logic Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PROTOCOL_AUDIO_PUMP_H_ 5 #ifndef REMOTING_PROTOCOL_AUDIO_PUMP_H_
6 #define REMOTING_PROTOCOL_AUDIO_PUMP_H_ 6 #define REMOTING_PROTOCOL_AUDIO_PUMP_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 class AudioEncoder; 22 class AudioEncoder;
23 class AudioPacket; 23 class AudioPacket;
24 24
25 namespace protocol { 25 namespace protocol {
26 26
27 class AudioStub; 27 class AudioStub;
28 class AudioSource; 28 class AudioSource;
29 29
30 // AudioPump is responsible for fetching audio data from the AudioCapturer 30 // AudioPump is responsible for fetching audio data from the AudioCapturer
31 // and encoding it before passing it to the AudioStub for delivery to the 31 // and encoding it before passing it to the AudioStub for delivery to the
32 // client. Audio is captured and encoded on the audio thread and then passed to 32 // client. Audio data will be downmixed to stereo if needed. Audio is captured
33 // AudioStub on the network thread. 33 // and encoded on the audio thread and then passed to AudioStub on the network
34 // thread.
34 class AudioPump : public AudioStream { 35 class AudioPump : public AudioStream {
35 public: 36 public:
36 // The caller must ensure that the |audio_stub| is not destroyed until the 37 // The caller must ensure that the |audio_stub| is not destroyed until the
37 // pump is destroyed. 38 // pump is destroyed.
38 AudioPump(scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 39 AudioPump(scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
39 std::unique_ptr<AudioSource> audio_source, 40 std::unique_ptr<AudioSource> audio_source,
40 std::unique_ptr<AudioEncoder> audio_encoder, 41 std::unique_ptr<AudioEncoder> audio_encoder,
41 AudioStub* audio_stub); 42 AudioStub* audio_stub);
42 ~AudioPump() override; 43 ~AudioPump() override;
43 44
(...skipping 18 matching lines...) Expand all
62 63
63 base::WeakPtrFactory<AudioPump> weak_factory_; 64 base::WeakPtrFactory<AudioPump> weak_factory_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(AudioPump); 66 DISALLOW_COPY_AND_ASSIGN(AudioPump);
66 }; 67 };
67 68
68 } // namespace protocol 69 } // namespace protocol
69 } // namespace remoting 70 } // namespace remoting
70 71
71 #endif // REMOTING_PROTOCOL_AUDIO_PUMP_H_ 72 #endif // REMOTING_PROTOCOL_AUDIO_PUMP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698