mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Add restream role
This commit is contained in:
parent
7eb3547979
commit
53e7e0457b
@ -1,25 +1,25 @@
|
||||
"""Controls go2rtc relay."""
|
||||
"""Controls go2rtc restream."""
|
||||
|
||||
|
||||
import requests
|
||||
import urllib.parse
|
||||
|
||||
from frigate.config import CameraConfig, FrigateConfig
|
||||
from frigate.config import FrigateConfig
|
||||
|
||||
|
||||
class RelayApi:
|
||||
class RestreamApi:
|
||||
"""Control go2rtc relay API."""
|
||||
|
||||
def __init__(self, config: FrigateConfig) -> None:
|
||||
self.config: FrigateConfig = config
|
||||
|
||||
def add_cameras(self) -> None:
|
||||
"""Add cameras to go2rtc relay."""
|
||||
"""Add cameras to go2rtc."""
|
||||
self.relays: dict[str, str] = {}
|
||||
|
||||
for cam_name, camera in self.config.cameras.items():
|
||||
for input in camera.ffmpeg.inputs:
|
||||
if "relay" in input.roles:
|
||||
if "restream" in input.roles:
|
||||
self.relays[cam_name] = input.path
|
||||
|
||||
for name, path in self.relays.items():
|
||||
Loading…
Reference in New Issue
Block a user