Injectable software codecs for Android.
This is similar to https://webrtc-review.googlesource.com/c/src/+/3620 for iOS. Using the new WebRtcMediaEngineFactory::Create API, the built-in software video codecs are no longer appended to the injected codecs. To be able to use the software codecs, they are exposed as Java classes through SoftwareVideoEncoderFactory etc. There is also a new DefaultVideoEncoderFactory used by AppRTCMobile. This factory tries to use hardware implementations where available, but falls back to using the injected software codecs. The HardwareVideoEncoderFactory is temporarily also falling back on the software codecs in its default configuration in order to maintain backwards compatibility. Bug: webrtc:7925 Change-Id: I3e8c5ed492ccd160aca968986ad217d7978a951c Reviewed-on: https://webrtc-review.googlesource.com/17480 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Anders Carlsson <andersc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20647}
This commit is contained in:
committed by
Commit Bot
parent
45bbc8ac19
commit
dc1b9f179a
@ -35,9 +35,9 @@ import org.webrtc.AudioSource;
|
||||
import org.webrtc.AudioTrack;
|
||||
import org.webrtc.CameraVideoCapturer;
|
||||
import org.webrtc.DataChannel;
|
||||
import org.webrtc.DefaultVideoDecoderFactory;
|
||||
import org.webrtc.DefaultVideoEncoderFactory;
|
||||
import org.webrtc.EglBase;
|
||||
import org.webrtc.HardwareVideoDecoderFactory;
|
||||
import org.webrtc.HardwareVideoEncoderFactory;
|
||||
import org.webrtc.IceCandidate;
|
||||
import org.webrtc.Logging;
|
||||
import org.webrtc.MediaConstraints;
|
||||
@ -521,9 +521,9 @@ public class PeerConnectionClient {
|
||||
final boolean enableH264HighProfile =
|
||||
VIDEO_CODEC_H264_HIGH.equals(peerConnectionParameters.videoCodec);
|
||||
factory = new PeerConnectionFactory(options,
|
||||
new HardwareVideoEncoderFactory(rootEglBase.getEglBaseContext(),
|
||||
new DefaultVideoEncoderFactory(rootEglBase.getEglBaseContext(),
|
||||
true /* enableIntelVp8Encoder */, enableH264HighProfile),
|
||||
new HardwareVideoDecoderFactory(rootEglBase.getEglBaseContext()));
|
||||
new DefaultVideoDecoderFactory(rootEglBase.getEglBaseContext()));
|
||||
Log.d(TAG, "Peer connection factory created.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user