diff --git a/video/src/main/java/com/example/video/Detect.java b/video/src/main/java/com/example/video/Detect.java index 3dd6e3d5aa6..4444ff492a8 100644 --- a/video/src/main/java/com/example/video/Detect.java +++ b/video/src/main/java/com/example/video/Detect.java @@ -16,7 +16,7 @@ package com.example.video; -import com.google.api.gax.grpc.OperationFuture; +import com.google.api.gax.rpc.OperationFuture; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse; @@ -30,13 +30,13 @@ import com.google.cloud.videointelligence.v1beta1.VideoIntelligenceServiceClient; import com.google.cloud.videointelligence.v1beta1.VideoIntelligenceServiceSettings; import com.google.cloud.videointelligence.v1beta1.VideoSegment; -import org.apache.commons.codec.binary.Base64; - +import com.google.longrunning.Operation; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.concurrent.ExecutionException; +import org.apache.commons.codec.binary.Base64; public class Detect { @@ -112,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..."); @@ -152,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..."); @@ -200,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..."); @@ -245,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..."); @@ -285,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 3b4b0dc376b..dbf166eb567 100644 --- a/video/src/main/java/com/example/video/QuickstartSample.java +++ b/video/src/main/java/com/example/video/QuickstartSample.java @@ -17,7 +17,8 @@ package com.example.video; // [START videointelligence_quickstart] -import com.google.api.gax.grpc.OperationFuture; + +import com.google.api.gax.rpc.OperationFuture; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest; import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse; @@ -27,7 +28,7 @@ import com.google.cloud.videointelligence.v1beta1.VideoAnnotationResults; import com.google.cloud.videointelligence.v1beta1.VideoIntelligenceServiceClient; import com.google.cloud.videointelligence.v1beta1.VideoIntelligenceServiceSettings; - +import com.google.longrunning.Operation; import java.io.IOException; import java.util.concurrent.ExecutionException; @@ -49,7 +50,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...");