| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 public static final String VIDEO_TRACK_TYPE = "video"; | 69 public static final String VIDEO_TRACK_TYPE = "video"; |
| 70 private static final String TAG = "PCRTCClient"; | 70 private static final String TAG = "PCRTCClient"; |
| 71 private static final String VIDEO_CODEC_VP8 = "VP8"; | 71 private static final String VIDEO_CODEC_VP8 = "VP8"; |
| 72 private static final String VIDEO_CODEC_VP9 = "VP9"; | 72 private static final String VIDEO_CODEC_VP9 = "VP9"; |
| 73 private static final String VIDEO_CODEC_H264 = "H264"; | 73 private static final String VIDEO_CODEC_H264 = "H264"; |
| 74 private static final String AUDIO_CODEC_OPUS = "opus"; | 74 private static final String AUDIO_CODEC_OPUS = "opus"; |
| 75 private static final String AUDIO_CODEC_ISAC = "ISAC"; | 75 private static final String AUDIO_CODEC_ISAC = "ISAC"; |
| 76 private static final String VIDEO_CODEC_PARAM_START_BITRATE = "x-google-start-
bitrate"; | 76 private static final String VIDEO_CODEC_PARAM_START_BITRATE = "x-google-start-
bitrate"; |
| 77 private static final String VIDEO_FLEXFEC_FIELDTRIAL = "WebRTC-FlexFEC-03/Enab
led/"; | 77 private static final String VIDEO_FLEXFEC_FIELDTRIAL = "WebRTC-FlexFEC-03/Enab
led/"; |
| 78 private static final String VIDEO_VP8_INTEL_HW_ENCODER_FIELDTRIAL = "WebRTC-In
telVP8/Enabled/"; | 78 private static final String VIDEO_VP8_INTEL_HW_ENCODER_FIELDTRIAL = "WebRTC-In
telVP8/Enabled/"; |
| 79 private static final String VIDEO_H264_HIGH_PROFILE_FIELDTRIAL = |
| 80 "WebRTC-H264HighProfile/Enabled/"; |
| 79 private static final String AUDIO_CODEC_PARAM_BITRATE = "maxaveragebitrate"; | 81 private static final String AUDIO_CODEC_PARAM_BITRATE = "maxaveragebitrate"; |
| 80 private static final String AUDIO_ECHO_CANCELLATION_CONSTRAINT = "googEchoCanc
ellation"; | 82 private static final String AUDIO_ECHO_CANCELLATION_CONSTRAINT = "googEchoCanc
ellation"; |
| 81 private static final String AUDIO_AUTO_GAIN_CONTROL_CONSTRAINT = "googAutoGain
Control"; | 83 private static final String AUDIO_AUTO_GAIN_CONTROL_CONSTRAINT = "googAutoGain
Control"; |
| 82 private static final String AUDIO_HIGH_PASS_FILTER_CONSTRAINT = "googHighpassF
ilter"; | 84 private static final String AUDIO_HIGH_PASS_FILTER_CONSTRAINT = "googHighpassF
ilter"; |
| 83 private static final String AUDIO_NOISE_SUPPRESSION_CONSTRAINT = "googNoiseSup
pression"; | 85 private static final String AUDIO_NOISE_SUPPRESSION_CONSTRAINT = "googNoiseSup
pression"; |
| 84 private static final String AUDIO_LEVEL_CONTROL_CONSTRAINT = "levelControl"; | 86 private static final String AUDIO_LEVEL_CONTROL_CONSTRAINT = "levelControl"; |
| 85 private static final String DTLS_SRTP_KEY_AGREEMENT_CONSTRAINT = "DtlsSrtpKeyA
greement"; | 87 private static final String DTLS_SRTP_KEY_AGREEMENT_CONSTRAINT = "DtlsSrtpKeyA
greement"; |
| 86 private static final int HD_VIDEO_WIDTH = 1280; | 88 private static final int HD_VIDEO_WIDTH = 1280; |
| 87 private static final int HD_VIDEO_HEIGHT = 720; | 89 private static final int HD_VIDEO_HEIGHT = 720; |
| 88 private static final int BPS_IN_KBPS = 1000; | 90 private static final int BPS_IN_KBPS = 1000; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 "Create peer connection factory. Use video: " + peerConnectionParameters
.videoCallEnabled); | 373 "Create peer connection factory. Use video: " + peerConnectionParameters
.videoCallEnabled); |
| 372 isError = false; | 374 isError = false; |
| 373 | 375 |
| 374 // Initialize field trials. | 376 // Initialize field trials. |
| 375 String fieldTrials = ""; | 377 String fieldTrials = ""; |
| 376 if (peerConnectionParameters.videoFlexfecEnabled) { | 378 if (peerConnectionParameters.videoFlexfecEnabled) { |
| 377 fieldTrials += VIDEO_FLEXFEC_FIELDTRIAL; | 379 fieldTrials += VIDEO_FLEXFEC_FIELDTRIAL; |
| 378 Log.d(TAG, "Enable FlexFEC field trial."); | 380 Log.d(TAG, "Enable FlexFEC field trial."); |
| 379 } | 381 } |
| 380 fieldTrials += VIDEO_VP8_INTEL_HW_ENCODER_FIELDTRIAL; | 382 fieldTrials += VIDEO_VP8_INTEL_HW_ENCODER_FIELDTRIAL; |
| 383 fieldTrials += VIDEO_H264_HIGH_PROFILE_FIELDTRIAL; |
| 381 PeerConnectionFactory.initializeFieldTrials(fieldTrials); | 384 PeerConnectionFactory.initializeFieldTrials(fieldTrials); |
| 382 | 385 |
| 383 // Check preferred video codec. | 386 // Check preferred video codec. |
| 384 preferredVideoCodec = VIDEO_CODEC_VP8; | 387 preferredVideoCodec = VIDEO_CODEC_VP8; |
| 385 if (videoCallEnabled && peerConnectionParameters.videoCodec != null) { | 388 if (videoCallEnabled && peerConnectionParameters.videoCodec != null) { |
| 386 if (peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_VP9)) { | 389 if (peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_VP9)) { |
| 387 preferredVideoCodec = VIDEO_CODEC_VP9; | 390 preferredVideoCodec = VIDEO_CODEC_VP9; |
| 388 } else if (peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_H264)) { | 391 } else if (peerConnectionParameters.videoCodec.equals(VIDEO_CODEC_H264)) { |
| 389 preferredVideoCodec = VIDEO_CODEC_H264; | 392 preferredVideoCodec = VIDEO_CODEC_H264; |
| 390 } | 393 } |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 public void onCreateFailure(final String error) { | 1282 public void onCreateFailure(final String error) { |
| 1280 reportError("createSDP error: " + error); | 1283 reportError("createSDP error: " + error); |
| 1281 } | 1284 } |
| 1282 | 1285 |
| 1283 @Override | 1286 @Override |
| 1284 public void onSetFailure(final String error) { | 1287 public void onSetFailure(final String error) { |
| 1285 reportError("setSDP error: " + error); | 1288 reportError("setSDP error: " + error); |
| 1286 } | 1289 } |
| 1287 } | 1290 } |
| 1288 } | 1291 } |
| OLD | NEW |