mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +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.")
 | 
					    motion: Optional[MotionConfig] = Field(title="Motion detection configuration.")
 | 
				
			||||||
    detect: Optional[DetectConfig] = Field(title="Object detection configuration.")
 | 
					    detect: Optional[DetectConfig] = Field(title="Object detection configuration.")
 | 
				
			||||||
    timestamp_style: Optional[TimestampStyleConfig] = Field(
 | 
					    timestamp_style: TimestampStyleConfig = Field(
 | 
				
			||||||
        title="Timestamp style configuration."
 | 
					        default_factory=TimestampStyleConfig, title="Timestamp style configuration."
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, **config):
 | 
					    def __init__(self, **config):
 | 
				
			||||||
 | 
				
			|||||||
@ -404,6 +404,7 @@ class CameraState:
 | 
				
			|||||||
                )
 | 
					                )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if draw_options.get("timestamp"):
 | 
					        if draw_options.get("timestamp"):
 | 
				
			||||||
 | 
					            color = self.camera_config.timestamp_style.color
 | 
				
			||||||
            draw_timestamp(
 | 
					            draw_timestamp(
 | 
				
			||||||
                frame_copy,
 | 
					                frame_copy,
 | 
				
			||||||
                frame_time,
 | 
					                frame_time,
 | 
				
			||||||
@ -411,7 +412,7 @@ class CameraState:
 | 
				
			|||||||
                font_effect=self.camera_config.timestamp_style.effect,
 | 
					                font_effect=self.camera_config.timestamp_style.effect,
 | 
				
			||||||
                font_scale=self.camera_config.timestamp_style.scale,
 | 
					                font_scale=self.camera_config.timestamp_style.scale,
 | 
				
			||||||
                font_thickness=self.camera_config.timestamp_style.thickness,
 | 
					                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,
 | 
					                position=self.camera_config.timestamp_style.position,
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user