Skip to content

Commit a917ece

Browse files
Google APIscopybara-github
authored andcommitted
feat!: LRO changes for CdnKey and Slate methods, VodSession changes for ad tracking, and LiveSession changes for live config
PiperOrigin-RevId: 519189362
1 parent 9595f23 commit a917ece

12 files changed

Lines changed: 510 additions & 99 deletions

google/cloud/video/stitcher/v1/BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ proto_library(
2525
"cdn_keys.proto",
2626
"companions.proto",
2727
"events.proto",
28+
"live_configs.proto",
2829
"sessions.proto",
2930
"slates.proto",
3031
"stitch_details.proto",
@@ -35,10 +36,12 @@ proto_library(
3536
"//google/api:client_proto",
3637
"//google/api:field_behavior_proto",
3738
"//google/api:resource_proto",
39+
"//google/longrunning:operations_proto",
3840
"@com_google_protobuf//:duration_proto",
3941
"@com_google_protobuf//:empty_proto",
4042
"@com_google_protobuf//:field_mask_proto",
4143
"@com_google_protobuf//:struct_proto",
44+
"@com_google_protobuf//:timestamp_proto",
4245
],
4346
)
4447

@@ -129,6 +132,7 @@ go_proto_library(
129132
protos = [":stitcher_proto"],
130133
deps = [
131134
"//google/api:annotations_go_proto",
135+
"//google/longrunning:longrunning_go_proto",
132136
],
133137
)
134138

@@ -144,7 +148,11 @@ go_gapic_library(
144148
transport = "grpc",
145149
deps = [
146150
":stitcher_go_proto",
151+
"//google/longrunning:longrunning_go_proto",
152+
"@com_google_cloud_go_longrunning//:go_default_library",
153+
"@com_google_cloud_go_longrunning//autogen:go_default_library",
147154
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
155+
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
148156
],
149157
)
150158

@@ -183,6 +191,8 @@ py_gapic_library(
183191
rest_numeric_enums = True,
184192
service_yaml = "videostitcher_v1.yaml",
185193
transport = "grpc",
194+
deps = [
195+
],
186196
)
187197

188198
py_test(

google/cloud/video/stitcher/v1/ad_tag_details.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/video/stitcher/v1/cdn_keys.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/video/stitcher/v1/companions.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/video/stitcher/v1/events.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2022 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.video.stitcher.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/protobuf/duration.proto";
22+
23+
option go_package = "cloud.google.com/go/video/stitcher/apiv1/stitcherpb;stitcherpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "LiveConfigsProto";
26+
option java_package = "com.google.cloud.video.stitcher.v1";
27+
28+
// Determines the Ad tracking policy.
29+
enum AdTracking {
30+
// The ad tracking policy is not specified.
31+
AD_TRACKING_UNSPECIFIED = 0;
32+
33+
// Client side ad tracking is specified. The client player is expected to
34+
// trigger playback and activity events itself.
35+
CLIENT = 1;
36+
37+
// The Video Stitcher API will trigger playback events on behalf of
38+
// the client player.
39+
SERVER = 2;
40+
}
41+
42+
// Metadata for used to register live configs.
43+
message LiveConfig {
44+
option (google.api.resource) = {
45+
type: "videostitcher.googleapis.com/LiveConfig"
46+
pattern: "projects/{project}/locations/{location}/liveConfigs/{live_config}"
47+
};
48+
49+
// State of the live config.
50+
enum State {
51+
// State is not specified.
52+
STATE_UNSPECIFIED = 0;
53+
54+
// Live config is being created.
55+
CREATING = 1;
56+
57+
// Live config is ready for use.
58+
READY = 2;
59+
60+
// Live config is queued up for deletion.
61+
DELETING = 3;
62+
}
63+
64+
// Defines the ad stitching behavior in case the ad duration does not align
65+
// exactly with the ad break boundaries. If not specified, the default is
66+
// CUT_CURRENT.
67+
enum StitchingPolicy {
68+
// Stitching policy is not specified.
69+
STITCHING_POLICY_UNSPECIFIED = 0;
70+
71+
// Cuts an ad short and returns to content in the middle of the ad.
72+
CUT_CURRENT = 1;
73+
74+
// Finishes stitching the current ad before returning to content.
75+
COMPLETE_AD = 2;
76+
}
77+
78+
// Output only. The resource name of the live config, in the form of
79+
// `projects/{project}/locations/{location}/liveConfigs/{id}`.
80+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
81+
82+
// Required. Source URI for the live stream manifest.
83+
string source_uri = 2 [(google.api.field_behavior) = REQUIRED];
84+
85+
// The default ad tag associated with this live stream config.
86+
string ad_tag_uri = 3;
87+
88+
// Additional metadata used to register a live stream with Google Ad Manager
89+
// (GAM)
90+
GamLiveConfig gam_live_config = 4;
91+
92+
// Output only. State of the live config.
93+
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
94+
95+
// Required. Determines how the ads should be tracked. If
96+
// [gam_live_config][google.cloud.video.stitcher.v1.LiveConfig.gam_live_config]
97+
// is set, the value must be `CLIENT` because the IMA SDK handles ad tracking.
98+
AdTracking ad_tracking = 6 [(google.api.field_behavior) = REQUIRED];
99+
100+
// This must refer to a slate in the same
101+
// project. In case Google Ad Manager (GAM) is being used for ads this will be
102+
// used to set the appropriate value of slateCreativeId in
103+
// https://developers.google.com/ad-manager/api/reference/v202211/LiveStreamEventService.LiveStreamEvent#slateCreativeId
104+
string default_slate = 7 [(google.api.resource_reference) = {
105+
type: "videostitcher.googleapis.com/Slate"
106+
}];
107+
108+
// Defines the stitcher behavior in case an ad does not align exactly with
109+
// the ad break boundaries. If not specified, the default is `CUT_CURRENT`.
110+
StitchingPolicy stitching_policy = 8;
111+
112+
// The configuration for prefetching ads.
113+
PrefetchConfig prefetch_config = 10;
114+
115+
// The default ad pod duration in seconds that will be requested when a
116+
// cue-out does not specify a duration.
117+
// The default value of this field is 30s.
118+
google.protobuf.Duration default_ad_break_duration = 11;
119+
}
120+
121+
// The configuration for prefetch ads.
122+
message PrefetchConfig {
123+
// Required. Indicates whether the option to prefetch ad requests is enabled.
124+
bool enabled = 1 [(google.api.field_behavior) = REQUIRED];
125+
126+
// The duration in seconds of the part of the break to be prefetched.
127+
// This field is only relevant if prefetch is enabled.
128+
// You should set this duration to as long as possible to increase the
129+
// benefits of prefetching, but not longer than the shortest ad break
130+
// expected. For example, for a live event with 30s and 60s ad breaks, the
131+
// initial duration should be set to 30s.
132+
google.protobuf.Duration initial_ad_request_duration = 2;
133+
}
134+
135+
// Metadata used to register a live stream with Google Ad Manager (GAM)
136+
message GamLiveConfig {
137+
// Required. Ad Manager network code to associate with the live config.
138+
string network_code = 1 [(google.api.field_behavior) = REQUIRED];
139+
140+
// Output only. The asset key identifier generated for the live config.
141+
string asset_key = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
142+
143+
// Output only. The custom asset key identifier generated for the live config.
144+
string custom_asset_key = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
145+
}

0 commit comments

Comments
 (0)