IStreamPushService.java 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. package com.genersoft.iot.vmp.service;
  2. import com.genersoft.iot.vmp.gb28181.bean.GbStream;
  3. import com.genersoft.iot.vmp.media.zlm.dto.StreamPush;
  4. import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
  5. import com.genersoft.iot.vmp.service.bean.StreamPushItemFromRedis;
  6. import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
  7. import com.github.pagehelper.PageInfo;
  8. import java.util.List;
  9. import java.util.Map;
  10. /**
  11. * @author lin
  12. */
  13. public interface IStreamPushService {
  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<StreamPush> getPushList(Integer page, Integer count, String query, Boolean pushing, String mediaServerId);
  30. List<StreamPush> getPushList(String mediaSererId);
  31. StreamPush transform(OnStreamChangedHookParam item);
  32. StreamPush getPush(String app, String streamId);
  33. /**
  34. * 停止一路推流
  35. * @param app 应用名
  36. * @param stream 流ID
  37. */
  38. boolean stop(String app, String stream);
  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<StreamPush> streamPushExcelDtoList);
  56. /**
  57. * 中止多个推流
  58. */
  59. boolean batchStop(List<GbStream> streamPushItems);
  60. /**
  61. * 导入时批量增加
  62. */
  63. void batchAddForUpload(List<StreamPush> 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. /**
  77. * 增加推流
  78. */
  79. boolean add(StreamPush stream);
  80. boolean update(StreamPush stream);
  81. /**
  82. * 获取全部的app+Streanm 用于判断推流列表是新增还是修改
  83. * @return
  84. */
  85. List<String> getAllAppAndStream();
  86. /**
  87. * 获取统计信息
  88. * @return
  89. */
  90. ResourceBaseInfo getOverview();
  91. Map<String, StreamPush> getAllAppAndStreamMap();
  92. void updatePush(OnStreamChangedHookParam param);
  93. Map<String, StreamPush> getAllGBId();
  94. void updateStatus(StreamPush push);
  95. }