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 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2301 send_ = send; | 2301 send_ = send; |
2302 return true; | 2302 return true; |
2303 } | 2303 } |
2304 | 2304 |
2305 bool WebRtcVoiceMediaChannel::ChangeSend(int channel, SendFlags send) { | 2305 bool WebRtcVoiceMediaChannel::ChangeSend(int channel, SendFlags send) { |
2306 if (send == SEND_MICROPHONE) { | 2306 if (send == SEND_MICROPHONE) { |
2307 if (engine()->voe()->base()->StartSend(channel) == -1) { | 2307 if (engine()->voe()->base()->StartSend(channel) == -1) { |
2308 LOG_RTCERR1(StartSend, channel); | 2308 LOG_RTCERR1(StartSend, channel); |
2309 return false; | 2309 return false; |
2310 } | 2310 } |
2311 if (engine()->voe()->file() && | |
2312 engine()->voe()->file()->StopPlayingFileAsMicrophone(channel) == -1) { | |
2313 LOG_RTCERR1(StopPlayingFileAsMicrophone, channel); | |
2314 return false; | |
2315 } | |
2316 } else { // SEND_NOTHING | 2311 } else { // SEND_NOTHING |
2317 RTC_DCHECK(send == SEND_NOTHING); | 2312 RTC_DCHECK(send == SEND_NOTHING); |
2318 if (engine()->voe()->base()->StopSend(channel) == -1) { | 2313 if (engine()->voe()->base()->StopSend(channel) == -1) { |
2319 LOG_RTCERR1(StopSend, channel); | 2314 LOG_RTCERR1(StopSend, channel); |
2320 return false; | 2315 return false; |
2321 } | 2316 } |
2322 } | 2317 } |
2323 | 2318 |
2324 return true; | 2319 return true; |
2325 } | 2320 } |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3499 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); | 3494 LOG(LS_WARNING) << "Unknown codec " << ToString(codec); |
3500 return false; | 3495 return false; |
3501 } | 3496 } |
3502 } | 3497 } |
3503 return true; | 3498 return true; |
3504 } | 3499 } |
3505 | 3500 |
3506 } // namespace cricket | 3501 } // namespace cricket |
3507 | 3502 |
3508 #endif // HAVE_WEBRTC_VOICE | 3503 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |