bump google-webrtc to 1.0.32006

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-02-09 12:13:06 +01:00
parent f349413d68
commit b50501a38f
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
7 changed files with 30 additions and 28 deletions

View File

@ -202,7 +202,7 @@ dependencies {
implementation 'com.github.HITGIF:TextFieldBoxes:1.4.5' implementation 'com.github.HITGIF:TextFieldBoxes:1.4.5'
implementation 'eu.davidea:flexible-adapter:5.1.0' implementation 'eu.davidea:flexible-adapter:5.1.0'
implementation 'eu.davidea:flexible-adapter-ui:1.0.0' implementation 'eu.davidea:flexible-adapter-ui:1.0.0'
implementation 'org.webrtc:google-webrtc:1.0.23295' implementation 'org.webrtc:google-webrtc:1.0.32006'
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}" implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation 'com.yarolegovich:lovely-dialog:1.1.0' implementation 'com.yarolegovich:lovely-dialog:1.1.0'
implementation 'com.yarolegovich:lovelyinput:1.0.9' implementation 'com.yarolegovich:lovelyinput:1.0.9'
@ -210,6 +210,7 @@ dependencies {
implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0' implementation 'me.zhanghai.android.effortlesspermissions:library:1.1.0'
implementation 'org.apache.commons:commons-lang3:3.9' implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'com.github.wooplr:Spotlight:1.3' implementation 'com.github.wooplr:Spotlight:1.3'
implementation 'com.google.code.findbugs:jsr305:2.0.1'
implementation('com.github.mario:chatkit:c6a61767291ddb212a2f4f792a2b6aaf295e69a5', { implementation('com.github.mario:chatkit:c6a61767291ddb212a2f4f792a2b6aaf295e69a5', {
exclude group: 'com.facebook.fresco' exclude group: 'com.facebook.fresco'
}) })

View File

@ -40,7 +40,7 @@ import com.nextcloud.talk.utils.DisplayUtils;
import java.util.List; import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.emoji.widget.EmojiTextView; import androidx.emoji.widget.EmojiTextView;
import butterknife.BindView; import butterknife.BindView;

View File

@ -25,10 +25,9 @@ import android.os.Build
import android.os.Build.VERSION.SDK_INT import android.os.Build.VERSION.SDK_INT
import android.os.Build.VERSION_CODES.P import android.os.Build.VERSION_CODES.P
import android.util.Log import android.util.Log
import androidx.appcompat.app.AppCompatDelegate
import androidx.emoji.bundled.BundledEmojiCompatConfig import androidx.emoji.bundled.BundledEmojiCompatConfig
import androidx.emoji.text.EmojiCompat import androidx.emoji.text.EmojiCompat
import androidx.appcompat.app.AppCompatDelegate
import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.LifecycleObserver
import androidx.multidex.MultiDex import androidx.multidex.MultiDex
import androidx.multidex.MultiDexApplication import androidx.multidex.MultiDexApplication
@ -66,7 +65,6 @@ import com.nextcloud.talk.utils.preferences.AppPreferences
import com.nextcloud.talk.webrtc.MagicWebRTCUtils import com.nextcloud.talk.webrtc.MagicWebRTCUtils
import com.vanniktech.emoji.EmojiManager import com.vanniktech.emoji.EmojiManager
import com.vanniktech.emoji.googlecompat.GoogleCompatEmojiProvider import com.vanniktech.emoji.googlecompat.GoogleCompatEmojiProvider
import de.cotech.hw.SecurityKeyManager import de.cotech.hw.SecurityKeyManager
import de.cotech.hw.SecurityKeyManagerConfig import de.cotech.hw.SecurityKeyManagerConfig
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
@ -74,11 +72,10 @@ import org.conscrypt.Conscrypt
import org.webrtc.PeerConnectionFactory import org.webrtc.PeerConnectionFactory
import org.webrtc.voiceengine.WebRtcAudioManager import org.webrtc.voiceengine.WebRtcAudioManager
import org.webrtc.voiceengine.WebRtcAudioUtils import org.webrtc.voiceengine.WebRtcAudioUtils
import javax.inject.Inject
import javax.inject.Singleton
import java.security.Security import java.security.Security
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import javax.inject.Inject
import javax.inject.Singleton
@AutoComponent(modules = [BusModule::class, ContextModule::class, DatabaseModule::class, RestModule::class, UserModule::class, ArbitraryStorageModule::class]) @AutoComponent(modules = [BusModule::class, ContextModule::class, DatabaseModule::class, RestModule::class, UserModule::class, ArbitraryStorageModule::class])
@Singleton @Singleton
@ -108,9 +105,7 @@ class NextcloudTalkApplication : MultiDexApplication(), LifecycleObserver {
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true) WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true)
} }
PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(this) PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(this)
.setEnableVideoHwAcceleration(MagicWebRTCUtils.shouldEnableVideoHardwareAcceleration())
.createInitializationOptions()) .createInitializationOptions())
} catch (e: UnsatisfiedLinkError) { } catch (e: UnsatisfiedLinkError) {
Log.w(TAG, e) Log.w(TAG, e)

View File

@ -107,6 +107,8 @@ import org.webrtc.Camera1Enumerator;
import org.webrtc.Camera2Enumerator; import org.webrtc.Camera2Enumerator;
import org.webrtc.CameraEnumerator; import org.webrtc.CameraEnumerator;
import org.webrtc.CameraVideoCapturer; import org.webrtc.CameraVideoCapturer;
import org.webrtc.DefaultVideoDecoderFactory;
import org.webrtc.DefaultVideoEncoderFactory;
import org.webrtc.EglBase; import org.webrtc.EglBase;
import org.webrtc.IceCandidate; import org.webrtc.IceCandidate;
import org.webrtc.Logging; import org.webrtc.Logging;
@ -116,6 +118,7 @@ import org.webrtc.PeerConnection;
import org.webrtc.PeerConnectionFactory; import org.webrtc.PeerConnectionFactory;
import org.webrtc.RendererCommon; import org.webrtc.RendererCommon;
import org.webrtc.SessionDescription; import org.webrtc.SessionDescription;
import org.webrtc.SurfaceTextureHelper;
import org.webrtc.SurfaceViewRenderer; import org.webrtc.SurfaceViewRenderer;
import org.webrtc.VideoCapturer; import org.webrtc.VideoCapturer;
import org.webrtc.VideoSource; import org.webrtc.VideoSource;
@ -358,10 +361,15 @@ public class CallController extends BaseController {
//Create a new PeerConnectionFactory instance. //Create a new PeerConnectionFactory instance.
PeerConnectionFactory.Options options = new PeerConnectionFactory.Options(); PeerConnectionFactory.Options options = new PeerConnectionFactory.Options();
peerConnectionFactory = PeerConnectionFactory.builder().createPeerConnectionFactory(); DefaultVideoEncoderFactory defaultVideoEncoderFactory = new DefaultVideoEncoderFactory(
rootEglBase.getEglBaseContext(),true,true);
DefaultVideoDecoderFactory defaultVideoDecoderFactory = new DefaultVideoDecoderFactory(rootEglBase.getEglBaseContext());
peerConnectionFactory.setVideoHwAccelerationOptions(rootEglBase.getEglBaseContext(), peerConnectionFactory = PeerConnectionFactory.builder()
rootEglBase.getEglBaseContext()); .setOptions(options)
.setVideoEncoderFactory(defaultVideoEncoderFactory)
.setVideoDecoderFactory(defaultVideoDecoderFactory)
.createPeerConnectionFactory();
//Create MediaConstraints - Will be useful for specifying video and audio constraints. //Create MediaConstraints - Will be useful for specifying video and audio constraints.
audioConstraints = new MediaConstraints(); audioConstraints = new MediaConstraints();
@ -584,15 +592,16 @@ public class CallController extends BaseController {
//Create a VideoSource instance //Create a VideoSource instance
if (videoCapturer != null) { if (videoCapturer != null) {
videoSource = peerConnectionFactory.createVideoSource(videoCapturer); SurfaceTextureHelper surfaceTextureHelper = SurfaceTextureHelper.create("CaptureThread", rootEglBase.getEglBaseContext());
videoSource = peerConnectionFactory.createVideoSource(false);
videoCapturer.initialize(surfaceTextureHelper, getApplicationContext(), videoSource.getCapturerObserver());
}
localVideoTrack = peerConnectionFactory.createVideoTrack("NCv0", videoSource); localVideoTrack = peerConnectionFactory.createVideoTrack("NCv0", videoSource);
localMediaStream.addTrack(localVideoTrack); localMediaStream.addTrack(localVideoTrack);
localVideoTrack.setEnabled(false); localVideoTrack.setEnabled(false);
localVideoTrack.addSink(pipVideoView); localVideoTrack.addSink(pipVideoView);
} }
}
private void microphoneInitialization() { private void microphoneInitialization() {
//create an AudioSource instance //create an AudioSource instance
audioSource = peerConnectionFactory.createAudioSource(audioConstraints); audioSource = peerConnectionFactory.createAudioSource(audioConstraints);

View File

@ -45,6 +45,7 @@ import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import com.bluelinelabs.conductor.RouterTransaction; import com.bluelinelabs.conductor.RouterTransaction;
@ -89,7 +90,6 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.annotation.Nullable;
import javax.inject.Inject; import javax.inject.Inject;
import autodagger.AutoInjector; import autodagger.AutoInjector;

View File

@ -23,6 +23,7 @@ import android.net.Uri;
import android.text.TextUtils; import android.text.TextUtils;
import androidx.annotation.DimenRes; import androidx.annotation.DimenRes;
import androidx.annotation.Nullable;
import com.nextcloud.talk.BuildConfig; import com.nextcloud.talk.BuildConfig;
import com.nextcloud.talk.R; import com.nextcloud.talk.R;
@ -32,8 +33,6 @@ import com.nextcloud.talk.models.RetrofitBucket;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.annotation.Nullable;
import okhttp3.Credentials; import okhttp3.Credentials;
public class ApiUtils { public class ApiUtils {

View File

@ -56,6 +56,7 @@ import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes; import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes; import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.XmlRes; import androidx.annotation.XmlRes;
import androidx.appcompat.widget.AppCompatDrawableManager; import androidx.appcompat.widget.AppCompatDrawableManager;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
@ -96,9 +97,6 @@ import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public class DisplayUtils { public class DisplayUtils {
private static final String TAG = "DisplayUtils"; private static final String TAG = "DisplayUtils";
@ -107,7 +105,7 @@ public class DisplayUtils {
SpannableString spannableString = new SpannableString(string); SpannableString spannableString = new SpannableString(string);
spannableString.setSpan(new ClickableSpan() { spannableString.setSpan(new ClickableSpan() {
@Override @Override
public void onClick(@Nonnull View widget) { public void onClick(@NonNull View widget) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
NextcloudTalkApplication.Companion.getSharedApplication().getApplicationContext().startActivity(browserIntent); NextcloudTalkApplication.Companion.getSharedApplication().getApplicationContext().startActivity(browserIntent);
@ -181,12 +179,12 @@ public class DisplayUtils {
} }
@Override @Override
public void onFinalImageSet(String id, @javax.annotation.Nullable Object imageInfo, @javax.annotation.Nullable Animatable animatable) { public void onFinalImageSet(String id, @androidx.annotation.Nullable Object imageInfo, @androidx.annotation.Nullable Animatable animatable) {
updateViewSize((ImageInfo) imageInfo, draweeView); updateViewSize((ImageInfo) imageInfo, draweeView);
} }
@Override @Override
public void onIntermediateImageSet(String id, @javax.annotation.Nullable Object imageInfo) { public void onIntermediateImageSet(String id, @androidx.annotation.Nullable Object imageInfo) {
updateViewSize((ImageInfo) imageInfo, draweeView); updateViewSize((ImageInfo) imageInfo, draweeView);
} }