Skip to content

Commit

Permalink
Add debug log about checking RTSP urls
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed May 31, 2024
1 parent 1479a14 commit 119fa7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reolink_aio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,8 @@ async def get_rtsp_stream_source(self, channel: int, stream: Optional[str] = Non
if channel in self._rtsp_verified and stream in self._rtsp_verified[channel]:
return self._rtsp_verified[channel][stream]

_LOGGER.debug("Checking RTSP urls host %s:%s, channel %s, stream %s", self._host, self._port, channel, stream)

if self.api_version("rtsp") >= 3 and stream == "main" and channel in self._rtsp_mainStream:
if await self._check_rtsp_url(self._rtsp_mainStream[channel], channel, stream):
return self._rtsp_mainStream[channel]
Expand Down Expand Up @@ -2317,7 +2319,7 @@ async def get_rtsp_stream_source(self, channel: int, stream: Optional[str] = Non
return url

# return the first tried URL (based on camera capabilities as above)
_LOGGER.error("Host %s:%s, could not verify a working RTSP url for stream %s", self._host, self._port, stream)
_LOGGER.error("Host %s:%s, could not verify a working RTSP url for channel %s, stream %s", self._host, self._port, channel, stream)
return self._rtsp_verified[channel][stream]

async def get_stream_source(self, channel: int, stream: Optional[str] = None) -> Optional[str]:
Expand Down

0 comments on commit 119fa7f

Please sign in to comment.