Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,3 @@ path = "app/src/main/res/raw/next_voice_message_doodle.ogg"
precedence = "aggregate"
SPDX-FileCopyrightText = "2024 Paciosoft"
SPDX-License-Identifier = "CC-BY-4.0"

[[annotations]]
path = "app/src/main/assets/selfie_segmenter.tflite"
precedence = "aggregate"
SPDX-FileCopyrightText = "2025 Google"
SPDX-License-Identifier = "Apache-2.0"
5 changes: 0 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ plugins {
id "org.jetbrains.kotlin.plugin.compose" version "2.3.0"
id "org.jetbrains.kotlin.kapt"
id 'com.google.devtools.ksp' version '2.3.4'
id "de.undercouch.download" version "5.6.0" // Download task and extension for retrieving files during a build
}

apply plugin: 'com.android.application'
Expand Down Expand Up @@ -369,10 +368,6 @@ dependencies {
testImplementation("com.squareup.okhttp3:mockwebserver:$okhttpVersion")
testImplementation("com.google.dagger:hilt-android-testing:2.57.2")
testImplementation("org.robolectric:robolectric:4.16")

// Computer Vision - for background effects during video calls
implementation 'com.google.mediapipe:tasks-vision:0.10.26'
implementation 'org.opencv:opencv:4.12.0'
}

tasks.register('installGitHooks', Copy) {
Expand Down
Binary file removed app/src/main/assets/selfie_segmenter.tflite
Binary file not shown.
54 changes: 0 additions & 54 deletions app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ import com.nextcloud.talk.call.ReactionAnimator
import com.nextcloud.talk.call.components.ParticipantGrid
import com.nextcloud.talk.call.components.SelfVideoView
import com.nextcloud.talk.call.components.screenshare.ScreenShareComponent
import com.nextcloud.talk.camera.BackgroundBlurFrameProcessor
import com.nextcloud.talk.camera.BlurBackgroundViewModel
import com.nextcloud.talk.camera.BlurBackgroundViewModel.BackgroundBlurOn
import com.nextcloud.talk.chat.ChatActivity
import com.nextcloud.talk.data.user.model.User
import com.nextcloud.talk.databinding.CallActivityBinding
Expand Down Expand Up @@ -219,7 +216,6 @@ class CallActivity : CallBaseActivity() {
var audioManager: WebRtcAudioManager? = null
var callRecordingViewModel: CallRecordingViewModel? = null
var raiseHandViewModel: RaiseHandViewModel? = null
val blurBackgroundViewModel: BlurBackgroundViewModel = BlurBackgroundViewModel()
private var mReceiver: BroadcastReceiver? = null
private var peerConnectionFactory: PeerConnectionFactory? = null
private var screenSharePeerConnectionFactory: PeerConnectionFactory? = null
Expand Down Expand Up @@ -446,7 +442,6 @@ class CallActivity : CallBaseActivity() {

initRaiseHandViewModel()
initCallRecordingViewModel(intent.extras!!.getInt(KEY_RECORDING_STATE))
initBackgroundBlurViewModel()

initClickListeners(isModerator, isOneToOneConversation)
binding!!.microphoneButton.setOnTouchListener(MicrophoneButtonTouchListener())
Expand Down Expand Up @@ -539,26 +534,6 @@ class CallActivity : CallBaseActivity() {
}
}

private fun initBackgroundBlurViewModel() {
blurBackgroundViewModel.viewState.observe(this) { state ->
val frontFacing = isCameraFrontFacing(cameraEnumerator)
if (frontFacing == null) {
Log.e(TAG, "Camera not found")
return@observe
}

val isOn = state == BackgroundBlurOn

val processor = if (isOn) {
BackgroundBlurFrameProcessor(context)
} else {
null
}

videoSource?.setVideoProcessor(processor)
}
}

private fun processExtras(extras: Bundle) {
roomId = extras.getString(KEY_ROOM_ID, "")
roomToken = extras.getString(KEY_ROOM_TOKEN, "")
Expand Down Expand Up @@ -1214,30 +1189,6 @@ class CallActivity : CallBaseActivity() {
return null
}

private fun isCameraFrontFacing(enumerator: CameraEnumerator?): Boolean? {
if (enumerator == null) {
return false
}

val deviceNames = enumerator.deviceNames

// First, try to find front facing camera
for (deviceName in deviceNames) {
if (enumerator.isFrontFacing(deviceName)) {
return true
}
}

// Front facing camera not found, try something else
for (deviceName in deviceNames) {
if (!enumerator.isFrontFacing(deviceName)) {
return false
}
}

return null
}

fun onMicrophoneClick() {
if (!canPublishAudioStream) {
microphoneOn = false
Expand Down Expand Up @@ -1319,7 +1270,6 @@ class CallActivity : CallBaseActivity() {
binding!!.cameraButton.setImageResource(R.drawable.ic_videocam_white_24px)
} else {
binding!!.cameraButton.setImageResource(R.drawable.ic_videocam_off_white_24px)
blurBackgroundViewModel.turnOffBlur()
}
toggleMedia(videoOn, true)
} else if (shouldShowRequestPermissionRationale(Manifest.permission.CAMERA)) {
Expand Down Expand Up @@ -1396,10 +1346,6 @@ class CallActivity : CallBaseActivity() {
raiseHandViewModel!!.clickHandButton()
}

fun toggleBackgroundBlur() {
blurBackgroundViewModel.toggleBackgroundBlur()
}

public override fun onDestroy() {
if (signalingMessageReceiver != null) {
signalingMessageReceiver!!.removeListener(localParticipantMessageListener)
Expand Down

This file was deleted.

Loading
Loading