Commit 72852799fc4f32dcdb504e0da7523eb7364638c6
Committed by
GitHub
Merge pull request #486 from hotcoffie/wvp-28181-2.0
一些细节修复
Showing
3 changed files
with
7 additions
and
23 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl; |
| 2 | 2 | |
| 3 | -import com.genersoft.iot.vmp.common.VideoManagerConstants; | |
| 4 | 3 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 5 | -import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper; | |
| 6 | 4 | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 7 | 5 | import com.genersoft.iot.vmp.gb28181.bean.WvpSipDate; |
| 8 | -import com.genersoft.iot.vmp.gb28181.event.EventPublisher; | |
| 9 | 6 | import com.genersoft.iot.vmp.gb28181.transmit.SIPProcessorObserver; |
| 10 | 7 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor; |
| 11 | 8 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 12 | 9 | import com.genersoft.iot.vmp.service.IDeviceService; |
| 13 | -import com.genersoft.iot.vmp.storager.IRedisCatchStorage; | |
| 14 | -import com.genersoft.iot.vmp.storager.IVideoManagerStorage; | |
| 15 | 10 | import com.genersoft.iot.vmp.utils.DateUtil; |
| 16 | 11 | import gov.nist.javax.sip.RequestEventExt; |
| 17 | 12 | import gov.nist.javax.sip.address.AddressImpl; |
| 18 | 13 | import gov.nist.javax.sip.address.SipUri; |
| 14 | +import gov.nist.javax.sip.clientauthutils.DigestServerAuthenticationHelper; | |
| 19 | 15 | import gov.nist.javax.sip.header.Expires; |
| 20 | 16 | import gov.nist.javax.sip.header.SIPDateHeader; |
| 21 | 17 | import org.slf4j.Logger; |
| ... | ... | @@ -51,15 +47,6 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen |
| 51 | 47 | private SipConfig sipConfig; |
| 52 | 48 | |
| 53 | 49 | @Autowired |
| 54 | - private IRedisCatchStorage redisCatchStorage; | |
| 55 | - | |
| 56 | - @Autowired | |
| 57 | - private IVideoManagerStorage storager; | |
| 58 | - | |
| 59 | - @Autowired | |
| 60 | - private EventPublisher publisher; | |
| 61 | - | |
| 62 | - @Autowired | |
| 63 | 50 | private SIPProcessorObserver sipProcessorObserver; |
| 64 | 51 | |
| 65 | 52 | @Autowired |
| ... | ... | @@ -86,7 +73,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen |
| 86 | 73 | ExpiresHeader expiresHeader = (ExpiresHeader) request.getHeader(Expires.NAME); |
| 87 | 74 | Response response = null; |
| 88 | 75 | boolean passwordCorrect = false; |
| 89 | - // 注册标志 0:未携带授权头或者密码错误 1:注册成功 2:注销成功 | |
| 76 | + // 注册标志 | |
| 90 | 77 | boolean registerFlag = false; |
| 91 | 78 | FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME); |
| 92 | 79 | AddressImpl address = (AddressImpl) fromHeader.getAddress(); | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
| ... | ... | @@ -19,17 +19,16 @@ import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe; |
| 19 | 19 | import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| 20 | 20 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 21 | 21 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| 22 | +import com.genersoft.iot.vmp.service.IMediaService; | |
| 23 | +import com.genersoft.iot.vmp.service.IPlayService; | |
| 22 | 24 | import com.genersoft.iot.vmp.service.bean.InviteTimeOutCallback; |
| 23 | 25 | import com.genersoft.iot.vmp.service.bean.PlayBackCallback; |
| 24 | 26 | import com.genersoft.iot.vmp.service.bean.PlayBackResult; |
| 25 | 27 | import com.genersoft.iot.vmp.service.bean.SSRCInfo; |
| 26 | 28 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 27 | 29 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 28 | -import com.genersoft.iot.vmp.utils.redis.RedisUtil; | |
| 29 | 30 | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| 30 | 31 | import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult; |
| 31 | -import com.genersoft.iot.vmp.service.IMediaService; | |
| 32 | -import com.genersoft.iot.vmp.service.IPlayService; | |
| 33 | 32 | import gov.nist.javax.sip.stack.SIPDialog; |
| 34 | 33 | import org.slf4j.Logger; |
| 35 | 34 | import org.slf4j.LoggerFactory; |
| ... | ... | @@ -43,6 +42,7 @@ import org.springframework.web.context.request.async.DeferredResult; |
| 43 | 42 | import javax.sip.ResponseEvent; |
| 44 | 43 | import java.io.FileNotFoundException; |
| 45 | 44 | import java.math.BigDecimal; |
| 45 | +import java.math.RoundingMode; | |
| 46 | 46 | import java.util.*; |
| 47 | 47 | |
| 48 | 48 | @SuppressWarnings(value = {"rawtypes", "unchecked"}) |
| ... | ... | @@ -64,9 +64,6 @@ public class PlayServiceImpl implements IPlayService { |
| 64 | 64 | private IRedisCatchStorage redisCatchStorage; |
| 65 | 65 | |
| 66 | 66 | @Autowired |
| 67 | - private RedisUtil redis; | |
| 68 | - | |
| 69 | - @Autowired | |
| 70 | 67 | private DeferredResultHolder resultHolder; |
| 71 | 68 | |
| 72 | 69 | @Autowired |
| ... | ... | @@ -591,7 +588,7 @@ public class PlayServiceImpl implements IPlayService { |
| 591 | 588 | |
| 592 | 589 | BigDecimal currentCount = new BigDecimal(duration/1000); |
| 593 | 590 | BigDecimal totalCount = new BigDecimal(end-start); |
| 594 | - BigDecimal divide = currentCount.divide(totalCount,2, BigDecimal.ROUND_HALF_UP); | |
| 591 | + BigDecimal divide = currentCount.divide(totalCount,2, RoundingMode.HALF_UP); | |
| 595 | 592 | double process = divide.doubleValue(); |
| 596 | 593 | streamInfo.setProgress(process); |
| 597 | 594 | } | ... | ... |
web_src/package.json