Loading Core/Media/Video/Transcoder/TranscodeStates.php +6 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class TranscodeStates 'guid' => $video->getGuid(), ]); $total = 0; $created = 0; $failures = 0; $completed = 0; Loading @@ -48,6 +49,7 @@ class TranscodeStates if ($transcode instanceof TranscodeProfiles\Thumbnails) { continue; // We skip thumbnails as these are likely to succeed } ++$total; switch ($transcode->getStatus()) { case TranscodeStates::TRANSCODING: if ($transcode->getLastEventTimestampMs() >= (time() - Manager::TRANSCODER_TIMEOUT_SECS) * 1000) { Loading Loading @@ -75,6 +77,10 @@ class TranscodeStates return TranscodeStates::CREATED; } if ($total < ($completed + $failures)) { return TranscodeStates::CREATED; } // If we have more completions then failures the declare completed if ($failures < $completed) { return TranscodeStates::COMPLETED; Loading Loading
Core/Media/Video/Transcoder/TranscodeStates.php +6 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ class TranscodeStates 'guid' => $video->getGuid(), ]); $total = 0; $created = 0; $failures = 0; $completed = 0; Loading @@ -48,6 +49,7 @@ class TranscodeStates if ($transcode instanceof TranscodeProfiles\Thumbnails) { continue; // We skip thumbnails as these are likely to succeed } ++$total; switch ($transcode->getStatus()) { case TranscodeStates::TRANSCODING: if ($transcode->getLastEventTimestampMs() >= (time() - Manager::TRANSCODER_TIMEOUT_SECS) * 1000) { Loading Loading @@ -75,6 +77,10 @@ class TranscodeStates return TranscodeStates::CREATED; } if ($total < ($completed + $failures)) { return TranscodeStates::CREATED; } // If we have more completions then failures the declare completed if ($failures < $completed) { return TranscodeStates::COMPLETED; Loading