IPlayService.java 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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.ParentPlatform;
  7. import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
  8. import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
  9. import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
  10. import com.genersoft.iot.vmp.media.zlm.dto.hook.HookParam;
  11. import com.genersoft.iot.vmp.service.bean.ErrorCallback;
  12. import com.genersoft.iot.vmp.service.bean.SSRCInfo;
  13. import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
  14. import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
  15. import gov.nist.javax.sip.message.SIPResponse;
  16. import javax.sip.InvalidArgumentException;
  17. import javax.sip.SipException;
  18. import javax.sip.header.CallIdHeader;
  19. import java.text.ParseException;
  20. import java.util.Map;
  21. /**
  22. * 点播处理
  23. */
  24. public interface IPlayService {
  25. void play(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, DeviceChannel channelId,
  26. ErrorCallback<Object> callback);
  27. SSRCInfo play(MediaServerItem mediaServerItem, String deviceId, String channelId, String ssrc, ErrorCallback<Object> callback);
  28. StreamInfo onPublishHandlerForPlay(MediaServerItem mediaServerItem, HookParam hookParam, String deviceId, String channelId);
  29. MediaServerItem getNewMediaServerItem(Device device);
  30. void playBack(String deviceId, String channelId, String startTime, String endTime, ErrorCallback<Object> callback);
  31. void playBack(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, ErrorCallback<Object> callback);
  32. void zlmServerOffline(String mediaServerId);
  33. void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, ErrorCallback<Object> callback);
  34. void download(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo,String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, ErrorCallback<Object> callback);
  35. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  36. void zlmServerOnline(String mediaServerId);
  37. AudioBroadcastResult audioBroadcast(Device device, String channelId, Boolean broadcastMode);
  38. boolean audioBroadcastCmd(Device device, String channelId, MediaServerItem mediaServerItem, String app, String stream, int timeout, boolean isFromPlatform, AudioBroadcastEvent event) throws InvalidArgumentException, ParseException, SipException;
  39. boolean audioBroadcastInUse(Device device, String channelId);
  40. void stopAudioBroadcast(String deviceId, String channelId);
  41. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  42. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  43. void startPushStream(SendRtpItem sendRtpItem, SIPResponse sipResponse, ParentPlatform platform, CallIdHeader callIdHeader);
  44. void startSendRtpStreamHand(SendRtpItem sendRtpItem, Object correlationInfo,
  45. JSONObject jsonObject, Map<String, Object> param, CallIdHeader callIdHeader);
  46. void talkCmd(Device device, String channelId, MediaServerItem mediaServerItem, String stream, AudioBroadcastEvent event);
  47. void stopTalk(Device device, String channelId, Boolean streamIsReady);
  48. void getSnap(String deviceId, String channelId, String fileName, ErrorCallback errorCallback);
  49. }