|  |  | 
 |  |  | package com.genersoft.iot.vmp.storager;
 | 
 |  |  | 
 | 
 |  |  | import java.util.List;
 | 
 |  |  | 
 | 
 |  |  | 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:视频设备数据存储接口
 | 
 |  |  | 
 |  |  |     * @param channel 通道
 | 
 |  |  |     */
 | 
 |  |  |    public void updateChannel(String deviceId, DeviceChannel channel);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 批量添加设备通道
 | 
 |  |  |     *
 | 
 |  |  |     * @param deviceId 设备id
 | 
 |  |  |     * @param channels 多个通道
 | 
 |  |  |     */
 | 
 |  |  |    public void updateChannels(String deviceId, List<DeviceChannel> channels);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 开始播放
 | 
 |  |  | 
 |  |  |     * @param channelId 通道ID
 | 
 |  |  |     */
 | 
 |  |  |    public DeviceChannel queryChannel(String deviceId, String channelId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 删除通道
 | 
 |  |  |     * @param deviceId 设备ID
 | 
 |  |  |     * @param channelId 通道ID
 | 
 |  |  |     */
 | 
 |  |  |    public int delChannel(String deviceId, String channelId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 获取多个设备
 | 
 |  |  | 
 |  |  |     * @param channelId
 | 
 |  |  |     * @return
 | 
 |  |  |     */
 | 
 |  |  |    GbStream queryStreamInParentPlatform(String platformId, String channelId);
 | 
 |  |  |    List<GbStream> queryStreamInParentPlatform(String platformId, String channelId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 获取平台关联的直播流
 | 
 |  |  | 
 |  |  |     * @param app
 | 
 |  |  |     * @param stream
 | 
 |  |  |     */
 | 
 |  |  |    void removeMedia(String app, String stream);
 | 
 |  |  |    int removeMedia(String app, String stream);
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  | 
 |  |  |     * @param app
 | 
 |  |  |     * @param streamId
 | 
 |  |  |     */
 | 
 |  |  |    void mediaOutline(String app, String streamId);
 | 
 |  |  |    int mediaOutline(String app, String streamId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 设置平台在线/离线
 | 
 |  |  | 
 |  |  |     */
 | 
 |  |  |    void updateMediaServer(MediaServerItem mediaServerItem);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 根据媒体ID获取启用/不启用的代理列表
 | 
 |  |  |     * @param id 媒体ID
 | 
 |  |  |     * @param b 启用/不启用
 | 
 |  |  |     * @return
 | 
 |  |  |     */
 | 
 |  |  |    List<StreamProxyItem> getStreamProxyListForEnableInMediaServer(String id, boolean b);
 | 
 |  |  | 
 | 
 |  |  |     Device queryVideoDeviceByChannelId(String platformGbId);
 | 
 |  |  |    /**
 | 
 |  |  |     * 根据通道ID获取其所在设备
 | 
 |  |  |     * @param channelId  通道ID
 | 
 |  |  |     * @return
 | 
 |  |  |     */
 | 
 |  |  |     Device queryVideoDeviceByChannelId(String channelId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 通道上线
 | 
 |  |  |     * @param channelId 通道ID
 | 
 |  |  |     */
 | 
 |  |  |    void deviceChannelOnline(String deviceId, String channelId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 通道离线
 | 
 |  |  |     * @param channelId 通道ID
 | 
 |  |  |     */
 | 
 |  |  |    void deviceChannelOffline(String deviceId, String channelId);
 | 
 |  |  | 
 | 
 |  |  |    /**
 | 
 |  |  |     * 通过app与stream获取StreamProxy
 | 
 |  |  |     * @param app
 | 
 |  |  |     * @param streamId
 | 
 |  |  |     * @return
 | 
 |  |  |     */
 | 
 |  |  |     StreamProxyItem getStreamProxyByAppAndStream(String app, String streamId);
 | 
 |  |  | 
 | 
 |  |  | }
 |