2021-04-02 19:04:01 +08:00
|
|
|
package com.genersoft.iot.vmp.service;
|
2020-12-16 20:29:19 +08:00
|
|
|
|
2022-11-05 20:49:56 +08:00
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
2022-03-25 16:05:14 +08:00
|
|
|
import com.genersoft.iot.vmp.common.StreamInfo;
|
2022-09-30 17:54:58 +08:00
|
|
|
import com.genersoft.iot.vmp.conf.exception.ServiceException;
|
2021-07-16 16:34:51 +08:00
|
|
|
import com.genersoft.iot.vmp.gb28181.bean.Device;
|
2023-05-25 17:28:57 +08:00
|
|
|
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
|
|
|
|
import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
2024-02-22 17:22:28 +08:00
|
|
|
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
2024-03-21 23:39:32 +08:00
|
|
|
import com.genersoft.iot.vmp.media.zlm.dto.MediaServer;
|
2023-06-27 17:18:46 +08:00
|
|
|
import com.genersoft.iot.vmp.media.zlm.dto.hook.HookParam;
|
2023-05-29 23:28:06 +08:00
|
|
|
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
2022-03-14 18:24:30 +08:00
|
|
|
import com.genersoft.iot.vmp.service.bean.SSRCInfo;
|
2022-09-29 16:27:59 +08:00
|
|
|
import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
|
2022-05-09 18:15:30 +08:00
|
|
|
import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
|
2022-12-19 14:20:22 +08:00
|
|
|
import gov.nist.javax.sip.message.SIPResponse;
|
2020-12-16 20:29:19 +08:00
|
|
|
|
2022-09-29 16:27:59 +08:00
|
|
|
import javax.sip.InvalidArgumentException;
|
|
|
|
import javax.sip.SipException;
|
2022-12-19 14:20:22 +08:00
|
|
|
import javax.sip.header.CallIdHeader;
|
2022-09-29 16:27:59 +08:00
|
|
|
import java.text.ParseException;
|
2022-12-19 14:20:22 +08:00
|
|
|
import java.util.Map;
|
2022-09-29 16:27:59 +08:00
|
|
|
|
2020-12-16 20:29:19 +08:00
|
|
|
/**
|
|
|
|
* 点播处理
|
|
|
|
*/
|
|
|
|
public interface IPlayService {
|
|
|
|
|
2024-03-21 23:39:32 +08:00
|
|
|
void play(MediaServer mediaServerItem, SSRCInfo ssrcInfo, Device device, DeviceChannel channelId,
|
2023-05-29 23:28:06 +08:00
|
|
|
ErrorCallback<Object> callback);
|
2024-03-21 23:39:32 +08:00
|
|
|
SSRCInfo play(MediaServer mediaServerItem, String deviceId, String channelId, String ssrc, ErrorCallback<Object> callback);
|
2021-07-16 16:34:51 +08:00
|
|
|
|
2024-03-21 23:39:32 +08:00
|
|
|
StreamInfo onPublishHandlerForPlay(MediaServer mediaServerItem, HookParam hookParam, String deviceId, String channelId);
|
2021-07-16 16:34:51 +08:00
|
|
|
|
2024-03-21 23:39:32 +08:00
|
|
|
MediaServer getNewMediaServerItem(Device device);
|
2021-11-26 23:05:36 +08:00
|
|
|
|
2023-05-29 23:28:06 +08:00
|
|
|
void playBack(String deviceId, String channelId, String startTime, String endTime, ErrorCallback<Object> callback);
|
2024-03-21 23:39:32 +08:00
|
|
|
void playBack(MediaServer mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, ErrorCallback<Object> callback);
|
2022-03-07 01:17:45 +08:00
|
|
|
void zlmServerOffline(String mediaServerId);
|
2022-03-25 16:05:14 +08:00
|
|
|
|
2023-05-29 23:28:06 +08:00
|
|
|
void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, ErrorCallback<Object> callback);
|
2024-03-21 23:39:32 +08:00
|
|
|
void download(MediaServer mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, ErrorCallback<Object> callback);
|
2022-03-25 16:05:14 +08:00
|
|
|
|
|
|
|
StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
|
2022-05-09 18:15:30 +08:00
|
|
|
|
2022-05-26 12:10:46 +08:00
|
|
|
void zlmServerOnline(String mediaServerId);
|
2022-06-27 10:16:21 +08:00
|
|
|
|
2023-03-20 14:20:28 +08:00
|
|
|
AudioBroadcastResult audioBroadcast(Device device, String channelId, Boolean broadcastMode);
|
2022-12-13 11:57:07 +08:00
|
|
|
|
2024-03-21 23:39:32 +08:00
|
|
|
boolean audioBroadcastCmd(Device device, String channelId, MediaServer mediaServerItem, String app, String stream, int timeout, boolean isFromPlatform, AudioBroadcastEvent event) throws InvalidArgumentException, ParseException, SipException;
|
2022-09-29 16:27:59 +08:00
|
|
|
|
2022-12-13 11:57:07 +08:00
|
|
|
boolean audioBroadcastInUse(Device device, String channelId);
|
|
|
|
|
2022-05-10 13:08:32 +08:00
|
|
|
void stopAudioBroadcast(String deviceId, String channelId);
|
2022-09-29 16:27:59 +08:00
|
|
|
|
2022-09-30 17:54:58 +08:00
|
|
|
void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
|
|
|
|
|
|
|
|
void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
|
2022-12-19 14:20:22 +08:00
|
|
|
|
|
|
|
void startPushStream(SendRtpItem sendRtpItem, SIPResponse sipResponse, ParentPlatform platform, CallIdHeader callIdHeader);
|
|
|
|
|
2023-07-02 13:53:45 +08:00
|
|
|
void startSendRtpStreamHand(SendRtpItem sendRtpItem, Object correlationInfo,
|
2022-12-19 14:20:22 +08:00
|
|
|
JSONObject jsonObject, Map<String, Object> param, CallIdHeader callIdHeader);
|
2023-02-19 12:46:53 +08:00
|
|
|
|
2024-03-21 23:39:32 +08:00
|
|
|
void talkCmd(Device device, String channelId, MediaServer mediaServerItem, String stream, AudioBroadcastEvent event);
|
2023-02-19 12:46:53 +08:00
|
|
|
|
|
|
|
void stopTalk(Device device, String channelId, Boolean streamIsReady);
|
2023-06-27 16:46:26 +08:00
|
|
|
|
2023-06-22 22:35:35 +08:00
|
|
|
void getSnap(String deviceId, String channelId, String fileName, ErrorCallback errorCallback);
|
2023-07-25 11:14:43 +08:00
|
|
|
|
2020-12-16 20:29:19 +08:00
|
|
|
}
|