def play(self, title, src, subs=None): if self.main_thread is None: self.main_thread = _start_thread(self.start) pipe = ProcessPipe(title) if subs is not None: pipe.add_process(SubtitlesProcess(subs)) pipe.add_process(src) pipe.add_process(OmxplayerProcess()) self.msgq.put(MSG_PLAYER_PLAY) self.msgq.put(pipe)
def play(self, title, src, subs=None, http=False, dlsrv=True): if self.main_thread is None: self.main_thread = _start_thread(self.start) pipe = ProcessPipe(title) if subs is not None: pipe.add_process(SubtitlesProcess(subs)) pipe.add_process(src) if not http: if dlsrv: pipe.add_process(DlsrvProcess()) pipe.add_process(OmxplayerProcess2()) else: pipe.add_process(OmxplayerProcess()) else: pipe.add_process(OmxplayerProcess2()) self.msgq.put(MSG_PLAYER_PLAY) self.msgq.put(pipe)
def _play(self, pipe): self.error = None self.paused = False self.play_pipe = pipe self.play_thread = _start_thread(pipe.start, self.msgq)