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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
782 : unsignalled_ssrc_handler_(&default_unsignalled_ssrc_handler_), | 782 : unsignalled_ssrc_handler_(&default_unsignalled_ssrc_handler_), |
783 voice_channel_(voice_channel), | 783 voice_channel_(voice_channel), |
784 voice_channel_id_(voice_channel ? voice_channel->voe_channel() : -1), | 784 voice_channel_id_(voice_channel ? voice_channel->voe_channel() : -1), |
785 external_encoder_factory_(external_encoder_factory), | 785 external_encoder_factory_(external_encoder_factory), |
786 external_decoder_factory_(external_decoder_factory) { | 786 external_decoder_factory_(external_decoder_factory) { |
787 DCHECK(thread_checker_.CalledOnValidThread()); | 787 DCHECK(thread_checker_.CalledOnValidThread()); |
788 SetDefaultOptions(); | 788 SetDefaultOptions(); |
789 options_.SetAll(options); | 789 options_.SetAll(options); |
790 options_.cpu_overuse_detection.Get(&signal_cpu_adaptation_); | 790 options_.cpu_overuse_detection.Get(&signal_cpu_adaptation_); |
791 webrtc::Call::Config config; | 791 webrtc::Call::Config config; |
792 config.overuse_callback = this; | |
793 if (voice_engine != NULL) { | 792 if (voice_engine != NULL) { |
794 config.voice_engine = voice_engine->voe()->engine(); | 793 config.voice_engine = voice_engine->voe()->engine(); |
795 } | 794 } |
796 config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 795 config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; |
797 config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 796 config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; |
798 config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 797 config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; |
799 call_.reset(call_factory->CreateCall(config)); | 798 call_.reset(call_factory->CreateCall(config)); |
800 if (voice_channel_) { | 799 if (voice_channel_) { |
801 voice_channel_->SetCall(call_.get()); | 800 voice_channel_->SetCall(call_.get()); |
802 } | 801 } |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1110 return false; | 1109 return false; |
1111 | 1110 |
1112 rtc::CritScope stream_lock(&stream_crit_); | 1111 rtc::CritScope stream_lock(&stream_crit_); |
1113 | 1112 |
1114 if (!ValidateSendSsrcAvailability(sp)) | 1113 if (!ValidateSendSsrcAvailability(sp)) |
1115 return false; | 1114 return false; |
1116 | 1115 |
1117 for (uint32 used_ssrc : sp.ssrcs) | 1116 for (uint32 used_ssrc : sp.ssrcs) |
1118 send_ssrcs_.insert(used_ssrc); | 1117 send_ssrcs_.insert(used_ssrc); |
1119 | 1118 |
1119 webrtc::VideoSendStream::Config config(this); | |
1120 config.overuse_callback = this; | |
pbos-webrtc
2015/09/03 20:36:39
Can you set WebRtcVideoSendStream::this inside the
the sun
2015/09/03 20:54:55
I'm just changing the API and introducing the poss
| |
1121 | |
1120 WebRtcVideoSendStream* stream = | 1122 WebRtcVideoSendStream* stream = |
1121 new WebRtcVideoSendStream(call_.get(), | 1123 new WebRtcVideoSendStream(call_.get(), |
1122 sp, | 1124 sp, |
1123 webrtc::VideoSendStream::Config(this), | 1125 config, |
1124 external_encoder_factory_, | 1126 external_encoder_factory_, |
1125 options_, | 1127 options_, |
1126 bitrate_config_.max_bitrate_bps, | 1128 bitrate_config_.max_bitrate_bps, |
1127 send_codec_, | 1129 send_codec_, |
1128 send_rtp_extensions_); | 1130 send_rtp_extensions_); |
1129 | 1131 |
1130 uint32 ssrc = sp.first_ssrc(); | 1132 uint32 ssrc = sp.first_ssrc(); |
1131 DCHECK(ssrc != 0); | 1133 DCHECK(ssrc != 0); |
1132 send_streams_[ssrc] = stream; | 1134 send_streams_[ssrc] = stream; |
1133 | 1135 |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2744 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2746 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2745 } | 2747 } |
2746 } | 2748 } |
2747 | 2749 |
2748 return video_codecs; | 2750 return video_codecs; |
2749 } | 2751 } |
2750 | 2752 |
2751 } // namespace cricket | 2753 } // namespace cricket |
2752 | 2754 |
2753 #endif // HAVE_WEBRTC_VIDEO | 2755 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |