Android: Remove use of deprecated functions related to legacy video codecs

Bug: webrtc:7925
Change-Id: I6728a0ef931ae93ba095965daeeb97925a31b245
Reviewed-on: https://webrtc-review.googlesource.com/88570
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23980}
This commit is contained in:
Magnus Jedvert 2018-07-13 17:26:32 +02:00 committed by Commit Bot
parent b4dfdf574d
commit 5a3d87d122
2 changed files with 1 additions and 22 deletions

View File

@ -331,13 +331,10 @@ public class PeerConnectionClient {
final String fieldTrials = getFieldTrials(peerConnectionParameters);
executor.execute(() -> {
Log.d(TAG,
"Initialize WebRTC. Field trials: " + fieldTrials + " Enable video HW acceleration: "
+ peerConnectionParameters.videoCodecHwAcceleration);
Log.d(TAG, "Initialize WebRTC. Field trials: " + fieldTrials);
PeerConnectionFactory.initialize(
PeerConnectionFactory.InitializationOptions.builder(appContext)
.setFieldTrials(fieldTrials)
.setEnableVideoHwAcceleration(peerConnectionParameters.videoCodecHwAcceleration)
.setEnableInternalTracer(true)
.createInitializationOptions());
});
@ -637,11 +634,6 @@ public class PeerConnectionClient {
queuedRemoteCandidates = new ArrayList<>();
if (isVideoCallEnabled()) {
factory.setVideoHwAccelerationOptions(
rootEglBase.getEglBaseContext(), rootEglBase.getEglBaseContext());
}
PeerConnection.RTCConfiguration rtcConfig =
new PeerConnection.RTCConfiguration(signalingParameters.iceServers);
// TCP candidates are only useful when connecting to a server that supports

View File

@ -37,7 +37,6 @@ import org.webrtc.Camera2Enumerator;
import org.webrtc.CameraEnumerator;
import org.webrtc.EglBase;
import org.webrtc.IceCandidate;
import org.webrtc.MediaCodecVideoEncoder;
import org.webrtc.PeerConnection;
import org.webrtc.PeerConnectionFactory;
import org.webrtc.SessionDescription;
@ -528,12 +527,6 @@ public class PeerConnectionClientTest implements PeerConnectionEvents {
Log.i(TAG, "Encode to textures is not supported. Requires SDK version 19");
return;
}
// TODO(perkj): If we can always capture to textures, there is no need to check if the
// hardware encoder supports to encode from a texture.
if (!MediaCodecVideoEncoder.isVp8HwSupportedUsingTextures()) {
Log.i(TAG, "VP8 encode to textures is not supported.");
return;
}
doLoopbackTest(createParametersForVideoCall(VIDEO_CODEC_VP8),
createCameraCapturer(true /* captureToTexture */), true /* decodeToTexture */);
}
@ -545,12 +538,6 @@ public class PeerConnectionClientTest implements PeerConnectionEvents {
Log.i(TAG, "Encode to textures is not supported. Requires KITKAT");
return;
}
// TODO(perkj): If we can always capture to textures, there is no need to check if the
// hardware encoder supports to encode from a texture.
if (!MediaCodecVideoEncoder.isH264HwSupportedUsingTextures()) {
Log.i(TAG, "H264 encode to textures is not supported.");
return;
}
doLoopbackTest(createParametersForVideoCall(VIDEO_CODEC_H264),
createCameraCapturer(true /* captureToTexture */), true /* decodeToTexture */);
}