OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 << ssrc << " which doesn't exist."; | 876 << ssrc << " which doesn't exist."; |
877 return webrtc::RtpParameters(); | 877 return webrtc::RtpParameters(); |
878 } | 878 } |
879 | 879 |
880 return it->second->GetRtpParameters(); | 880 return it->second->GetRtpParameters(); |
881 } | 881 } |
882 | 882 |
883 bool WebRtcVideoChannel2::SetRtpParameters( | 883 bool WebRtcVideoChannel2::SetRtpParameters( |
884 uint32_t ssrc, | 884 uint32_t ssrc, |
885 const webrtc::RtpParameters& parameters) { | 885 const webrtc::RtpParameters& parameters) { |
| 886 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetRtpParameters"); |
886 rtc::CritScope stream_lock(&stream_crit_); | 887 rtc::CritScope stream_lock(&stream_crit_); |
887 auto it = send_streams_.find(ssrc); | 888 auto it = send_streams_.find(ssrc); |
888 if (it == send_streams_.end()) { | 889 if (it == send_streams_.end()) { |
889 LOG(LS_ERROR) << "Attempting to set RTP parameters for stream with ssrc " | 890 LOG(LS_ERROR) << "Attempting to set RTP parameters for stream with ssrc " |
890 << ssrc << " which doesn't exist."; | 891 << ssrc << " which doesn't exist."; |
891 return false; | 892 return false; |
892 } | 893 } |
893 | 894 |
894 return it->second->SetRtpParameters(parameters); | 895 return it->second->SetRtpParameters(parameters); |
895 } | 896 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 bool WebRtcVideoChannel2::GetSendCodec(VideoCodec* codec) { | 979 bool WebRtcVideoChannel2::GetSendCodec(VideoCodec* codec) { |
979 if (!send_codec_) { | 980 if (!send_codec_) { |
980 LOG(LS_VERBOSE) << "GetSendCodec: No send codec set."; | 981 LOG(LS_VERBOSE) << "GetSendCodec: No send codec set."; |
981 return false; | 982 return false; |
982 } | 983 } |
983 *codec = send_codec_->codec; | 984 *codec = send_codec_->codec; |
984 return true; | 985 return true; |
985 } | 986 } |
986 | 987 |
987 bool WebRtcVideoChannel2::SetSend(bool send) { | 988 bool WebRtcVideoChannel2::SetSend(bool send) { |
| 989 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSend"); |
988 LOG(LS_VERBOSE) << "SetSend: " << (send ? "true" : "false"); | 990 LOG(LS_VERBOSE) << "SetSend: " << (send ? "true" : "false"); |
989 if (send && !send_codec_) { | 991 if (send && !send_codec_) { |
990 LOG(LS_ERROR) << "SetSend(true) called before setting codec."; | 992 LOG(LS_ERROR) << "SetSend(true) called before setting codec."; |
991 return false; | 993 return false; |
992 } | 994 } |
993 { | 995 { |
994 rtc::CritScope stream_lock(&stream_crit_); | 996 rtc::CritScope stream_lock(&stream_crit_); |
995 for (const auto& kv : send_streams_) { | 997 for (const auto& kv : send_streams_) { |
996 kv.second->SetSend(send); | 998 kv.second->SetSend(send); |
997 } | 999 } |
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2565 rtx_mapping[video_codecs[i].codec.id] != | 2567 rtx_mapping[video_codecs[i].codec.id] != |
2566 fec_settings.red_payload_type) { | 2568 fec_settings.red_payload_type) { |
2567 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2569 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2568 } | 2570 } |
2569 } | 2571 } |
2570 | 2572 |
2571 return video_codecs; | 2573 return video_codecs; |
2572 } | 2574 } |
2573 | 2575 |
2574 } // namespace cricket | 2576 } // namespace cricket |
OLD | NEW |