From 4134c73745ff63d44186ed608735ea432b244755 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 21 三月 2024 22:38:56 +0800
Subject: [PATCH] 优化Track的构建

---
 src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java b/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
index 70718c7..1cd09bb 100644
--- a/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
+++ b/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
@@ -1,5 +1,7 @@
 package com.genersoft.iot.vmp.common;
 
+import com.genersoft.iot.vmp.media.bean.Track;
+import com.genersoft.iot.vmp.service.bean.DownloadFileInfo;
 import io.swagger.v3.oas.annotations.media.Schema;
 
 import java.io.Serializable;
@@ -69,13 +71,15 @@
     @Schema(description = "娴佸獟浣揑D")
     private String mediaServerId;
     @Schema(description = "娴佺紪鐮佷俊鎭�")
-    private Object tracks;
+    private Track track;
     @Schema(description = "寮�濮嬫椂闂�")
     private String startTime;
     @Schema(description = "缁撴潫鏃堕棿")
     private String endTime;
     @Schema(description = "杩涘害锛堝綍鍍忎笅杞戒娇鐢級")
     private double progress;
+    @Schema(description = "鏂囦欢涓嬭浇鍦板潃锛堝綍鍍忎笅杞戒娇鐢級")
+    private DownloadFileInfo downLoadFilePath;
 
     @Schema(description = "鏄惁鏆傚仠锛堝綍鍍忓洖鏀句娇鐢級")
     private boolean pause;
@@ -237,11 +241,11 @@
         }
     }
 
-    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam) {
+    public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam, boolean isPlay) {
         if (callIdParam != null) {
             callIdParam = Objects.equals(callIdParam, "") ? callIdParam : callIdParam.replace("?", "&");
         }
-        String file = String.format("index/api/webrtc?app=%s&stream=%s&type=play%s", app, stream, callIdParam);
+        String file = String.format("index/api/webrtc?app=%s&stream=%s&type=%s%s", app, stream, isPlay?"play":"push", callIdParam);
         if (port > 0) {
             this.rtc = new StreamURL("http", host, port, file);
         }
@@ -470,12 +474,12 @@
         this.mediaServerId = mediaServerId;
     }
 
-    public Object getTracks() {
-        return tracks;
+    public Track getTrack() {
+        return track;
     }
 
-    public void setTracks(Object tracks) {
-        this.tracks = tracks;
+    public void setTrack(Track track) {
+        this.track = track;
     }
 
     public String getStartTime() {
@@ -605,5 +609,11 @@
         this.subStream = subStream;
     }
 
+    public DownloadFileInfo getDownLoadFilePath() {
+        return downLoadFilePath;
+    }
 
+    public void setDownLoadFilePath(DownloadFileInfo downLoadFilePath) {
+        this.downLoadFilePath = downLoadFilePath;
+    }
 }

--
Gitblit v1.8.0