From 07b349ed8954ef49d287f8691c6e091af1a63928 Mon Sep 17 00:00:00 2001 From: Skye Ewers Date: Mon, 3 Apr 2023 13:04:02 +0200 Subject: [PATCH 1/5] Fixed google/cloud-storage naming --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bcb58ab..d91f9e3 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "require-dev": { "phpunit/phpunit": "^8.4", "aws/aws-sdk-php": "^3.0@dev", - "google/cloud-storage": "dev-master", + "google/cloud-storage": "dev-main", "microsoft/azure-storage-blob": "dev-master" }, "autoload-dev": { From c225d49e97894e56c53f54bb5cd00099b5464a9a Mon Sep 17 00:00:00 2001 From: Skye Ewers Date: Mon, 3 Apr 2023 13:07:54 +0200 Subject: [PATCH 2/5] Fixed: getIterator() incompatible with Traversable() --- src/RepsCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RepsCollection.php b/src/RepsCollection.php index ada2ef3..11a7990 100644 --- a/src/RepsCollection.php +++ b/src/RepsCollection.php @@ -98,7 +98,7 @@ public function count(): int /** * {@inheritdoc} */ - public function getIterator() + public function getIterator(): \Traversable { return new \ArrayIterator($this->representations); } From a937daca0045bb5f53492436d8066e06378642dc Mon Sep 17 00:00:00 2001 From: Skye Ewers Date: Mon, 3 Apr 2023 15:17:09 +0200 Subject: [PATCH 3/5] Fixed implicit float to int conversion exception --- src/Stream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Stream.php b/src/Stream.php index 5b9e133..d13b55d 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -189,7 +189,7 @@ public function metadata(): Metadata public function __destruct() { // make sure that FFmpeg process has benn terminated - sleep(.5); + sleep(1); File::remove($this->tmp_dir); if ($this->media->isTmp()) { From a8342f6075c54a3277662c99ef125877d234e703 Mon Sep 17 00:00:00 2001 From: Skye Ewers Date: Mon, 3 Apr 2023 15:19:46 +0200 Subject: [PATCH 4/5] Fixed one more issue with Traversable --- src/AutoReps.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AutoReps.php b/src/AutoReps.php index b704928..8340f8a 100644 --- a/src/AutoReps.php +++ b/src/AutoReps.php @@ -16,6 +16,7 @@ use FFMpeg\Format\VideoInterface; use Streaming\Exception\InvalidArgumentException; use Streaming\Exception\RuntimeException; +use Traversable; class AutoReps implements \IteratorAggregate @@ -231,7 +232,7 @@ public function getKBitrate(): array * Retrieve an external iterator reps * @return \Traversable An instance of an object implementing Iterator or Traversable */ - public function getIterator() + public function getIterator(): Traversable { $reps = $this->getCalculatedReps(); array_push($reps, $this->getOriginalRep()); From 298fc267ad05757858283497e11e999dab4f0ebb Mon Sep 17 00:00:00 2001 From: Skye Ewers Date: Mon, 3 Apr 2023 15:20:39 +0200 Subject: [PATCH 5/5] fixes --- src/AutoReps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AutoReps.php b/src/AutoReps.php index 8340f8a..63aa200 100644 --- a/src/AutoReps.php +++ b/src/AutoReps.php @@ -94,7 +94,7 @@ private function getKiloBitRate(): int return intval(($this->original_format->get('bit_rate') / 1024) * .9); } - return (int)$this->video->get('bit_rate') / 1024; + return intval($this->video->get('bit_rate') / 1024); } /**