From de7368d08258b80af017bc3a0ac891b314f01e36 Mon Sep 17 00:00:00 2001
From: Dana <Dana_Lee1016@126.com>
Date: 星期五, 06 二月 2026 13:31:59 +0800
Subject: [PATCH] 1.录像、推流 回调,关联摄像头 2.推流 startPush主线程(P2 3.
---
app/src/main/java/com/safeluck/floatwindow/FloatingService.java | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/app/src/main/java/com/safeluck/floatwindow/FloatingService.java b/app/src/main/java/com/safeluck/floatwindow/FloatingService.java
index 184cc3b..106ec32 100644
--- a/app/src/main/java/com/safeluck/floatwindow/FloatingService.java
+++ b/app/src/main/java/com/safeluck/floatwindow/FloatingService.java
@@ -198,7 +198,7 @@
private void startMedia(MediaArgu media) {
if (media == null) {
Timber.w("startMedia: media is null");
- notifyCallback(1, -1, "MediaArgu is null");
+ notifyCallback(1, -1, "MediaArgu is null",1);
return;
}
@@ -210,7 +210,7 @@
p2Service.startMedia(media);
} catch (RemoteException e) {
Timber.e(e, "startMedia forward to P2 failed");
- notifyCallback(1, -3, "鍚姩P2鏈嶅姟澶辫触: " + e.getMessage());
+ notifyCallback(1, -3, "鍚姩P2鏈嶅姟澶辫触: " + e.getMessage(),2);
}
} else {
// 绛夊緟杩炴帴瀹屾垚鍚庢墽琛�
@@ -232,7 +232,7 @@
usbCameraPushManager.startPush(media);
} else {
Timber.w("鎺ㄦ祦浠呮敮鎸乁SB鎽勫儚澶�");
- notifyCallback(1, -4, "鎺ㄦ祦浠呮敮鎸乁SB鎽勫儚澶�");
+ notifyCallback(1, -4, "鎺ㄦ祦浠呮敮鎸乁SB鎽勫儚澶�",1);
}
} else {
// 褰曞儚
@@ -353,10 +353,12 @@
* @param type 绫诲瀷锛�0-褰曞儚 1-鎺ㄦ祦 2-鏂囦欢鍚嶇被鍨嬬瓑
* @param errCode 閿欒鐮侊細0-鎴愬姛锛屽叾浠栦负閿欒鐮�
* @param message 娑堟伅鍐呭
+ * @param cameraId 0-android camera 1-P1 usb 2-P2 usb
*/
- private void notifyCallback(int type, int errCode, String message) {
+ private void notifyCallback(int type, int errCode, String message,int cameraId) {
ResponseVO response = new ResponseVO();
response.setType(type);
+ response.setCameraId(cameraId);
response.setErrCode(errCode);
response.setMessage(message);
notifyCallback(response);
--
Gitblit v1.8.0