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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1369 int duration) { | 1369 int duration) { |
1370 return InvokeOnWorker(Bind(&VoiceChannel::InsertDtmf_w, this, | 1370 return InvokeOnWorker(Bind(&VoiceChannel::InsertDtmf_w, this, |
1371 ssrc, event_code, duration)); | 1371 ssrc, event_code, duration)); |
1372 } | 1372 } |
1373 | 1373 |
1374 bool VoiceChannel::SetOutputVolume(uint32_t ssrc, double volume) { | 1374 bool VoiceChannel::SetOutputVolume(uint32_t ssrc, double volume) { |
1375 return InvokeOnWorker(Bind(&VoiceMediaChannel::SetOutputVolume, | 1375 return InvokeOnWorker(Bind(&VoiceMediaChannel::SetOutputVolume, |
1376 media_channel(), ssrc, volume)); | 1376 media_channel(), ssrc, volume)); |
1377 } | 1377 } |
1378 | 1378 |
1379 void VoiceChannel::SetRawAudioSink(uint32_t ssrc, AudioRenderer::Sink* sink) { | |
1380 worker_thread()->Invoke<void>( | |
perkj_webrtc
2015/12/10 12:24:05
Use InvokeOnWorker same as the others.
tommi
2015/12/10 22:37:25
InvokeOnWorker unfortunately only works for method
| |
1381 Bind(&VoiceMediaChannel::SetRawAudioSink, media_channel(), ssrc, sink)); | |
1382 } | |
1383 | |
1379 bool VoiceChannel::GetStats(VoiceMediaInfo* stats) { | 1384 bool VoiceChannel::GetStats(VoiceMediaInfo* stats) { |
1380 return InvokeOnWorker(Bind(&VoiceMediaChannel::GetStats, | 1385 return InvokeOnWorker(Bind(&VoiceMediaChannel::GetStats, |
1381 media_channel(), stats)); | 1386 media_channel(), stats)); |
1382 } | 1387 } |
1383 | 1388 |
1384 void VoiceChannel::StartMediaMonitor(int cms) { | 1389 void VoiceChannel::StartMediaMonitor(int cms) { |
1385 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), | 1390 media_monitor_.reset(new VoiceMediaMonitor(media_channel(), worker_thread(), |
1386 rtc::Thread::Current())); | 1391 rtc::Thread::Current())); |
1387 media_monitor_->SignalUpdate.connect( | 1392 media_monitor_->SignalUpdate.connect( |
1388 this, &VoiceChannel::OnMediaMonitorUpdate); | 1393 this, &VoiceChannel::OnMediaMonitorUpdate); |
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2314 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); | 2319 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); |
2315 } | 2320 } |
2316 | 2321 |
2317 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { | 2322 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { |
2318 rtc::TypedMessageData<uint32_t>* message = | 2323 rtc::TypedMessageData<uint32_t>* message = |
2319 new rtc::TypedMessageData<uint32_t>(sid); | 2324 new rtc::TypedMessageData<uint32_t>(sid); |
2320 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2325 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
2321 } | 2326 } |
2322 | 2327 |
2323 } // namespace cricket | 2328 } // namespace cricket |
OLD | NEW |