mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	disable zooming if relative zoom not supported (#8028)
This commit is contained in:
		
							parent
							
								
									08ef69bac4
								
							
						
					
					
						commit
						20c2ab39bc
					
				@ -131,18 +131,24 @@ class OnvifController:
 | 
			
		||||
 | 
			
		||||
        # try setting relative zoom translation space
 | 
			
		||||
        try:
 | 
			
		||||
            if self.config.cameras[camera_name].onvif.autotracking.zooming:
 | 
			
		||||
            if (
 | 
			
		||||
                self.config.cameras[camera_name].onvif.autotracking.zooming
 | 
			
		||||
                == ZoomingModeEnum.relative
 | 
			
		||||
            ):
 | 
			
		||||
                if zoom_space_id is not None:
 | 
			
		||||
                    move_request.Translation.Zoom.space = ptz_config["Spaces"][
 | 
			
		||||
                        "RelativeZoomTranslationSpace"
 | 
			
		||||
                    ][0]["URI"]
 | 
			
		||||
        except Exception:
 | 
			
		||||
            if self.config.cameras[camera_name].onvif.autotracking.zoom_relative:
 | 
			
		||||
            if (
 | 
			
		||||
                self.config.cameras[camera_name].onvif.autotracking.zooming
 | 
			
		||||
                == ZoomingModeEnum.relative
 | 
			
		||||
            ):
 | 
			
		||||
                self.config.cameras[
 | 
			
		||||
                    camera_name
 | 
			
		||||
                ].onvif.autotracking.zoom_relative = False
 | 
			
		||||
                ].onvif.autotracking.zooming = ZoomingModeEnum.disabled
 | 
			
		||||
                logger.warning(
 | 
			
		||||
                    f"Disabling autotracking zooming for {camera_name}: Absolute zoom not supported"
 | 
			
		||||
                    f"Disabling autotracking zooming for {camera_name}: Relative zoom not supported"
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
        if move_request.Speed is None:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user