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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 rtcp_receiver_report_ssrc_ = kDefaultRtcpReceiverReportSsrc; | 629 rtcp_receiver_report_ssrc_ = kDefaultRtcpReceiverReportSsrc; |
630 sending_ = false; | 630 sending_ = false; |
631 default_send_ssrc_ = 0; | 631 default_send_ssrc_ = 0; |
632 SetRecvCodecs(recv_codecs); | 632 SetRecvCodecs(recv_codecs); |
633 } | 633 } |
634 | 634 |
635 void WebRtcVideoChannel2::SetDefaultOptions() { | 635 void WebRtcVideoChannel2::SetDefaultOptions() { |
636 options_.cpu_overuse_detection = rtc::Optional<bool>(true); | 636 options_.cpu_overuse_detection = rtc::Optional<bool>(true); |
637 options_.dscp = rtc::Optional<bool>(false); | 637 options_.dscp = rtc::Optional<bool>(false); |
638 options_.suspend_below_min_bitrate = rtc::Optional<bool>(false); | 638 options_.suspend_below_min_bitrate = rtc::Optional<bool>(false); |
639 options_.screencast_min_bitrate = rtc::Optional<int>(0); | 639 options_.screencast_min_bitrate_kbps = rtc::Optional<int>(0); |
640 } | 640 } |
641 | 641 |
642 WebRtcVideoChannel2::~WebRtcVideoChannel2() { | 642 WebRtcVideoChannel2::~WebRtcVideoChannel2() { |
643 for (auto& kv : send_streams_) | 643 for (auto& kv : send_streams_) |
644 delete kv.second; | 644 delete kv.second; |
645 for (auto& kv : receive_streams_) | 645 for (auto& kv : receive_streams_) |
646 delete kv.second; | 646 delete kv.second; |
647 } | 647 } |
648 | 648 |
649 bool WebRtcVideoChannel2::CodecIsExternallySupported( | 649 bool WebRtcVideoChannel2::CodecIsExternallySupported( |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 RecreateWebRtcStream(); | 1940 RecreateWebRtcStream(); |
1941 } | 1941 } |
1942 } | 1942 } |
1943 | 1943 |
1944 webrtc::VideoEncoderConfig | 1944 webrtc::VideoEncoderConfig |
1945 WebRtcVideoChannel2::WebRtcVideoSendStream::CreateVideoEncoderConfig( | 1945 WebRtcVideoChannel2::WebRtcVideoSendStream::CreateVideoEncoderConfig( |
1946 const Dimensions& dimensions, | 1946 const Dimensions& dimensions, |
1947 const VideoCodec& codec) const { | 1947 const VideoCodec& codec) const { |
1948 webrtc::VideoEncoderConfig encoder_config; | 1948 webrtc::VideoEncoderConfig encoder_config; |
1949 if (dimensions.is_screencast) { | 1949 if (dimensions.is_screencast) { |
1950 RTC_CHECK(parameters_.options.screencast_min_bitrate); | 1950 RTC_CHECK(parameters_.options.screencast_min_bitrate_kbps); |
1951 encoder_config.min_transmit_bitrate_bps = | 1951 encoder_config.min_transmit_bitrate_bps = |
1952 *parameters_.options.screencast_min_bitrate * 1000; | 1952 *parameters_.options.screencast_min_bitrate_kbps * 1000; |
1953 encoder_config.content_type = | 1953 encoder_config.content_type = |
1954 webrtc::VideoEncoderConfig::ContentType::kScreen; | 1954 webrtc::VideoEncoderConfig::ContentType::kScreen; |
1955 } else { | 1955 } else { |
1956 encoder_config.min_transmit_bitrate_bps = 0; | 1956 encoder_config.min_transmit_bitrate_bps = 0; |
1957 encoder_config.content_type = | 1957 encoder_config.content_type = |
1958 webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo; | 1958 webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo; |
1959 } | 1959 } |
1960 | 1960 |
1961 // Restrict dimensions according to codec max. | 1961 // Restrict dimensions according to codec max. |
1962 int width = dimensions.width; | 1962 int width = dimensions.width; |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2626 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2626 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2627 } | 2627 } |
2628 } | 2628 } |
2629 | 2629 |
2630 return video_codecs; | 2630 return video_codecs; |
2631 } | 2631 } |
2632 | 2632 |
2633 } // namespace cricket | 2633 } // namespace cricket |
2634 | 2634 |
2635 #endif // HAVE_WEBRTC_VIDEO | 2635 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |