def make_timeshift_player_stream( settings: ServerSettings) -> TimeshiftPlayerStream: stream = TimeshiftPlayerStream() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) stream.output = OutputUrls(urls=[OutputUrl(id=OutputUrl.generate_id())]) return stream
def make_test_life_stream(settings: ServerSettings) -> TestLifeStream: stream = TestLifeStream() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) stream.output = OutputUrls(urls=[ OutputUrl(id=OutputUrl.generate_id(), uri=constants.DEFAULT_TEST_URL) ]) return stream
def get_data(self) -> InputUrls: urls = InputUrls() for url in self.data['urls']: urls.urls.append(InputUrl(url['id'], url['uri'])) return urls
def make_catchup_stream(settings: ServerSettings) -> CatchupStream: stream = CatchupStream() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) return stream
def make_timeshift_recorder_stream( settings: ServerSettings) -> TimeshiftRecorderStream: stream = TimeshiftRecorderStream() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) return stream
def make_encode_stream(settings: ServerSettings) -> EncodeStream: stream = EncodeStream() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) stream.output = OutputUrls(urls=[OutputUrl(id=OutputUrl.generate_id())]) return stream
def make_relay_stream(settings: ServerSettings) -> RelayStream: stream = RelayStream() stream._settings = settings stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())]) stream.output = OutputUrls(urls=[OutputUrl(id=OutputUrl.generate_id())]) return stream