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:
committed by
Commit Bot
parent
b4dfdf574d
commit
5a3d87d122
@ -331,13 +331,10 @@ public class PeerConnectionClient {
|
|||||||
|
|
||||||
final String fieldTrials = getFieldTrials(peerConnectionParameters);
|
final String fieldTrials = getFieldTrials(peerConnectionParameters);
|
||||||
executor.execute(() -> {
|
executor.execute(() -> {
|
||||||
Log.d(TAG,
|
Log.d(TAG, "Initialize WebRTC. Field trials: " + fieldTrials);
|
||||||
"Initialize WebRTC. Field trials: " + fieldTrials + " Enable video HW acceleration: "
|
|
||||||
+ peerConnectionParameters.videoCodecHwAcceleration);
|
|
||||||
PeerConnectionFactory.initialize(
|
PeerConnectionFactory.initialize(
|
||||||
PeerConnectionFactory.InitializationOptions.builder(appContext)
|
PeerConnectionFactory.InitializationOptions.builder(appContext)
|
||||||
.setFieldTrials(fieldTrials)
|
.setFieldTrials(fieldTrials)
|
||||||
.setEnableVideoHwAcceleration(peerConnectionParameters.videoCodecHwAcceleration)
|
|
||||||
.setEnableInternalTracer(true)
|
.setEnableInternalTracer(true)
|
||||||
.createInitializationOptions());
|
.createInitializationOptions());
|
||||||
});
|
});
|
||||||
@ -637,11 +634,6 @@ public class PeerConnectionClient {
|
|||||||
|
|
||||||
queuedRemoteCandidates = new ArrayList<>();
|
queuedRemoteCandidates = new ArrayList<>();
|
||||||
|
|
||||||
if (isVideoCallEnabled()) {
|
|
||||||
factory.setVideoHwAccelerationOptions(
|
|
||||||
rootEglBase.getEglBaseContext(), rootEglBase.getEglBaseContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
PeerConnection.RTCConfiguration rtcConfig =
|
PeerConnection.RTCConfiguration rtcConfig =
|
||||||
new PeerConnection.RTCConfiguration(signalingParameters.iceServers);
|
new PeerConnection.RTCConfiguration(signalingParameters.iceServers);
|
||||||
// TCP candidates are only useful when connecting to a server that supports
|
// TCP candidates are only useful when connecting to a server that supports
|
||||||
|
|||||||
@ -37,7 +37,6 @@ import org.webrtc.Camera2Enumerator;
|
|||||||
import org.webrtc.CameraEnumerator;
|
import org.webrtc.CameraEnumerator;
|
||||||
import org.webrtc.EglBase;
|
import org.webrtc.EglBase;
|
||||||
import org.webrtc.IceCandidate;
|
import org.webrtc.IceCandidate;
|
||||||
import org.webrtc.MediaCodecVideoEncoder;
|
|
||||||
import org.webrtc.PeerConnection;
|
import org.webrtc.PeerConnection;
|
||||||
import org.webrtc.PeerConnectionFactory;
|
import org.webrtc.PeerConnectionFactory;
|
||||||
import org.webrtc.SessionDescription;
|
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");
|
Log.i(TAG, "Encode to textures is not supported. Requires SDK version 19");
|
||||||
return;
|
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),
|
doLoopbackTest(createParametersForVideoCall(VIDEO_CODEC_VP8),
|
||||||
createCameraCapturer(true /* captureToTexture */), true /* decodeToTexture */);
|
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");
|
Log.i(TAG, "Encode to textures is not supported. Requires KITKAT");
|
||||||
return;
|
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),
|
doLoopbackTest(createParametersForVideoCall(VIDEO_CODEC_H264),
|
||||||
createCameraCapturer(true /* captureToTexture */), true /* decodeToTexture */);
|
createCameraCapturer(true /* captureToTexture */), true /* decodeToTexture */);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user