Skip to content

Commit f673572

Browse files
authored
Correct video detect region tags. (#1107)
video_analyze_labels_gcs video_analyze_labels_local video_analyze_shots video_analyze_explicit_content
1 parent 6e4f7f2 commit f673572

File tree

1 file changed

+8
-8
lines changed
  • video/cloud-client/src/main/java/com/example/video

1 file changed

+8
-8
lines changed

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static void argsHelper(String[] args) throws Exception {
9191
* @param gcsUri the path to the video file to analyze.
9292
*/
9393
public static void analyzeLabels(String gcsUri) throws Exception {
94-
// [START detect_labels_gcs]
94+
// [START video_analyze_labels_gcs]
9595
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
9696
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
9797
// Provide path to file hosted on GCS as "gs://bucket-name/..."
@@ -164,7 +164,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
164164
}
165165
}
166166
}
167-
// [END detect_labels_gcs]
167+
// [END video_analyze_labels_gcs]
168168
}
169169

170170
/**
@@ -173,7 +173,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
173173
* @param filePath the path to the video file to analyze.
174174
*/
175175
public static void analyzeLabelsFile(String filePath) throws Exception {
176-
// [START detect_labels_file]
176+
// [START video_analyze_labels_local]
177177
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
178178
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
179179
// Read file and encode into Base64
@@ -251,7 +251,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
251251
}
252252
}
253253
}
254-
// [END detect_labels_file]
254+
// [END video_analyze_labels_local]
255255
}
256256

257257
/**
@@ -260,7 +260,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
260260
* @param gcsUri the path to the video file to analyze.
261261
*/
262262
public static void analyzeShots(String gcsUri) throws Exception {
263-
// [START detect_shots]
263+
// [START video_analyze_shots]
264264
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
265265
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
266266
// Provide path to file hosted on GCS as "gs://bucket-name/..."
@@ -290,7 +290,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
290290
}
291291
}
292292
}
293-
// [END detect_shots]
293+
// [END video_analyze_shots]
294294
}
295295

296296
/**
@@ -299,7 +299,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
299299
* @param gcsUri the path to the video file to analyze.
300300
*/
301301
public static void analyzeExplicitContent(String gcsUri) throws Exception {
302-
// [START detect_explicit_content]
302+
// [START video_analyze_explicit_content]
303303
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
304304
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
305305
// Create an operation that will contain the response when the operation completes.
@@ -321,7 +321,7 @@ public static void analyzeExplicitContent(String gcsUri) throws Exception {
321321
System.out.println("Adult: " + frame.getPornographyLikelihood());
322322
}
323323
}
324-
// [END detect_explicit_content]
324+
// [END video_analyze_explicit_content]
325325
}
326326
}
327327
}

0 commit comments

Comments
 (0)