From 289f51651f6bbdd4ab4abe0386b589611da991ee Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Thu, 6 Apr 2023 02:47:47 -0700 Subject: [PATCH] Make GraphTextureFrame constructor public. PiperOrigin-RevId: 522287217 --- .../google/mediapipe/framework/GraphTextureFrame.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java b/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java index a253a8289..94636c2c9 100644 --- a/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java +++ b/mediapipe/java/com/google/mediapipe/framework/GraphTextureFrame.java @@ -42,7 +42,15 @@ public class GraphTextureFrame implements TextureFrame { this(nativeHandle, timestamp, false); } - GraphTextureFrame(long nativeHandle, long timestamp, boolean deferredSync) { + /** + * Create a GraphTextureFrame based on a raw C++ handle. + * + * @param nativeHandle C++ pointer a std::shared_ptr + * @param timestamp Raw packet timestamp obtained by Timestamp.Value() + * @param deferredSync If true, a GPU wait will automatically occur when + * GraphTextureFrame#getTextureName is called + */ + public GraphTextureFrame(long nativeHandle, long timestamp, boolean deferredSync) { nativeBufferHandle = nativeHandle; // TODO: use a single JNI call to fill in all info textureName = nativeGetTextureName(nativeBufferHandle);