16
16
import java .util .*;
17
17
18
18
import org .webrtc .AudioTrack ;
19
+ import org .webrtc .DefaultVideoDecoderFactory ;
20
+ import org .webrtc .DefaultVideoEncoderFactory ;
19
21
import org .webrtc .EglBase ;
20
22
import org .webrtc .IceCandidate ;
21
23
import org .webrtc .Logging ;
@@ -93,7 +95,7 @@ private FlutterWebRTCPlugin(Registrar registrar, MethodChannel channel) {
93
95
94
96
PeerConnectionFactory .initialize (
95
97
PeerConnectionFactory .InitializationOptions .builder (registrar .context ())
96
- .setEnableInternalTracer (false )
98
+ .setEnableInternalTracer (true )
97
99
.createInitializationOptions ());
98
100
99
101
final AudioDeviceModule audioDeviceModule = JavaAudioDeviceModule .builder (registrar .context ())
@@ -102,10 +104,12 @@ private FlutterWebRTCPlugin(Registrar registrar, MethodChannel channel) {
102
104
.createAudioDeviceModule ();
103
105
104
106
// Initialize EGL contexts required for HW acceleration.
105
- EglUtils .getRootEglBaseContext ();
107
+ EglBase . Context eglContext = EglUtils .getRootEglBaseContext ();
106
108
107
109
mFactory = PeerConnectionFactory .builder ()
108
110
.setOptions (new PeerConnectionFactory .Options ())
111
+ .setVideoEncoderFactory (new DefaultVideoEncoderFactory (eglContext , true , true ))
112
+ .setVideoDecoderFactory (new DefaultVideoDecoderFactory (eglContext ))
109
113
.setAudioDeviceModule (audioDeviceModule )
110
114
.createPeerConnectionFactory ();
111
115
0 commit comments