diff --git a/MyApplication/app/build.gradle b/MyApplication/app/build.gradle index 98d8448..70dddf3 100644 --- a/MyApplication/app/build.gradle +++ b/MyApplication/app/build.gradle @@ -131,5 +131,6 @@ dependencies { implementation 'com.github.bumptech.glide:glide:4.11.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0' + api 'org.webrtc:google-webrtc:1.0.32006' } \ No newline at end of file diff --git a/MyApplication/app/src/main/java/com/example/myapplication/ui/mediapipe/MediaPipeActivity.kt b/MyApplication/app/src/main/java/com/example/myapplication/ui/mediapipe/MediaPipeActivity.kt index d16f2df..cfc5633 100644 --- a/MyApplication/app/src/main/java/com/example/myapplication/ui/mediapipe/MediaPipeActivity.kt +++ b/MyApplication/app/src/main/java/com/example/myapplication/ui/mediapipe/MediaPipeActivity.kt @@ -17,6 +17,7 @@ import com.google.mediapipe.components.FrameProcessor import com.google.mediapipe.components.PermissionHelper import com.google.mediapipe.framework.AndroidAssetUtil import com.google.mediapipe.glutil.EglManager +import org.webrtc.SurfaceViewRenderer class MediaPipeActivity : BaseActivity() { @@ -24,7 +25,7 @@ class MediaPipeActivity : BaseActivity() { private var previewFrameTexture: SurfaceTexture? = null - private val previewDisplayView: SurfaceView by lazy { SurfaceView(this) } + private val previewDisplayView: SurfaceViewRenderer by lazy { SurfaceViewRenderer(this) } private val eglManager: EglManager by lazy { EglManager(null) } private val processor: FrameProcessor by lazy {