IStreamPushService.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. package com.genersoft.iot.vmp.service;
  2. import com.genersoft.iot.vmp.gb28181.bean.GbStream;
  3. import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig;
  4. import com.genersoft.iot.vmp.media.zlm.dto.MediaItem;
  5. import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
  6. import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
  7. import com.genersoft.iot.vmp.service.bean.StreamPushItemFromRedis;
  8. import com.genersoft.iot.vmp.vmanager.bean.StreamPushExcelDto;
  9. import com.github.pagehelper.PageInfo;
  10. import java.util.List;
  11. import java.util.Map;
  12. public interface IStreamPushService {
  13. List<StreamPushItem> handleJSON(String json, MediaServerItem mediaServerItem);
  14. /**
  15. * 将应用名和流ID加入国标关联
  16. * @param stream
  17. * @return
  18. */
  19. boolean saveToGB(GbStream stream);
  20. /**
  21. * 将应用名和流ID移出国标关联
  22. * @param stream
  23. * @return
  24. */
  25. boolean removeFromGB(GbStream stream);
  26. /**
  27. * 获取
  28. */
  29. PageInfo<StreamPushItem> getPushList(Integer page, Integer count, String query, Boolean pushing, String mediaServerId);
  30. List<StreamPushItem> getPushList(String mediaSererId);
  31. StreamPushItem transform(MediaItem item);
  32. StreamPushItem getPush(String app, String streamId);
  33. /**
  34. * 停止一路推流
  35. * @param app 应用名
  36. * @param streamId 流ID
  37. */
  38. boolean stop(String app, String streamId);
  39. /**
  40. * 新的节点加入
  41. */
  42. void zlmServerOnline(String mediaServerId);
  43. /**
  44. * 节点离线
  45. */
  46. void zlmServerOffline(String mediaServerId);
  47. /**
  48. * 清空
  49. */
  50. void clean();
  51. boolean saveToRandomGB();
  52. /**
  53. * 批量添加
  54. */
  55. void batchAdd(List<StreamPushItem> streamPushExcelDtoList);
  56. /**
  57. * 中止多个推流
  58. */
  59. boolean batchStop(List<GbStream> streamPushItems);
  60. /**
  61. * 导入时批量增加
  62. */
  63. void batchAddForUpload(List<StreamPushItem> streamPushItems, Map<String, List<String[]>> streamPushItemsForAll);
  64. /**
  65. * 全部离线
  66. */
  67. void allStreamOffline();
  68. /**
  69. * 推流离线
  70. */
  71. void offline(List<StreamPushItemFromRedis> offlineStreams);
  72. /**
  73. * 推流上线
  74. */
  75. void online(List<StreamPushItemFromRedis> onlineStreams);
  76. }