feat: Added more filters, including crop.

This commit is contained in:
Spencer Brower
2024-01-21 23:10:37 -05:00
parent 2686c545a3
commit 25a3868dca
4 changed files with 127 additions and 31 deletions

View File

@@ -90,6 +90,14 @@ def can_convert_filtergraph_to_string [] {
assert equal $got $want;
}
#[test]
def boolean_params_are_converted_to_1_or_0 [] {
let got = (cmd ['INPUT'] ['OUTPUT'] | crop -k | run -d | get 4);
let want = 'crop=w=iw:x=0:y=0:keep_aspect=1:exact=0';
assert equal $got $want;
}
#[test]
def without_filterchain_chains_are_concated [] {
let got = (cmd ['INPUT'] ['OUTPUT'] | fps 25 | loop 2 1);
@@ -102,18 +110,18 @@ def without_filterchain_chains_are_concated [] {
input: []
name: 'fps'
params: [
{param: 'fps' value: 25}
]
output: []
}
{
input: []
name: 'settb'
params: [
{param: 'expr' value: '1/25'}
{param: 'fps' value: '25'}
]
output: []
}
#{
# input: []
# name: 'settb'
# params: [
# {param: 'expr' value: '1/25'}
# ]
# output: []
#}
]
[{
input: []
@@ -141,18 +149,18 @@ def filterchain_concats_filters [] {
input: ['in']
name: 'fps'
params: [
{param: 'fps' value: 25}
]
output: []
}
{
input: []
name: 'settb'
params: [
{param: 'expr' value: '1/25'}
{param: 'fps' value: '25'}
]
output: []
}
#{
# input: []
# name: 'settb'
# params: [
# {param: 'expr' value: '1/25'}
# ]
# output: []
#}
{
input: []
name: 'loop'