Change default to no-loop

This commit is contained in:
Ruben van de Ven 2023-10-27 11:47:36 +02:00
parent fd2e8a3b49
commit 1aed4161f6
2 changed files with 5 additions and 5 deletions

View File

@ -194,8 +194,8 @@ frame_emitter_parser.add_argument("--video-src",
default=lambda: list(Path('../DATASETS/VIRAT_subset_0102x/').glob('*.mp4')))
#TODO: camera as source
frame_emitter_parser.add_argument("--video-no-loop",
help="By default it emitter will run indefiniately. This prevents that and plays every video only once.",
frame_emitter_parser.add_argument("--video-loop",
help="By default it emitter will run only once. This allows it to loop the video file to keep testing.",
action='store_true')
#TODO: camera as source

View File

@ -36,10 +36,10 @@ class FrameEmitter:
logger.info(f"Connection socket {config.zmq_frame_addr}")
if self.config.video_no_loop:
self.video_srcs = self.config.video_src
else:
if self.config.video_loop:
self.video_srcs = cycle(self.config.video_src)
else:
self.video_srcs = self.config.video_src
def emit_video(self):