| | |
| | | private H264FileTransmitter h264FileTransmitter; // H264文件传输器 |
| | | private String outputFileDirectory; // H264文件输出目录 |
| | | private WatermarkInfo currentWatermarkInfo; // 当前水印信息 |
| | | private boolean currentUseTFCard = true; // 当前是否使用TF卡配置 |
| | | private static final int H264_FILE_RETENTION_DAYS = 1; // 可根据需求调整为3或5天 |
| | | |
| | | // 多进程支持:第二个摄像头的服务连接 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ResourceInfo> getResourceList(String startTime, String endTime) throws RemoteException { |
| | | return H264EncodeService.this.getResourceList(startTime, endTime); |
| | | public List<ResourceInfo> getResourceList(String startTime, String endTime,boolean useTFCard) throws RemoteException { |
| | | return H264EncodeService.this.getResourceList(startTime, endTime,useTFCard); |
| | | } |
| | | |
| | | @Override |
| | |
| | | int framerate = config != null && config.framerate > 0 ? config.framerate : DEFAULT_FRAME_RATE; |
| | | h264Encoder.setEncoderParams(width, height, framerate, DEFAULT_BITRATE); |
| | | |
| | | // 保存当前useTFCard配置 |
| | | // currentUseTFCard = config.useTFCard; |
| | | |
| | | |
| | | // 获取输出文件目录(根据useTFCard配置) |
| | | String outputDir = getOutputFileDirectory(config.useTFCard); |
| | |
| | | * @param endTime 结束时间(格式:YYMMDDHHmmss) |
| | | * @return 资源列表 |
| | | */ |
| | | private List<ResourceInfo> getResourceList(String startTime, String endTime) { |
| | | Timber.d("getResourceList called, startTime: %s, endTime: %s, useTFCard: %b", startTime, endTime, currentUseTFCard); |
| | | private List<ResourceInfo> getResourceList(String startTime, String endTime,boolean useTFCard) { |
| | | Timber.d("getResourceList called, startTime: %s, endTime: %s, useTFCard: %b", startTime, endTime, useTFCard); |
| | | |
| | | List<ResourceInfo> resourceList = new ArrayList<>(); |
| | | |
| | |
| | | return resourceList; |
| | | } |
| | | |
| | | if (currentUseTFCard) { |
| | | if (useTFCard) { |
| | | // 使用TF卡:扫描TF卡上的h264文件夹,根据日期范围过滤 |
| | | String storagePath = FileUtil.getStoragePath(this, true); |
| | | if (storagePath == null || storagePath.trim().isEmpty()) { |