You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove dead code: unused functions, deprecated options, and unreachable code
- Remove unused extract_camera_model() from gpmf_parser.py and
blackvue_parser.py (superseded by extract_gopro_info() and
extract_blackvue_info())
- Remove deprecated --video_sample_interval and --video_duration_ratio
CLI options (deprecated since v0.10.0), along with the
_sample_single_video_by_interval() function, xor() helper, and
related constants
- Remove dead rich logging code path in utils.py (unconditional
raise ImportError made it unreachable)
- Remove deprecated MAPMetaTags field from types.py, schema, and
JSON schema (deprecated since v0.10.0, never set in production)
- Remove commented-out ffmpeg options from ffmpeg.py
- Update tests to reflect removed features
help="[DEPRECATED since v0.10.0] Time interval, in seconds, for sampling video frames. Since v0.10.0 you must disable distance-sampling with --video_sample_distance=-1 in order to apply this option. [default: %(default)s]",
31
-
default=constants.VIDEO_SAMPLE_INTERVAL,
32
-
type=float,
33
-
required=False,
34
-
)
35
-
group.add_argument(
36
-
"--video_duration_ratio",
37
-
help="[DEPRECATED since v0.10.0] Real time video duration ratio of the under or oversampled video duration. [default: %(default)s]",
38
-
type=float,
39
-
default=constants.VIDEO_DURATION_RATIO,
40
-
required=False,
41
-
)
42
28
group.add_argument(
43
29
"--video_start_time",
44
30
help="Video start time specified in YYYY_MM_DD_HH_MM_SS_sss in UTC. For example 2020_12_28_12_36_36_508 represents 2020-12-28T12:36:36.508Z.",
f"Expect either non-negative video_sample_distance or positive video_sample_interval but got {video_sample_distance} and {video_sample_interval} respectively"
61
+
f"Expect non-negative video_sample_distance but got {video_sample_distance}"
69
62
)
70
63
71
64
video_start_time_dt: datetime.datetime|None=None
@@ -106,24 +99,12 @@ def sample_video(
106
99
continue
107
100
108
101
try:
109
-
if0<=video_sample_distance:
110
-
_sample_single_video_by_distance(
111
-
video_path,
112
-
sample_dir,
113
-
sample_distance=video_sample_distance,
114
-
start_time=video_start_time_dt,
115
-
)
116
-
else:
117
-
assert0<video_sample_interval, (
118
-
"expect positive video_sample_interval but got {video_sample_interval}"
0 commit comments