mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 12:15:25 +03:00
error if profile remains unset
This commit is contained in:
parent
ae706ad195
commit
bd2dda825f
@ -87,21 +87,24 @@ class OnvifController:
|
|||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
ptz = onvif.create_ptz_service()
|
||||||
|
|
||||||
|
profile = None
|
||||||
for key, onvif_profile in enumerate(profiles):
|
for key, onvif_profile in enumerate(profiles):
|
||||||
# skip non-H264 profiles
|
|
||||||
if (
|
if (
|
||||||
not onvif_profile.VideoEncoderConfiguration
|
onvif_profile.VideoEncoderConfiguration
|
||||||
or onvif_profile.VideoEncoderConfiguration.Encoding != "H264"
|
and onvif_profile.VideoEncoderConfiguration.Encoding == "H264"
|
||||||
):
|
):
|
||||||
continue
|
|
||||||
else:
|
|
||||||
# use the first H264 profile
|
|
||||||
profile = onvif_profile
|
profile = onvif_profile
|
||||||
break
|
break
|
||||||
|
|
||||||
ptz = onvif.create_ptz_service()
|
if profile is None:
|
||||||
|
logger.error(
|
||||||
|
f"No appropriate Onvif profiles found for camera: {camera_name}."
|
||||||
|
)
|
||||||
|
return False
|
||||||
|
|
||||||
# get the PTZ config for the first onvif profile
|
# get the PTZ config for the profile
|
||||||
try:
|
try:
|
||||||
configs = profile.PTZConfiguration
|
configs = profile.PTZConfiguration
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user