Skip to content

Commit

Permalink
Function cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
spacebanana420 committed Jun 22, 2024
1 parent b51ba37 commit 3a367d1
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/capture/record.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,10 @@ import ffscala.misc.*
def record(
output: String, captureargs: List[String], args: List[String] = List(), filters: List[String] = List(),
hwaccel: String = "", quiet: Boolean = true, exec: String = "ffmpeg"): Int =
val filterlist = processFilters(filters)
val filters_v =
if filterlist(0).length > 0 then
List("-filter:v", filterlist(0))
else
List()
val filters_a =
if filterlist(1).length > 0 then
List("-filter:a", filterlist(1))
else
List()
val nonfilters = getNonFilters(filters)
val filter_args = mkFilterArgs(filters)
val base = getBaseArgs_hw(exec, quiet, hwaccel)
try
val cmd: List[String] = base ::: captureargs ::: args ::: filters_v ::: filters_a ::: nonfilters ::: List(output)
val cmd: List[String] = base ::: captureargs ::: args ::: filter_args ::: List(output)
cmd.!<
catch
case e: Exception => -1
Expand Down

0 comments on commit 3a367d1

Please sign in to comment.