IPlayService.java 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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.HookSubscribeForKey;
  6. import com.genersoft.iot.vmp.gb28181.bean.BroadcastItem;
  7. import com.genersoft.iot.vmp.gb28181.bean.Device;
  8. import com.genersoft.iot.vmp.gb28181.bean.InviteStreamCallback;
  9. import com.genersoft.iot.vmp.gb28181.bean.InviteStreamInfo;
  10. import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
  11. import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe;
  12. import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
  13. import com.genersoft.iot.vmp.service.bean.*;
  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. void openBroadcast(MediaServerItem mediaServerItem,
  27. String deviceId,
  28. String app,
  29. String audioStreamId,
  30. HookSubscribeForKey broadcastForInviteHook,
  31. NodeCallBack nodeCallBack,
  32. Runnable timeoutCallback);
  33. void openBroadcast(MediaServerItem mediaServerItem,
  34. Device device,
  35. int waitTime,
  36. BroadcastCallback callback);
  37. MediaServerItem getNewMediaServerItem(Device device);
  38. /**
  39. * 获取包含assist服务的节点
  40. */
  41. MediaServerItem getNewMediaServerItemHasAssist(Device device);
  42. void onPublishHandlerForDownload(InviteStreamInfo inviteStreamInfo, String deviceId, String channelId, String toString);
  43. void playBack(String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  44. void playBack(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  45. void zlmServerOffline(String mediaServerId);
  46. void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback playBackCallback);
  47. void download(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, InviteStreamCallback infoCallBack, PlayBackCallback hookCallBack);
  48. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  49. void zlmServerOnline(String mediaServerId);
  50. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  51. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  52. void broadcast(
  53. MediaServerItem mediaServerItem,
  54. Device device,
  55. BroadcastItem broadcastItem,
  56. int waitTime,
  57. BroadcastCallback callback
  58. );
  59. }