-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Expand file tree
/
Copy pathSynchronousProviderOptions.php
More file actions
61 lines (54 loc) · 1.68 KB
/
Copy pathSynchronousProviderOptions.php
File metadata and controls
61 lines (54 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\TaskProcessing;
/**
* @since 35.0.0
*/
class SynchronousProviderOptions {
private \Closure $reportIntermediateOutput;
/**
* @param bool $includeWatermarks Whether to include the watermark in the media output files or not
* @param bool $preferStreaming Whether to prefer streaming the output or not
* @param null|callable $reportIntermediateOutput Callback for the provider to report the intermediate output (streaming)
* @return void
* @since 35.0.0
*/
public function __construct(
private readonly bool $includeWatermarks = false,
private readonly bool $preferStreaming = false,
?callable $reportIntermediateOutput = null,
) {
$this->reportIntermediateOutput = $reportIntermediateOutput !== null
? \Closure::fromCallable($reportIntermediateOutput)
: static function (array $output): bool {
return true;
};
}
/**
* Get the includeWatermarks option value
* @return bool Whether to include the watermark in the media output files or not
* @since 35.0.0
*/
public function getIncludeWatermarks(): bool {
return $this->includeWatermarks;
}
/**
* Get the preferStreaming option value
* @return bool Whether to prefer streaming the output or not
* @since 35.0.0
*/
public function getPreferStreaming(): bool {
return $this->preferStreaming;
}
/**
* Get the reportOutput option value
* @return callable Callback for the provider to report the intermediate output (streaming)
* @since 35.0.0
*/
public function getReportIntermediateOutput(): callable {
return $this->reportIntermediateOutput;
}
}