1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Soluble\MediaTools\Video; |
||
6 | |||
7 | use Soluble\MediaTools\Common\Service\ActionParamInterface; |
||
8 | use Soluble\MediaTools\Video\Exception\InvalidArgumentException; |
||
9 | |||
10 | interface ConversionParamsInterface extends ActionParamInterface |
||
11 | { |
||
12 | public const PARAM_VIDEO_CODEC = 'VIDEO_CODEC'; |
||
13 | public const PARAM_VIDEO_BITRATE = 'VIDEO_BITRATE'; |
||
14 | public const PARAM_VIDEO_MIN_BITRATE = 'VIDEO_MIN_BITRATE'; |
||
15 | public const PARAM_VIDEO_MAX_BITRATE = 'VIDEO_MAX_BITRATE'; |
||
16 | public const PARAM_VIDEO_QUALITY_SCALE = 'VIDEO_QUALITY_SCALE'; |
||
17 | public const PARAM_VIDEO_FILTER = 'VIDEO_FILTER'; |
||
18 | public const PARAM_AUDIO_CODEC = 'AUDIO_CODEC'; |
||
19 | public const PARAM_AUDIO_BITRATE = 'AUDIO_BITRATE'; |
||
20 | public const PARAM_CRF = 'CRF'; |
||
21 | public const PARAM_PIX_FMT = 'PIX_FMT'; |
||
22 | public const PARAM_PRESET = 'PRESET'; |
||
23 | public const PARAM_TUNE = 'TUNE'; |
||
24 | public const PARAM_STREAMABLE = 'STREAMABLE'; |
||
25 | public const PARAM_QUALITY = 'QUALITY'; |
||
26 | public const PARAM_FRAME_PARALLEL = 'FRAME_PARALLEL'; |
||
27 | public const PARAM_TILE_COLUMNS = 'TILE_COLUMNS'; |
||
28 | |||
29 | public const PARAM_SEEK_START = 'SEEK_START'; |
||
30 | public const PARAM_SEEK_END = 'SEEK_END'; |
||
31 | |||
32 | // Only for vp9 |
||
33 | public const PARAM_SPEED = 'SPEED'; |
||
34 | public const PARAM_THREADS = 'THREADS'; |
||
35 | public const PARAM_KEYFRAME_SPACING = 'KEYFRAME_SPACING'; |
||
36 | |||
37 | // File Options |
||
38 | public const PARAM_OVERWRITE = 'OVERWRITE'; |
||
39 | |||
40 | public const PARAM_NOAUDIO = 'NOAUDIO'; |
||
0 ignored issues
–
show
|
|||
41 | public const PARAM_VIDEO_FRAMES = 'VIDEO_FRAMES'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 8 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
42 | public const PARAM_OUTPUT_FORMAT = 'OUTPUT_FORMAT'; |
||
0 ignored issues
–
show
Equals sign not aligned with surrounding assignments; expected 1 space but found 7 spaces
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line. To visualize $a = "a";
$ab = "ab";
$abc = "abc";
will produce issues in the first and second line, while this second example $a = "a";
$ab = "ab";
$abc = "abc";
will produce no issues. ![]() |
|||
43 | |||
44 | /** |
||
45 | * Built-in params. |
||
46 | * |
||
47 | * @var string[] |
||
48 | */ |
||
49 | public const BUILTIN_PARAMS = [ |
||
50 | self::PARAM_VIDEO_QUALITY_SCALE, |
||
51 | self::PARAM_VIDEO_CODEC, |
||
52 | self::PARAM_VIDEO_BITRATE, |
||
53 | self::PARAM_VIDEO_MIN_BITRATE, |
||
54 | self::PARAM_VIDEO_MAX_BITRATE, |
||
55 | self::PARAM_VIDEO_FILTER, |
||
56 | self::PARAM_AUDIO_CODEC, |
||
57 | self::PARAM_AUDIO_BITRATE, |
||
58 | self::PARAM_CRF, |
||
59 | self::PARAM_PIX_FMT, |
||
60 | self::PARAM_PRESET, |
||
61 | self::PARAM_TUNE, |
||
62 | self::PARAM_STREAMABLE, |
||
63 | self::PARAM_QUALITY, |
||
64 | self::PARAM_OUTPUT_FORMAT, |
||
65 | self::PARAM_FRAME_PARALLEL, |
||
66 | self::PARAM_TILE_COLUMNS, |
||
67 | self::PARAM_THREADS, |
||
68 | self::PARAM_SPEED, |
||
69 | self::PARAM_KEYFRAME_SPACING, |
||
70 | self::PARAM_OVERWRITE, |
||
71 | self::PARAM_NOAUDIO, |
||
72 | self::PARAM_VIDEO_FRAMES, |
||
73 | self::PARAM_SEEK_START, |
||
74 | self::PARAM_SEEK_END, |
||
75 | ]; |
||
76 | |||
77 | /** |
||
78 | * Set a built-in param... |
||
79 | * |
||
80 | * @param string $paramName a param that must exist in builtInParams |
||
81 | * @param mixed $paramValue |
||
82 | * |
||
83 | * @throws InvalidArgumentException in case of unsupported builtin param |
||
84 | */ |
||
85 | public function withBuiltInParam(string $paramName, $paramValue): self; |
||
86 | } |
||
87 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.