| Index: chrome/renderer/media/cast_udp_transport.cc
|
| diff --git a/chrome/renderer/media/cast_udp_transport.cc b/chrome/renderer/media/cast_udp_transport.cc
|
| index fd98e572d67bd52d27f264f9aa2f9c32fda145e4..84f215e3dfbecba9f4f01d12b25cee9a78700ee3 100644
|
| --- a/chrome/renderer/media/cast_udp_transport.cc
|
| +++ b/chrome/renderer/media/cast_udp_transport.cc
|
| @@ -6,6 +6,23 @@
|
|
|
| #include "base/logging.h"
|
| #include "chrome/renderer/media/cast_session.h"
|
| +#include "content/public/renderer/p2p_socket_client.h"
|
| +#include "net/base/host_port_pair.h"
|
| +#include "net/base/net_util.h"
|
| +
|
| +class CastUdpSocketFactory : public CastSession::SocketFactory {
|
| + public:
|
| + virtual scoped_refptr<content::P2PSocketClient> create() OVERRIDE {
|
| + net::IPEndPoint unspecified_end_point;
|
| + scoped_refptr<content::P2PSocketClient> socket =
|
| + content::P2PSocketClient::Create(
|
| + content::P2P_SOCKET_UDP,
|
| + unspecified_end_point,
|
| + unspecified_end_point,
|
| + NULL);
|
| + return socket;
|
| + }
|
| +};
|
|
|
| CastUdpTransport::CastUdpTransport(
|
| const scoped_refptr<CastSession>& session)
|
| @@ -15,6 +32,8 @@ CastUdpTransport::CastUdpTransport(
|
| CastUdpTransport::~CastUdpTransport() {
|
| }
|
|
|
| -void CastUdpTransport::Start(const net::HostPortPair& remote_address) {
|
| - NOTIMPLEMENTED();
|
| +void CastUdpTransport::Start(const net::IPEndPoint& remote_address) {
|
| + cast_session_->SetSocketFactory(
|
| + scoped_ptr<CastSession::SocketFactory>(new CastUdpSocketFactory()).Pass(),
|
| + remote_address);
|
| }
|
|
|