17b38f6937087fed7011818a2692cd7f55c580813solenberg/* 27b38f6937087fed7011818a2692cd7f55c580813solenberg * libjingle 37b38f6937087fed7011818a2692cd7f55c580813solenberg * Copyright 2015 Google Inc. 47b38f6937087fed7011818a2692cd7f55c580813solenberg * 57b38f6937087fed7011818a2692cd7f55c580813solenberg * Redistribution and use in source and binary forms, with or without 67b38f6937087fed7011818a2692cd7f55c580813solenberg * modification, are permitted provided that the following conditions are met: 77b38f6937087fed7011818a2692cd7f55c580813solenberg * 87b38f6937087fed7011818a2692cd7f55c580813solenberg * 1. Redistributions of source code must retain the above copyright notice, 97b38f6937087fed7011818a2692cd7f55c580813solenberg * this list of conditions and the following disclaimer. 107b38f6937087fed7011818a2692cd7f55c580813solenberg * 2. Redistributions in binary form must reproduce the above copyright notice, 117b38f6937087fed7011818a2692cd7f55c580813solenberg * this list of conditions and the following disclaimer in the documentation 127b38f6937087fed7011818a2692cd7f55c580813solenberg * and/or other materials provided with the distribution. 137b38f6937087fed7011818a2692cd7f55c580813solenberg * 3. The name of the author may not be used to endorse or promote products 147b38f6937087fed7011818a2692cd7f55c580813solenberg * derived from this software without specific prior written permission. 157b38f6937087fed7011818a2692cd7f55c580813solenberg * 167b38f6937087fed7011818a2692cd7f55c580813solenberg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 177b38f6937087fed7011818a2692cd7f55c580813solenberg * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 187b38f6937087fed7011818a2692cd7f55c580813solenberg * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 197b38f6937087fed7011818a2692cd7f55c580813solenberg * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 207b38f6937087fed7011818a2692cd7f55c580813solenberg * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 217b38f6937087fed7011818a2692cd7f55c580813solenberg * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 227b38f6937087fed7011818a2692cd7f55c580813solenberg * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 237b38f6937087fed7011818a2692cd7f55c580813solenberg * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 247b38f6937087fed7011818a2692cd7f55c580813solenberg * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 257b38f6937087fed7011818a2692cd7f55c580813solenberg * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 267b38f6937087fed7011818a2692cd7f55c580813solenberg */ 277b38f6937087fed7011818a2692cd7f55c580813solenberg 28709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg#ifndef TALK_APP_WEBRTC_MEDIACONTROLLER_H_ 29709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg#define TALK_APP_WEBRTC_MEDIACONTROLLER_H_ 30709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg 31709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg#include "webrtc/base/thread.h" 32709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg 33c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefannamespace cricket { 34c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefanclass ChannelManager; 35c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefan} // namespace cricket 36c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefan 37709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenbergnamespace webrtc { 38709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenbergclass Call; 39709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenbergclass VoiceEngine; 40709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg 41709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg// The MediaController currently owns shared state between media channels, but 42709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg// in the future will create and own RtpSenders and RtpReceivers. 43709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenbergclass MediaControllerInterface { 44709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg public: 45c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefan static MediaControllerInterface* Create( 46c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefan rtc::Thread* worker_thread, 47c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefan cricket::ChannelManager* channel_manager); 48709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg 49709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg virtual ~MediaControllerInterface() {} 50709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg virtual webrtc::Call* call_w() = 0; 51c1aeaf0dc37d96f31c92f893f4e30e7a5f7cc2b7stefan virtual cricket::ChannelManager* channel_manager() const = 0; 52709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg}; 53709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg} // namespace webrtc 54709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg 55709ed67c38d0a942f3bf3e68e337cc27a27bc353Fredrik Solenberg#endif // TALK_APP_WEBRTC_MEDIACONTROLLER_H_ 56