2015-10-15 07:26:07 -07:00
|
|
|
/*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
|
2015-10-15 07:26:07 -07:00
|
|
|
*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2015-10-15 07:26:07 -07:00
|
|
|
*/
|
|
|
|
|
|
2016-02-10 10:53:12 +01:00
|
|
|
#ifndef WEBRTC_API_FAKEMEDIACONTROLLER_H_
|
|
|
|
|
#define WEBRTC_API_FAKEMEDIACONTROLLER_H_
|
2015-10-15 07:26:07 -07:00
|
|
|
|
2016-02-10 10:53:12 +01:00
|
|
|
#include "webrtc/api/mediacontroller.h"
|
2015-10-15 07:26:07 -07:00
|
|
|
#include "webrtc/base/checks.h"
|
2016-02-12 02:27:06 -08:00
|
|
|
#include "webrtc/media/base/mediachannel.h"
|
2015-10-15 07:26:07 -07:00
|
|
|
|
|
|
|
|
namespace cricket {
|
|
|
|
|
|
|
|
|
|
class FakeMediaController : public webrtc::MediaControllerInterface {
|
|
|
|
|
public:
|
|
|
|
|
explicit FakeMediaController(cricket::ChannelManager* channel_manager,
|
|
|
|
|
webrtc::Call* call)
|
|
|
|
|
: channel_manager_(channel_manager), call_(call) {
|
|
|
|
|
RTC_DCHECK(nullptr != channel_manager_);
|
|
|
|
|
RTC_DCHECK(nullptr != call_);
|
|
|
|
|
}
|
|
|
|
|
~FakeMediaController() override {}
|
2016-03-01 12:42:03 -08:00
|
|
|
void Close() override {}
|
2015-10-15 07:26:07 -07:00
|
|
|
webrtc::Call* call_w() override { return call_; }
|
|
|
|
|
cricket::ChannelManager* channel_manager() const override {
|
|
|
|
|
return channel_manager_;
|
|
|
|
|
}
|
2016-02-12 02:27:06 -08:00
|
|
|
const MediaConfig& config() const override { return media_config_; }
|
2015-10-15 07:26:07 -07:00
|
|
|
|
|
|
|
|
private:
|
2016-02-12 02:27:06 -08:00
|
|
|
const MediaConfig media_config_ = MediaConfig();
|
2015-10-15 07:26:07 -07:00
|
|
|
cricket::ChannelManager* channel_manager_;
|
|
|
|
|
webrtc::Call* call_;
|
|
|
|
|
};
|
|
|
|
|
} // namespace cricket
|
2016-02-10 10:53:12 +01:00
|
|
|
#endif // WEBRTC_API_FAKEMEDIACONTROLLER_H_
|