Skip to content

Commit e43e3d6

Browse files
Google APIscopybara-github
authored andcommitted
feat: added support for slate events which allow users to create and insert a slate into a live stream to replace the main live stream content
feat: added a new asset resource which can be used as the content of slate events feat: added a new pool resource for protecting input endpoints within a VPC Service Controls perimeter PiperOrigin-RevId: 549682971
1 parent 3b7a121 commit e43e3d6

4 files changed

Lines changed: 375 additions & 19 deletions

File tree

google/cloud/video/livestream/v1/livestream_v1.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ documentation:
2020
- selector: google.cloud.location.Locations.ListLocations
2121
description: Lists information about the supported locations for this service.
2222

23-
- selector: google.longrunning.Operations.ListOperations
24-
description: |-
25-
Lists operations that match the specified filter in the request. If
26-
the server doesn't support this method, it returns `UNIMPLEMENTED`.
27-
2823
backend:
2924
rules:
3025
- selector: google.cloud.location.Locations.GetLocation

google/cloud/video/livestream/v1/outputs.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/livestream/v1/resources.proto

Lines changed: 155 additions & 12 deletions
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.
@@ -407,6 +407,21 @@ message Event {
407407
google.protobuf.Duration duration = 1;
408408
}
409409

410+
// Inserts a slate.
411+
message SlateTask {
412+
// Optional. Duration of the slate. Must be greater than 0 if specified.
413+
// Omit this field for a long running slate.
414+
google.protobuf.Duration duration = 1;
415+
416+
// Slate asset to use for the duration. If its duration is less than the
417+
// duration of the SlateTask, then it will be looped. The slate must be
418+
// represented in the form of:
419+
// `projects/{project}/locations/{location}/assets/{assetId}`.
420+
string asset = 2 [(google.api.resource_reference) = {
421+
type: "livestream.googleapis.com/Asset"
422+
}];
423+
}
424+
410425
// Stops any events which are currently running. This only applies to events
411426
// with a duration.
412427
message ReturnToProgramTask {}
@@ -463,21 +478,23 @@ message Event {
463478

464479
// Required. Operation to be executed by this event.
465480
oneof task {
466-
// Required. Switches to another input stream.
467-
InputSwitchTask input_switch = 5 [(google.api.field_behavior) = REQUIRED];
481+
// Switches to another input stream.
482+
InputSwitchTask input_switch = 5;
468483

469-
// Required. Inserts a new ad opportunity.
470-
AdBreakTask ad_break = 6 [(google.api.field_behavior) = REQUIRED];
484+
// Inserts a new ad opportunity.
485+
AdBreakTask ad_break = 6;
471486

472-
// Required. Stops any running ad break.
473-
ReturnToProgramTask return_to_program = 13
474-
[(google.api.field_behavior) = REQUIRED];
487+
// Stops any running ad break.
488+
ReturnToProgramTask return_to_program = 13;
475489

476-
// Required. Mutes the stream.
477-
MuteTask mute = 15 [(google.api.field_behavior) = REQUIRED];
490+
// Inserts a slate.
491+
SlateTask slate = 14;
478492

479-
// Required. Unmutes the stream.
480-
UnmuteTask unmute = 16 [(google.api.field_behavior) = REQUIRED];
493+
// Mutes the stream.
494+
MuteTask mute = 15;
495+
496+
// Unmutes the stream.
497+
UnmuteTask unmute = 16;
481498
}
482499

483500
// When this field is set to true, the event will be executed at the earliest
@@ -504,6 +521,89 @@ message Event {
504521
google.rpc.Status error = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
505522
}
506523

524+
// An asset represents a video or an image.
525+
message Asset {
526+
option (google.api.resource) = {
527+
type: "livestream.googleapis.com/Asset"
528+
pattern: "projects/{project}/locations/{location}/assets/{asset}"
529+
};
530+
531+
// VideoAsset represents a video. The supported formats are MP4, MPEG-TS, and
532+
// FLV. The supported video codec is H264. The supported audio codecs are
533+
// AAC, AC3, MP2, and MP3.
534+
message VideoAsset {
535+
// Cloud Storage URI of the video. The format is `gs://my-bucket/my-object`.
536+
string uri = 1;
537+
}
538+
539+
// Image represents an image. The supported format is JPEG.
540+
message ImageAsset {
541+
// Cloud Storage URI of the image. The format is `gs://my-bucket/my-object`.
542+
string uri = 1;
543+
}
544+
545+
// State of the asset resource.
546+
enum State {
547+
// State is not specified.
548+
STATE_UNSPECIFIED = 0;
549+
550+
// The asset is being created.
551+
CREATING = 1;
552+
553+
// The asset is ready for use.
554+
ACTIVE = 2;
555+
556+
// The asset is being deleted.
557+
DELETING = 3;
558+
559+
// The asset has an error.
560+
ERROR = 4;
561+
}
562+
563+
// The resource name of the asset, in the form of:
564+
// `projects/{project}/locations/{location}/assets/{assetId}`.
565+
string name = 1;
566+
567+
// Output only. The creation time.
568+
google.protobuf.Timestamp create_time = 2
569+
[(google.api.field_behavior) = OUTPUT_ONLY];
570+
571+
// Output only. The update time.
572+
google.protobuf.Timestamp update_time = 3
573+
[(google.api.field_behavior) = OUTPUT_ONLY];
574+
575+
// User-defined key/value metadata.
576+
map<string, string> labels = 4;
577+
578+
// The reference to the asset.
579+
// The maximum size of the resource is 250 MB.
580+
oneof resource {
581+
// VideoAsset represents a video.
582+
VideoAsset video = 5;
583+
584+
// ImageAsset represents an image.
585+
ImageAsset image = 6;
586+
}
587+
588+
// Based64-encoded CRC32c checksum of the asset file. For more information,
589+
// see the crc32c checksum of the [Cloud Storage Objects
590+
// resource](https://cloud.google.com/storage/docs/json_api/v1/objects).
591+
// If crc32c is omitted or left empty when the asset is created, this field is
592+
// filled by the crc32c checksum of the Cloud Storage object indicated by
593+
// [VideoAsset.uri] or [ImageAsset.uri].
594+
// If crc32c is set, the asset can't be created if the crc32c value does not
595+
// match with the crc32c checksum of the Cloud Storage object indicated by
596+
// [VideoAsset.uri] or [ImageAsset.uri].
597+
string crc32c = 7;
598+
599+
// Output only. The state of the asset resource.
600+
State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
601+
602+
// Output only. Only present when `state` is `ERROR`. The reason for the error
603+
// state of the asset.
604+
google.rpc.Status error = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
605+
}
606+
507607
// Encryption settings.
508608
message Encryption {
509609
// Configuration for secrets stored in Google Secret Manager.
@@ -584,3 +684,46 @@ message Encryption {
584684
MpegCommonEncryption mpeg_cenc = 6;
585685
}
586686
}
687+
688+
// Pool resource defines the configuration of Live Stream pools for a specific
689+
// location. Currently we support only one pool resource per project per
690+
// location. After the creation of the first input, a default pool is created
691+
// automatically at "projects/{project}/locations/{location}/pools/default".
692+
message Pool {
693+
option (google.api.resource) = {
694+
type: "livestream.googleapis.com/Pool"
695+
pattern: "projects/{project}/locations/{location}/pools/{pool}"
696+
};
697+
698+
// Defines the network configuration for the pool.
699+
message NetworkConfig {
700+
// peered_network is the network resource URL of the network that is peered
701+
// to the service provider network. Must be of the format
702+
// projects/NETWORK_PROJECT_NUMBER/global/networks/NETWORK_NAME, where
703+
// NETWORK_PROJECT_NUMBER is the project number of the Cloud project that
704+
// holds your VPC network and NETWORK_NAME is the name of your VPC network.
705+
// If peered_network is omitted or empty, the pool will use endpoints that
706+
// are publicly available.
707+
string peered_network = 1 [(google.api.resource_reference) = {
708+
type: "compute.googleapis.com/Network"
709+
}];
710+
}
711+
712+
// The resource name of the pool, in the form of:
713+
// `projects/{project}/locations/{location}/pools/{poolId}`.
714+
string name = 1;
715+
716+
// Output only. The creation time.
717+
google.protobuf.Timestamp create_time = 2
718+
[(google.api.field_behavior) = OUTPUT_ONLY];
719+
720+
// Output only. The update time.
721+
google.protobuf.Timestamp update_time = 3
722+
[(google.api.field_behavior) = OUTPUT_ONLY];
723+
724+
// User-defined key/value metadata.
725+
map<string, string> labels = 4;
726+
727+
// Network configuration for the pool.
728+
NetworkConfig network_config = 5;
729+
}

0 commit comments

Comments
 (0)