| Index: talk/app/webrtc/mediacontroller.h
|
| diff --git a/talk/app/webrtc/mediacontroller.h b/talk/app/webrtc/mediacontroller.h
|
| index 68798515d00984c586a88fbf8346f75ca96f309b..41c4a03b3d80d30b43135f694f02fa24ca72c58a 100644
|
| --- a/talk/app/webrtc/mediacontroller.h
|
| +++ b/talk/app/webrtc/mediacontroller.h
|
| @@ -29,11 +29,23 @@
|
| #define TALK_APP_WEBRTC_MEDIACONTROLLER_H_
|
|
|
| #include "webrtc/base/thread.h"
|
| +#include "webrtc/common_types.h"
|
| +#include "webrtc/call.h"
|
| +
|
| +namespace cricket {
|
| +class TransportChannel;
|
| +} // namespace cricket
|
|
|
| namespace webrtc {
|
| -class Call;
|
| class VoiceEngine;
|
|
|
| +class CallFactory {
|
| + public:
|
| + virtual Call* CreateCall(const webrtc::Call::Config& config) {
|
| + return webrtc::Call::Create(config);
|
| + }
|
| +};
|
| +
|
| // The MediaController currently owns shared state between media channels, but
|
| // in the future will create and own RtpSenders and RtpReceivers.
|
| class MediaControllerInterface {
|
| @@ -41,8 +53,23 @@ class MediaControllerInterface {
|
| static MediaControllerInterface* Create(rtc::Thread* worker_thread,
|
| webrtc::VoiceEngine* voice_engine);
|
|
|
| + // Ownership of call_factory is passed on to the MediaController.
|
| + static MediaControllerInterface* Create(CallFactory* call_factory,
|
| + rtc::Thread* worker_thread,
|
| + webrtc::VoiceEngine* voice_engine);
|
| +
|
| virtual ~MediaControllerInterface() {}
|
| virtual webrtc::Call* call_w() = 0;
|
| + // Connects the media controller to a transport channel's SignalSentPacket.
|
| + // This method should be called with the transport channel of newly created
|
| + // BaseChannels.
|
| + // The media controller will not be notified when transport channels are
|
| + // removed to avoid having to reference count them, therefore the media
|
| + // controller may have dangling pointers to transport channels.
|
| + // TODO(holmer): This should be removed once we have RtpSenders and
|
| + // RtpTransports, which the MediaController will have direct access to.
|
| + virtual void ConnectToSignalSentPacket_w(
|
| + cricket::TransportChannel* transport_channel) = 0;
|
| };
|
| } // namespace webrtc
|
|
|
|
|