IPlayService.java 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.Device;
  6. import com.genersoft.iot.vmp.gb28181.bean.InviteStreamCallback;
  7. import com.genersoft.iot.vmp.gb28181.bean.InviteStreamInfo;
  8. import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
  9. import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
  10. import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
  11. import com.genersoft.iot.vmp.service.bean.InviteTimeOutCallback;
  12. import com.genersoft.iot.vmp.service.bean.PlayBackCallback;
  13. import com.genersoft.iot.vmp.service.bean.SSRCInfo;
  14. import javax.sip.InvalidArgumentException;
  15. import javax.sip.SipException;
  16. import java.text.ParseException;
  17. /**
  18. * 点播处理
  19. */
  20. public interface IPlayService {
  21. void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId);
  22. void play(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId,
  23. ZlmHttpHookSubscribe.Event hookEvent, SipSubscribe.Event errorEvent,
  24. InviteTimeOutCallback timeoutCallback);
  25. void play(MediaServerItem mediaServerItem, String deviceId, String channelId, ZlmHttpHookSubscribe.Event event, SipSubscribe.Event errorEvent, Runnable timeoutCallback);
  26. MediaServerItem getNewMediaServerItem(Device device);
  27. /**
  28. * 获取包含assist服务的节点
  29. */
  30. MediaServerItem getNewMediaServerItemHasAssist(Device device);
  31. void onPublishHandlerForDownload(InviteStreamInfo inviteStreamInfo, String deviceId, String channelId, String toString);
  32. void playBack(String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  33. void playBack(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  34. void zlmServerOffline(String mediaServerId);
  35. void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  36. void download(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  37. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  38. void zlmServerOnline(String mediaServerId);
  39. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  40. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  41. }