Skip to content

Commit f92eb66

Browse files
committed
Upgrades client to 0.20.1 and addresses changes to long running operations
1 parent 2f31b73 commit f92eb66

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

video/cloud-client/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.
6666
```
6767
or
6868
```
69-
java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.example.video.Detect labels-file resources/cat.mp4
69+
java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.example.video.Detect labels-file resources\\cat.mp4
7070
```

video/cloud-client/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@
4343
<dependency>
4444
<groupId>com.google.cloud</groupId>
4545
<artifactId>google-cloud</artifactId>
46-
<version>0.20.0-alpha</version>
46+
<version>0.20.1-alpha</version>
4747
</dependency>
4848
<dependency>
4949
<groupId>com.google.cloud</groupId>
5050
<artifactId>google-cloud-video-intelligence</artifactId>
51-
<version>0.20.0-alpha</version>
51+
<version>0.20.1-alpha</version>
5252
</dependency>
5353
<dependency>
5454
<groupId>com.google.auth</groupId>

video/cloud-client/src/main/java/com/example/video/Detect.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.example.video;
1818

1919
import com.google.api.gax.grpc.OperationFuture;
20+
import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress;
2021
import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest;
2122
import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse;
2223
import com.google.cloud.videointelligence.v1beta1.FaceAnnotation;
@@ -111,7 +112,7 @@ public static void analyzeFaces(String gcsUri) throws ExecutionException,
111112
.addFeatures(Feature.FACE_DETECTION)
112113
.build();
113114

114-
OperationFuture<AnnotateVideoResponse> operation =
115+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
115116
client.annotateVideoAsync(request);
116117

117118
System.out.println("Waiting for operation to complete...");
@@ -151,7 +152,7 @@ public static void analyzeLabels(String gcsUri) throws
151152
.addFeatures(Feature.LABEL_DETECTION)
152153
.build();
153154

154-
OperationFuture<AnnotateVideoResponse> operation =
155+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
155156
client.annotateVideoAsync(request);
156157

157158
System.out.println("Waiting for operation to complete...");
@@ -199,7 +200,7 @@ public static void analyzeLabelsFile(String filePath) throws
199200
.addFeatures(Feature.LABEL_DETECTION)
200201
.build();
201202

202-
OperationFuture<AnnotateVideoResponse> operation =
203+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
203204
client.annotateVideoAsync(request);
204205

205206
System.out.println("Waiting for operation to complete...");
@@ -244,7 +245,7 @@ public static void analyzeShots(String gcsUri)
244245
.addFeatures(Feature.SHOT_CHANGE_DETECTION)
245246
.build();
246247

247-
OperationFuture<AnnotateVideoResponse> operation =
248+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
248249
client.annotateVideoAsync(request);
249250

250251
System.out.println("Waiting for operation to complete...");
@@ -284,7 +285,7 @@ public static void analyzeSafeSearch(String gcsUri)
284285
.addFeatures(Feature.SAFE_SEARCH_DETECTION)
285286
.build();
286287

287-
OperationFuture<AnnotateVideoResponse> operation =
288+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
288289
client.annotateVideoAsync(request);
289290

290291
System.out.println("Waiting for operation to complete...");

video/cloud-client/src/main/java/com/example/video/QuickstartSample.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
// [START videointelligence_quickstart]
2020
import com.google.api.gax.grpc.OperationFuture;
21+
import com.google.cloud.videointelligence.v1beta1.AnnotateVideoProgress;
2122
import com.google.cloud.videointelligence.v1beta1.AnnotateVideoRequest;
2223
import com.google.cloud.videointelligence.v1beta1.AnnotateVideoResponse;
2324
import com.google.cloud.videointelligence.v1beta1.Feature;
@@ -48,7 +49,7 @@ public static void main(String[] args) throws
4849
.addFeatures(Feature.LABEL_DETECTION)
4950
.build();
5051

51-
OperationFuture<AnnotateVideoResponse> operation =
52+
OperationFuture<AnnotateVideoResponse, AnnotateVideoProgress> operation =
5253
client.annotateVideoAsync(request);
5354

5455
System.out.println("Waiting for operation to complete...");

0 commit comments

Comments
 (0)