@@ -667,8 +667,20 @@ message Clip {
667667 string output_uri = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
668668 }
669669
670+ // OutputType represents the output type of the clip.
671+ enum OutputType {
672+ // OutputType is not specified.
673+ OUTPUT_TYPE_UNSPECIFIED = 0 ;
674+
675+ // OutputType is a VOD manifest. This is the default value.
676+ MANIFEST = 1 ;
677+
678+ // OutputType is an MP4 file.
679+ MP4 = 2 ;
680+ }
681+
670682 // The resource name of the clip, in the following format:
671- // `projects/{project}/locations/{location}/channels/{c }/clips/{clipId}`.
683+ // `projects/{project}/locations/{location}/channels/{channelId }/clips/{clipId}`.
672684 // `{clipId}` is a user-specified resource id that conforms to the following
673685 // criteria:
674686 //
@@ -715,6 +727,139 @@ message Clip {
715727 // allowed.
716728 repeated ClipManifest clip_manifests = 12
717729 [(google.api.field_behavior ) = REQUIRED ];
730+
731+ // Optional. OutputType of the clip. If not specified, the default value is
732+ // MANIFEST.
733+ OutputType output_type = 13 [(google.api.field_behavior ) = OPTIONAL ];
734+ }
735+
736+ // TimeInterval represents a time interval.
737+ message TimeInterval {
738+ // Optional. The start time of the interval.
739+ google.protobuf.Timestamp start_time = 1
740+ [(google.api.field_behavior ) = OPTIONAL ];
741+
742+ // Optional. The end time of the interval.
743+ google.protobuf.Timestamp end_time = 2
744+ [(google.api.field_behavior ) = OPTIONAL ];
745+ }
746+
747+ // DvrSession is a sub-resource under channel. Each DvrSession represents a DVR
748+ // recording of the live stream for a specific time range.
749+ message DvrSession {
750+ option (google.api.resource ) = {
751+ type : "livestream.googleapis.com/DvrSession"
752+ pattern : "projects/{project}/locations/{location}/channels/{channel}/dvrSessions/{dvr_session}"
753+ plural : "dvrSessions"
754+ singular : "dvrSession"
755+ };
756+
757+ // State of the DVR session.
758+ enum State {
759+ // State is not specified.
760+ STATE_UNSPECIFIED = 0 ;
761+
762+ // The operation is pending to be picked up by the server.
763+ PENDING = 1 ;
764+
765+ // The session is being updated.
766+ UPDATING = 2 ;
767+
768+ // The session is scheduled and waiting for the start time.
769+ SCHEDULED = 3 ;
770+
771+ // The session is currently in progress and the outputs are available in the
772+ // specified Cloud Storage bucket. For additional information, see the
773+ // `dvr_manifests.output_uri` field.
774+ LIVE = 4 ;
775+
776+ // Outputs are available in the specified Cloud Storage bucket. For
777+ // additional information, see the `dvr_manifests.output_uri` field.
778+ FINISHED = 5 ;
779+
780+ // The operation has failed. For additional information, see the `error`
781+ // field.
782+ FAILED = 6 ;
783+
784+ // The session is being deleted.
785+ DELETING = 7 ;
786+
787+ // The session is being post processed.
788+ POST_PROCESSING = 8 ;
789+
790+ // The session is in cooldown. The cooldown period lasts for 60 seconds.
791+ // When the DVR session is updated by the user to have a new end time that
792+ // is likely already in the past, the DVR manifest will end as soon as
793+ // possible and the DVR session will move to this state. This is done to
794+ // prevent the players to receive a manifest update that removes a segment
795+ // that has already been played. After the cooldown period ends, a new
796+ // manifest is generated that honors the new end time.
797+ COOLDOWN = 9 ;
798+
799+ // The session is being stopped. The session will move to STOPPING state, if
800+ // the parent channel is updated.
801+ STOPPING = 10 ;
802+ }
803+
804+ // DvrManifest identifies a source manifest and specifies a file name for the
805+ // generated DVR manifest.
806+ message DvrManifest {
807+ // Required. A unique key that identifies a manifest config in the parent
808+ // channel. This key is the same as `channel.manifests.key` for the selected
809+ // manifest.
810+ string manifest_key = 1 [(google.api.field_behavior ) = REQUIRED ];
811+
812+ // Output only. The output URI of the DVR manifest. The DVR output will be
813+ // placed in a directory named `dvr/dvrSessionId/` under the parent
814+ // channel's output uri. Format:
815+ // {channel.output.uri}/dvr/{dvrSessionId}/{channel.manifests.fileName}
816+ // Example: gs://my-bucket/outputs/dvr/my-dvr-session/main.m3u8
817+ string output_uri = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
818+ }
819+
820+ // DvrWindow represents a DVR window.
821+ message DvrWindow {
822+ // The allowlist forms of a DVR window.
823+ oneof kind {
824+ // A time interval in the form of a tuple of Unix epoch time.
825+ TimeInterval time_interval = 1 ;
826+ }
827+ }
828+
829+ // Identifier. The resource name of the DVR session, in the following format:
830+ // `projects/{project}/locations/{location}/channels/{channelId}/dvrSessions/{dvrSessionId}`.
831+ // `{dvrSessionId}` is a user-specified resource id that conforms to the
832+ // following criteria:
833+ //
834+ // 1. 1 character minimum, 63 characters maximum
835+ // 2. Only contains letters, digits, underscores, and hyphens
836+ string name = 1 [(google.api.field_behavior ) = IDENTIFIER ];
837+
838+ // Output only. The creation time.
839+ google.protobuf.Timestamp create_time = 2
840+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
841+
842+ // Output only. The update time.
843+ google.protobuf.Timestamp update_time = 3
844+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
845+
846+ // Optional. User-defined key/value metadata.
847+ map <string , string > labels = 4 [(google.api.field_behavior ) = OPTIONAL ];
848+
849+ // Output only. The state of the clip.
850+ State state = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
851+
852+ // Output only. An error object that describes the reason for the failure.
853+ // This property only presents when `state` is `FAILED`.
854+ google.rpc.Status error = 6 [(google.api.field_behavior ) = OUTPUT_ONLY ];
855+
856+ // Required. A list of DVR manifests. Currently only one DVR manifest is
857+ // allowed.
858+ repeated DvrManifest dvr_manifests = 7
859+ [(google.api.field_behavior ) = REQUIRED ];
860+
861+ // Required. The specified ranges of segments to generate a DVR recording.
862+ repeated DvrWindow dvr_windows = 8 [(google.api.field_behavior ) = REQUIRED ];
718863}
719864
720865// An asset represents a video or an image.
0 commit comments