class VideoWorker extends BaseWorker

Constants

VIDEO_QUALITY_HD

VIDEO_QUALITY_SD

Properties

SystemWorkerController $mod from  BaseWorker

Methods

__construct(SystemWorkerController $mod)

No description

bool
downloadConvertedVideo(string $fileDownloadPath, string $quality)

No description

bool
downloadSubtitles(string $fileDownloadPath, string $fileId)

No description

array|null
encodeVideo()

No description

array
generatePreviewImages(string $destinationFolder)

No description

Base
getApiClient()

No description

string|null
getApiHost()

No description

array|null
getCallbackCheckResult(string $callbackUri, string|null $bearerToken = null)

Sends a request containing the callback URI in order to test, whether the callback can be called from the worker back to XELOS.

static string
getIconClass()

No description

int|null
getLocalPackageMaxLength()

Fetches the package max length from the environment variables (most likely the Docker environment) and calculates the length according to the unit.

string
getName()

No description

array
getVideoMetadata(string|null $quality = null)

No description

string
getWorkerID()

No description

int
getWorkerPackageMaxLength()

Fetches the package_max_length setting from the video worker instance used for comparison with the local setting.

array
getWorkerRequestLog()

Returns the logs of worker requests.

array
getWorkerStats()

Retrieve current worker stats Currently this is primarily based upon Openswoole (see https://openswoole.com/docs/modules/swoole-server-stats )

bool
isWorkerAvailable()

Can we connect to the worker service / container?

bool
savePreviewImage(string $saveTargetFile)

No description

array|null
setCallbackParams(string $callbackUri, string|null $bearerToken = null)

No description

string|null
uploadVideoFile(string $pathToVideoFile)

No description

Details

in BaseWorker at line 15
__construct(SystemWorkerController $mod)

No description

Parameters

SystemWorkerController $mod

in BaseWorker at line 81
BaseWorker applyXELOSConfigurationParameters()

No description

Return Value

BaseWorker

at line 139
bool downloadConvertedVideo(string $fileDownloadPath, string $quality)

No description

Parameters

string $fileDownloadPath
string $quality

Return Value

bool

Exceptions

WorkerException

at line 146
bool downloadSubtitles(string $fileDownloadPath, string $fileId)

No description

Parameters

string $fileDownloadPath
string $fileId

Return Value

bool

Exceptions

WorkerException

at line 104
array|null encodeVideo()

No description

Return Value

array|null

Exceptions

WorkerException

at line 122
array generatePreviewImages(string $destinationFolder)

No description

Parameters

string $destinationFolder

Return Value

array

Exceptions

WorkerException

at line 160
Base getApiClient()

No description

Return Value

Base

in BaseWorker at line 27
string|null getApiHost()

No description

Return Value

string|null

in BaseWorker at line 143
array|null getCallbackCheckResult(string $callbackUri, string|null $bearerToken = null)

Sends a request containing the callback URI in order to test, whether the callback can be called from the worker back to XELOS.

Parameters

string $callbackUri
string|null $bearerToken

Return Value

array|null

at line 167
static string getIconClass()

No description

Return Value

string

in BaseWorker at line 128
protected int|null getLocalPackageMaxLength()

Fetches the package max length from the environment variables (most likely the Docker environment) and calculates the length according to the unit.

Return Value

int|null

in BaseWorker at line 70
string getName()

No description

Return Value

string

at line 54
array getVideoMetadata(string|null $quality = null)

No description

Parameters

string|null $quality

Return Value

array

Exceptions

WorkerException

in BaseWorker at line 19
string getWorkerID()

No description

Return Value

string

in BaseWorker at line 115
protected int getWorkerPackageMaxLength()

Fetches the package_max_length setting from the video worker instance used for comparison with the local setting.

Return Value

int

0 If the variable is not set. Otherwise the variable's value.

in BaseWorker at line 157
array getWorkerRequestLog()

Returns the logs of worker requests.

Return Value

array

in BaseWorker at line 57
array getWorkerStats()

Retrieve current worker stats Currently this is primarily based upon Openswoole (see https://openswoole.com/docs/modules/swoole-server-stats )

Return Value

array

[ 'up' => 1|0, 'version' => 'OpenSwoole-22.0.0', 'workers_total' => 12, 'workers_idle' => 11, 'start_time' => 1700464155, 'start_seconds' => 123, 'connections_accepted' => 100, 'connections_active' => 1, 'connections_closed' => 99 ]

in BaseWorker at line 36
bool isWorkerAvailable()

Can we connect to the worker service / container?

Return Value

bool

at line 92
bool savePreviewImage(string $saveTargetFile)

No description

Parameters

string $saveTargetFile

Return Value

bool

Exceptions

WorkerException

at line 153
array|null setCallbackParams(string $callbackUri, string|null $bearerToken = null)

No description

Parameters

string $callbackUri
string|null $bearerToken

Return Value

array|null

Exceptions

WorkerException

at line 69
string|null uploadVideoFile(string $pathToVideoFile)

No description

Parameters

string $pathToVideoFile

Return Value

string|null videoFileRemoteId

Exceptions

WorkerException