Skip to content

Commit 489ebb1

Browse files
feat: [VideoLiveStream] Added H.265 (HEVC) codec support (#8610)
* feat: Added H.265 (HEVC) codec support feat: Added UHD (4k) resolution support feat: Added Auto Transcription support feat: Added StartDistribution/StopDistribution methods and Distribution/DistributionStream messages used for distributing live streams to external RTMP/SRT endpoints feat: Added PreviewInput method used for the low latency input monitoring feat: Added UpdateEncryptions event to perform key rotation without restarting a channel docs: Update requirements of resource ID fields to be more clear PiperOrigin-RevId: 808091810 Source-Link: googleapis/googleapis@c4e80cd Source-Link: googleapis/googleapis-gen@6f37911 Copy-Tag: eyJwIjoiVmlkZW9MaXZlU3RyZWFtLy5Pd2xCb3QueWFtbCIsImgiOiI2ZjM3OTExZTMyZDZlYWRjZmMzMTI1NmU2ODhhMDQ4ZjdkNzE3MmNjIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent f824eda commit 489ebb1

47 files changed

Lines changed: 3982 additions & 189 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1.56 KB
Binary file not shown.
1.07 KB
Binary file not shown.

VideoLiveStream/metadata/V1/Service.php

Lines changed: 28 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VideoLiveStream/samples/V1/LivestreamServiceClient/create_asset.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@
3838
* `projects/{project}/locations/{location}`. Please see
3939
* {@see LivestreamServiceClient::locationName()} for help formatting this field.
4040
* @param string $assetId The ID of the asset resource to be created.
41-
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
42-
* could contain dashes (-) in between.
41+
*
42+
* This value must be 1-63 characters, begin and end with a lower-case letter
43+
* or a number, and consist of only lower-case letters, numbers, and hyphens.
44+
* In other words, it must match the following regex:
45+
* `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
4346
*/
4447
function create_asset_sample(string $formattedParent, string $assetId): void
4548
{

VideoLiveStream/samples/V1/LivestreamServiceClient/create_channel.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@
3939
* `projects/{project}/locations/{location}`. Please see
4040
* {@see LivestreamServiceClient::locationName()} for help formatting this field.
4141
* @param string $channelId The ID of the channel resource to be created.
42-
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
43-
* could contain dashes (-) in between.
42+
*
43+
* This value must be 1-63 characters, begin and end with a lower-case letter
44+
* or a number, and consist of only lower-case letters, numbers, and hyphens.
45+
* In other words, it must match the following regex:
46+
* `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
4447
*/
4548
function create_channel_sample(string $formattedParent, string $channelId): void
4649
{

VideoLiveStream/samples/V1/LivestreamServiceClient/create_clip.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@
3737
* @param string $formattedParent The parent resource name, in the following form:
3838
* `projects/{project}/locations/{location}/channels/{channel}`. Please see
3939
* {@see LivestreamServiceClient::channelName()} for help formatting this field.
40-
* @param string $clipId Id of the requesting object in the following form:
40+
* @param string $clipId The ID of the clip resource to be created.
4141
*
42-
* 1. 1 character minimum, 63 characters maximum
43-
* 2. Only contains letters, digits, underscores, and hyphens
42+
* This value must be 1-63 characters, begin and end with a lower-case letter
43+
* or a number, and consist of only lower-case letters, numbers, and hyphens.
44+
* In other words, it must match the following regex:
45+
* `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
4446
* @param string $clipClipManifestsManifestKey A unique key that identifies a manifest config in the parent
4547
* channel. This key is the same as `channel.manifests.key` for the selected
4648
* manifest.

VideoLiveStream/samples/V1/LivestreamServiceClient/create_dvr_session.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@
3838
* @param string $formattedParent The parent resource name, in the following form:
3939
* `projects/{project}/locations/{location}/channels/{channelId}`. Please see
4040
* {@see LivestreamServiceClient::channelName()} for help formatting this field.
41-
* @param string $dvrSessionId Id of the requesting object in the following form:
41+
* @param string $dvrSessionId The ID of the DVR session resource to be created.
4242
*
43-
* 1. 1 character minimum, 63 characters maximum
44-
* 2. Only contains letters, digits, underscores, and hyphens
43+
* This value must be 1-63 characters, begin and end with a lower-case letter
44+
* or a number, and consist of only lower-case letters, numbers, and hyphens.
45+
* In other words, it must match the following regex:
46+
* `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
4547
* @param string $dvrSessionDvrManifestsManifestKey A unique key that identifies a manifest config in the parent
4648
* channel. This key is the same as `channel.manifests.key` for the selected
4749
* manifest.

VideoLiveStream/samples/V1/LivestreamServiceClient/create_event.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
* `projects/{project}/locations/{location}/channels/{channelId}`. Please see
3636
* {@see LivestreamServiceClient::channelName()} for help formatting this field.
3737
* @param string $eventId The ID of the event resource to be created.
38-
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
39-
* could contain dashes (-) in between.
38+
*
39+
* This value must be 1-63 characters, begin and end with a lower-case letter
40+
* or a number, and consist of only lower-case letters, numbers, and hyphens.
41+
* In other words, it must match the following regex:
42+
* `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
4043
*/
4144
function create_event_sample(string $formattedParent, string $eventId): void
4245
{

VideoLiveStream/samples/V1/LivestreamServiceClient/create_input.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@
3737
* `projects/{project}/locations/{location}`. Please see
3838
* {@see LivestreamServiceClient::locationName()} for help formatting this field.
3939
* @param string $inputId The ID of the input resource to be created.
40-
* This value must be 1-63 characters, begin and end with `[a-z0-9]`,
41-
* could contain dashes (-) in between.
40+
*
41+
* This value must be 1-63 characters, begin and end with a lower-case letter
42+
* or a number, and consist of only lower-case letters, numbers, and hyphens.
43+
* In other words, it must match the following regex:
44+
* `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
4245
*/
4346
function create_input_sample(string $formattedParent, string $inputId): void
4447
{
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
/*
3+
* Copyright 2025 Google LLC
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/*
19+
* GENERATED CODE WARNING
20+
* This file was automatically generated - do not edit!
21+
*/
22+
23+
require_once __DIR__ . '/../../../vendor/autoload.php';
24+
25+
// [START livestream_v1_generated_LivestreamService_PreviewInput_sync]
26+
use Google\ApiCore\ApiException;
27+
use Google\Cloud\Video\LiveStream\V1\Client\LivestreamServiceClient;
28+
use Google\Cloud\Video\LiveStream\V1\PreviewInputRequest;
29+
use Google\Cloud\Video\LiveStream\V1\PreviewInputResponse;
30+
31+
/**
32+
* Preview the streaming content of the specified input.
33+
*
34+
* @param string $formattedName The name of the input resource, in the form of:
35+
* `projects/{project}/locations/{location}/inputs/{inputId}`. Please see
36+
* {@see LivestreamServiceClient::inputName()} for help formatting this field.
37+
*/
38+
function preview_input_sample(string $formattedName): void
39+
{
40+
// Create a client.
41+
$livestreamServiceClient = new LivestreamServiceClient();
42+
43+
// Prepare the request message.
44+
$request = (new PreviewInputRequest())
45+
->setName($formattedName);
46+
47+
// Call the API and handle any network failures.
48+
try {
49+
/** @var PreviewInputResponse $response */
50+
$response = $livestreamServiceClient->previewInput($request);
51+
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
52+
} catch (ApiException $ex) {
53+
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
54+
}
55+
}
56+
57+
/**
58+
* Helper to execute the sample.
59+
*
60+
* This sample has been automatically generated and should be regarded as a code
61+
* template only. It will require modifications to work:
62+
* - It may require correct/in-range values for request initialization.
63+
* - It may require specifying regional endpoints when creating the service client,
64+
* please see the apiEndpoint client configuration option for more details.
65+
*/
66+
function callSample(): void
67+
{
68+
$formattedName = LivestreamServiceClient::inputName('[PROJECT]', '[LOCATION]', '[INPUT]');
69+
70+
preview_input_sample($formattedName);
71+
}
72+
// [END livestream_v1_generated_LivestreamService_PreviewInput_sync]

0 commit comments

Comments
 (0)