Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit 7f6843a

Browse files
yoshi-automationbusunkim96
authored andcommitted
feat!: update proto files, add create_time, start_time and end_time, height_pixels and width_pixels become optional
PiperOrigin-RevId: 334639492 Source-Author: Google APIs <noreply@google.com> Source-Date: Wed Sep 30 11:15:35 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 054339f961e16b2a359b0efc35a927b5f899c90f Source-Link: googleapis/googleapis@054339f
1 parent a89a272 commit 7f6843a

File tree

5 files changed

+57
-14
lines changed

5 files changed

+57
-14
lines changed

google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from google.cloud.video.transcoder_v1beta1.services.transcoder_service import pagers
3232
from google.cloud.video.transcoder_v1beta1.types import resources
3333
from google.cloud.video.transcoder_v1beta1.types import services
34+
from google.protobuf import timestamp_pb2 as timestamp # type: ignore
3435

3536
from .transports.base import TranscoderServiceTransport, DEFAULT_CLIENT_INFO
3637
from .transports.grpc_asyncio import TranscoderServiceGrpcAsyncIOTransport
@@ -441,7 +442,8 @@ async def create_job_template(
441442
resource name.
442443
443444
This value should be 4-63 characters, and valid
444-
characters are ``/[a-zA-Z0-9_-_]/``.
445+
characters must match the regular expression
446+
``[a-zA-Z][a-zA-Z0-9_-]*``.
445447
This corresponds to the ``job_template_id`` field
446448
on the ``request`` instance; if ``request`` is provided, this
447449
should not be set.

google/cloud/video/transcoder_v1beta1/services/transcoder_service/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from google.cloud.video.transcoder_v1beta1.services.transcoder_service import pagers
3636
from google.cloud.video.transcoder_v1beta1.types import resources
3737
from google.cloud.video.transcoder_v1beta1.types import services
38+
from google.protobuf import timestamp_pb2 as timestamp # type: ignore
3839

3940
from .transports.base import TranscoderServiceTransport, DEFAULT_CLIENT_INFO
4041
from .transports.grpc import TranscoderServiceGrpcTransport
@@ -624,7 +625,8 @@ def create_job_template(
624625
resource name.
625626
626627
This value should be 4-63 characters, and valid
627-
characters are ``/[a-zA-Z0-9_-_]/``.
628+
characters must match the regular expression
629+
``[a-zA-Z][a-zA-Z0-9_-]*``.
628630
This corresponds to the ``job_template_id`` field
629631
on the ``request`` instance; if ``request`` is provided, this
630632
should not be set.

google/cloud/video/transcoder_v1beta1/types/resources.py

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020

2121
from google.protobuf import duration_pb2 as duration # type: ignore
22+
from google.protobuf import timestamp_pb2 as timestamp # type: ignore
2223

2324

2425
__protobuf__ = proto.module(
@@ -99,6 +100,14 @@ class Job(proto.Message):
99100
Output only. List of failure details. This property may
100101
contain additional information about the failure when
101102
``failure_reason`` is present.
103+
create_time (~.timestamp.Timestamp):
104+
Output only. The time the job was created.
105+
start_time (~.timestamp.Timestamp):
106+
Output only. The time the transcoding
107+
started.
108+
end_time (~.timestamp.Timestamp):
109+
Output only. The time the transcoding
110+
finished.
102111
"""
103112

104113
class ProcessingState(proto.Enum):
@@ -152,6 +161,12 @@ class OriginUri(proto.Message):
152161
proto.MESSAGE, number=11, message="FailureDetail",
153162
)
154163

164+
create_time = proto.Field(proto.MESSAGE, number=12, message=timestamp.Timestamp,)
165+
166+
start_time = proto.Field(proto.MESSAGE, number=13, message=timestamp.Timestamp,)
167+
168+
end_time = proto.Field(proto.MESSAGE, number=14, message=timestamp.Timestamp,)
169+
155170

156171
class JobTemplate(proto.Message):
157172
r"""Transcoding job template resource.
@@ -387,9 +402,9 @@ class Manifest(proto.Message):
387402
388403
Attributes:
389404
file_name (str):
390-
The name of the generated file. The default is ``"master"``
391-
with the extension suffix corresponding to the
392-
``Manifest.type``.
405+
The name of the generated file. The default is
406+
``"manifest"`` with the extension suffix corresponding to
407+
the ``Manifest.type``.
393408
type_ (~.resources.Manifest.ManifestType):
394409
Required. Type of the manifest, can be "HLS"
395410
or "DASH".
@@ -811,11 +826,17 @@ class VideoStream(proto.Message):
811826
Enforce specified codec preset. The default is
812827
``"veryfast"``.
813828
height_pixels (int):
814-
Required. The height of video in pixels. Must
815-
be an even integer.
829+
The height of the video in pixels. Must be an
830+
even integer. When not specified, the height is
831+
adjusted to match the specified width and input
832+
aspect ratio. If both are omitted, the input
833+
height is used.
816834
width_pixels (int):
817-
Required. The width of video in pixels. Must
818-
be an even integer.
835+
The width of the video in pixels. Must be an
836+
even integer. When not specified, the width is
837+
adjusted to match the specified height and input
838+
aspect ratio. If both are omitted, the input
839+
width is used.
819840
pixel_format (str):
820841
Pixel format to use. The default is ``"yuv420p"``.
821842
@@ -880,10 +901,26 @@ class VideoStream(proto.Message):
880901
equal to zero. Must be less than
881902
``VideoStream.gop_frame_count`` if set. The default is 0.
882903
frame_rate (float):
883-
Required. The video frame rate in frames per
884-
second. Must be less than or equal to 120. Will
885-
default to the input frame rate if larger than
886-
the input frame rate.
904+
Required. The target video frame rate in frames per second
905+
(FPS). Must be less than or equal to 120. Will default to
906+
the input frame rate if larger than the input frame rate.
907+
The API will generate an output FPS that is divisible by the
908+
input FPS, and smaller or equal to the target FPS.
909+
910+
The following table shows the computed video FPS given the
911+
target FPS (in parenthesis) and input FPS (in the first
912+
column):
913+
914+
\| \| (30) \| (60) \| (25) \| (50) \|
915+
\|--------|--------|--------|------|------\| \| 240 \| Fail
916+
\| Fail \| Fail \| Fail \| \| 120 \| 30 \| 60 \| 20 \| 30 \|
917+
\| 100 \| 25 \| 50 \| 20 \| 30 \| \| 50 \| 25 \| 50 \| 20 \|
918+
30 \| \| 60 \| 30 \| 60 \| 20 \| 30 \| \| 59.94 \| 29.97 \|
919+
59.94 \| 20 \| 30 \| \| 48 \| 24 \| 48 \| 20 \| 30 \| \| 30
920+
\| 30 \| 30 \| 20 \| 30 \| \| 25 \| 25 \| 25 \| 20 \| 30 \|
921+
\| 24 \| 24 \| 24 \| 20 \| 30 \| \| 23.976 \| 23.976 \|
922+
23.976 \| 20 \| 30 \| \| 15 \| 15 \| 15 \| 20 \| 30 \| \| 12
923+
\| 12 \| 12 \| 20 \| 30 \| \| 10 \| 10 \| 10 \| 20 \| 30 \|
887924
aq_strength (float):
888925
Specify the intensity of the adaptive
889926
quantizer (AQ). Must be between 0 and 1, where 0

google/cloud/video/transcoder_v1beta1/types/services.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class CreateJobTemplateRequest(proto.Message):
136136
name.
137137
138138
This value should be 4-63 characters, and valid characters
139-
are ``/[a-zA-Z0-9_-_]/``.
139+
must match the regular expression
140+
``[a-zA-Z][a-zA-Z0-9_-]*``.
140141
"""
141142

142143
parent = proto.Field(proto.STRING, number=1)

tests/unit/gapic/transcoder_v1beta1/test_transcoder_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from google.cloud.video.transcoder_v1beta1.types import services
4545
from google.oauth2 import service_account
4646
from google.protobuf import duration_pb2 as duration # type: ignore
47+
from google.protobuf import timestamp_pb2 as timestamp # type: ignore
4748

4849

4950
def client_cert_source_callback():

0 commit comments

Comments
 (0)