def avi_cmd(path): fifo = '/tmp/omxplayer_fifo' sh.rm('-f', fifo) sh.mkfifo(fifo) omx_fifo_cmd = "/usr/bin/omxplayer -r -o hdmi " + path + " < " + fifo + " &" call(omx_fifo_cmd, shell=True) sh.sleep(0.2) call("echo . > " + fifo + " &", shell=True)
def create_fifo(self): if not os.path.exists(self.fifofile ): sh.mkfifo( self.fifofile ) ret = True if os.path.exists(self.fifofile ) else False return ret