Skip to content

Commit 9160740

Browse files
authored
fix(deps): update dependency google/cloud-video-stitcher to v1 (#2027)
1 parent 7e1361f commit 9160740

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

media/videostitcher/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "google/video-stitcher-sample",
33
"type": "project",
44
"require": {
5-
"google/cloud-video-stitcher": "^0.9.0"
5+
"google/cloud-video-stitcher": "^1.0.0"
66
}
77
}

media/videostitcher/test/videoStitcherTest.php

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@
2121

2222
use Google\Cloud\TestUtils\EventuallyConsistentTestTrait;
2323
use Google\Cloud\TestUtils\TestTrait;
24-
use Google\Cloud\Video\Stitcher\V1\VideoStitcherServiceClient;
24+
use Google\Cloud\Video\Stitcher\V1\Client\VideoStitcherServiceClient;
25+
use Google\Cloud\Video\Stitcher\V1\DeleteCdnKeyRequest;
26+
use Google\Cloud\Video\Stitcher\V1\DeleteLiveConfigRequest;
27+
use Google\Cloud\Video\Stitcher\V1\DeleteSlateRequest;
28+
use Google\Cloud\Video\Stitcher\V1\GetLiveSessionRequest;
29+
use Google\Cloud\Video\Stitcher\V1\ListCdnKeysRequest;
30+
use Google\Cloud\Video\Stitcher\V1\ListLiveConfigsRequest;
31+
use Google\Cloud\Video\Stitcher\V1\ListSlatesRequest;
2532
use PHPUnit\Framework\TestCase;
2633

2734
/**
@@ -577,7 +584,9 @@ public function testListLiveAdTagDetails()
577584

578585
$stitcherClient = new VideoStitcherServiceClient();
579586
$formattedName = $stitcherClient->liveSessionName(self::$projectId, self::$location, self::$liveSessionId);
580-
$session = $stitcherClient->getLiveSession($formattedName);
587+
$getLiveSessionRequest = (new GetLiveSessionRequest())
588+
->setName($formattedName);
589+
$session = $stitcherClient->getLiveSession($getLiveSessionRequest);
581590
$playUri = $session->getPlayUri();
582591

583592
$manifest = file_get_contents($playUri);
@@ -621,7 +630,9 @@ private static function deleteOldSlates(): void
621630
{
622631
$stitcherClient = new VideoStitcherServiceClient();
623632
$parent = $stitcherClient->locationName(self::$projectId, self::$location);
624-
$response = $stitcherClient->listSlates($parent);
633+
$listSlatesRequest = (new ListSlatesRequest())
634+
->setParent($parent);
635+
$response = $stitcherClient->listSlates($listSlatesRequest);
625636
$slates = $response->iterateAllElements();
626637

627638
$currentTime = time();
@@ -634,7 +645,9 @@ private static function deleteOldSlates(): void
634645
$timestamp = intval(end($tmp));
635646

636647
if ($currentTime - $timestamp >= $oneHourInSecs) {
637-
$stitcherClient->deleteSlate($slate->getName());
648+
$deleteSlateRequest = (new DeleteSlateRequest())
649+
->setName($slate->getName());
650+
$stitcherClient->deleteSlate($deleteSlateRequest);
638651
}
639652
}
640653
}
@@ -643,7 +656,9 @@ private static function deleteOldCdnKeys(): void
643656
{
644657
$stitcherClient = new VideoStitcherServiceClient();
645658
$parent = $stitcherClient->locationName(self::$projectId, self::$location);
646-
$response = $stitcherClient->listCdnKeys($parent);
659+
$listCdnKeysRequest = (new ListCdnKeysRequest())
660+
->setParent($parent);
661+
$response = $stitcherClient->listCdnKeys($listCdnKeysRequest);
647662
$keys = $response->iterateAllElements();
648663

649664
$currentTime = time();
@@ -656,7 +671,9 @@ private static function deleteOldCdnKeys(): void
656671
$timestamp = intval(end($tmp));
657672

658673
if ($currentTime - $timestamp >= $oneHourInSecs) {
659-
$stitcherClient->deleteCdnKey($key->getName());
674+
$deleteCdnKeyRequest = (new DeleteCdnKeyRequest())
675+
->setName($key->getName());
676+
$stitcherClient->deleteCdnKey($deleteCdnKeyRequest);
660677
}
661678
}
662679
}
@@ -665,7 +682,9 @@ private static function deleteOldLiveConfigs(): void
665682
{
666683
$stitcherClient = new VideoStitcherServiceClient();
667684
$parent = $stitcherClient->locationName(self::$projectId, self::$location);
668-
$response = $stitcherClient->listLiveConfigs($parent);
685+
$listLiveConfigsRequest = (new ListLiveConfigsRequest())
686+
->setParent($parent);
687+
$response = $stitcherClient->listLiveConfigs($listLiveConfigsRequest);
669688
$liveConfigs = $response->iterateAllElements();
670689

671690
$currentTime = time();
@@ -678,7 +697,9 @@ private static function deleteOldLiveConfigs(): void
678697
$timestamp = intval(end($tmp));
679698

680699
if ($currentTime - $timestamp >= $oneHourInSecs) {
681-
$stitcherClient->deleteLiveConfig($liveConfig->getName());
700+
$deleteLiveConfigRequest = (new DeleteLiveConfigRequest())
701+
->setName($liveConfig->getName());
702+
$stitcherClient->deleteLiveConfig($deleteLiveConfigRequest);
682703
}
683704
}
684705
}

0 commit comments

Comments
 (0)