Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Video Detect region tags for Samples Tracker. #1107

Merged
merged 3 commits into from
May 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]
}
}
}