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