IPlayService.java 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.genersoft.iot.vmp.service;
  2. import com.alibaba.fastjson.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 com.genersoft.iot.vmp.vmanager.bean.WVPResult;
  15. import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult;
  16. import org.springframework.web.context.request.async.DeferredResult;
  17. import javax.sip.InvalidArgumentException;
  18. import javax.sip.SipException;
  19. import java.text.ParseException;
  20. /**
  21. * 点播处理
  22. */
  23. public interface IPlayService {
  24. void onPublishHandlerForPlay(MediaServerItem mediaServerItem, JSONObject resonse, String deviceId, String channelId, String uuid);
  25. void play(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId,
  26. ZlmHttpHookSubscribe.Event hookEvent, SipSubscribe.Event errorEvent,
  27. InviteTimeOutCallback timeoutCallback, String uuid);
  28. PlayResult play(MediaServerItem mediaServerItem, String deviceId, String channelId, ZlmHttpHookSubscribe.Event event, SipSubscribe.Event errorEvent, Runnable timeoutCallback);
  29. MediaServerItem getNewMediaServerItem(Device device);
  30. void onPublishHandlerForDownload(InviteStreamInfo inviteStreamInfo, String deviceId, String channelId, String toString);
  31. DeferredResult<WVPResult<StreamInfo>> playBack(String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  32. DeferredResult<WVPResult<StreamInfo>> playBack(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  33. void zlmServerOffline(String mediaServerId);
  34. DeferredResult<WVPResult<StreamInfo>> download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  35. DeferredResult<WVPResult<StreamInfo>> download(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  36. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  37. void zlmServerOnline(String mediaServerId);
  38. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  39. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  40. }