IPlayService.java 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package com.genersoft.iot.vmp.gb28181.service;
  2. import com.genersoft.iot.vmp.common.StreamInfo;
  3. import com.genersoft.iot.vmp.conf.exception.ServiceException;
  4. import com.genersoft.iot.vmp.gb28181.bean.Device;
  5. import com.genersoft.iot.vmp.gb28181.bean.Platform;
  6. import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
  7. import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
  8. import com.genersoft.iot.vmp.media.bean.MediaInfo;
  9. import com.genersoft.iot.vmp.media.bean.MediaServer;
  10. import com.genersoft.iot.vmp.service.bean.ErrorCallback;
  11. import com.genersoft.iot.vmp.service.bean.SSRCInfo;
  12. import com.genersoft.iot.vmp.vmanager.bean.AudioBroadcastResult;
  13. import com.genersoft.iot.vmp.gb28181.controller.bean.AudioBroadcastEvent;
  14. import gov.nist.javax.sip.message.SIPResponse;
  15. import javax.sip.InvalidArgumentException;
  16. import javax.sip.SipException;
  17. import javax.sip.header.CallIdHeader;
  18. import java.text.ParseException;
  19. /**
  20. * 点播处理
  21. */
  22. public interface IPlayService {
  23. void play(MediaServer mediaServerItem, SSRCInfo ssrcInfo, Device device, DeviceChannel channelId,
  24. ErrorCallback<Object> callback);
  25. SSRCInfo play(MediaServer mediaServerItem, String deviceId, String channelId, String ssrc, ErrorCallback<StreamInfo> callback);
  26. StreamInfo onPublishHandlerForPlay(MediaServer mediaServerItem, MediaInfo mediaInfo, String deviceId, String channelId);
  27. MediaServer getNewMediaServerItem(Device device);
  28. void playBack(String deviceId, String channelId, String startTime, String endTime, ErrorCallback<Object> callback);
  29. void playBack(MediaServer mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, ErrorCallback<Object> callback);
  30. void zlmServerOffline(String mediaServerId);
  31. void download(String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, ErrorCallback<Object> callback);
  32. void download(MediaServer mediaServerItem, SSRCInfo ssrcInfo, String deviceId, String channelId, String startTime, String endTime, int downloadSpeed, ErrorCallback<Object> callback);
  33. StreamInfo getDownLoadInfo(String deviceId, String channelId, String stream);
  34. void zlmServerOnline(String mediaServerId);
  35. AudioBroadcastResult audioBroadcast(Device device, String channelId, Boolean broadcastMode);
  36. boolean audioBroadcastCmd(Device device, String channelId, MediaServer mediaServerItem, String app, String stream, int timeout, boolean isFromPlatform, AudioBroadcastEvent event) throws InvalidArgumentException, ParseException, SipException;
  37. boolean audioBroadcastInUse(Device device, String channelId);
  38. void stopAudioBroadcast(String deviceId, String channelId);
  39. void pauseRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  40. void resumeRtp(String streamId) throws ServiceException, InvalidArgumentException, ParseException, SipException;
  41. void startPushStream(SendRtpItem sendRtpItem, SIPResponse sipResponse, Platform platform, CallIdHeader callIdHeader);
  42. void startSendRtpStreamFailHand(SendRtpItem sendRtpItem, Platform platform, CallIdHeader callIdHeader);
  43. void talkCmd(Device device, String channelId, MediaServer mediaServerItem, String stream, AudioBroadcastEvent event);
  44. void stopTalk(Device device, String channelId, Boolean streamIsReady);
  45. void getSnap(String deviceId, String channelId, String fileName, ErrorCallback errorCallback);
  46. void stopPlay(Device device, String channelId);
  47. }