def start(self, args): self.cmd = OMX_CMD if 'subtitles' in args: self.cmd = self.cmd + "--align center --subtitles '" + args[ 'subtitles'] + "' " fname = args['outfile'] #if fname.startswith('http'): # self.cmd = self.cmd + "'" + fname + "'" if not self._wait_input(fname): self._set_error("Omxplayer timed out waiting for input file") self.msg_halted() return else: pid = args['pid'] tail = "tail -f --pid=" + str( pid) + " --bytes=+0 \"" + fname + "\"" #self.cmd = tail + ' | ' + self.cmd + 'pipe:0' self.cmd = tail + ' | ' + 'omxplayer --hw --timeout 60s -o both --no-keys pipe:0 ' # Wait a bit for input cherrypy.log("OMXPROCESS: " + self.cmd) #print "self.cmd => " + self.cmd #f = open("/tmp/demofile3.txt", "w") #f.write(self.cmd) #f.close() time.sleep(10) ExternalProcess.start(self, args)
def start(self, args): self.cmd = OMX_CMD if 'subtitles' in args: self.cmd = self.cmd + "--align center --subtitles '" + args['subtitles'] + "' " fname = args['outfile'] if fname.startswith('http'): self.cmd = self.cmd + "'" + fname + "'" elif not self._wait_input(fname): self._set_error("Omxplayer timed out waiting for input file") self.msg_halted() return else: pid = args['pid'] tail = "tail -f --pid=" + str(pid) + " --bytes=+0 \"" + fname + "\"" self.cmd = tail + ' | ' + self.cmd + 'pipe:0' # Wait a bit for input time.sleep(5) ExternalProcess.start(self, args)
def start(self, args): if not os.path.exists(_CMD_FIFO): os.system("mkfifo " + _CMD_FIFO) ExternalProcess.start(self, args)