From aa07fdadcb6076aae95cb49c57f620d14a8e699b Mon Sep 17 00:00:00 2001 From: Vadim Melnik Date: Tue, 25 Jun 2024 17:03:19 +0300 Subject: [PATCH] Extract video time info based on reprostim capture filename format, WiP #96 --- Parsing/parse_wQR.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Parsing/parse_wQR.py b/Parsing/parse_wQR.py index c669173..fc02cfa 100755 --- a/Parsing/parse_wQR.py +++ b/Parsing/parse_wQR.py @@ -3,6 +3,8 @@ import json import logging import os +from datetime import datetime + from pydantic import BaseModel, Field from pyzbar.pyzbar import decode, ZBarSymbol import cv2 @@ -18,6 +20,12 @@ logger.debug(f"name={__name__}") +# Define class for video time info +class VideoTimeInfo(BaseModel): + start_time: datetime = Field(..., description="Start time of the video") + end_time: datetime = Field(..., description="End time of the video") + + # Define the data model for the QR record class QrRecord(BaseModel): frame_start: int = Field(..., description="Frame number where QR code starts")