Summary: Between two MacOS computers, one with an Intel CPU and one with an M1 CPU the same deck will return different results to avfctl that fails a regular expression check in vrecord and Resources/vrecord_functions which then fails to display any AV decks in the user interface. (Note: The CPU model may be irrelevant, but I'm pointing out that there are differences from how avfctl reports attached devices)
Line 598 of vrecord has a command pipeline with a regular expression grep -o "\[[0-9]\].*" which assumes the M1 style of output. The Intel output fails the regular expression and returns nothing to vrecord and no decks are listed.
A better solution is to use grep -v and sed to remove the parts of the output we don't want. Updating Line 598 with the following solves the problem:
Second problem: This same command is duplicated in the function Resources/vrecord_functions:_get_avfctl_input_list(). The vrecord main script should be using this, instead of repeating the commands. If it's not possible to refactor the code, then replace the same faulty grep with sed from above.
Summary: Between two MacOS computers, one with an Intel CPU and one with an M1 CPU the same deck will return different results to
avfctl
that fails a regular expression check invrecord
andResources/vrecord_functions
which then fails to display any AV decks in the user interface. (Note: The CPU model may be irrelevant, but I'm pointing out that there are differences from howavfctl
reports attached devices)On the M1 machine, we have:
On the Intel, the same deck is displayed differently.
avfctl
is the same version on both computers.Line 598 of vrecord has a command pipeline with a regular expression
grep -o "\[[0-9]\].*"
which assumes the M1 style of output. The Intel output fails the regular expression and returns nothing tovrecord
and no decks are listed.A better solution is to use
grep -v
andsed
to remove the parts of the output we don't want. Updating Line 598 with the following solves the problem:Second problem: This same command is duplicated in the function
Resources/vrecord_functions:_get_avfctl_input_list()
. Thevrecord
main script should be using this, instead of repeating the commands. If it's not possible to refactor the code, then replace the same faultygrep
withsed
from above.This pull request addresses both.