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 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 return false; | 1495 return false; |
1496 } | 1496 } |
1497 | 1497 |
1498 if (!SetRtpTransportParameters_w(content, action, CS_REMOTE, error_desc)) { | 1498 if (!SetRtpTransportParameters_w(content, action, CS_REMOTE, error_desc)) { |
1499 return false; | 1499 return false; |
1500 } | 1500 } |
1501 | 1501 |
1502 AudioSendParameters send_params = last_send_params_; | 1502 AudioSendParameters send_params = last_send_params_; |
1503 RtpSendParametersFromMediaDescription(audio, &send_params); | 1503 RtpSendParametersFromMediaDescription(audio, &send_params); |
1504 if (audio->agc_minus_10db()) { | 1504 if (audio->agc_minus_10db()) { |
1505 send_params.options.adjust_agc_delta = rtc::Maybe<int>(kAgcMinus10db); | 1505 send_params.options.adjust_agc_delta = rtc::Optional<int>(kAgcMinus10db); |
1506 } | 1506 } |
1507 if (!media_channel()->SetSendParameters(send_params)) { | 1507 if (!media_channel()->SetSendParameters(send_params)) { |
1508 SafeSetError("Failed to set remote audio description send parameters.", | 1508 SafeSetError("Failed to set remote audio description send parameters.", |
1509 error_desc); | 1509 error_desc); |
1510 return false; | 1510 return false; |
1511 } | 1511 } |
1512 last_send_params_ = send_params; | 1512 last_send_params_ = send_params; |
1513 | 1513 |
1514 // TODO(pthatcher): Move remote streams into AudioRecvParameters, | 1514 // TODO(pthatcher): Move remote streams into AudioRecvParameters, |
1515 // and only give it to the media channel once we have a local | 1515 // and only give it to the media channel once we have a local |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 } | 1782 } |
1783 | 1783 |
1784 | 1784 |
1785 if (!SetRtpTransportParameters_w(content, action, CS_REMOTE, error_desc)) { | 1785 if (!SetRtpTransportParameters_w(content, action, CS_REMOTE, error_desc)) { |
1786 return false; | 1786 return false; |
1787 } | 1787 } |
1788 | 1788 |
1789 VideoSendParameters send_params = last_send_params_; | 1789 VideoSendParameters send_params = last_send_params_; |
1790 RtpSendParametersFromMediaDescription(video, &send_params); | 1790 RtpSendParametersFromMediaDescription(video, &send_params); |
1791 if (video->conference_mode()) { | 1791 if (video->conference_mode()) { |
1792 send_params.options.conference_mode = rtc::Maybe<bool>(true); | 1792 send_params.options.conference_mode = rtc::Optional<bool>(true); |
1793 } | 1793 } |
1794 if (!media_channel()->SetSendParameters(send_params)) { | 1794 if (!media_channel()->SetSendParameters(send_params)) { |
1795 SafeSetError("Failed to set remote video description send parameters.", | 1795 SafeSetError("Failed to set remote video description send parameters.", |
1796 error_desc); | 1796 error_desc); |
1797 return false; | 1797 return false; |
1798 } | 1798 } |
1799 last_send_params_ = send_params; | 1799 last_send_params_ = send_params; |
1800 | 1800 |
1801 // TODO(pthatcher): Move remote streams into VideoRecvParameters, | 1801 // TODO(pthatcher): Move remote streams into VideoRecvParameters, |
1802 // and only give it to the media channel once we have a local | 1802 // and only give it to the media channel once we have a local |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2288 return (data_channel_type_ == DCT_RTP); | 2288 return (data_channel_type_ == DCT_RTP); |
2289 } | 2289 } |
2290 | 2290 |
2291 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { | 2291 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { |
2292 rtc::TypedMessageData<uint32_t>* message = | 2292 rtc::TypedMessageData<uint32_t>* message = |
2293 new rtc::TypedMessageData<uint32_t>(sid); | 2293 new rtc::TypedMessageData<uint32_t>(sid); |
2294 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2294 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
2295 } | 2295 } |
2296 | 2296 |
2297 } // namespace cricket | 2297 } // namespace cricket |
OLD | NEW |