From a8c609fa1b19a639daaaefe477ca1799b1932d6d Mon Sep 17 00:00:00 2001 From: zozero94 Date: Tue, 5 Jan 2021 19:14:32 +0900 Subject: [PATCH] =?UTF-8?q?[#9]=20webRtc=20dependency=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=20&=20SurfaceView->SurfaceViewRenderer=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyApplication/app/build.gradle | 1 + .../example/myapplication/ui/mediapipe/MediaPipeActivity.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 {