| | |
| | | import com.basic.security.manager.DeviceManager; |
| | | import com.basic.security.model.GuestMessage; |
| | | import com.basic.security.model.ModelAdapter; |
| | | import com.basic.security.receiver.WebRtcBroadCastReceiver; |
| | | import com.basic.security.utils.CompareFeatureResult; |
| | | import com.basic.security.utils.Constants; |
| | | import com.basic.security.utils.DetectedResult; |
| | |
| | | boolean detectedResultChangedByTrackId = detectedResultChangedByTrackId(detectedResult); |
| | | if (System.currentTimeMillis() - lastSetDetectedResult > 3 * 1000 || detectedResultChangedByTrackId) { |
| | | if (Constants.indoorOutdoorInOne) { |
| | | // System.out.println("GuestAcceptedClient.setDetectedResult"); |
| | | // System1.out.println("GuestAcceptedClient.setDetectedResult"); |
| | | BaseApplication.getApplication().activity.fragment_guest_mode.addGuestListS(detectedResult); |
| | | } |
| | | acceptedClientListLock.lock(); |
| | |
| | | mLastFrame = detectedResultQueue.poll(); |
| | | } |
| | | } |
| | | // System.out.println("GuestAcceptedClient.getDetectedResult " + mLastFrame); |
| | | // System1.out.println("GuestAcceptedClient.getDetectedResult " + mLastFrame); |
| | | return mLastFrame; |
| | | } |
| | | |
| | |
| | | map.put(GuestMessage.frameJpgOrYuv, frameJpgOrYuv); |
| | | map.put(GuestMessage.frameJpgLength, frameJpgLength + ""); |
| | | map.put(GuestMessage.hasFrameData, hasFrameData); |
| | | // map.put(Constants.webRtcClientConnected, WebRtcBroadCastReceiver.webRtcClientConnected ? Constants.TRUE : Constants.FALSE); |
| | | // map.put(Constants.webRtcServerStarted, allowed && WebRtcBroadCastReceiver.webRtcServerStarted ? Constants.TRUE : Constants.FALSE); |
| | | map.put(GuestMessage.deviceId, DeviceManager.getDeviceId()); |
| | | socketUtil.writeMap(map); |
| | | if (Constants.TRUE.equals(hasFrameData)) { |