From cbee28aacfa95544f7eec1a6c3a869392b708ddb Mon Sep 17 00:00:00 2001
From: Dana <Dana_Lee1016@126.com>
Date: 星期二, 23 十二月 2025 17:04:48 +0800
Subject: [PATCH] 1.修改app名字,湖北video 2.修改获取h264文件列表,是否使用tfcard加这个参数

---
 app/src/main/java/com/anyun/h264/H264EncodeService2.java |   22 ++++++++--------------
 1 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/app/src/main/java/com/anyun/h264/H264EncodeService2.java b/app/src/main/java/com/anyun/h264/H264EncodeService2.java
index 6644037..ea76ddb 100644
--- a/app/src/main/java/com/anyun/h264/H264EncodeService2.java
+++ b/app/src/main/java/com/anyun/h264/H264EncodeService2.java
@@ -33,8 +33,7 @@
     private H264FileTransmitter h264FileTransmitter; // H264鏂囦欢浼犺緭鍣�
     private String outputFileDirectory; // H264鏂囦欢杈撳嚭鐩綍
     private WatermarkInfo currentWatermarkInfo; // 褰撳墠姘村嵃淇℃伅
-    private boolean currentUseTFCard = false; // 褰撳墠鏄惁浣跨敤TF鍗¢厤缃�
-    
+
     // 榛樿缂栫爜鍙傛暟
     private static final int DEFAULT_WIDTH = 640;
     private static final int DEFAULT_HEIGHT = 480;
@@ -50,10 +49,10 @@
         public int controlEncode(int action, String jsonConfig) throws RemoteException {
             return H264EncodeService2.this.controlEncode(action, jsonConfig);
         }
-        
+
         @Override
-        public List<ResourceInfo> getResourceList(String startTime, String endTime) throws RemoteException {
-            return H264EncodeService2.this.getResourceList(startTime, endTime);
+        public List<ResourceInfo> getResourceList(String startTime, String endTime,boolean useTFCard) throws RemoteException {
+            return H264EncodeService2.this.getResourceList(startTime, endTime,useTFCard);
         }
         
         @Override
@@ -291,10 +290,6 @@
             // 璁剧疆 Context锛堢敤浜庢竻鐞� TF 鍗℃枃浠讹級
             h264Encoder.setContext(this);
             
-            // 淇濆瓨褰撳墠useTFCard閰嶇疆
-            currentUseTFCard = config != null && config.useTFCard;
-            
-            // 璁剧疆缂栫爜鍙傛暟锛堜娇鐢ㄩ厤缃腑鐨勫弬鏁帮級
             // 璁剧疆缂栫爜鍙傛暟锛堜娇鐢ㄩ厤缃腑鐨勫弬鏁帮級
             int width = config != null && config.width > 0 ? config.width : DEFAULT_WIDTH;
             int height = config != null && config.height > 0 ? config.height : DEFAULT_HEIGHT;
@@ -363,8 +358,7 @@
             // 璁剧疆 Context锛堢敤浜庢竻鐞� TF 鍗℃枃浠讹級
             h264Encoder.setContext(this);
             
-            // 淇濆瓨褰撳墠useTFCard閰嶇疆
-            currentUseTFCard = config != null && config.useTFCard;
+
             
             // 璁剧疆缂栫爜鍙傛暟锛堜娇鐢ㄩ厤缃腑鐨勫弬鏁帮級
             int width = config != null && config.width > 0 ? config.width : DEFAULT_WIDTH;
@@ -602,8 +596,8 @@
     /**
      * 鑾峰彇璧勬簮鍒楄〃锛堟牴鎹甁T/T 1076-2016琛�23瀹氫箟锛�
      */
-    private List<ResourceInfo> getResourceList(String startTime, String endTime) {
-        Timber.d("getResourceList called (camera2), startTime: %s, endTime: %s, useTFCard: %b", startTime, endTime, currentUseTFCard);
+    private List<ResourceInfo> getResourceList(String startTime, String endTime,boolean useTFCard) {
+        Timber.d("getResourceList called (camera2), startTime: %s, endTime: %s, useTFCard: %b", startTime, endTime, useTFCard);
         
         List<ResourceInfo> resourceList = new ArrayList<>();
         
@@ -617,7 +611,7 @@
                 return resourceList;
             }
             
-            if (currentUseTFCard) {
+            if (useTFCard) {
                 // 浣跨敤TF鍗★細鎵弿TF鍗′笂鐨刪264鏂囦欢澶癸紝鏍规嵁鏃ユ湡鑼冨洿杩囨护
                 String storagePath = FileUtil.getStoragePath(this, true);
                 if (storagePath == null || storagePath.trim().isEmpty()) {

--
Gitblit v1.8.0