mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-01-31 00:18:55 +01:00
fix timestamp
This commit is contained in:
parent
ab93cae4c0
commit
3fb24b4bf5
@ -472,8 +472,8 @@ class CameraConfig(BaseModel):
|
||||
)
|
||||
motion: Optional[MotionConfig] = Field(title="Motion detection configuration.")
|
||||
detect: Optional[DetectConfig] = Field(title="Object detection configuration.")
|
||||
timestamp_style: Optional[TimestampStyleConfig] = Field(
|
||||
title="Timestamp style configuration."
|
||||
timestamp_style: TimestampStyleConfig = Field(
|
||||
default_factory=TimestampStyleConfig, title="Timestamp style configuration."
|
||||
)
|
||||
|
||||
def __init__(self, **config):
|
||||
|
@ -404,6 +404,7 @@ class CameraState:
|
||||
)
|
||||
|
||||
if draw_options.get("timestamp"):
|
||||
color = self.camera_config.timestamp_style.color
|
||||
draw_timestamp(
|
||||
frame_copy,
|
||||
frame_time,
|
||||
@ -411,7 +412,7 @@ class CameraState:
|
||||
font_effect=self.camera_config.timestamp_style.effect,
|
||||
font_scale=self.camera_config.timestamp_style.scale,
|
||||
font_thickness=self.camera_config.timestamp_style.thickness,
|
||||
font_color=self.camera_config.timestamp_style.color,
|
||||
font_color=(color.red, color.green, color.blue),
|
||||
position=self.camera_config.timestamp_style.position,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user