google-cloud-video_intelligence 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/video_intelligence.rb +4 -0
- data/lib/google/cloud/video_intelligence/v1.rb +8 -0
- data/lib/google/cloud/video_intelligence/v1/doc/google/cloud/videointelligence/v1/video_intelligence.rb +46 -46
- data/lib/google/cloud/video_intelligence/v1/video_intelligence_service_client.rb +19 -10
- data/lib/google/cloud/video_intelligence/v1beta1.rb +8 -0
- data/lib/google/cloud/video_intelligence/v1beta1/doc/google/cloud/videointelligence/v1beta1/video_intelligence.rb +22 -22
- data/lib/google/cloud/video_intelligence/v1beta1/video_intelligence_service_client.rb +19 -10
- data/lib/google/cloud/video_intelligence/v1beta2.rb +8 -0
- data/lib/google/cloud/video_intelligence/v1beta2/doc/google/cloud/videointelligence/v1beta2/video_intelligence.rb +28 -28
- data/lib/google/cloud/video_intelligence/v1beta2/video_intelligence_service_client.rb +19 -10
- data/lib/google/cloud/video_intelligence/v1p1beta1.rb +8 -0
- data/lib/google/cloud/video_intelligence/v1p1beta1/doc/google/cloud/videointelligence/v1p1beta1/video_intelligence.rb +27 -27
- data/lib/google/cloud/video_intelligence/v1p1beta1/video_intelligence_service_client.rb +19 -10
- data/lib/google/cloud/video_intelligence/v1p2beta1.rb +8 -0
- data/lib/google/cloud/video_intelligence/v1p2beta1/doc/google/cloud/videointelligence/v1p2beta1/video_intelligence.rb +34 -34
- data/lib/google/cloud/video_intelligence/v1p2beta1/video_intelligence_service_client.rb +19 -10
- data/lib/google/cloud/video_intelligence/version.rb +1 -1
- data/lib/google/cloud/videointelligence/v1/video_intelligence_pb.rb +42 -41
- data/lib/google/cloud/videointelligence/v1/video_intelligence_services_pb.rb +21 -20
- data/lib/google/cloud/videointelligence/v1beta1/video_intelligence_pb.rb +21 -20
- data/lib/google/cloud/videointelligence/v1beta1/video_intelligence_services_pb.rb +21 -20
- data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_pb.rb +28 -27
- data/lib/google/cloud/videointelligence/v1beta2/video_intelligence_services_pb.rb +21 -20
- data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_pb.rb +28 -27
- data/lib/google/cloud/videointelligence/v1p1beta1/video_intelligence_services_pb.rb +21 -20
- data/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_pb.rb +32 -31
- data/lib/google/cloud/videointelligence/v1p2beta1/video_intelligence_services_pb.rb +21 -20
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4cb3c23817a9a62c559c18b840ab983915111a1b11181758971f7d80d11a1a2c
|
4
|
+
data.tar.gz: 200e3fe8fd8d3f47251142e5123e3abef66692aefa2544bd0ff97fc06e073b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75412856add8ae5ad79e5a91a30ce502b329884512cc82dd7bc48544032141fd2afdba2be318359fceb84cb3ac42dfccac56eb1c8572708b58e2f3fc07641e90
|
7
|
+
data.tar.gz: ccba496e79777230591b77685bede2c1ae57c37d5cf78eb82364da8125b022ce4397d8c8c7c09eadda9b6e9916677768c7b2488821f952d62b52a8169a3825ef
|
@@ -157,6 +157,10 @@ module Google
|
|
157
157
|
# The default timeout, in seconds, for calls made through this client.
|
158
158
|
# @param metadata [Hash]
|
159
159
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
160
|
+
# @param service_address [String]
|
161
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
162
|
+
# @param service_port [Integer]
|
163
|
+
# Override for the service port, or `nil` to leave as the default.
|
160
164
|
# @param exception_transformer [Proc]
|
161
165
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
162
166
|
# custom error handling.
|
@@ -147,6 +147,10 @@ module Google
|
|
147
147
|
# The default timeout, in seconds, for calls made through this client.
|
148
148
|
# @param metadata [Hash]
|
149
149
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
150
|
+
# @param service_address [String]
|
151
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
152
|
+
# @param service_port [Integer]
|
153
|
+
# Override for the service port, or `nil` to leave as the default.
|
150
154
|
# @param exception_transformer [Proc]
|
151
155
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
152
156
|
# custom error handling.
|
@@ -156,6 +160,8 @@ module Google
|
|
156
160
|
client_config: nil,
|
157
161
|
timeout: nil,
|
158
162
|
metadata: nil,
|
163
|
+
service_address: nil,
|
164
|
+
service_port: nil,
|
159
165
|
exception_transformer: nil,
|
160
166
|
lib_name: nil,
|
161
167
|
lib_version: nil
|
@@ -167,6 +173,8 @@ module Google
|
|
167
173
|
metadata: metadata,
|
168
174
|
exception_transformer: exception_transformer,
|
169
175
|
lib_name: lib_name,
|
176
|
+
service_address: service_address,
|
177
|
+
service_port: service_port,
|
170
178
|
lib_version: lib_version
|
171
179
|
}.select { |_, v| v != nil }
|
172
180
|
Google::Cloud::VideoIntelligence::V1::VideoIntelligenceServiceClient.new(**kwargs)
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Cloud
|
18
|
-
module
|
18
|
+
module VideoIntelligence
|
19
19
|
module V1
|
20
20
|
# Video annotation request.
|
21
21
|
# @!attribute [rw] input_uri
|
@@ -36,10 +36,10 @@ module Google
|
|
36
36
|
# If unset, the input video(s) should be specified via `input_uri`.
|
37
37
|
# If set, `input_uri` should be unset.
|
38
38
|
# @!attribute [rw] features
|
39
|
-
# @return [Array<Google::Cloud::
|
39
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::Feature>]
|
40
40
|
# Requested video annotation features.
|
41
41
|
# @!attribute [rw] video_context
|
42
|
-
# @return [Google::Cloud::
|
42
|
+
# @return [Google::Cloud::VideoIntelligence::V1::VideoContext]
|
43
43
|
# Additional video context and/or feature-specific parameters.
|
44
44
|
# @!attribute [rw] output_uri
|
45
45
|
# @return [String]
|
@@ -58,36 +58,36 @@ module Google
|
|
58
58
|
|
59
59
|
# Video context and/or feature-specific parameters.
|
60
60
|
# @!attribute [rw] segments
|
61
|
-
# @return [Array<Google::Cloud::
|
61
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::VideoSegment>]
|
62
62
|
# Video segments to annotate. The segments may overlap and are not required
|
63
63
|
# to be contiguous or span the whole video. If unspecified, each video is
|
64
64
|
# treated as a single segment.
|
65
65
|
# @!attribute [rw] label_detection_config
|
66
|
-
# @return [Google::Cloud::
|
66
|
+
# @return [Google::Cloud::VideoIntelligence::V1::LabelDetectionConfig]
|
67
67
|
# Config for LABEL_DETECTION.
|
68
68
|
# @!attribute [rw] shot_change_detection_config
|
69
|
-
# @return [Google::Cloud::
|
69
|
+
# @return [Google::Cloud::VideoIntelligence::V1::ShotChangeDetectionConfig]
|
70
70
|
# Config for SHOT_CHANGE_DETECTION.
|
71
71
|
# @!attribute [rw] explicit_content_detection_config
|
72
|
-
# @return [Google::Cloud::
|
72
|
+
# @return [Google::Cloud::VideoIntelligence::V1::ExplicitContentDetectionConfig]
|
73
73
|
# Config for EXPLICIT_CONTENT_DETECTION.
|
74
74
|
# @!attribute [rw] face_detection_config
|
75
|
-
# @return [Google::Cloud::
|
75
|
+
# @return [Google::Cloud::VideoIntelligence::V1::FaceDetectionConfig]
|
76
76
|
# Config for FACE_DETECTION.
|
77
77
|
# @!attribute [rw] speech_transcription_config
|
78
|
-
# @return [Google::Cloud::
|
78
|
+
# @return [Google::Cloud::VideoIntelligence::V1::SpeechTranscriptionConfig]
|
79
79
|
# Config for SPEECH_TRANSCRIPTION.
|
80
80
|
# @!attribute [rw] text_detection_config
|
81
|
-
# @return [Google::Cloud::
|
81
|
+
# @return [Google::Cloud::VideoIntelligence::V1::TextDetectionConfig]
|
82
82
|
# Config for TEXT_DETECTION.
|
83
83
|
# @!attribute [rw] object_tracking_config
|
84
|
-
# @return [Google::Cloud::
|
84
|
+
# @return [Google::Cloud::VideoIntelligence::V1::ObjectTrackingConfig]
|
85
85
|
# Config for OBJECT_TRACKING.
|
86
86
|
class VideoContext; end
|
87
87
|
|
88
88
|
# Config for LABEL_DETECTION.
|
89
89
|
# @!attribute [rw] label_detection_mode
|
90
|
-
# @return [Google::Cloud::
|
90
|
+
# @return [Google::Cloud::VideoIntelligence::V1::LabelDetectionMode]
|
91
91
|
# What labels should be detected with LABEL_DETECTION, in addition to
|
92
92
|
# video-level labels or segment-level labels.
|
93
93
|
# If unspecified, defaults to `SHOT_MODE`.
|
@@ -182,7 +182,7 @@ module Google
|
|
182
182
|
|
183
183
|
# Video segment level annotation results for label detection.
|
184
184
|
# @!attribute [rw] segment
|
185
|
-
# @return [Google::Cloud::
|
185
|
+
# @return [Google::Cloud::VideoIntelligence::V1::VideoSegment]
|
186
186
|
# Video segment where a label was detected.
|
187
187
|
# @!attribute [rw] confidence
|
188
188
|
# @return [Float]
|
@@ -215,19 +215,19 @@ module Google
|
|
215
215
|
|
216
216
|
# Label annotation.
|
217
217
|
# @!attribute [rw] entity
|
218
|
-
# @return [Google::Cloud::
|
218
|
+
# @return [Google::Cloud::VideoIntelligence::V1::Entity]
|
219
219
|
# Detected entity.
|
220
220
|
# @!attribute [rw] category_entities
|
221
|
-
# @return [Array<Google::Cloud::
|
221
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::Entity>]
|
222
222
|
# Common categories for the detected entity.
|
223
223
|
# E.g. when the label is `Terrier` the category is likely `dog`. And in some
|
224
224
|
# cases there might be more than one categories e.g. `Terrier` could also be
|
225
225
|
# a `pet`.
|
226
226
|
# @!attribute [rw] segments
|
227
|
-
# @return [Array<Google::Cloud::
|
227
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::LabelSegment>]
|
228
228
|
# All video segments where a label was detected.
|
229
229
|
# @!attribute [rw] frames
|
230
|
-
# @return [Array<Google::Cloud::
|
230
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::LabelFrame>]
|
231
231
|
# All video frames where a label was detected.
|
232
232
|
class LabelAnnotation; end
|
233
233
|
|
@@ -237,7 +237,7 @@ module Google
|
|
237
237
|
# Time-offset, relative to the beginning of the video, corresponding to the
|
238
238
|
# video frame for this location.
|
239
239
|
# @!attribute [rw] pornography_likelihood
|
240
|
-
# @return [Google::Cloud::
|
240
|
+
# @return [Google::Cloud::VideoIntelligence::V1::Likelihood]
|
241
241
|
# Likelihood of the pornography content..
|
242
242
|
class ExplicitContentFrame; end
|
243
243
|
|
@@ -245,7 +245,7 @@ module Google
|
|
245
245
|
# If no explicit content has been detected in a frame, no annotations are
|
246
246
|
# present for that frame.
|
247
247
|
# @!attribute [rw] frames
|
248
|
-
# @return [Array<Google::Cloud::
|
248
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::ExplicitContentFrame>]
|
249
249
|
# All video frames where explicit content was detected.
|
250
250
|
class ExplicitContentAnnotation; end
|
251
251
|
|
@@ -268,13 +268,13 @@ module Google
|
|
268
268
|
|
269
269
|
# Video segment level annotation results for face detection.
|
270
270
|
# @!attribute [rw] segment
|
271
|
-
# @return [Google::Cloud::
|
271
|
+
# @return [Google::Cloud::VideoIntelligence::V1::VideoSegment]
|
272
272
|
# Video segment where a face was detected.
|
273
273
|
class FaceSegment; end
|
274
274
|
|
275
275
|
# Video frame level annotation results for face detection.
|
276
276
|
# @!attribute [rw] normalized_bounding_boxes
|
277
|
-
# @return [Array<Google::Cloud::
|
277
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox>]
|
278
278
|
# Normalized Bounding boxes in a frame.
|
279
279
|
# There can be more than one boxes if the same face is detected in multiple
|
280
280
|
# locations within the current frame.
|
@@ -289,10 +289,10 @@ module Google
|
|
289
289
|
# @return [String]
|
290
290
|
# Thumbnail of a representative face view (in JPEG format).
|
291
291
|
# @!attribute [rw] segments
|
292
|
-
# @return [Array<Google::Cloud::
|
292
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::FaceSegment>]
|
293
293
|
# All video segments where a face was detected.
|
294
294
|
# @!attribute [rw] frames
|
295
|
-
# @return [Array<Google::Cloud::
|
295
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::FaceFrame>]
|
296
296
|
# All video frames where a face was detected.
|
297
297
|
class FaceAnnotation; end
|
298
298
|
|
@@ -302,36 +302,36 @@ module Google
|
|
302
302
|
# Video file location in
|
303
303
|
# [Google Cloud Storage](https://cloud.google.com/storage/).
|
304
304
|
# @!attribute [rw] segment_label_annotations
|
305
|
-
# @return [Array<Google::Cloud::
|
305
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::LabelAnnotation>]
|
306
306
|
# Label annotations on video level or user specified segment level.
|
307
307
|
# There is exactly one element for each unique label.
|
308
308
|
# @!attribute [rw] shot_label_annotations
|
309
|
-
# @return [Array<Google::Cloud::
|
309
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::LabelAnnotation>]
|
310
310
|
# Label annotations on shot level.
|
311
311
|
# There is exactly one element for each unique label.
|
312
312
|
# @!attribute [rw] frame_label_annotations
|
313
|
-
# @return [Array<Google::Cloud::
|
313
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::LabelAnnotation>]
|
314
314
|
# Label annotations on frame level.
|
315
315
|
# There is exactly one element for each unique label.
|
316
316
|
# @!attribute [rw] face_annotations
|
317
|
-
# @return [Array<Google::Cloud::
|
317
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::FaceAnnotation>]
|
318
318
|
# Face annotations. There is exactly one element for each unique face.
|
319
319
|
# @!attribute [rw] shot_annotations
|
320
|
-
# @return [Array<Google::Cloud::
|
320
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::VideoSegment>]
|
321
321
|
# Shot annotations. Each shot is represented as a video segment.
|
322
322
|
# @!attribute [rw] explicit_annotation
|
323
|
-
# @return [Google::Cloud::
|
323
|
+
# @return [Google::Cloud::VideoIntelligence::V1::ExplicitContentAnnotation]
|
324
324
|
# Explicit content annotation.
|
325
325
|
# @!attribute [rw] speech_transcriptions
|
326
|
-
# @return [Array<Google::Cloud::
|
326
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::SpeechTranscription>]
|
327
327
|
# Speech transcription.
|
328
328
|
# @!attribute [rw] text_annotations
|
329
|
-
# @return [Array<Google::Cloud::
|
329
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::TextAnnotation>]
|
330
330
|
# OCR text detection and tracking.
|
331
331
|
# Annotations for list of detected text snippets. Each will have list of
|
332
332
|
# frame information associated with it.
|
333
333
|
# @!attribute [rw] object_annotations
|
334
|
-
# @return [Array<Google::Cloud::
|
334
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::ObjectTrackingAnnotation>]
|
335
335
|
# Annotations for list of objects detected and tracked in video.
|
336
336
|
# @!attribute [rw] error
|
337
337
|
# @return [Google::Rpc::Status]
|
@@ -343,7 +343,7 @@ module Google
|
|
343
343
|
# field of the `Operation` returned by the `GetOperation`
|
344
344
|
# call of the `google::longrunning::Operations` service.
|
345
345
|
# @!attribute [rw] annotation_results
|
346
|
-
# @return [Array<Google::Cloud::
|
346
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::VideoAnnotationResults>]
|
347
347
|
# Annotation results for all videos specified in `AnnotateVideoRequest`.
|
348
348
|
class AnnotateVideoResponse; end
|
349
349
|
|
@@ -368,7 +368,7 @@ module Google
|
|
368
368
|
# field of the `Operation` returned by the `GetOperation`
|
369
369
|
# call of the `google::longrunning::Operations` service.
|
370
370
|
# @!attribute [rw] annotation_progress
|
371
|
-
# @return [Array<Google::Cloud::
|
371
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::VideoAnnotationProgress>]
|
372
372
|
# Progress metadata for all videos specified in `AnnotateVideoRequest`.
|
373
373
|
class AnnotateVideoProgress; end
|
374
374
|
|
@@ -394,7 +394,7 @@ module Google
|
|
394
394
|
# with asterisks, e.g. "f***". If set to `false` or omitted, profanities
|
395
395
|
# won't be filtered out.
|
396
396
|
# @!attribute [rw] speech_contexts
|
397
|
-
# @return [Array<Google::Cloud::
|
397
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::SpeechContext>]
|
398
398
|
# *Optional* A means to provide context to assist the speech recognition.
|
399
399
|
# @!attribute [rw] enable_automatic_punctuation
|
400
400
|
# @return [true, false]
|
@@ -444,7 +444,7 @@ module Google
|
|
444
444
|
|
445
445
|
# A speech recognition result corresponding to a portion of the audio.
|
446
446
|
# @!attribute [rw] alternatives
|
447
|
-
# @return [Array<Google::Cloud::
|
447
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::SpeechRecognitionAlternative>]
|
448
448
|
# May contain one or more recognition hypotheses (up to the maximum specified
|
449
449
|
# in `max_alternatives`). These alternatives are ordered in terms of
|
450
450
|
# accuracy, with the top (first) alternative being the most probable, as
|
@@ -470,7 +470,7 @@ module Google
|
|
470
470
|
# `confidence` field as it is not guaranteed to be accurate or consistent.
|
471
471
|
# The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
472
472
|
# @!attribute [rw] words
|
473
|
-
# @return [Array<Google::Cloud::
|
473
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::WordInfo>]
|
474
474
|
# A list of word-specific information for each recognized word.
|
475
475
|
class SpeechRecognitionAlternative; end
|
476
476
|
|
@@ -537,20 +537,20 @@ module Google
|
|
537
537
|
# than 0, or greater than 1 due to trignometric calculations for location of
|
538
538
|
# the box.
|
539
539
|
# @!attribute [rw] vertices
|
540
|
-
# @return [Array<Google::Cloud::
|
540
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::NormalizedVertex>]
|
541
541
|
# Normalized vertices of the bounding polygon.
|
542
542
|
class NormalizedBoundingPoly; end
|
543
543
|
|
544
544
|
# Video segment level annotation results for text detection.
|
545
545
|
# @!attribute [rw] segment
|
546
|
-
# @return [Google::Cloud::
|
546
|
+
# @return [Google::Cloud::VideoIntelligence::V1::VideoSegment]
|
547
547
|
# Video segment where a text snippet was detected.
|
548
548
|
# @!attribute [rw] confidence
|
549
549
|
# @return [Float]
|
550
550
|
# Confidence for the track of detected text. It is calculated as the highest
|
551
551
|
# over all frames where OCR detected text appears.
|
552
552
|
# @!attribute [rw] frames
|
553
|
-
# @return [Array<Google::Cloud::
|
553
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::TextFrame>]
|
554
554
|
# Information related to the frames where OCR detected text appears.
|
555
555
|
class TextSegment; end
|
556
556
|
|
@@ -558,7 +558,7 @@ module Google
|
|
558
558
|
# Contains information regarding timestamp and bounding box locations for the
|
559
559
|
# frames containing detected OCR text snippets.
|
560
560
|
# @!attribute [rw] rotated_bounding_box
|
561
|
-
# @return [Google::Cloud::
|
561
|
+
# @return [Google::Cloud::VideoIntelligence::V1::NormalizedBoundingPoly]
|
562
562
|
# Bounding polygon of the detected text for this frame.
|
563
563
|
# @!attribute [rw] time_offset
|
564
564
|
# @return [Google::Protobuf::Duration]
|
@@ -572,14 +572,14 @@ module Google
|
|
572
572
|
# @return [String]
|
573
573
|
# The detected text.
|
574
574
|
# @!attribute [rw] segments
|
575
|
-
# @return [Array<Google::Cloud::
|
575
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::TextSegment>]
|
576
576
|
# All video segments where OCR detected text appears.
|
577
577
|
class TextAnnotation; end
|
578
578
|
|
579
579
|
# Video frame level annotations for object detection and tracking. This field
|
580
580
|
# stores per frame location, time offset, and confidence.
|
581
581
|
# @!attribute [rw] normalized_bounding_box
|
582
|
-
# @return [Google::Cloud::
|
582
|
+
# @return [Google::Cloud::VideoIntelligence::V1::NormalizedBoundingBox]
|
583
583
|
# The normalized bounding box location of this object track for the frame.
|
584
584
|
# @!attribute [rw] time_offset
|
585
585
|
# @return [Google::Protobuf::Duration]
|
@@ -588,7 +588,7 @@ module Google
|
|
588
588
|
|
589
589
|
# Annotations corresponding to one tracked object.
|
590
590
|
# @!attribute [rw] segment
|
591
|
-
# @return [Google::Cloud::
|
591
|
+
# @return [Google::Cloud::VideoIntelligence::V1::VideoSegment]
|
592
592
|
# Non-streaming batch mode ONLY.
|
593
593
|
# Each object track corresponds to one video segment where it appears.
|
594
594
|
# @!attribute [rw] track_id
|
@@ -600,13 +600,13 @@ module Google
|
|
600
600
|
# the customers can correlate the results of the ongoing
|
601
601
|
# ObjectTrackAnnotation of the same track_id over time.
|
602
602
|
# @!attribute [rw] entity
|
603
|
-
# @return [Google::Cloud::
|
603
|
+
# @return [Google::Cloud::VideoIntelligence::V1::Entity]
|
604
604
|
# Entity to specify the object category that this track is labeled as.
|
605
605
|
# @!attribute [rw] confidence
|
606
606
|
# @return [Float]
|
607
607
|
# Object category's labeling confidence of this track.
|
608
608
|
# @!attribute [rw] frames
|
609
|
-
# @return [Array<Google::Cloud::
|
609
|
+
# @return [Array<Google::Cloud::VideoIntelligence::V1::ObjectTrackingFrame>]
|
610
610
|
# Information corresponding to all frames where this object track appears.
|
611
611
|
# Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame
|
612
612
|
# messages in frames.
|
@@ -38,7 +38,7 @@ module Google
|
|
38
38
|
# Service that implements Google Cloud Video Intelligence API.
|
39
39
|
#
|
40
40
|
# @!attribute [r] video_intelligence_service_stub
|
41
|
-
# @return [Google::Cloud::
|
41
|
+
# @return [Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Stub]
|
42
42
|
class VideoIntelligenceServiceClient
|
43
43
|
# @private
|
44
44
|
attr_reader :video_intelligence_service_stub
|
@@ -92,6 +92,10 @@ module Google
|
|
92
92
|
# The default timeout, in seconds, for calls made through this client.
|
93
93
|
# @param metadata [Hash]
|
94
94
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
95
|
+
# @param service_address [String]
|
96
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
97
|
+
# @param service_port [Integer]
|
98
|
+
# Override for the service port, or `nil` to leave as the default.
|
95
99
|
# @param exception_transformer [Proc]
|
96
100
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
97
101
|
# custom error handling.
|
@@ -101,6 +105,8 @@ module Google
|
|
101
105
|
client_config: {},
|
102
106
|
timeout: DEFAULT_TIMEOUT,
|
103
107
|
metadata: nil,
|
108
|
+
service_address: nil,
|
109
|
+
service_port: nil,
|
104
110
|
exception_transformer: nil,
|
105
111
|
lib_name: nil,
|
106
112
|
lib_version: ""
|
@@ -118,7 +124,10 @@ module Google
|
|
118
124
|
client_config: client_config,
|
119
125
|
timeout: timeout,
|
120
126
|
lib_name: lib_name,
|
127
|
+
service_address: service_address,
|
128
|
+
service_port: service_port,
|
121
129
|
lib_version: lib_version,
|
130
|
+
metadata: metadata,
|
122
131
|
)
|
123
132
|
|
124
133
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
@@ -163,8 +172,8 @@ module Google
|
|
163
172
|
end
|
164
173
|
|
165
174
|
# Allow overriding the service path/port in subclasses.
|
166
|
-
service_path = self.class::SERVICE_ADDRESS
|
167
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
175
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
176
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
168
177
|
interceptors = self.class::GRPC_INTERCEPTORS
|
169
178
|
@video_intelligence_service_stub = Google::Gax::Grpc.create_stub(
|
170
179
|
service_path,
|
@@ -174,7 +183,7 @@ module Google
|
|
174
183
|
updater_proc: updater_proc,
|
175
184
|
scopes: scopes,
|
176
185
|
interceptors: interceptors,
|
177
|
-
&Google::Cloud::
|
186
|
+
&Google::Cloud::VideoIntelligence::V1::VideoIntelligenceService::Stub.method(:new)
|
178
187
|
)
|
179
188
|
|
180
189
|
@annotate_video = Google::Gax.create_api_call(
|
@@ -206,11 +215,11 @@ module Google
|
|
206
215
|
# The video data bytes.
|
207
216
|
# If unset, the input video(s) should be specified via `input_uri`.
|
208
217
|
# If set, `input_uri` should be unset.
|
209
|
-
# @param features [Array<Google::Cloud::
|
218
|
+
# @param features [Array<Google::Cloud::VideoIntelligence::V1::Feature>]
|
210
219
|
# Requested video annotation features.
|
211
|
-
# @param video_context [Google::Cloud::
|
220
|
+
# @param video_context [Google::Cloud::VideoIntelligence::V1::VideoContext | Hash]
|
212
221
|
# Additional video context and/or feature-specific parameters.
|
213
|
-
# A hash of the same form as `Google::Cloud::
|
222
|
+
# A hash of the same form as `Google::Cloud::VideoIntelligence::V1::VideoContext`
|
214
223
|
# can also be provided.
|
215
224
|
# @param output_uri [String]
|
216
225
|
# Optional location where the output (in JSON format) should be stored.
|
@@ -279,12 +288,12 @@ module Google
|
|
279
288
|
output_uri: output_uri,
|
280
289
|
location_id: location_id
|
281
290
|
}.delete_if { |_, v| v.nil? }
|
282
|
-
req = Google::Gax::to_proto(req, Google::Cloud::
|
291
|
+
req = Google::Gax::to_proto(req, Google::Cloud::VideoIntelligence::V1::AnnotateVideoRequest)
|
283
292
|
operation = Google::Gax::Operation.new(
|
284
293
|
@annotate_video.call(req, options),
|
285
294
|
@operations_client,
|
286
|
-
Google::Cloud::
|
287
|
-
Google::Cloud::
|
295
|
+
Google::Cloud::VideoIntelligence::V1::AnnotateVideoResponse,
|
296
|
+
Google::Cloud::VideoIntelligence::V1::AnnotateVideoProgress,
|
288
297
|
call_options: options
|
289
298
|
)
|
290
299
|
operation.on_done { |operation| yield(operation) } if block_given?
|
@@ -109,6 +109,10 @@ module Google
|
|
109
109
|
# The default timeout, in seconds, for calls made through this client.
|
110
110
|
# @param metadata [Hash]
|
111
111
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
112
|
+
# @param service_address [String]
|
113
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
114
|
+
# @param service_port [Integer]
|
115
|
+
# Override for the service port, or `nil` to leave as the default.
|
112
116
|
# @param exception_transformer [Proc]
|
113
117
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
114
118
|
# custom error handling.
|
@@ -118,6 +122,8 @@ module Google
|
|
118
122
|
client_config: nil,
|
119
123
|
timeout: nil,
|
120
124
|
metadata: nil,
|
125
|
+
service_address: nil,
|
126
|
+
service_port: nil,
|
121
127
|
exception_transformer: nil,
|
122
128
|
lib_name: nil,
|
123
129
|
lib_version: nil
|
@@ -129,6 +135,8 @@ module Google
|
|
129
135
|
metadata: metadata,
|
130
136
|
exception_transformer: exception_transformer,
|
131
137
|
lib_name: lib_name,
|
138
|
+
service_address: service_address,
|
139
|
+
service_port: service_port,
|
132
140
|
lib_version: lib_version
|
133
141
|
}.select { |_, v| v != nil }
|
134
142
|
Google::Cloud::VideoIntelligence::V1beta1::VideoIntelligenceServiceClient.new(**kwargs)
|