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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 : unsignalled_ssrc_handler_(&default_unsignalled_ssrc_handler_), | 796 : unsignalled_ssrc_handler_(&default_unsignalled_ssrc_handler_), |
797 voice_channel_(voice_channel), | 797 voice_channel_(voice_channel), |
798 voice_channel_id_(voice_channel ? voice_channel->voe_channel() : -1), | 798 voice_channel_id_(voice_channel ? voice_channel->voe_channel() : -1), |
799 external_encoder_factory_(external_encoder_factory), | 799 external_encoder_factory_(external_encoder_factory), |
800 external_decoder_factory_(external_decoder_factory) { | 800 external_decoder_factory_(external_decoder_factory) { |
801 DCHECK(thread_checker_.CalledOnValidThread()); | 801 DCHECK(thread_checker_.CalledOnValidThread()); |
802 SetDefaultOptions(); | 802 SetDefaultOptions(); |
803 options_.SetAll(options); | 803 options_.SetAll(options); |
804 options_.cpu_overuse_detection.Get(&signal_cpu_adaptation_); | 804 options_.cpu_overuse_detection.Get(&signal_cpu_adaptation_); |
805 webrtc::Call::Config config; | 805 webrtc::Call::Config config; |
806 config.overuse_callback = this; | |
807 if (voice_engine != NULL) { | 806 if (voice_engine != NULL) { |
808 config.voice_engine = voice_engine->voe()->engine(); | 807 config.voice_engine = voice_engine->voe()->engine(); |
809 } | 808 } |
810 config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 809 config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; |
811 config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 810 config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; |
812 config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 811 config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; |
813 call_.reset(call_factory->CreateCall(config)); | 812 call_.reset(call_factory->CreateCall(config)); |
814 if (voice_channel_) { | 813 if (voice_channel_) { |
815 voice_channel_->SetCall(call_.get()); | 814 voice_channel_->SetCall(call_.get()); |
816 } | 815 } |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 return false; | 1123 return false; |
1125 | 1124 |
1126 rtc::CritScope stream_lock(&stream_crit_); | 1125 rtc::CritScope stream_lock(&stream_crit_); |
1127 | 1126 |
1128 if (!ValidateSendSsrcAvailability(sp)) | 1127 if (!ValidateSendSsrcAvailability(sp)) |
1129 return false; | 1128 return false; |
1130 | 1129 |
1131 for (uint32 used_ssrc : sp.ssrcs) | 1130 for (uint32 used_ssrc : sp.ssrcs) |
1132 send_ssrcs_.insert(used_ssrc); | 1131 send_ssrcs_.insert(used_ssrc); |
1133 | 1132 |
| 1133 webrtc::VideoSendStream::Config config(this); |
| 1134 config.overuse_callback = this; |
| 1135 |
1134 WebRtcVideoSendStream* stream = | 1136 WebRtcVideoSendStream* stream = |
1135 new WebRtcVideoSendStream(call_.get(), | 1137 new WebRtcVideoSendStream(call_.get(), |
1136 sp, | 1138 sp, |
1137 webrtc::VideoSendStream::Config(this), | 1139 config, |
1138 external_encoder_factory_, | 1140 external_encoder_factory_, |
1139 options_, | 1141 options_, |
1140 bitrate_config_.max_bitrate_bps, | 1142 bitrate_config_.max_bitrate_bps, |
1141 send_codec_, | 1143 send_codec_, |
1142 send_rtp_extensions_); | 1144 send_rtp_extensions_); |
1143 | 1145 |
1144 uint32 ssrc = sp.first_ssrc(); | 1146 uint32 ssrc = sp.first_ssrc(); |
1145 DCHECK(ssrc != 0); | 1147 DCHECK(ssrc != 0); |
1146 send_streams_[ssrc] = stream; | 1148 send_streams_[ssrc] = stream; |
1147 | 1149 |
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2765 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2764 } | 2766 } |
2765 } | 2767 } |
2766 | 2768 |
2767 return video_codecs; | 2769 return video_codecs; |
2768 } | 2770 } |
2769 | 2771 |
2770 } // namespace cricket | 2772 } // namespace cricket |
2771 | 2773 |
2772 #endif // HAVE_WEBRTC_VIDEO | 2774 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |