OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 // our local variable. This is OK since we're synchronously invoking. | 1402 // our local variable. This is OK since we're synchronously invoking. |
1403 InvokeOnWorker(Bind(&SetRawAudioSink_w, media_channel(), ssrc, &sink)); | 1403 InvokeOnWorker(Bind(&SetRawAudioSink_w, media_channel(), ssrc, &sink)); |
1404 } | 1404 } |
1405 | 1405 |
1406 webrtc::RtpParameters VoiceChannel::GetRtpParameters(uint32_t ssrc) const { | 1406 webrtc::RtpParameters VoiceChannel::GetRtpParameters(uint32_t ssrc) const { |
1407 return worker_thread()->Invoke<webrtc::RtpParameters>( | 1407 return worker_thread()->Invoke<webrtc::RtpParameters>( |
1408 Bind(&VoiceChannel::GetRtpParameters_w, this, ssrc)); | 1408 Bind(&VoiceChannel::GetRtpParameters_w, this, ssrc)); |
1409 } | 1409 } |
1410 | 1410 |
1411 webrtc::RtpParameters VoiceChannel::GetRtpParameters_w(uint32_t ssrc) const { | 1411 webrtc::RtpParameters VoiceChannel::GetRtpParameters_w(uint32_t ssrc) const { |
1412 // Not yet implemented. | 1412 return media_channel()->GetRtpParameters(ssrc); |
1413 // TODO(skvlad): Add support for limiting send bitrate for audio channels. | |
1414 return webrtc::RtpParameters(); | |
1415 } | 1413 } |
1416 | 1414 |
1417 bool VoiceChannel::SetRtpParameters(uint32_t ssrc, | 1415 bool VoiceChannel::SetRtpParameters(uint32_t ssrc, |
1418 const webrtc::RtpParameters& parameters) { | 1416 const webrtc::RtpParameters& parameters) { |
1419 return InvokeOnWorker( | 1417 return InvokeOnWorker( |
1420 Bind(&VoiceChannel::SetRtpParameters_w, this, ssrc, parameters)); | 1418 Bind(&VoiceChannel::SetRtpParameters_w, this, ssrc, parameters)); |
1421 } | 1419 } |
1422 | 1420 |
1423 bool VoiceChannel::SetRtpParameters_w(uint32_t ssrc, | 1421 bool VoiceChannel::SetRtpParameters_w(uint32_t ssrc, |
1424 webrtc::RtpParameters parameters) { | 1422 webrtc::RtpParameters parameters) { |
1425 // Not yet implemented. | 1423 return media_channel()->SetRtpParameters(ssrc, parameters); |
1426 // TODO(skvlad): Add support for limiting send bitrate for audio channels. | |
1427 return false; | |
1428 } | 1424 } |
1429 | 1425 |
1430 bool VoiceChannel::GetStats(VoiceMediaInfo* stats) { | 1426 bool VoiceChannel::GetStats(VoiceMediaInfo* stats) { |
1431 return InvokeOnWorker(Bind(&VoiceMediaChannel::GetStats, | 1427 return InvokeOnWorker(Bind(&VoiceMediaChannel::GetStats, |
1432 media_channel(), stats)); | 1428 media_channel(), stats)); |
1433 } | 1429 } |
1434 | 1430 |
1435 void VoiceChannel::StartMediaMonitor(int cms) { | 1431 void VoiceChannel::StartMediaMonitor(int cms) { |
1436 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), | 1432 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), |
1437 rtc::Thread::Current())); | 1433 rtc::Thread::Current())); |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2205 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); | 2201 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); |
2206 } | 2202 } |
2207 | 2203 |
2208 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { | 2204 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { |
2209 rtc::TypedMessageData<uint32_t>* message = | 2205 rtc::TypedMessageData<uint32_t>* message = |
2210 new rtc::TypedMessageData<uint32_t>(sid); | 2206 new rtc::TypedMessageData<uint32_t>(sid); |
2211 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2207 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
2212 } | 2208 } |
2213 | 2209 |
2214 } // namespace cricket | 2210 } // namespace cricket |
OLD | NEW |