def make_stream(cls, settings: ServiceSettings, client: ServiceClient): vod = VodEncodeStream(name=IStreamObject.DEFAULT_STREAM_NAME, tvg_logo=IStreamObject.DEFAULT_ICON_URL) vod.loop = False vod.input = [InputUrl(id=InputUrl.generate_id())] vod.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(vod, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): relay = RelayStream(name=IStreamObject.DEFAULT_STREAM_NAME, tvg_logo=IStreamObject.DEFAULT_ICON_URL) relay.input = [InputUrl(id=InputUrl.generate_id())] relay.output = [OutputUrl(id=OutputUrl.generate_id())] relay.video_parser = constants.DEFAULT_VIDEO_PARSER relay.audio_parser = constants.DEFAULT_AUDIO_PARSER return cls(relay, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): test = TestLifeStream() test.visible = False test.input = [InputUrl(id=InputUrl.generate_id())] test.output = [ OutputUrl(id=OutputUrl.generate_id(), uri=constants.DEFAULT_TEST_URL) ] return cls(test, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): test = TestLifeStream(name=IStreamObject.DEFAULT_STREAM_NAME, tvg_logo=IStreamObject.DEFAULT_ICON_URL) test.visible = False test.input = [InputUrl(id=InputUrl.generate_id())] test.output = [ OutputUrl(id=OutputUrl.generate_id(), uri=constants.DEFAULT_TEST_URL) ] return cls(test, settings, client)
def generate_cod_link( self, hls_type: constants.HlsType, playlist_name=constants.DEFAULT_HLS_PLAYLIST, oid=OutputUrl.generate_id() ) -> OutputUrl: cods_root = self._generate_cods_root_dir(oid) link = '{0}/{1}'.format(cods_root, playlist_name) return OutputUrl(id=oid, uri=self._settings.generate_cods_link(link), http_root=cods_root, hls_type=hls_type)
def config(self) -> dict: conf = super(CatchupStreamObject, self).config() conf[ConfigFields.TIMESHIFT_DIR] = self._generate_catchup_dir( oid=OutputUrl.generate_id()) diff_msec = self._stream.stop - self._stream.start conf[ConfigFields.AUTO_EXIT_TIME_FIELD] = diff_msec / 1000 return conf
def generate_vod_link( self, hls_type: constants.HlsType, chunk_duration=10, playlist_name=constants.DEFAULT_HLS_PLAYLIST, oid=OutputUrl.generate_id() ) -> OutputUrl: vods_root = self._generate_vods_root_dir(oid) link = '{0}/{1}'.format(vods_root, playlist_name) result = OutputUrl(id=oid, uri=self._settings.generate_vods_link(link), http_root=vods_root, hls_type=hls_type) if chunk_duration is not None: result.chunk_duration = chunk_duration return result
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): test = TestLifeStream(name=IStreamObject.DEFAULT_STREAM_NAME) test.visible = False test.input = [InputUrl.make_stub()] test.output = [OutputUrl.make_test()] IStreamObject.fill_defaults(test) return cls(test, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): vod = VodEncodeStream(name=IStreamObject.DEFAULT_STREAM_NAME) vod.loop = False vod.input = [InputUrl.make_stub()] vod.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(vod) return cls(vod, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): relay = RelayStream(name=IStreamObject.DEFAULT_STREAM_NAME) relay.input = [InputUrl.make_stub()] relay.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(relay) return cls(relay, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): hard = HardwareStream(name=IStreamObject.DEFAULT_STREAM_NAME) hard.input = [InputUrl.make_stub()] hard.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(hard) return cls(hard, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): event = EventStream() event.input = [InputUrl(id=InputUrl.generate_id())] event.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(event, settings, client)
def make_stream(cls, settings): proxy = ProxyStream() proxy.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(proxy, settings)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): cod = CodRelayStream(name=IStreamObject.DEFAULT_STREAM_NAME) cod.input = [InputUrl.make_stub()] cod.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(cod) return cls(cod, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): tp = TimeshiftPlayerStream(name=IStreamObject.DEFAULT_STREAM_NAME) tp.input = [InputUrl.make_stub()] tp.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(tp) return cls(tp, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): tp = TimeshiftPlayerStream() tp.input = [InputUrl(id=InputUrl.generate_id())] tp.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(tp, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): cat = CatchupStream() cat.input = [InputUrl(id=InputUrl.generate_id())] cat.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(cat, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): encode = EncodeStream() encode.input = [InputUrl(id=InputUrl.generate_id())] encode.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(encode, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): relay = RelayStream() relay.input = [InputUrl(id=InputUrl.generate_id())] relay.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(relay, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): hard = HardwareStream() hard.input = [InputUrl(id=InputUrl.generate_id())] hard.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(hard, settings, client)
def make_stream(cls, settings: ServiceSettings): proxy = ProxyVodStream(name=IStreamObject.DEFAULT_STREAM_NAME) proxy.input = [InputUrl(id=InputUrl.generate_id())] proxy.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(proxy, settings)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): encode = EncodeStream(name=IStreamObject.DEFAULT_STREAM_NAME) encode.input = [InputUrl.make_stub()] encode.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(encode) return cls(encode, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): cat = CatchupStream(name=IStreamObject.DEFAULT_STREAM_NAME) cat.input = [InputUrl.make_stub()] cat.output = [OutputUrl.make_default_http()] IStreamObject.fill_defaults(cat) return cls(cat, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): cod = CodEncodeStream(name=IStreamObject.DEFAULT_STREAM_NAME) cod.input = [InputUrl(id=InputUrl.generate_id())] cod.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(cod, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): cod = CodEncodeStream() cod.input = [InputUrl(id=InputUrl.generate_id())] cod.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(cod, settings, client)
def make_stream(cls, settings: ServiceSettings): proxy = ProxyVodStream() proxy.input = [InputUrl(id=InputUrl.generate_id())] proxy.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(proxy, settings)
def make_stream(cls, settings: ServiceSettings): proxy = ProxyVodStream(name=IStreamObject.DEFAULT_STREAM_NAME) proxy.input = [InputUrl.make_stub()] proxy.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(proxy) return cls(proxy, settings)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): vod = VodEncodeStream() vod.loop = False vod.input = [InputUrl(id=InputUrl.generate_id())] vod.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(vod, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): event = EventStream(name=IStreamObject.DEFAULT_STREAM_NAME) event.input = [InputUrl.make_stub()] event.output = [OutputUrl.make_stub()] IStreamObject.fill_defaults(event) return cls(event, settings, client)
def make_stream(cls, settings: ServiceSettings, client: ServiceClient): event = EventStream(name=IStreamObject.DEFAULT_STREAM_NAME) event.input = [InputUrl(id=InputUrl.generate_id())] event.output = [OutputUrl(id=OutputUrl.generate_id())] return cls(event, settings, client)