IPlayService.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. void onPublishHandlerForDownload(InviteStreamInfo inviteStreamInfo, String deviceId, String channelId, String toString);
  28. void playBack(String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  29. void playBack(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  30. void zlmServerOffline(String mediaServerId);
  31. void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  32. void download(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  33. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  34. void zlmServerOnline(String mediaServerId);
  35. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  36. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  37. }