diff --git a/video/src/main/java/com/example/video/Detect.java b/video/src/main/java/com/example/video/Detect.java index 3c11c01cff2..3dd6e3d5aa6 100644 --- a/video/src/main/java/com/example/video/Detect.java +++ b/video/src/main/java/com/example/video/Detect.java @@ -17,6 +17,7 @@ package com.example.video; import com.google.api.gax.grpc.OperationFuture; +import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse; import com.google.cloud.videointelligence.v1beta1.FaceAnnotation; @@ -111,7 +112,7 @@ public static void analyzeFaces(String gcsUri) throws ExecutionException, .addFeatures(Feature.FACE_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -151,7 +152,7 @@ public static void analyzeLabels(String gcsUri) throws .addFeatures(Feature.LABEL_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -199,7 +200,7 @@ public static void analyzeLabelsFile(String filePath) throws .addFeatures(Feature.LABEL_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -244,7 +245,7 @@ public static void analyzeShots(String gcsUri) .addFeatures(Feature.SHOT_CHANGE_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); @@ -284,7 +285,7 @@ public static void analyzeSafeSearch(String gcsUri) .addFeatures(Feature.SAFE_SEARCH_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete..."); diff --git a/video/src/main/java/com/example/video/QuickstartSample.java b/video/src/main/java/com/example/video/QuickstartSample.java index f2958fc503c..3b4b0dc376b 100644 --- a/video/src/main/java/com/example/video/QuickstartSample.java +++ b/video/src/main/java/com/example/video/QuickstartSample.java @@ -18,6 +18,7 @@ // [START videointelligence_quickstart] import com.google.api.gax.grpc.OperationFuture; +import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse; import com.google.cloud.videointelligence.v1beta1.Feature; @@ -48,7 +49,7 @@ public static void main(String[] args) throws .addFeatures(Feature.LABEL_DETECTION) .build(); - OperationFuture operation = + OperationFuture operation = client.annotateVideoAsync(request); System.out.println("Waiting for operation to complete...");