Skip to content

Commit

Permalink
update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemia committed Mar 14, 2024
1 parent 74efae5 commit 2c03d40
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 185 deletions.
55 changes: 44 additions & 11 deletions src/ffmpeg/common/tests/__snapshots__/test_serialize.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@
],
"name": "trim",
"input_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
],
"output_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
]
},
"index": 0
Expand Down Expand Up @@ -148,10 +154,16 @@
],
"name": "trim",
"input_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
],
"output_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
]
},
"index": 0
Expand Down Expand Up @@ -196,33 +208,54 @@
],
"name": "hflip",
"input_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
],
"output_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
]
},
"index": 0
}
],
"name": "overlay",
"input_typings": [
"video",
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
},
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
],
"output_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
]
},
"index": 0
}
],
"name": "drawbox",
"input_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
],
"output_typings": [
"video"
{
"__class__": "ffmpeg.common.schema.StreamType",
"value": "video"
}
]
},
"index": 0
Expand Down
4 changes: 2 additions & 2 deletions src/ffmpeg/dag/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ def filter_node_factory(filter: FFMpegFilterDef, *inputs: FilterableStream, **kw
if isinstance(filter.typings_input, str):
input_typings = tuple(eval(filter.typings_input, {"StreamType": StreamType, "re": re, **kwargs}))
else:
input_typings = filter.typings_input
input_typings = tuple(StreamType.video if k == "video" else StreamType.audio for k in filter.typings_input)

if isinstance(filter.typings_output, str):
output_typings = tuple(eval(filter.typings_output, {"StreamType": StreamType, "re": re, **kwargs}))
else:
output_typings = filter.typings_output
output_typings = tuple(StreamType.video if k == "video" else StreamType.audio for k in filter.typings_output)

return FilterNode(
name=filter.name,
Expand Down
Loading

0 comments on commit 2c03d40

Please sign in to comment.