8000 feat: Specifying language code and display name for text and audio st… · googleapis/googleapis@187d780 · GitHub
[go: up one dir, main page]

Skip to content

Commit 187d780

Browse files
Google APIscopybara-github
authored andcommitted
feat: Specifying language code and display name for text and audio streams is now supported
PiperOrigin-RevId: 513138925
1 parent ffe555a commit 187d780

File tree

2 files changed

+87
-58
lines changed

2 files changed

+87
-58
lines changed

google/cloud/video/transcoder/v1/resources.proto

Lines changed: 73 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ message Job {
5757
// Format: `projects/{project_number}/locations/{location}/jobs/{job}`
5858
string name = 1;
5959

60-
// Input only. Specify the `input_uri` to populate empty `uri` fields in each element of
61-
// `Job.config.inputs` or `JobTemplate.config.inputs` when using template.
62-
// URI of the media. Input files must be at least 5 seconds in duration and
63-
// stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See
64-
// [Supported input and output
60+
// Input only. Specify the `input_uri` to populate empty `uri` fields in each
61+
// element of `Job.config.inputs` or `JobTemplate.config.inputs` when using
62+
// template. URI of the media. Input files must be at least 5 seconds in
63+
// duration and stored in Cloud Storage (for example,
64+
// `gs://bucket/inputs/file.mp4`). See [Supported input and output
6565
// formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
6666
string input_uri = 2 [(google.api.field_behavior) = INPUT_ONLY];
6767

68-
// Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or
69-
// `JobTemplate.config.output.uri` when using template.
70-
// URI for the output file(s). For example, `gs://my-bucket/outputs/`. See
71-
// [Supported input and output
68+
// Input only. Specify the `output_uri` to populate an empty
69+
// `Job.config.output.uri` or `JobTemplate.config.output.uri` when using
70+
// template. URI for the output file(s). For example,
71+
// `gs://my-bucket/outputs/`. See [Supported input and output
7272
// formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
7373
string output_uri = 3 [(google.api.field_behavior) = INPUT_ONLY];
7474

@@ -77,8 +77,8 @@ message Job {
7777
// `preset/web-hd` by default. When you use a `template_id` to create a job,
7878
// the `Job.config` is populated by the `JobTemplate.config`.<br>
7979
oneof job_config {
80-
// Input only. Specify the `template_id` to use for populating `Job.config`. The default
81-
// is `preset/web-hd`.
80+
// Input only. Specify the `template_id` to use for populating `Job.config`.
81+
// The default is `preset/web-hd`.
8282
//
8383
// Preset Transcoder templates:
8484
// - `preset/{preset_id}`
@@ -95,13 +95,16 @@ message Job {
9595
ProcessingState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
9696

9797
// Output only. The time the job was created.
98-
google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
98+
google.protobuf.Timestamp create_time = 12
99+
[(google.api.field_behavior) = OUTPUT_ONLY];
99100

100101
// Output only. The time the transcoding started.
101-
google.protobuf.Timestamp start_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
102+
google.protobuf.Timestamp start_time = 13
103+
[(google.api.field_behavior) = OUTPUT_ONLY];
102104

103105
// Output only. The time the transcoding finished.
104-
google.protobuf.Timestamp end_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
106+
google.protobuf.Timestamp end_time = 14
107+
[(google.api.field_behavior) = OUTPUT_ONLY];
105108

106109
// Job time to live value in days, which will be effective after job
107110
// completion. Job should be deleted automatically after the given TTL. Enter
@@ -301,7 +304,8 @@ message Manifest {
301304
// Required. Type of the manifest, can be `HLS` or `DASH`.
302305
ManifestType type = 2 [(google.api.field_behavior) = REQUIRED];
303306

304-
// Required. List of user given `MuxStream.key`s that should appear in this manifest.
307+
// Required. List of user given `MuxStream.key`s that should appear in this
308+
// manifest.
305309
//
306310
// When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key`
307311
// and `.m3u8` extension is generated for each element of the
@@ -331,21 +335,27 @@ message SpriteSheet {
331335
// from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.
332336
string file_prefix = 2 [(google.api.field_behavior) = REQUIRED];
333337

334-
// Required. The width of sprite in pixels. Must be an even integer. To preserve the
335-
// source aspect ratio, set the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field or
336-
// the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field, but not both (the API will
337-
// automatically calculate the missing field).
338+
// Required. The width of sprite in pixels. Must be an even integer. To
339+
// preserve the source aspect ratio, set the
340+
// [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels]
341+
// field or the
342+
// [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels]
343+
// field, but not both (the API will automatically calculate the missing
344+
// field).
338345
//
339346
// For portrait videos that contain horizontal ASR and rotation metadata,
340347
// provide the width, in pixels, per the horizontal ASR. The API calculates
341348
// the height per the horizontal ASR. The API detects any rotation metadata
342349
// and swaps the requested height and width for the output.
343350
int32 sprite_width_pixels = 3 [(google.api.field_behavior) = REQUIRED];
344351

345-
// Required. The height of sprite in pixels. Must be an even integer. To preserve the
346-
// source aspect ratio, set the [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels] field or
347-
// the [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels] field, but not both (the API will
348-
// automatically calculate the missing field).
352+
// Required. The height of sprite in pixels. Must be an even integer. To
353+
// preserve the source aspect ratio, set the
354+
// [SpriteSheet.sprite_height_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_height_pixels]
355+
// field or the
356+
// [SpriteSheet.sprite_width_pixels][google.cloud.video.transcoder.v1.SpriteSheet.sprite_width_pixels]
357+
// field, but not both (the API will automatically calculate the missing
358+
// field).
349359
//
350360
// For portrait videos that contain horizontal ASR and rotation metadata,
351361
// provide the height, in pixels, per the horizontal ASR. The API calculates
@@ -714,17 +724,17 @@ message VideoStream {
714724
// and swaps the requested height and width for the output.
715725
int32 height_pixels = 2;
716726

717-
// Required. The target video frame rate in frames per second (FPS). Must be less than
718-
// or equal to 120. Will default to the input frame rate if larger than the
719-
// input frame rate. The API will generate an output FPS that is divisible
720-
// by the input FPS, and smaller or equal to the target FPS. See
727+
// Required. The target video frame rate in frames per second (FPS). Must be
728+
// less than or equal to 120. Will default to the input frame rate if larger
729+
// than the input frame rate. The API will generate an output FPS that is
730+
// divisible by the input FPS, and smaller or equal to the target FPS. See
721731
// [Calculating frame
722732
// rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for
723733
// more information.
724734
double frame_rate = 3 [(google.api.field_behavior) = REQUIRED];
725735

726-
// Required. The video bitrate in bits per second. The minimum value is 1,000.
727-
// The maximum value is 800,000,000.
736+
// Required. The video bitrate in bits per second. The minimum value is
737+
// 1,000. The maximum value is 800,000,000.
728738
int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED];
729739

730740
// Pixel format to use. The default is `yuv420p`.
@@ -859,17 +869,17 @@ message VideoStream {
859869
// and swaps the requested height and width for the output.
860870
int32 height_pixels = 2;
861871

862-
// Required. The target video frame rate in frames per second (FPS). Must be less than
863-
// or equal to 120. Will default to the input frame rate if larger than the
864-
// input frame rate. The API will generate an output FPS that is divisible
865-
// by the input FPS, and smaller or equal to the target FPS. See
872+
// Required. The target video frame rate in frames per second (FPS). Must be
873+
// less than or equal to 120. Will default to the input frame rate if larger
874+
// than the input frame rate. The API will generate an output FPS that is
875+
// divisible by the input FPS, and smaller or equal to the target FPS. See
866876
// [Calculating frame
867877
// rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for
868878
// more information.
869879
double frame_rate = 3 [(google.api.field_behavior) = REQUIRED];
870880

871-
// Required. The video bitrate in bits per second. The minimum value is 1,000.
872-
// The maximum value is 800,000,000.
881+
// Required. The video bitrate in bits per second. The minimum value is
882+
// 1,000. The maximum value is 800,000,000.
873883
int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED];
874884

875885
// Pixel format to use. The default is `yuv420p`.
@@ -1011,17 +1021,17 @@ message VideoStream {
10111021
// and swaps the requested height and width for the output.
10121022
int32 height_pixels = 2;
10131023

1014-
// Required. The target video frame rate in frames per second (FPS). Must be less than
1015-
// or equal to 120. Will default to the input frame rate if larger than the
1016-
// input frame rate. The API will generate an output FPS that is divisible
1017-
// by the input FPS, and smaller or equal to the target FPS. See
1024+
// Required. The target video frame rate in frames per second (FPS). Must be
1025+
// less than or equal to 120. Will default to the input frame rate if larger
1026+
// than the input frame rate. The API will generate an output FPS that is
1027+
// divisible by the input FPS, and smaller or equal to the target FPS. See
10181028
// [Calculating frame
10191029
// rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for
10201030
// more information.
10211031
double frame_rate = 3 [(google.api.field_behavior) = REQUIRED];
10221032

1023-
// Required. The video bitrate in bits per second. The minimum value is 1,000.
1024-
// The maximum value is 480,000,000.
1033+
// Required. The video bitrate in bits per second. The minimum value is
1034+
// 1,000. The maximum value is 480,000,000.
10251035
int32 bitrate_bps = 4 [(google.api.field_behavior) = REQUIRED];
10261036

10271037
// Pixel format to use. The default is `yuv420p`.
@@ -1099,8 +1109,8 @@ message VideoStream {
10991109
message AudioStream {
11001110
// The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.
11011111
message AudioMapping {
1102-
// Required. The `EditAtom.key` that references the atom with audio inputs in the
1103-
// `Job.edit_list`.
1112+
// Required. The `EditAtom.key` that references the atom with audio inputs
1113+
// in the `Job.edit_list`.
11041114
string atom_key = 1 [(google.api.field_behavior) = REQUIRED];
11051115

11061116
// Required. The `Input.key` that identifies the input file.
@@ -1132,7 +1142,8 @@ message AudioStream {
11321142
// - `eac3`
11331143
string codec = 1;
11341144

1135-
// Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.
1145+
// Required. Audio bitrate in bits per second. Must be between 1 and
1146+
// 10,000,000.
11361147
int32 bitrate_bps = 2 [(google.api.field_behavior) = REQUIRED];
11371148

11381149
// Number of audio channels. Must be between 1 and 6. The default is 2.
@@ -1157,6 +1168,15 @@ message AudioStream {
11571168

11581169
// The audio sample rate in Hertz. The default is 48000 Hertz.
11591170
int32 sample_rate_hertz = 6;
1171+
1172+
// The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
1173+
// information, see
1174+
// https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1175+
string language_code = 7;
1176+
1177+
// The name for this particular audio stream that
1178+
// will be added to the HLS/DASH manifest.
1179+
string display_name = 8;
11601180
}
11611181

11621182
// Encoding of a text stream. For example, closed captions or subtitles.
@@ -1185,8 +1205,17 @@ message TextStream {
11851205
// - `webvtt`
11861206
string codec = 1;
11871207

1208+
// The BCP-47 language code, such as `en-US` or `sr-Latn`. For more
1209+
// information, see
1210+
// https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1211+
string language_code = 2;
1212+
11881213
// The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.
11891214
repeated TextMapping mapping = 3;
1215+
1216+
// The name for this particular text stream that
1217+
// will be added to the HLS/DASH manifest.
1218+
string display_name = 4;
11901219
}
11911220

11921221
// Segment settings for `ts`, `fmp4` and `vtt`.

google/cloud/video/transcoder/v1/services.proto

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ option ruby_package = "Google::Cloud::Video::Transcoder::V1";
3939
// concatenation, and digital ad-stitch ready content generation.
4040
service TranscoderService {
4141
option (google.api.default_host) = "transcoder.googleapis.com";
42-
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
42+
option (google.api.oauth_scopes) =
43+
"https://www.googleapis.com/auth/cloud-platform";
4344

4445
// Creates a job in the specified region.
4546
rpc CreateJob(CreateJobRequest) returns (Job) {
@@ -80,11 +81,13 @@ service TranscoderService {
8081
post: "/v1/{par F438 ent=projects/*/locations/*}/jobTemplates"
8182
body: "job_template"
8283
};
83-
option (google.api.method_signature) = "parent,job_template,job_template_id";
84+
option (google.api.method_signature) =
85+
"parent,job_template,job_template_id";
8486
}
8587

8688
// Lists job templates in the specified region.
87-
rpc ListJobTemplates(ListJobTemplatesRequest) returns (ListJobTemplatesResponse) {
89+
rpc ListJobTemplates(ListJobTemplatesRequest)
90+
returns (ListJobTemplatesResponse) {
8891
option (google.api.http) = {
8992
get: "/v1/{parent=projects/*/locations/*}/jobTemplates"
9093
};
@@ -100,7 +103,8 @@ service TranscoderService {
100103
}
101104

102105
// Deletes a job template.
103-
rpc DeleteJobTemplate(DeleteJobTemplateRequest) returns (google.protobuf.Empty) {
106+
rpc DeleteJobTemplate(DeleteJobTemplateRequest)
107+
returns (google.protobuf.Empty) {
104108
option (google.api.http) = {
105109
delete: "/v1/{name=projects/*/locations/*/jobTemplates/*}"
106110
};
@@ -156,9 +160,7 @@ message GetJobRequest {
156160
// Format: `projects/{project}/locations/{location}/jobs/{job}`
157161
string name = 1 [
158162
(google.api.field_behavior) = REQUIRED,
159-
(google.api.resource_reference) = {
160-
type: "transcoder.googleapis.com/Job"
161-
}
163+
(google.api.resource_reference) = { type: "transcoder.googleapis.com/Job" }
162164
];
163165
}
164166

@@ -168,9 +170,7 @@ message DeleteJobRequest {
168170
// Format: `projects/{project}/locations/{location}/jobs/{job}`
169171
string name = 1 [
170172
(google.api.field_behavior) = REQUIRED,
171-
(google.api.resource_reference) = {
172-
type: "transcoder.googleapis.com/Job"
173-
}
173+
(google.api.resource_reference) = { type: "transcoder.googleapis.com/Job" }
174174 C1CD
];
175175

176176
// If set to true, and the job is not found, the request will succeed but no
@@ -204,8 +204,8 @@ message CreateJobTemplateRequest {
204204
// Required. Parameters for creating job template.
205205
JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED];
206206

207-
// Required. The ID to use for the job template, which will become the final component
208-
// of the job template's resource name.
207+
// Required. The ID to use for the job template, which will become the final
208+
// component of the job template's resource name.
209209
//
210210
// This value should be 4-63 characters, and valid characters must match the
211211
// regular expression `[a-zA-Z][a-zA-Z0-9_-]*`.
@@ -214,8 +214,8 @@ message CreateJobTemplateRequest {
214214

215215
// Request message for `TranscoderService.ListJobTemplates`.
216216
message ListJobTemplatesRequest {
217-
// Required. The parent location from which to retrieve the collection of job templates.
218-
// Format: `projects/{project}/locations/{location}`
217+
// Required. The parent location from which to retrieve the collection of job
218+
// templates. Format: `projects/{project}/locations/{location}`
219219
string parent = 1 [
220220
(google.api.field_behavior) = REQUIRED,
221221
(google.api.resource_reference) = {

0 commit comments

Comments
 (0)
0