henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef AUDIO_NULL_AUDIO_POLLER_H_ |
| 12 | #define AUDIO_NULL_AUDIO_POLLER_H_ |
| 13 | |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 14 | #include <stdint.h> |
| 15 | |
henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame] | 16 | #include "modules/audio_device/include/audio_device_defines.h" |
| 17 | #include "rtc_base/messagehandler.h" |
Yves Gerey | 988cc08 | 2018-10-23 12:03:01 +0200 | [diff] [blame] | 18 | #include "rtc_base/messagequeue.h" |
henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame] | 19 | #include "rtc_base/thread_checker.h" |
| 20 | |
| 21 | namespace webrtc { |
| 22 | namespace internal { |
| 23 | |
| 24 | class NullAudioPoller final : public rtc::MessageHandler { |
| 25 | public: |
| 26 | explicit NullAudioPoller(AudioTransport* audio_transport); |
Mirko Bonadei | 8fdcac3 | 2018-08-28 16:30:18 +0200 | [diff] [blame] | 27 | ~NullAudioPoller() override; |
henrika | 5f6bf24 | 2017-11-01 11:06:56 +0100 | [diff] [blame] | 28 | |
| 29 | protected: |
| 30 | void OnMessage(rtc::Message* msg) override; |
| 31 | |
| 32 | private: |
| 33 | rtc::ThreadChecker thread_checker_; |
| 34 | AudioTransport* const audio_transport_; |
| 35 | int64_t reschedule_at_; |
| 36 | }; |
| 37 | |
| 38 | } // namespace internal |
| 39 | } // namespace webrtc |
| 40 | |
| 41 | #endif // AUDIO_NULL_AUDIO_POLLER_H_ |