This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffplay.exe -hide_banner -i "udp://192.168.1.123:5004" -analyzeduration 6M -probesize 32M -fflags nobuffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defp split_lf_aware(str, 0, "", line), do: { line, to_string(str) } | |
defp split_lf_aware(str, 0, acc, line), do: { acc, line <> to_string(str) } | |
defp split_lf_aware("", _, acc, line), do: { acc + line, "" } | |
defp split_lf_aware("\n" <> str, pos, acc, line) do | |
split_lf_aware(str, pos-1, acc <> line <> "\n", "") | |
end | |
defp split_lf_aware(<<chr :: utf8>> <> str, pos, acc, line) do | |
split_lf_aware(str, pos-1, acc, line <> <<chr :: utf8>>) |