From f652169cc5d6501511eece5df57b7b396fd7a7ab Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Tue, 02 Jun 2026 09:51:34 +0800
Subject: [PATCH] 优化

---
 ard-modules/ard-modules-zlm/src/main/java/com/ard/zlm/service/IMediaServerService.java |   40 +++++++++++++++++++++++++++++++++-------
 1 files changed, 33 insertions(+), 7 deletions(-)

diff --git a/ard-modules/ard-modules-zlm/src/main/java/com/ard/zlm/service/IMediaServerService.java b/ard-modules/ard-modules-zlm/src/main/java/com/ard/zlm/service/IMediaServerService.java
index 4e2a08a..06e10b4 100644
--- a/ard-modules/ard-modules-zlm/src/main/java/com/ard/zlm/service/IMediaServerService.java
+++ b/ard-modules/ard-modules-zlm/src/main/java/com/ard/zlm/service/IMediaServerService.java
@@ -1,7 +1,9 @@
 package com.ard.zlm.service;
 
 import com.ard.gb28181.api.domain.Device;
-import com.ard.qs.api.domain.QsDevice;
+import com.ard.zlm.domain.StreamChannel;
+import com.ard.zlm.domain.StreamChannel;
+import com.ard.work.api.domian.ArdChannel;
 import com.ard.zlm.api.domain.*;
 import com.ard.zlm.common.InviteSessionType;
 import com.ard.zlm.domain.MediaServerLoad;
@@ -292,11 +294,11 @@
     /**
      * 开始播放
      *
-     * @param device   设备信息
+     * @param channel  通道信息
      * @param record   是否录制
      * @param callback 回调
      */
-    void play(QsDevice device, Boolean record, ErrorCallback<StreamInfo> callback);
+    void play(ArdChannel channel, Boolean record, ErrorCallback<StreamInfo> callback);
 
     /**
      * 获取流媒体服务器负载
@@ -334,11 +336,11 @@
     /**
      * gb28181 播放
      *
-     * @param qsDevice
+     * @param streamChannel
      * @param gbDevice
      * @param callback
      */
-    void startGb28181Play(QsDevice qsDevice, Device gbDevice, ErrorCallback<StreamInfo> callback);
+    void startGb28181Play(StreamChannel streamChannel, Device gbDevice, ErrorCallback<StreamInfo> callback);
 
     /**
      * 连接rtp服务
@@ -355,10 +357,34 @@
      * gb28181 停止点播
      *
      * @param type
-     * @param qsDevice
+     * @param streamChannel
      * @param device
      * @param stream
      */
-    void stopGb28181Play(InviteSessionType type, QsDevice qsDevice, Device device, String stream);
+    void stopGb28181Play(InviteSessionType type, StreamChannel streamChannel, Device device, String stream);
 
+    /**
+     * gb28181 播放(基于GbChannel,不依赖QS)
+     */
+    void startGb28181PlayByGbChannel(StreamChannel streamChannel, Device gbDevice, ErrorCallback<StreamInfo> callback);
+
+    /**
+     * gb28181 停止点播(基于GbChannel,不依赖QS)
+     */
+    void stopGb28181PlayByGbChannel(InviteSessionType type, StreamChannel streamChannel, Device device, String stream);
+
+    /**
+     * 通过通道ID拉流代理(简化传参,自动根据通道类型确定app/url等参数)
+     *
+     * @param channelId 通道ID
+     * @param callback  回调
+     */
+    void streamPullPlayByChannelId(String channelId, ErrorCallback<StreamInfo> callback);
+
+    /**
+     * 通过通道ID停止拉流代理
+     *
+     * @param channelId 通道ID
+     */
+    void stopStreamPullPlayByChannelId(String channelId);
 }

--
Gitblit v1.9.3