| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 before[i].codec.preference = 0; | 781 before[i].codec.preference = 0; |
| 782 after[i].codec.preference = 0; | 782 after[i].codec.preference = 0; |
| 783 if (before[i] != after[i]) { | 783 if (before[i] != after[i]) { |
| 784 return true; | 784 return true; |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 return false; | 787 return false; |
| 788 } | 788 } |
| 789 | 789 |
| 790 bool WebRtcVideoChannel2::SetSendParameters(const VideoSendParameters& params) { | 790 bool WebRtcVideoChannel2::SetSendParameters(const VideoSendParameters& params) { |
| 791 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSendParameters"); |
| 791 LOG(LS_INFO) << "SetSendParameters: " << params.ToString(); | 792 LOG(LS_INFO) << "SetSendParameters: " << params.ToString(); |
| 792 // TODO(pbos): Refactor this to only recreate the send streams once | 793 // TODO(pbos): Refactor this to only recreate the send streams once |
| 793 // instead of 4 times. | 794 // instead of 4 times. |
| 794 return (SetSendCodecs(params.codecs) && | 795 return (SetSendCodecs(params.codecs) && |
| 795 SetSendRtpHeaderExtensions(params.extensions) && | 796 SetSendRtpHeaderExtensions(params.extensions) && |
| 796 SetMaxSendBandwidth(params.max_bandwidth_bps) && | 797 SetMaxSendBandwidth(params.max_bandwidth_bps) && |
| 797 SetOptions(params.options)); | 798 SetOptions(params.options)); |
| 798 } | 799 } |
| 799 | 800 |
| 800 bool WebRtcVideoChannel2::SetRecvParameters(const VideoRecvParameters& params) { | 801 bool WebRtcVideoChannel2::SetRecvParameters(const VideoRecvParameters& params) { |
| 802 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetRecvParameters"); |
| 801 LOG(LS_INFO) << "SetRecvParameters: " << params.ToString(); | 803 LOG(LS_INFO) << "SetRecvParameters: " << params.ToString(); |
| 802 // TODO(pbos): Refactor this to only recreate the recv streams once | 804 // TODO(pbos): Refactor this to only recreate the recv streams once |
| 803 // instead of twice. | 805 // instead of twice. |
| 804 return (SetRecvCodecs(params.codecs) && | 806 return (SetRecvCodecs(params.codecs) && |
| 805 SetRecvRtpHeaderExtensions(params.extensions)); | 807 SetRecvRtpHeaderExtensions(params.extensions)); |
| 806 } | 808 } |
| 807 | 809 |
| 808 std::string WebRtcVideoChannel2::CodecSettingsVectorToString( | 810 std::string WebRtcVideoChannel2::CodecSettingsVectorToString( |
| 809 const std::vector<VideoCodecSettings>& codecs) { | 811 const std::vector<VideoCodecSettings>& codecs) { |
| 810 std::stringstream out; | 812 std::stringstream out; |
| (...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2683 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2685 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2684 } | 2686 } |
| 2685 } | 2687 } |
| 2686 | 2688 |
| 2687 return video_codecs; | 2689 return video_codecs; |
| 2688 } | 2690 } |
| 2689 | 2691 |
| 2690 } // namespace cricket | 2692 } // namespace cricket |
| 2691 | 2693 |
| 2692 #endif // HAVE_WEBRTC_VIDEO | 2694 #endif // HAVE_WEBRTC_VIDEO |
| OLD | NEW |