| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 } | 1029 } |
| 1030 if (send) { | 1030 if (send) { |
| 1031 StartAllSendStreams(); | 1031 StartAllSendStreams(); |
| 1032 } else { | 1032 } else { |
| 1033 StopAllSendStreams(); | 1033 StopAllSendStreams(); |
| 1034 } | 1034 } |
| 1035 sending_ = send; | 1035 sending_ = send; |
| 1036 return true; | 1036 return true; |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 bool WebRtcVideoChannel2::SetVideoSend(uint32 ssrc, bool mute, | 1039 bool WebRtcVideoChannel2::SetVideoSend(uint32 ssrc, bool enable, |
| 1040 const VideoOptions* options) { | 1040 const VideoOptions* options) { |
| 1041 // TODO(solenberg): The state change should be fully rolled back if any one of | 1041 // TODO(solenberg): The state change should be fully rolled back if any one of |
| 1042 // these calls fail. | 1042 // these calls fail. |
| 1043 if (!MuteStream(ssrc, mute)) { | 1043 if (!MuteStream(ssrc, !enable)) { |
| 1044 return false; | 1044 return false; |
| 1045 } | 1045 } |
| 1046 if (!mute && options) { | 1046 if (enable && options) { |
| 1047 return SetOptions(*options); | 1047 return SetOptions(*options); |
| 1048 } else { | 1048 } else { |
| 1049 return true; | 1049 return true; |
| 1050 } | 1050 } |
| 1051 } | 1051 } |
| 1052 | 1052 |
| 1053 bool WebRtcVideoChannel2::ValidateSendSsrcAvailability( | 1053 bool WebRtcVideoChannel2::ValidateSendSsrcAvailability( |
| 1054 const StreamParams& sp) const { | 1054 const StreamParams& sp) const { |
| 1055 for (uint32_t ssrc: sp.ssrcs) { | 1055 for (uint32_t ssrc: sp.ssrcs) { |
| 1056 if (send_ssrcs_.find(ssrc) != send_ssrcs_.end()) { | 1056 if (send_ssrcs_.find(ssrc) != send_ssrcs_.end()) { |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2737 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2738 } | 2738 } |
| 2739 } | 2739 } |
| 2740 | 2740 |
| 2741 return video_codecs; | 2741 return video_codecs; |
| 2742 } | 2742 } |
| 2743 | 2743 |
| 2744 } // namespace cricket | 2744 } // namespace cricket |
| 2745 | 2745 |
| 2746 #endif // HAVE_WEBRTC_VIDEO | 2746 #endif // HAVE_WEBRTC_VIDEO |
| OLD | NEW |