Skip to content

Commit

Permalink
Fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Dec 30, 2022
1 parent fce413b commit 676986e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frigate/ffmpeg_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,15 @@
],
}


def parse_preset_hardware_acceleration_decode(arg: Any) -> list[str]:
"""Return the correct preset if in preset format otherwise return None."""
if not isinstance(arg, str):
return None

return PRESETS_HW_ACCEL_DECODE.get(arg, None)


def parse_preset_hardware_acceleration_scale(
arg: Any,
detect_args: list[str],
Expand All @@ -256,13 +258,15 @@ def parse_preset_hardware_acceleration_scale(
scale[1] = scale[1].format(fps, width, height)
return scale


def parse_preset_hardware_acceleration_encode(arg: Any) -> list[str]:
"""Return the correct scaling preset or default preset if none is set."""
if not isinstance(arg, str):
return PRESETS_HW_ACCEL_ENCODE["default"]

return PRESETS_HW_ACCEL_ENCODE.get(arg, PRESETS_HW_ACCEL_ENCODE["default"])


PRESETS_INPUT = {
"preset-http-jpeg-generic": _user_agent_args
+ [
Expand Down

0 comments on commit 676986e

Please sign in to comment.