1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Frame rate patterns.
#
# ARCHITECTURE NOTE (v0.2):
# Most fps patterns are handled here using exact lookups and
# capture-group templates ({N} syntax).
# The legacy frame_rate.rs matcher is kept only for:
# - Decimal fps values (29.97fps, 23.976fps) with rounding
# - Resolution-attached rates (1080p25) requiring screen_size context
= "frame_rate"
# ── Exact fps token matches (case-insensitive) ─────────────────────────
[]
# Explicit fps suffix
= "24fps"
= "25fps"
= "30fps"
= "48fps"
= "50fps"
= "60fps"
= "120fps"
= "23fps"
= "29fps"
= "59fps"
= "90fps"
= "240fps"
# Broadcast p-suffix (standalone: 24p, 25p, 50p, 60p)
# Only valid when unambiguous (e.g., not 720p which is a screen size).
# The tokenizer will claim 720p / 1080p as ScreenSize first, so
# these p-suffix tokens only appear here when they’re standalone fps markers.
= "24fps"
= "25fps"
= "30fps"
= "48fps"
= "50fps"
= "60fps"
# ── Dynamic patterns using capture-group templates ─────────────────────
[[]]
# Integer fps with suffix: 15fps, 120fps, etc. (any value not in exact table)
= '(?i)^(\d{2,3})\s*fps$'
= "{1}fps"
[[]]
# Decimal fps with suffix: 29.97fps, 23.976fps, etc.
# Tokenizer splits on `.`, so this matches via 2-token window: "29" + "97fps" → "29.97fps"
= '(?i)^(\d+\.\d+)\s*fps$'
= "{1}fps"
[[]]
# Resolution-attached fps: 1080p25, 720p50, 2160p24, etc.
# Valid rates only — prevents false positives from bare resolution tokens.
= '(?i)^(?:1080|720|1440|2160)[pi](23|24|25|29|30|48|50|59|60|120)$'
= "{1}fps"