|  |  |  | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.GbStream; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.service.IMediaServerService; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.service.IMediaService; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.service.IStreamPushService; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.service.impl.StreamPushUploadFileHandler; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.BatchGBStreamParam; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.ErrorCode; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.StreamPushExcelDto; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.vmanager.bean.*; | 
|---|
|  |  |  | import com.github.pagehelper.PageInfo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Parameter; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.tags.Tag; | 
|---|
|  |  |  | import org.apache.poi.sl.usermodel.Sheet; | 
|---|
|  |  |  | import org.slf4j.Logger; | 
|---|
|  |  |  | import org.slf4j.LoggerFactory; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.http.ResponseEntity; | 
|---|
|  |  |  | import org.springframework.stereotype.Controller; | 
|---|
|  |  |  | import org.springframework.util.ObjectUtils; | 
|---|
|  |  |  | import org.springframework.util.StringUtils; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import org.springframework.web.context.request.async.DeferredResult; | 
|---|
|  |  |  | import org.springframework.web.multipart.MultipartFile; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletRequest; | 
|---|
|  |  |  | import java.io.IOException; | 
|---|
|  |  |  | import java.io.InputStream; | 
|---|
|  |  |  | import java.util.HashMap; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Tag(name  = "推流信息管理") | 
|---|
|  |  |  | @Controller | 
|---|
|  |  |  | @CrossOrigin | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/api/push") | 
|---|
|  |  |  | public class StreamPushController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | String name = file.getName(); | 
|---|
|  |  |  | inputStream = file.getInputStream(); | 
|---|
|  |  |  | } catch (IOException e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | logger.error("未处理的异常 ", e); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | //传入参数 | 
|---|
|  |  |  | 
|---|
|  |  |  | @Parameter(name = "app", description = "应用名", required = true) | 
|---|
|  |  |  | @Parameter(name = "stream", description = "流id", required = true) | 
|---|
|  |  |  | @Parameter(name = "mediaServerId", description = "媒体服务器id") | 
|---|
|  |  |  | public StreamInfo getPlayUrl(@RequestParam String app,@RequestParam String stream, | 
|---|
|  |  |  | @RequestParam(required = false) String mediaServerId){ | 
|---|
|  |  |  | public StreamContent getPlayUrl(@RequestParam String app, @RequestParam String stream, | 
|---|
|  |  |  | @RequestParam(required = false) String mediaServerId){ | 
|---|
|  |  |  | boolean authority = false; | 
|---|
|  |  |  | // 是否登陆用户, 登陆用户返回完整信息 | 
|---|
|  |  |  | LoginUser userInfo = SecurityUtils.getUserInfo(); | 
|---|
|  |  |  | 
|---|
|  |  |  | if (streamInfo == null){ | 
|---|
|  |  |  | throw new ControllerException(ErrorCode.ERROR100.getCode(), "获取播放地址失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return streamInfo; | 
|---|
|  |  |  | return new StreamContent(streamInfo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|