typed-ffmpeg-compatible 2.7.0__py3-none-any.whl → 2.7.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- typed_ffmpeg/common/schema.py +1 -1
- typed_ffmpeg/dag/factory.py +25 -4
- {typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/METADATA +1 -1
- {typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/RECORD +7 -7
- {typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/LICENSE +0 -0
- {typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/WHEEL +0 -0
- {typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/entry_points.txt +0 -0
typed_ffmpeg/common/schema.py
CHANGED
typed_ffmpeg/dag/factory.py
CHANGED
@@ -15,6 +15,27 @@ from ..utils.run import ignore_default
|
|
15
15
|
from .nodes import FilterableStream, FilterNode
|
16
16
|
|
17
17
|
|
18
|
+
def eval_formula(formula: str, **kwargs: Any) -> list[StreamType]:
|
19
|
+
"""
|
20
|
+
Evaluate a formula string with the given parameters.
|
21
|
+
|
22
|
+
This function evaluates a formula string using the provided parameters.
|
23
|
+
It supports basic arithmetic operations and conditional logic.
|
24
|
+
|
25
|
+
Args:
|
26
|
+
formula: The formula string to evaluate
|
27
|
+
**kwargs: Additional keyword arguments to pass to the formula
|
28
|
+
|
29
|
+
Returns:
|
30
|
+
The result of the formula evaluation
|
31
|
+
"""
|
32
|
+
# Convert formula to Python code
|
33
|
+
return eval(
|
34
|
+
formula,
|
35
|
+
{"StreamType": StreamType, "re": re, **kwargs},
|
36
|
+
)
|
37
|
+
|
38
|
+
|
18
39
|
def filter_node_factory(
|
19
40
|
ffmpeg_filter_def: FFMpegFilterDef, *inputs: FilterableStream, **kwargs: Any
|
20
41
|
) -> FilterNode:
|
@@ -45,9 +66,9 @@ def filter_node_factory(
|
|
45
66
|
|
46
67
|
if isinstance(ffmpeg_filter_def.typings_input, str):
|
47
68
|
input_typings = tuple(
|
48
|
-
|
69
|
+
eval_formula(
|
49
70
|
ffmpeg_filter_def.typings_input,
|
50
|
-
|
71
|
+
**kwargs,
|
51
72
|
)
|
52
73
|
)
|
53
74
|
else:
|
@@ -58,9 +79,9 @@ def filter_node_factory(
|
|
58
79
|
|
59
80
|
if isinstance(ffmpeg_filter_def.typings_output, str):
|
60
81
|
output_typings = tuple(
|
61
|
-
|
82
|
+
eval_formula(
|
62
83
|
ffmpeg_filter_def.typings_output,
|
63
|
-
|
84
|
+
**kwargs,
|
64
85
|
)
|
65
86
|
)
|
66
87
|
else:
|
{typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: typed-ffmpeg-compatible
|
3
|
-
Version: 2.7.
|
3
|
+
Version: 2.7.3
|
4
4
|
Summary: Modern Python FFmpeg wrappers offer comprehensive support for complex filters, complete with detailed typing and documentation.
|
5
5
|
Home-page: https://livingbio.github.io/typed-ffmpeg/
|
6
6
|
License: MIT
|
@@ -1,12 +1,12 @@
|
|
1
1
|
typed_ffmpeg/__init__.py,sha256=NL_jH6nUb5pF8pMt3S51243qBTUvZdN-9sJpeuiznRE,1532
|
2
2
|
typed_ffmpeg/base.py,sha256=C5Tqbx2I0c-09D7aXKZoGkspu-lAAeAhuOns5zr3PXQ,6304
|
3
3
|
typed_ffmpeg/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
typed_ffmpeg/common/schema.py,sha256=
|
4
|
+
typed_ffmpeg/common/schema.py,sha256=Gfq_C8T4F0Ie6E9vzmWMn-mzjN0tOfTK0mKHugW5vEs,19547
|
5
5
|
typed_ffmpeg/common/serialize.py,sha256=QH7UVPCXAHrqbAMK11DzFfy03XgFEHXWOrCVUJxBxR0,7764
|
6
6
|
typed_ffmpeg/dag/__init__.py,sha256=qAApSNqjbZ1DtUaV5bSku9RwG7MpMPa1HJO764cSBt4,849
|
7
7
|
typed_ffmpeg/dag/compile.py,sha256=GXMTFE1vqRDI-nuIZPtJwXQhCc61uCIGh5u4OBRp8gg,3129
|
8
8
|
typed_ffmpeg/dag/context.py,sha256=pv77lltW6yk-PRYlZ0MC6FICVxYLuyxQAS9Vx5vko0s,11691
|
9
|
-
typed_ffmpeg/dag/factory.py,sha256=
|
9
|
+
typed_ffmpeg/dag/factory.py,sha256=2IMVKP_2UaTrlGXBg8YDx5KXBqhpScJiJQ87PRrppzY,3147
|
10
10
|
typed_ffmpeg/dag/global_runnable/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
typed_ffmpeg/dag/global_runnable/global_args.py,sha256=ehLtx4v-XxqkmODhpE_gik0r79hs4Sa8TJnRsH9Fj1o,8043
|
12
12
|
typed_ffmpeg/dag/global_runnable/runnable.py,sha256=wvfvojrLFvu-Vz0N2AIXbla2kptwcu0Dba4TfKYOH3I,11041
|
@@ -41,8 +41,8 @@ typed_ffmpeg/utils/run.py,sha256=mSoAdcvD-InldqkRgWNc8iXKgJJoEMAOE4PL2gVmtqw,217
|
|
41
41
|
typed_ffmpeg/utils/snapshot.py,sha256=mKILRm6qiQV2egaD-70MSUEl-DFoLD5w_v9GZIequI4,2181
|
42
42
|
typed_ffmpeg/utils/typing.py,sha256=DBQn_gCF8C_DTwsfMHeCgfnNUROwAjlIcHrQ7lNDOoE,1187
|
43
43
|
typed_ffmpeg/utils/view.py,sha256=4DJmyGIkUeE6-V0azudDCWm608mRdeRhTZHMgnew9Kw,3409
|
44
|
-
typed_ffmpeg_compatible-2.7.
|
45
|
-
typed_ffmpeg_compatible-2.7.
|
46
|
-
typed_ffmpeg_compatible-2.7.
|
47
|
-
typed_ffmpeg_compatible-2.7.
|
48
|
-
typed_ffmpeg_compatible-2.7.
|
44
|
+
typed_ffmpeg_compatible-2.7.3.dist-info/LICENSE,sha256=8Aaya5i_09Cou2i3QMxTwz6uHGzi_fGA4uhkco07-A4,1066
|
45
|
+
typed_ffmpeg_compatible-2.7.3.dist-info/METADATA,sha256=95rIej_AdoZU92K9-9OJMVJo-mv0M7IcaBTqJMzXpZE,7249
|
46
|
+
typed_ffmpeg_compatible-2.7.3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
47
|
+
typed_ffmpeg_compatible-2.7.3.dist-info/entry_points.txt,sha256=KfZmNsM16GT_lF1otASIN6E3i6xXHXoB1gMeEdlptjA,44
|
48
|
+
typed_ffmpeg_compatible-2.7.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{typed_ffmpeg_compatible-2.7.0.dist-info → typed_ffmpeg_compatible-2.7.3.dist-info}/entry_points.txt
RENAMED
File without changes
|