|  |  |  | 
|---|
|  |  |  | package com.genersoft.iot.vmp.storager; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.Device; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.platform.bean.ChannelReduce; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.MobilePosition; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.*; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; | 
|---|
|  |  |  | import com.github.pagehelper.PageInfo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Description:视频设备数据存储接口 | 
|---|
|  |  |  | * @description:视频设备数据存储接口 | 
|---|
|  |  |  | * @author: swwheihei | 
|---|
|  |  |  | * @date:   2020年5月6日 下午2:14:31 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public boolean outline(String deviceId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 更新所有设备离线 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @return true:更新成功  false:更新失败 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public boolean outlineForAll(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询子设备 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param platformGbId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | ParentPlatform queryParentPlatById(String platformGbId); | 
|---|
|  |  |  | ParentPlatform queryParentPlatByServerGBId(String platformGbId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 所有平台离线 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加Mobile Position设备移动位置 | 
|---|
|  |  |  | * @param MobilePosition | 
|---|
|  |  |  | * @param mobilePosition | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public boolean insertMobilePosition(MobilePosition mobilePosition); | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param deviceId | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public int clearMobilePositionsByDeviceId(String deviceId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 新增代理流 | 
|---|
|  |  |  | * @param streamProxyDto | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public boolean addStreamProxy(StreamProxyItem streamProxyDto); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 更新代理流 | 
|---|
|  |  |  | * @param streamProxyDto | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public boolean updateStreamProxy(StreamProxyItem streamProxyDto); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 移除代理流 | 
|---|
|  |  |  | * @param app | 
|---|
|  |  |  | * @param stream | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public int deleteStreamProxy(String app, String stream); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 按照是否启用获取代理流 | 
|---|
|  |  |  | * @param enable | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public List<StreamProxyItem> getStreamProxyListForEnable(boolean enable); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 按照是app和stream获取代理流 | 
|---|
|  |  |  | * @param app | 
|---|
|  |  |  | * @param stream | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public StreamProxyItem queryStreamProxy(String app, String stream); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取代理流 | 
|---|
|  |  |  | * @param page | 
|---|
|  |  |  | * @param count | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | PageInfo<StreamProxyItem> queryStreamProxyList(Integer page, Integer count); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据国标ID获取平台关联的直播流 | 
|---|
|  |  |  | * @param platformId | 
|---|
|  |  |  | * @param channelId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | GbStream queryStreamInParentPlatform(String platformId, String channelId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取平台关联的直播流 | 
|---|
|  |  |  | * @param platformId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<GbStream> queryGbStreamListInPlatform(String platformId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 批量更新推流列表 | 
|---|
|  |  |  | * @param streamPushItems | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void updateMediaList(List<StreamPushItem> streamPushItems); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 更新单个推流 | 
|---|
|  |  |  | * @param streamPushItem | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void updateMedia(StreamPushItem streamPushItem); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 移除单个推流 | 
|---|
|  |  |  | * @param app | 
|---|
|  |  |  | * @param stream | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void removeMedia(String app, String stream); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 清空推流列表 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void clearMediaList(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 设置流离线 | 
|---|
|  |  |  | * @param app | 
|---|
|  |  |  | * @param streamId | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void mediaOutline(String app, String streamId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 设置平台在线/离线 | 
|---|
|  |  |  | * @param online | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void updateParentPlatformStatus(String platformGbID, boolean online); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 更新媒体节点 | 
|---|
|  |  |  | * @param mediaServerItem | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void updateMediaServer(MediaServerItem mediaServerItem); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据媒体ID获取启用/不启用的代理列表 | 
|---|
|  |  |  | * @param id 媒体ID | 
|---|
|  |  |  | * @param b 启用/不启用 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean b); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据通道ID获取其所在设备 | 
|---|
|  |  |  | * @param channelId  通道ID | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Device queryVideoDeviceByChannelId(String channelId); | 
|---|
|  |  |  | } | 
|---|