Class TranscoderServiceClient (2.23.0-rc)

Using the Transcoder API, you can queue asynchronous jobs for transcoding media into various output formats.

Output formats may include different streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive Streaming over HTTP (DASH). You can also customize jobs using advanced features such as Digital Rights Management (DRM), audio equalization, content concatenation, and digital ad-stitch ready content generation.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

TranscoderServiceClient(TranscoderServiceClient const &)

Copy and move support

Parameter
NameDescription
TranscoderServiceClient const &

TranscoderServiceClient(TranscoderServiceClient &&)

Copy and move support

Parameter
NameDescription
TranscoderServiceClient &&

TranscoderServiceClient(std::shared_ptr< TranscoderServiceConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< TranscoderServiceConnection >
opts Options

Operators

operator=(TranscoderServiceClient const &)

Copy and move support

Parameter
NameDescription
TranscoderServiceClient const &
Returns
TypeDescription
TranscoderServiceClient &

operator=(TranscoderServiceClient &&)

Copy and move support

Parameter
NameDescription
TranscoderServiceClient &&
Returns
TypeDescription
TranscoderServiceClient &

Functions

CreateJob(std::string const &, google::cloud::video::transcoder::v1::Job const &, Options)

Creates a job in the specified region.

Parameters
NameDescription
parent std::string const &

Required. The parent location to create and process this job. Format: projects/{project}/locations/{location}

job google::cloud::video::transcoder::v1::Job const &

Required. Parameters for creating transcoding job.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::Job >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.Job) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateJob(google::cloud::video::transcoder::v1::CreateJobRequest const &, Options)

Creates a job in the specified region.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::CreateJobRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.CreateJobRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::Job >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.Job) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListJobs(std::string const &, Options)

Lists jobs in the specified region.

Parameters
NameDescription
parent std::string const &

Required. Format: projects/{project}/locations/{location}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::video::transcoder::v1::Job >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.video.transcoder.v1.Job, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListJobs(google::cloud::video::transcoder::v1::ListJobsRequest, Options)

Lists jobs in the specified region.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::ListJobsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.ListJobsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::video::transcoder::v1::Job >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.video.transcoder.v1.Job, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetJob(std::string const &, Options)

Returns the job data.

Parameters
NameDescription
name std::string const &

Required. The name of the job to retrieve. Format: projects/{project}/locations/{location}/jobs/{job}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::Job >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.Job) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetJob(google::cloud::video::transcoder::v1::GetJobRequest const &, Options)

Returns the job data.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::GetJobRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.GetJobRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::Job >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.Job) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteJob(std::string const &, Options)

Deletes a job.

Parameters
NameDescription
name std::string const &

Required. The name of the job to delete. Format: projects/{project}/locations/{location}/jobs/{job}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteJob(google::cloud::video::transcoder::v1::DeleteJobRequest const &, Options)

Deletes a job.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::DeleteJobRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.DeleteJobRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

CreateJobTemplate(std::string const &, google::cloud::video::transcoder::v1::JobTemplate const &, std::string const &, Options)

Creates a job template in the specified region.

Parameters
NameDescription
parent std::string const &

Required. The parent location to create this job template. Format: projects/{project}/locations/{location}

job_template google::cloud::video::transcoder::v1::JobTemplate const &

Required. Parameters for creating job template.

job_template_id std::string const &

Required. The ID to use for the job template, which will become the final component of the job template's resource name.
This value should be 4-63 characters, and valid characters must match the regular expression [a-zA-Z][a-zA-Z0-9_-]*.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::JobTemplate >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.JobTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

CreateJobTemplate(google::cloud::video::transcoder::v1::CreateJobTemplateRequest const &, Options)

Creates a job template in the specified region.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::CreateJobTemplateRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.CreateJobTemplateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::JobTemplate >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.JobTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListJobTemplates(std::string const &, Options)

Lists job templates in the specified region.

Parameters
NameDescription
parent std::string const &

Required. The parent location from which to retrieve the collection of job templates. Format: projects/{project}/locations/{location}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::video::transcoder::v1::JobTemplate >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.video.transcoder.v1.JobTemplate, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListJobTemplates(google::cloud::video::transcoder::v1::ListJobTemplatesRequest, Options)

Lists job templates in the specified region.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::ListJobTemplatesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.ListJobTemplatesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StreamRange< google::cloud::video::transcoder::v1::JobTemplate >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.video.transcoder.v1.JobTemplate, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetJobTemplate(std::string const &, Options)

Returns the job template data.

Parameters
NameDescription
name std::string const &

Required. The name of the job template to retrieve. Format: projects/{project}/locations/{location}/jobTemplates/{job_template}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::JobTemplate >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.JobTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetJobTemplate(google::cloud::video::transcoder::v1::GetJobTemplateRequest const &, Options)

Returns the job template data.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::GetJobTemplateRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.GetJobTemplateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
StatusOr< google::cloud::video::transcoder::v1::JobTemplate >

the result of the RPC. The response message type (google.cloud.video.transcoder.v1.JobTemplate) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteJobTemplate(std::string const &, Options)

Deletes a job template.

Parameters
NameDescription
name std::string const &

Required. The name of the job template to delete. projects/{project}/locations/{location}/jobTemplates/{job_template}

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteJobTemplate(google::cloud::video::transcoder::v1::DeleteJobTemplateRequest const &, Options)

Deletes a job template.

Parameters
NameDescription
request google::cloud::video::transcoder::v1::DeleteJobTemplateRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.video.transcoder.v1.DeleteJobTemplateRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
TypeDescription
Status

a Status object. If the request failed, the status contains the details of the failure.