OLD | NEW |
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_CLIENT_AUDIO_DECODE_SCHEDULER_H_ | 5 #ifndef REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ |
6 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ | 6 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "remoting/protocol/audio_stub.h" | 12 #include "remoting/protocol/audio_stub.h" |
12 | 13 |
13 namespace base { | 14 namespace base { |
14 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
15 } // namespace base | 16 } // namespace base |
16 | 17 |
17 namespace remoting { | 18 namespace remoting { |
18 | 19 |
19 namespace protocol { | 20 namespace protocol { |
20 class SessionConfig; | 21 class SessionConfig; |
21 } // namespace protocol | 22 } // namespace protocol |
22 | 23 |
23 class AudioDecoder; | 24 class AudioDecoder; |
24 class AudioPacket; | 25 class AudioPacket; |
25 class AudioPlayer; | 26 class AudioPlayer; |
26 | 27 |
27 class AudioDecodeScheduler : public protocol::AudioStub { | 28 class AudioDecodeScheduler : public protocol::AudioStub { |
28 public: | 29 public: |
29 AudioDecodeScheduler( | 30 AudioDecodeScheduler( |
30 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
31 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, | 32 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, |
32 scoped_ptr<AudioPlayer> audio_player); | 33 std::unique_ptr<AudioPlayer> audio_player); |
33 ~AudioDecodeScheduler() override; | 34 ~AudioDecodeScheduler() override; |
34 | 35 |
35 // Initializes decoder with the information from the protocol config. | 36 // Initializes decoder with the information from the protocol config. |
36 void Initialize(const protocol::SessionConfig& config); | 37 void Initialize(const protocol::SessionConfig& config); |
37 | 38 |
38 // AudioStub implementation. | 39 // AudioStub implementation. |
39 void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, | 40 void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet, |
40 const base::Closure& done) override; | 41 const base::Closure& done) override; |
41 | 42 |
42 private: | 43 private: |
43 class Core; | 44 class Core; |
44 | 45 |
45 scoped_refptr<Core> core_; | 46 scoped_refptr<Core> core_; |
46 | 47 |
47 DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler); | 48 DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace remoting | 51 } // namespace remoting |
51 | 52 |
52 #endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ | 53 #endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ |
OLD | NEW |