|  |  |  | 
|---|
|  |  |  | package com.ruoyi.media.service; | 
|---|
|  |  |  | import com.ruoyi.media.domain.Items; | 
|---|
|  |  |  | import com.ruoyi.media.domain.RtspSession; | 
|---|
|  |  |  | import com.ruoyi.media.domain.StreamInfo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.ruoyi.media.domain.*; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface IMediaService { | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 增加路径 | 
|---|
|  |  |  | * name 名称 | 
|---|
|  |  |  | * rtspPath rtsp地址 | 
|---|
|  |  |  | * mode 模式:gpu硬解码/cpu软解码 | 
|---|
|  |  |  | * isCode 是否转码 | 
|---|
|  |  |  | * 刘苏义 | 
|---|
|  |  |  | * 2023/8/12 13:56:52 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Map<String, String> addPath(String name, String sourceUrl, String mode, String isCode); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String addPath(String name, String rtspPath); | 
|---|
|  |  |  | public void removePath(String name); | 
|---|
|  |  |  | public List<StreamInfo>paths(); | 
|---|
|  |  |  | public List<Items> rtspconns(); | 
|---|
|  |  |  | public List<Items> rtspsessions(); | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改路径 | 
|---|
|  |  |  | * name 名称 | 
|---|
|  |  |  | * rtspPath rtsp地址 | 
|---|
|  |  |  | * mode 模式:实时/按需 | 
|---|
|  |  |  | * isCode 是否转码 | 
|---|
|  |  |  | * 刘苏义 | 
|---|
|  |  |  | * 2023/8/12 13:56:52 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Map<String, String> editPath(String name, String sourceUrl, String mode, String isCode); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | StreamInfo getPathInfo(String name); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void removePath(String[] names); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void removePath(String name); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<StreamInfo> paths(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<String> getNameList(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | boolean checkNameExist(String name); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | RtspSession getRtspSessionById(String sessionId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<RtspSession>getPushStreams(); | 
|---|
|  |  |  | List<RtspSession>getPullStreams(); | 
|---|
|  |  |  | WebrtcSession getWebrtcSessionById(String sessionId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<StreamInfo>getPushStreamList(); | 
|---|
|  |  |  | List<StreamInfo>getPullStreamList(); | 
|---|
|  |  |  | RtmpSession getRtmpSessionById(String sessionId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<StreamInfo> getPushStreamList(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<StreamInfo> getPullStreamList(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Boolean kickRtspSession(String sessionId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Boolean kickRtmpSession(String sessionId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Boolean kickWebrtcSession(String sessionId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 配置流媒体参数 | 
|---|
|  |  |  | * 刘苏义 | 
|---|
|  |  |  | * 2023/10/13 15:17:57 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String setConfig(Config config); | 
|---|
|  |  |  | } | 
|---|