x1ongzhu пре 7 година
родитељ
комит
6e3ba3e5d0

+ 1 - 2
src/main/java/com/izouma/awesomeadmin/service/impl/VideoNotifyServiceImpl.java

@@ -55,8 +55,7 @@ public class VideoNotifyServiceImpl implements VideoNotifyService {
         if (param.getPlayerInfoId() != null) {
             PlayerInfo playerInfo = playerInfoService.getPlayerInfoById(param.getPlayerInfoId().toString());
             playerInfo.setVideo(param.getPath());
-            playerInfo.setStatusFlag(5);
-            playerInfoService.updatePlayerInfo(playerInfo);
+            videoRecognitionService.start(playerInfo);
         }
     }
 

+ 2 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/VideoRecognitionServiceImpl.java

@@ -153,6 +153,8 @@ public class VideoRecognitionServiceImpl implements VideoRecognitionService {
         if (playerInfo.getStatusFlag() > 4) {
             return;
         }
+        playerInfo.setStatusFlag(5);
+        playerInfoService.updatePlayerInfo(playerInfo);
         VideoCapture capture = new VideoCapture();
         if (capture.open(playerInfo.getVideo())) {
             System.out.println(capture.get(Videoio.CAP_PROP_FRAME_WIDTH));