@@ -91,7 +91,7 @@ public static void argsHelper(String[] args) throws Exception {
91
91
* @param gcsUri the path to the video file to analyze.
92
92
*/
93
93
public static void analyzeLabels (String gcsUri ) throws Exception {
94
- // [START detect_labels_gcs ]
94
+ // [START video_analyze_labels_gcs ]
95
95
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
96
96
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient .create ()) {
97
97
// Provide path to file hosted on GCS as "gs://bucket-name/..."
@@ -164,7 +164,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
164
164
}
165
165
}
166
166
}
167
- // [END detect_labels_gcs ]
167
+ // [END video_analyze_labels_gcs ]
168
168
}
169
169
170
170
/**
@@ -173,7 +173,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
173
173
* @param filePath the path to the video file to analyze.
174
174
*/
175
175
public static void analyzeLabelsFile (String filePath ) throws Exception {
176
- // [START detect_labels_file ]
176
+ // [START video_analyze_labels_local ]
177
177
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
178
178
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient .create ()) {
179
179
// Read file and encode into Base64
@@ -251,7 +251,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
251
251
}
252
252
}
253
253
}
254
- // [END detect_labels_file ]
254
+ // [END video_analyze_labels_local ]
255
255
}
256
256
257
257
/**
@@ -260,7 +260,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
260
260
* @param gcsUri the path to the video file to analyze.
261
261
*/
262
262
public static void analyzeShots (String gcsUri ) throws Exception {
263
- // [START detect_shots ]
263
+ // [START video_analyze_shots ]
264
264
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
265
265
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient .create ()) {
266
266
// Provide path to file hosted on GCS as "gs://bucket-name/..."
@@ -290,7 +290,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
290
290
}
291
291
}
292
292
}
293
- // [END detect_shots ]
293
+ // [END video_analyze_shots ]
294
294
}
295
295
296
296
/**
@@ -299,7 +299,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
299
299
* @param gcsUri the path to the video file to analyze.
300
300
*/
301
301
public static void analyzeExplicitContent (String gcsUri ) throws Exception {
302
- // [START detect_explicit_content ]
302
+ // [START video_analyze_explicit_content ]
303
303
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
304
304
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient .create ()) {
305
305
// Create an operation that will contain the response when the operation completes.
@@ -321,7 +321,7 @@ public static void analyzeExplicitContent(String gcsUri) throws Exception {
321
321
System .out .println ("Adult: " + frame .getPornographyLikelihood ());
322
322
}
323
323
}
324
- // [END detect_explicit_content ]
324
+ // [END video_analyze_explicit_content ]
325
325
}
326
326
}
327
327
}
0 commit comments