IPlayService.java 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package com.genersoft.iot.vmp.service;
  2. import com.alibaba.fastjson2.JSONObject;
  3. import com.genersoft.iot.vmp.common.StreamInfo;
  4. import com.genersoft.iot.vmp.conf.exception.ServiceException;
  5. import com.genersoft.iot.vmp.gb28181.bean.*;
  6. import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
  7. import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
  8. import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
  9. import com.genersoft.iot.vmp.service.bean.InviteTimeOutCallback;
  10. import com.genersoft.iot.vmp.service.bean.PlayBackCallback;
  11. import com.genersoft.iot.vmp.service.bean.SSRCInfo;
  12. import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
  13. import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
  14. import gov.nist.javax.sip.message.SIPResponse;
  15. import javax.sip.InvalidArgumentException;
  16. import javax.sip.SipException;
  17. import javax.sip.header.CallIdHeader;
  18. import java.text.ParseException;
  19. import java.util.Map;
  20. /**
  21. * 点播处理
  22. */
  23. public interface IPlayService {
  24. void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId);
  25. void play(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId,
  26. ZlmHttpHookSubscribe.Event hookEvent, SipSubscribe.Event errorEvent,
  27. InviteTimeOutCallback timeoutCallback);
  28. void play(MediaServerItem mediaServerItem, String deviceId, String channelId, ZlmHttpHookSubscribe.Event event, SipSubscribe.Event errorEvent, Runnable timeoutCallback);
  29. MediaServerItem getNewMediaServerItem(Device device);
  30. /**
  31. * 获取包含assist服务的节点
  32. */
  33. MediaServerItem getNewMediaServerItemHasAssist(Device device);
  34. void onPublishHandlerForDownload(InviteStreamInfo inviteStreamInfo, String deviceId, String channelId, String toString);
  35. void playBack(String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  36. void playBack(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  37. void zlmServerOffline(String mediaServerId);
  38. void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  39. void download(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  40. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  41. void zlmServerOnline(String mediaServerId);
  42. AudioBroadcastResult audioBroadcast(Device device, String channelId, Boolean broadcastMode);
  43. void stopAudioBroadcast(String deviceId, String channelId);
  44. void audioBroadcastCmd(Device device, String channelId, int timeout, MediaServerItem mediaServerItem, String sourceApp, String sourceStream, AudioBroadcastEvent event) throws InvalidArgumentException, ParseException, SipException;
  45. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  46. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  47. void startPushStream(SendRtpItem sendRtpItem, SIPResponse sipResponse, ParentPlatform platform, CallIdHeader callIdHeader);
  48. void startSendRtpStreamHand(SendRtpItem sendRtpItem, ParentPlatform parentPlatform,
  49. JSONObject jsonObject, Map<String, Object> param, CallIdHeader callIdHeader);
  50. void talkCmd(Device device, String channelId, MediaServerItem mediaServerItem, String stream, AudioBroadcastEvent event);
  51. void stopTalk(Device device, String channelId, Boolean streamIsReady);
  52. }