private void initializePeerConnectionFactory() { PeerConnectionFactory.initializeAndroidGlobals(this, true, true, true); factory = new PeerConnectionFactory(null); factory.setVideoHwAccelerationOptions(rootEglBase.getEglBaseContext(), rootEglBase.getEglBaseContext()); }
private void initializePeerConnectionFactory() { PeerConnectionFactory.initializeAndroidGlobals(this, true, true, true); factory = new PeerConnectionFactory(null); factory.setVideoHwAccelerationOptions(rootEglBase.getEglBaseContext(), rootEglBase.getEglBaseContext()); }
@Override public void run() { if (null == mPeerConnectionFactory) { Log.d(LOG_TAG, "## initCallUI(): video call and no mPeerConnectionFactory"); mPeerConnectionFactory = new PeerConnectionFactory(null); // Initialize EGL contexts required for HW acceleration. EglBase.Context eglContext = EglUtils.getRootEglBaseContext(); if (eglContext != null) { mPeerConnectionFactory.setVideoHwAccelerationOptions(eglContext, eglContext); } createVideoTrack(); createAudioTrack(); createLocalStream(); if (null != callInviteParams) { dispatchOnStateDidChange(CALL_STATE_RINGING); setRemoteDescription(callInviteParams); } } } });
factory.setVideoHwAccelerationOptions(renderEGLContext, renderEGLContext);
factory.setVideoHwAccelerationOptions(renderEGLContext, renderEGLContext);
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(this, R.layout.activity_sample_camera_render); // Create video renderers. EglBase rootEglBase = EglBase.create(); binding.surfaceView.init(rootEglBase.getEglBaseContext(), null); binding.surfaceView.setEnableHardwareScaler(true); binding.surfaceView.setMirror(true); PeerConnectionFactory.initializeAndroidGlobals(this, true, true, true); PeerConnectionFactory factory = new PeerConnectionFactory(null); factory.setVideoHwAccelerationOptions(rootEglBase.getEglBaseContext(), rootEglBase.getEglBaseContext()); createVideoTrackFromCameraAndShowIt(factory); }