solenberg | 7b38f69 | 2015-09-07 04:38:33 -0700 | [diff] [blame] | 1 | /* |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 2 | * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
solenberg | 7b38f69 | 2015-09-07 04:38:33 -0700 | [diff] [blame] | 3 | * |
kjellander | b24317b | 2016-02-10 07:54:43 -0800 | [diff] [blame] | 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. |
solenberg | 7b38f69 | 2015-09-07 04:38:33 -0700 | [diff] [blame] | 9 | */ |
| 10 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 11 | #ifndef WEBRTC_API_MEDIACONTROLLER_H_ |
| 12 | #define WEBRTC_API_MEDIACONTROLLER_H_ |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 13 | |
| 14 | #include "webrtc/base/thread.h" |
| 15 | |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 16 | namespace cricket { |
| 17 | class ChannelManager; |
nisse | 51542be | 2016-02-12 02:27:06 -0800 | [diff] [blame] | 18 | struct MediaConfig; |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 19 | } // namespace cricket |
| 20 | |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 21 | namespace webrtc { |
| 22 | class Call; |
| 23 | class VoiceEngine; |
| 24 | |
| 25 | // The MediaController currently owns shared state between media channels, but |
| 26 | // in the future will create and own RtpSenders and RtpReceivers. |
| 27 | class MediaControllerInterface { |
| 28 | public: |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 29 | static MediaControllerInterface* Create( |
nisse | 51542be | 2016-02-12 02:27:06 -0800 | [diff] [blame] | 30 | const cricket::MediaConfig& config, |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 31 | rtc::Thread* worker_thread, |
| 32 | cricket::ChannelManager* channel_manager); |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 33 | |
| 34 | virtual ~MediaControllerInterface() {} |
solenberg | 03d6d57 | 2016-03-01 12:42:03 -0800 | [diff] [blame^] | 35 | virtual void Close() = 0; |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 36 | virtual webrtc::Call* call_w() = 0; |
stefan | c1aeaf0 | 2015-10-15 07:26:07 -0700 | [diff] [blame] | 37 | virtual cricket::ChannelManager* channel_manager() const = 0; |
nisse | 51542be | 2016-02-12 02:27:06 -0800 | [diff] [blame] | 38 | virtual const cricket::MediaConfig& config() const = 0; |
Fredrik Solenberg | 709ed67 | 2015-09-15 12:26:33 +0200 | [diff] [blame] | 39 | }; |
| 40 | } // namespace webrtc |
| 41 | |
Henrik Kjellander | 15583c1 | 2016-02-10 10:53:12 +0100 | [diff] [blame] | 42 | #endif // WEBRTC_API_MEDIACONTROLLER_H_ |