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 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1940 | 1940 |
1941 format_ = VideoFormat(codec_settings.codec.width, | 1941 format_ = VideoFormat(codec_settings.codec.width, |
1942 codec_settings.codec.height, | 1942 codec_settings.codec.height, |
1943 VideoFormat::FpsToInterval(30), | 1943 VideoFormat::FpsToInterval(30), |
1944 FOURCC_I420); | 1944 FOURCC_I420); |
1945 | 1945 |
1946 AllocatedEncoder new_encoder = CreateVideoEncoder(codec_settings.codec); | 1946 AllocatedEncoder new_encoder = CreateVideoEncoder(codec_settings.codec); |
1947 parameters_.config.encoder_settings.encoder = new_encoder.encoder; | 1947 parameters_.config.encoder_settings.encoder = new_encoder.encoder; |
1948 parameters_.config.encoder_settings.payload_name = codec_settings.codec.name; | 1948 parameters_.config.encoder_settings.payload_name = codec_settings.codec.name; |
1949 parameters_.config.encoder_settings.payload_type = codec_settings.codec.id; | 1949 parameters_.config.encoder_settings.payload_type = codec_settings.codec.id; |
| 1950 if (new_encoder.external) { |
| 1951 webrtc::VideoCodecType type = CodecTypeFromName(codec_settings.codec.name); |
| 1952 parameters_.config.encoder_settings.internal_source = |
| 1953 external_encoder_factory_->EncoderTypeHasInternalSource(type); |
| 1954 } |
1950 parameters_.config.rtp.fec = codec_settings.fec; | 1955 parameters_.config.rtp.fec = codec_settings.fec; |
1951 | 1956 |
1952 // Set RTX payload type if RTX is enabled. | 1957 // Set RTX payload type if RTX is enabled. |
1953 if (!parameters_.config.rtp.rtx.ssrcs.empty()) { | 1958 if (!parameters_.config.rtp.rtx.ssrcs.empty()) { |
1954 if (codec_settings.rtx_payload_type == -1) { | 1959 if (codec_settings.rtx_payload_type == -1) { |
1955 LOG(LS_WARNING) << "RTX SSRCs configured but there's no configured RTX " | 1960 LOG(LS_WARNING) << "RTX SSRCs configured but there's no configured RTX " |
1956 "payload type. Ignoring."; | 1961 "payload type. Ignoring."; |
1957 parameters_.config.rtp.rtx.ssrcs.clear(); | 1962 parameters_.config.rtp.rtx.ssrcs.clear(); |
1958 } else { | 1963 } else { |
1959 parameters_.config.rtp.rtx.payload_type = codec_settings.rtx_payload_type; | 1964 parameters_.config.rtp.rtx.payload_type = codec_settings.rtx_payload_type; |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2623 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2628 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2624 } | 2629 } |
2625 } | 2630 } |
2626 | 2631 |
2627 return video_codecs; | 2632 return video_codecs; |
2628 } | 2633 } |
2629 | 2634 |
2630 } // namespace cricket | 2635 } // namespace cricket |
2631 | 2636 |
2632 #endif // HAVE_WEBRTC_VIDEO | 2637 #endif // HAVE_WEBRTC_VIDEO |
OLD | NEW |