| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1307 this, &VoiceChannel::OnSrtpError); | 1307 this, &VoiceChannel::OnSrtpError); |
| 1308 return true; | 1308 return true; |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 bool VoiceChannel::SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) { | 1311 bool VoiceChannel::SetRemoteRenderer(uint32 ssrc, AudioRenderer* renderer) { |
| 1312 return InvokeOnWorker(Bind(&VoiceMediaChannel::SetRemoteRenderer, | 1312 return InvokeOnWorker(Bind(&VoiceMediaChannel::SetRemoteRenderer, |
| 1313 media_channel(), ssrc, renderer)); | 1313 media_channel(), ssrc, renderer)); |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 bool VoiceChannel::SetAudioSend(uint32 ssrc, | 1316 bool VoiceChannel::SetAudioSend(uint32 ssrc, |
| 1317 bool mute, | 1317 bool enable, |
| 1318 const AudioOptions* options, | 1318 const AudioOptions* options, |
| 1319 AudioRenderer* renderer) { | 1319 AudioRenderer* renderer) { |
| 1320 return InvokeOnWorker(Bind(&VoiceMediaChannel::SetAudioSend, media_channel(), | 1320 return InvokeOnWorker(Bind(&VoiceMediaChannel::SetAudioSend, media_channel(), |
| 1321 ssrc, mute, options, renderer)); | 1321 ssrc, enable, options, renderer)); |
| 1322 } | 1322 } |
| 1323 | 1323 |
| 1324 // TODO(juberti): Handle early media the right way. We should get an explicit | 1324 // TODO(juberti): Handle early media the right way. We should get an explicit |
| 1325 // ringing message telling us to start playing local ringback, which we cancel | 1325 // ringing message telling us to start playing local ringback, which we cancel |
| 1326 // if any early media actually arrives. For now, we do the opposite, which is | 1326 // if any early media actually arrives. For now, we do the opposite, which is |
| 1327 // to wait 1 second for early media, and start playing local ringback if none | 1327 // to wait 1 second for early media, and start playing local ringback if none |
| 1328 // arrives. | 1328 // arrives. |
| 1329 void VoiceChannel::SetEarlyMedia(bool enable) { | 1329 void VoiceChannel::SetEarlyMedia(bool enable) { |
| 1330 if (enable) { | 1330 if (enable) { |
| 1331 // Start the early media timeout | 1331 // Start the early media timeout |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2406 return (data_channel_type_ == DCT_RTP); | 2406 return (data_channel_type_ == DCT_RTP); |
| 2407 } | 2407 } |
| 2408 | 2408 |
| 2409 void DataChannel::OnStreamClosedRemotely(uint32 sid) { | 2409 void DataChannel::OnStreamClosedRemotely(uint32 sid) { |
| 2410 rtc::TypedMessageData<uint32>* message = | 2410 rtc::TypedMessageData<uint32>* message = |
| 2411 new rtc::TypedMessageData<uint32>(sid); | 2411 new rtc::TypedMessageData<uint32>(sid); |
| 2412 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2412 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
| 2413 } | 2413 } |
| 2414 | 2414 |
| 2415 } // namespace cricket | 2415 } // namespace cricket |
| OLD | NEW |