From f553835a350d168f4edb8e18fbfb383ac8440d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Sun, 7 Feb 2021 19:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/mogo/cloud/LivePushActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/mogo/cloud/LivePushActivity.java b/app/src/main/java/com/mogo/cloud/LivePushActivity.java index 2bb2843..b10db54 100644 --- a/app/src/main/java/com/mogo/cloud/LivePushActivity.java +++ b/app/src/main/java/com/mogo/cloud/LivePushActivity.java @@ -27,6 +27,7 @@ public class LivePushActivity extends BaseLiveActivity { public void onVideoFrame(byte[] bytes, int bytesLength) { //Log.i(TAG, "onVideoFrame byte length: " + bytesLength); if (liveStreamManager != null) { + // 将摄像头采集的YUV数据推送到ZEGO liveStreamManager.notifyYUVData(bytes, 1280, 720, 3); } } @@ -40,7 +41,10 @@ public class LivePushActivity extends BaseLiveActivity { protected void onDestroy() { super.onDestroy(); if (liveStreamManager != null) { + // 停止 liveStreamManager.stopLiveStream(); + // 释放资源 + liveStreamManager.release(); } } } \ No newline at end of file