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