No need to check for h264 onvif profile (#12444)

This commit is contained in:
Josh Hawkins 2024-07-14 13:29:49 -05:00 committed by GitHub
parent 093201a1cc
commit 3afd77cbe0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,7 +94,6 @@ class OnvifController:
for key, onvif_profile in enumerate(profiles): for key, onvif_profile in enumerate(profiles):
if ( if (
onvif_profile.VideoEncoderConfiguration onvif_profile.VideoEncoderConfiguration
and onvif_profile.VideoEncoderConfiguration.Encoding == "H264"
and onvif_profile.PTZConfiguration and onvif_profile.PTZConfiguration
and ( and (
onvif_profile.PTZConfiguration.DefaultContinuousPanTiltVelocitySpace onvif_profile.PTZConfiguration.DefaultContinuousPanTiltVelocitySpace
@ -103,6 +102,7 @@ class OnvifController:
is not None is not None
) )
): ):
# use the first profile that has a valid ptz configuration
profile = onvif_profile profile = onvif_profile
logger.debug(f"Selected Onvif profile for {camera_name}: {profile}") logger.debug(f"Selected Onvif profile for {camera_name}: {profile}")
break break