Changed timestamp

This commit is contained in:
udamaster 2022-10-25 18:54:58 -04:00
parent 2b2b699fea
commit 1a9b5bd53c
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
package com.google.mediapipe.solutions.lindera;
public interface ComputerVisionPlugin {
void bodyJoints(int timestamp, BodyJoints bodyJoints);
void bodyJoints(Long timestamp, BodyJoints bodyJoints);
}

View File

@ -26,7 +26,7 @@ public class Lindera {
private PoseTracking poseTracking;
// TODO: Verify that this is the timestamp used in Actual Plugin
private int timeStamp = 0;
private Long timeStamp = 0L;
private CameraRotation cameraRotation = CameraRotation.AUTOMATIC;
// Live camera demo UI and camera components.
@ -85,14 +85,14 @@ public class Lindera {
glSurfaceView.setRenderData(poseTrackingResult);
glSurfaceView.requestRender();
ImmutableList<LandmarkProto.Landmark> landmarks = poseTrackingResult.multiPoseLandmarks();
timeStamp+=1;
//timeStamp+=1;
if (landmarks.isEmpty()) return;
BodyJoints bodyJoints = new BodyJoints();
landmarksToBodyJoints(landmarks,bodyJoints);
plugin.bodyJoints(timeStamp, bodyJoints);
plugin.bodyJoints(System.currentTimeMillis(), bodyJoints);
});
}