Skip to content

Commit

Permalink
Correct video detect region tags. (#1107)
Browse files Browse the repository at this point in the history
video_analyze_labels_gcs
video_analyze_labels_local
video_analyze_shots
video_analyze_explicit_content
  • Loading branch information
kurtisvg authored May 21, 2018
1 parent 6e4f7f2 commit f673572
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions video/cloud-client/src/main/java/com/example/video/Detect.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void argsHelper(String[] args) throws Exception {
* @param gcsUri the path to the video file to analyze.
*/
public static void analyzeLabels(String gcsUri) throws Exception {
// [START detect_labels_gcs]
// [START video_analyze_labels_gcs]
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
// Provide path to file hosted on GCS as "gs://bucket-name/..."
Expand Down Expand Up @@ -164,7 +164,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
}
}
}
// [END detect_labels_gcs]
// [END video_analyze_labels_gcs]
}

/**
Expand All @@ -173,7 +173,7 @@ public static void analyzeLabels(String gcsUri) throws Exception {
* @param filePath the path to the video file to analyze.
*/
public static void analyzeLabelsFile(String filePath) throws Exception {
// [START detect_labels_file]
// [START video_analyze_labels_local]
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
// Read file and encode into Base64
Expand Down Expand Up @@ -251,7 +251,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
}
}
}
// [END detect_labels_file]
// [END video_analyze_labels_local]
}

/**
Expand All @@ -260,7 +260,7 @@ public static void analyzeLabelsFile(String filePath) throws Exception {
* @param gcsUri the path to the video file to analyze.
*/
public static void analyzeShots(String gcsUri) throws Exception {
// [START detect_shots]
// [START video_analyze_shots]
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
// Provide path to file hosted on GCS as "gs://bucket-name/..."
Expand Down Expand Up @@ -290,7 +290,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
}
}
}
// [END detect_shots]
// [END video_analyze_shots]
}

/**
Expand All @@ -299,7 +299,7 @@ public static void analyzeShots(String gcsUri) throws Exception {
* @param gcsUri the path to the video file to analyze.
*/
public static void analyzeExplicitContent(String gcsUri) throws Exception {
// [START detect_explicit_content]
// [START video_analyze_explicit_content]
// Instantiate a com.google.cloud.videointelligence.v1.VideoIntelligenceServiceClient
try (VideoIntelligenceServiceClient client = VideoIntelligenceServiceClient.create()) {
// Create an operation that will contain the response when the operation completes.
Expand All @@ -321,7 +321,7 @@ public static void analyzeExplicitContent(String gcsUri) throws Exception {
System.out.println("Adult: " + frame.getPornographyLikelihood());
}
}
// [END detect_explicit_content]
// [END video_analyze_explicit_content]
}
}
}

0 comments on commit f673572

Please sign in to comment.