Skip to content

Commit bd564e8

Browse files
authored
Merge pull request #750 from GoogleCloudPlatform/video-version-bump
Adds instructions for Windows and upgrades client library versions.
2 parents 0756f07 + 14400b8 commit bd564e8

File tree

4 files changed

+23
-29
lines changed

4 files changed

+23
-29
lines changed

video/cloud-client/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,12 @@ Detect Shots
5959
java -cp target/video-google-cloud-samples-1.0.0-jar-with-dependencies.jar \
6060
com.example.video.Detect shots gs://cloudmleap/video/next/gbikes_dinosaur.mp4
6161
```
62+
63+
From Windows, you may need to supply your classpath diferently, for example:
64+
```
65+
java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.example.video.Detect labels gs://demomaker/cat.mp4
66+
```
67+
or
68+
```
69+
java -cp target\\video-google-cloud-samples-1.0.0-jar-with-dependencies.jar com.example.video.Detect labels-file resources\\cat.mp4
70+
```

video/cloud-client/pom.xml

+6-23
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,22 @@
4343
<dependency>
4444
<groupId>com.google.cloud</groupId>
4545
<artifactId>google-cloud</artifactId>
46-
<version>0.18.0-alpha</version>
47-
<exclusions>
48-
<exclusion> <!-- exclude an old version of Guava -->
49-
<groupId>com.google.guava</groupId>
50-
<artifactId>guava-jdk5</artifactId>
51-
</exclusion>
52-
</exclusions>
46+
<version>0.20.1-alpha</version>
5347
</dependency>
5448
<dependency>
5549
<groupId>com.google.cloud</groupId>
5650
<artifactId>google-cloud-video-intelligence</artifactId>
57-
<version>0.20.0-alpha</version>
58-
<exclusions>
59-
<exclusion> <!-- exclude an old version of Guava -->
60-
<groupId>com.google.guava</groupId>
61-
<artifactId>guava-jdk5</artifactId>
62-
</exclusion>
63-
</exclusions>
51+
<version>0.20.1-alpha</version>
6452
</dependency>
6553
<dependency>
6654
<groupId>com.google.auth</groupId>
67-
<artifactId>google-auth-library-oauth2-http</artifactId>
68-
<version>0.6.1</version>
69-
</dependency>
70-
<dependency>
71-
<groupId>com.google.auth</groupId>
72-
<artifactId>google-auth-library-credentials</artifactId>
55+
<artifactId>google-auth-library-credentials</artifactId>
7356
<version>0.6.1</version>
7457
</dependency>
7558
<dependency>
76-
<groupId>io.netty</groupId>
77-
<artifactId>netty-tcnative-boringssl-static</artifactId>
78-
<version>1.1.33.Fork26</version>
59+
<groupId>com.google.oauth-client</groupId>
60+
<artifactId>google-oauth-client-jetty</artifactId>
61+
<version>1.22.0</version>
7962
</dependency>
8063
<!-- [END dependencies] -->
8164

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)