Commit 260bfd5935b87edd4e09a2d77b9536d0e85dde47
1 parent
db865cc9
替换一个过时的API,解决maven打包警告
Showing
1 changed file
with
4 additions
and
7 deletions
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
| ... | ... | @@ -18,17 +18,16 @@ import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe; |
| 18 | 18 | import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; |
| 19 | 19 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| 20 | 20 | import com.genersoft.iot.vmp.service.IMediaServerService; |
| 21 | +import com.genersoft.iot.vmp.service.IMediaService; | |
| 22 | +import com.genersoft.iot.vmp.service.IPlayService; | |
| 21 | 23 | import com.genersoft.iot.vmp.service.bean.InviteTimeOutCallback; |
| 22 | 24 | import com.genersoft.iot.vmp.service.bean.PlayBackCallback; |
| 23 | 25 | import com.genersoft.iot.vmp.service.bean.PlayBackResult; |
| 24 | 26 | import com.genersoft.iot.vmp.service.bean.SSRCInfo; |
| 25 | 27 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 26 | 28 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 27 | -import com.genersoft.iot.vmp.utils.redis.RedisUtil; | |
| 28 | 29 | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| 29 | 30 | import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.PlayResult; |
| 30 | -import com.genersoft.iot.vmp.service.IMediaService; | |
| 31 | -import com.genersoft.iot.vmp.service.IPlayService; | |
| 32 | 31 | import gov.nist.javax.sip.stack.SIPDialog; |
| 33 | 32 | import org.slf4j.Logger; |
| 34 | 33 | import org.slf4j.LoggerFactory; |
| ... | ... | @@ -42,6 +41,7 @@ import org.springframework.web.context.request.async.DeferredResult; |
| 42 | 41 | import javax.sip.ResponseEvent; |
| 43 | 42 | import java.io.FileNotFoundException; |
| 44 | 43 | import java.math.BigDecimal; |
| 44 | +import java.math.RoundingMode; | |
| 45 | 45 | import java.util.*; |
| 46 | 46 | |
| 47 | 47 | @SuppressWarnings(value = {"rawtypes", "unchecked"}) |
| ... | ... | @@ -63,9 +63,6 @@ public class PlayServiceImpl implements IPlayService { |
| 63 | 63 | private IRedisCatchStorage redisCatchStorage; |
| 64 | 64 | |
| 65 | 65 | @Autowired |
| 66 | - private RedisUtil redis; | |
| 67 | - | |
| 68 | - @Autowired | |
| 69 | 66 | private DeferredResultHolder resultHolder; |
| 70 | 67 | |
| 71 | 68 | @Autowired |
| ... | ... | @@ -556,7 +553,7 @@ public class PlayServiceImpl implements IPlayService { |
| 556 | 553 | |
| 557 | 554 | BigDecimal currentCount = new BigDecimal(duration/1000); |
| 558 | 555 | BigDecimal totalCount = new BigDecimal(end-start); |
| 559 | - BigDecimal divide = currentCount.divide(totalCount,2, BigDecimal.ROUND_HALF_UP); | |
| 556 | + BigDecimal divide = currentCount.divide(totalCount,2, RoundingMode.HALF_UP); | |
| 560 | 557 | double process = divide.doubleValue(); |
| 561 | 558 | streamInfo.setProgress(process); |
| 562 | 559 | } | ... | ... |