diff --git a/video/cloud-client/README.md b/video/cloud-client/README.md index edef15190d1..d7b19d912f8 100644 --- a/video/cloud-client/README.md +++ b/video/cloud-client/README.md @@ -59,3 +59,12 @@ Detect Shots java -cp target/video-google-cloud-samples-1.0.0-jar-with-dependencies.jar \ com.example.video.Detect shots gs://cloudmleap/video/next/gbikes_dinosaur.mp4 ``` + +From Windows, you may need to supply your classpath diferently, for example: +``` +java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.example.video.Detect labels gs://demomaker/cat.mp4 +``` +or +``` +java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.example.video.Detect labels-file resources\\cat.mp4 +``` diff --git a/video/cloud-client/pom.xml b/video/cloud-client/pom.xml index cf80597ece8..24cc621503b 100644 --- a/video/cloud-client/pom.xml +++ b/video/cloud-client/pom.xml @@ -43,39 +43,22 @@ com.google.cloud google-cloud - 0.18.0-alpha - - - com.google.guava - guava-jdk5 - - + 0.20.1-alpha com.google.cloud google-cloud-video-intelligence - 0.20.0-alpha - - - com.google.guava - guava-jdk5 - - + 0.20.1-alpha com.google.auth - google-auth-library-oauth2-http - 0.6.1 - - - com.google.auth - google-auth-library-credentials + google-auth-library-credentials 0.6.1 - io.netty - netty-tcnative-boringssl-static - 1.1.33.Fork26 + com.google.oauth-client + google-oauth-client-jetty + 1.22.0 diff --git a/video/cloud-client/src/main/java/com/example/video/Detect.java b/video/cloud-client/src/main/java/com/example/video/Detect.java index 3c11c01cff2..3dd6e3d5aa6 100644 --- a/video/cloud-client/src/main/java/com/example/video/Detect.java +++ b/video/cloud-client/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/cloud-client/src/main/java/com/example/video/QuickstartSample.java b/video/cloud-client/src/main/java/com/example/video/QuickstartSample.java index f2958fc503c..3b4b0dc376b 100644 --- a/video/cloud-client/src/main/java/com/example/video/QuickstartSample.java +++ b/video/cloud-client/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...");