OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/media/cast_send_transport.h" | 5 #include "chrome/renderer/media/cast_send_transport.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/renderer/media/cast_session.h" | 8 #include "chrome/renderer/media/cast_session.h" |
9 #include "chrome/renderer/media/cast_udp_transport.h" | 9 #include "chrome/renderer/media/cast_udp_transport.h" |
10 #include "media/cast/cast_config.h" | 10 #include "media/cast/cast_config.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 CastRtpPayloadParams::~CastRtpPayloadParams() { | 112 CastRtpPayloadParams::~CastRtpPayloadParams() { |
113 } | 113 } |
114 | 114 |
115 CastRtpCaps::CastRtpCaps() { | 115 CastRtpCaps::CastRtpCaps() { |
116 } | 116 } |
117 | 117 |
118 CastRtpCaps::~CastRtpCaps() { | 118 CastRtpCaps::~CastRtpCaps() { |
119 } | 119 } |
120 | 120 |
121 CastSendTransport::CastSendTransport( | 121 CastSendTransport::CastSendTransport( |
122 CastUdpTransport* udp_transport, | 122 const blink::WebMediaStreamTrack& track, |
123 const blink::WebMediaStreamTrack& track) | 123 const scoped_refptr<CastSession>& session) |
124 : cast_session_(udp_transport->cast_session()), track_(track) { | 124 : track_(track), |
| 125 cast_session_(session) { |
125 } | 126 } |
126 | 127 |
127 CastSendTransport::~CastSendTransport() { | 128 CastSendTransport::~CastSendTransport() { |
128 } | 129 } |
129 | 130 |
130 CastRtpCaps CastSendTransport::GetCaps() { | 131 CastRtpCaps CastSendTransport::GetCaps() { |
131 if (IsAudio()) | 132 if (IsAudio()) |
132 return DefaultAudioCaps(); | 133 return DefaultAudioCaps(); |
133 else | 134 else |
134 return DefaultVideoCaps(); | 135 return DefaultVideoCaps(); |
(...skipping 19 matching lines...) Expand all Loading... |
154 } | 155 } |
155 } | 156 } |
156 | 157 |
157 void CastSendTransport::Stop() { | 158 void CastSendTransport::Stop() { |
158 NOTIMPLEMENTED(); | 159 NOTIMPLEMENTED(); |
159 } | 160 } |
160 | 161 |
161 bool CastSendTransport::IsAudio() const { | 162 bool CastSendTransport::IsAudio() const { |
162 return track_.source().type() == blink::WebMediaStreamSource::TypeAudio; | 163 return track_.source().type() == blink::WebMediaStreamSource::TypeAudio; |
163 } | 164 } |
OLD | NEW |