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 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 // Remove any remaining streams. | 1736 // Remove any remaining streams. |
1737 while (!receive_channels_.empty()) { | 1737 while (!receive_channels_.empty()) { |
1738 RemoveRecvStream(receive_channels_.begin()->first); | 1738 RemoveRecvStream(receive_channels_.begin()->first); |
1739 } | 1739 } |
1740 DCHECK(receive_streams_.empty()); | 1740 DCHECK(receive_streams_.empty()); |
1741 | 1741 |
1742 // Delete the default channel. | 1742 // Delete the default channel. |
1743 DeleteChannel(voe_channel()); | 1743 DeleteChannel(voe_channel()); |
1744 } | 1744 } |
1745 | 1745 |
| 1746 bool WebRtcVoiceMediaChannel::SetSendParameters( |
| 1747 const AudioSendParameters& params) { |
| 1748 // TODO(pthatcher): Refactor this to be more clean now that we have |
| 1749 // all the information at once. |
| 1750 return (SetSendCodecs(params.codecs) && |
| 1751 SetSendRtpHeaderExtensions(params.extensions) && |
| 1752 SetMaxSendBandwidth(params.max_bandwidth_bps) && |
| 1753 SetOptions(params.options)); |
| 1754 } |
| 1755 |
| 1756 bool WebRtcVoiceMediaChannel::SetRecvParameters( |
| 1757 const AudioRecvParameters& params) { |
| 1758 // TODO(pthatcher): Refactor this to be more clean now that we have |
| 1759 // all the information at once. |
| 1760 return (SetRecvCodecs(params.codecs) && |
| 1761 SetRecvRtpHeaderExtensions(params.extensions)); |
| 1762 } |
| 1763 |
1746 bool WebRtcVoiceMediaChannel::SetOptions(const AudioOptions& options) { | 1764 bool WebRtcVoiceMediaChannel::SetOptions(const AudioOptions& options) { |
1747 LOG(LS_INFO) << "Setting voice channel options: " | 1765 LOG(LS_INFO) << "Setting voice channel options: " |
1748 << options.ToString(); | 1766 << options.ToString(); |
1749 | 1767 |
1750 // Check if DSCP value is changed from previous. | 1768 // Check if DSCP value is changed from previous. |
1751 bool dscp_option_changed = (options_.dscp != options.dscp); | 1769 bool dscp_option_changed = (options_.dscp != options.dscp); |
1752 | 1770 |
1753 // TODO(xians): Add support to set different options for different send | 1771 // TODO(xians): Add support to set different options for different send |
1754 // streams after we support multiple APMs. | 1772 // streams after we support multiple APMs. |
1755 | 1773 |
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3667 | 3685 |
3668 int WebRtcSoundclipStream::Rewind() { | 3686 int WebRtcSoundclipStream::Rewind() { |
3669 mem_.Rewind(); | 3687 mem_.Rewind(); |
3670 // Return -1 to keep VoiceEngine from looping. | 3688 // Return -1 to keep VoiceEngine from looping. |
3671 return (loop_) ? 0 : -1; | 3689 return (loop_) ? 0 : -1; |
3672 } | 3690 } |
3673 | 3691 |
3674 } // namespace cricket | 3692 } // namespace cricket |
3675 | 3693 |
3676 #endif // HAVE_WEBRTC_VOICE | 3694 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |