Example #1
0
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
Example #2
0
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
Example #3
0
    def get_data(self) -> InputUrls:
        urls = InputUrls()
        for url in self.data['urls']:
            urls.urls.append(InputUrl(url['id'], url['uri']))

        return urls
Example #4
0
def make_catchup_stream(settings: ServerSettings) -> CatchupStream:
    stream = CatchupStream()
    stream._settings = settings
    stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())])
    return stream
Example #5
0
def make_timeshift_recorder_stream(
        settings: ServerSettings) -> TimeshiftRecorderStream:
    stream = TimeshiftRecorderStream()
    stream._settings = settings
    stream.input = InputUrls(urls=[InputUrl(id=InputUrl.generate_id())])
    return stream
Example #6
0
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
Example #7
0
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