コード例 #1
0
 def stop(self):
     if self.subsfile is not None and os.path.exists(self.subsfile):
         try:
             os.remove(self.subsfile)
         except Exception:
             pass
     ExternalProcess.stop(self)
コード例 #2
0
ファイル: subsproc.py プロジェクト: Kornflexx/blissflixx
 def stop(self):
   if self.subsfile is not None and os.path.exists(self.subsfile):
     try:
       os.remove(self.subsfile)
     except Exception:
       pass
   ExternalProcess.stop(self)
コード例 #3
0
    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)
コード例 #4
0
 def stop(self):
     if os.path.exists(_CMD_FIFO):
         try:
             os.remove(_CMD_FIFO)
         except Exception:
             pass
     ExternalProcess.stop(self)
コード例 #5
0
ファイル: omxproc2.py プロジェクト: SalvatoreT/blissflixx
 def stop(self):
   if os.path.exists(_CMD_FIFO):
     try:
       os.remove(_CMD_FIFO)
     except Exception:
       pass
   ExternalProcess.stop(self)
コード例 #6
0
ファイル: lvstrmrproc.py プロジェクト: erick-guerra/Royalbox
 def __init__(self, url, quality='best'):
     ExternalProcess.__init__(self)
     cmd = [
         'livestreamer', url, quality, '--http-header',
         'Client-ID=tq6hq1srip0i37ipzuscegt7viex9fh', '--output', OUT_FILE,
         '--player-fifo'
     ]
     self.cmd = cmd
コード例 #7
0
ファイル: lvstrmrproc.py プロジェクト: Kornflexx/blissflixx
 def __init__(self, url, quality='best'):
   ExternalProcess.__init__(self)
   cmd = [
     'livestreamer',
     url,
     quality,
     '--output',
     OUT_FILE,
     '--player-fifo'
   ]
   self.cmd = cmd 
コード例 #8
0
ファイル: lvstrmrproc.py プロジェクト: crow34/vhsheaven
 def __init__(self, url, quality='best'):
   ExternalProcess.__init__(self)
   cmd = [
     'livestreamer',
     url,
     quality,
     '--http-header',
     'Client-ID=tq6hq1srip0i37ipzuscegt7viex9fh',
     '--output',
     OUT_FILE,
     '--player-fifo'
   ]
   self.cmd = cmd 
コード例 #9
0
 def __init__(self, torrent, idx):
     ExternalProcess.__init__(self)
     cmd = ["node", "--max-old-space-size=128", "/usr/local/bin/peerflix"]
     # Avoid problems with downloading torrent files
     torrent = chanutils.torrent.torrent2magnet(torrent)
     cmd.append(torrent)
     cmd.append("-q")
     cmd.append("-r")
     cmd.append("-p")
     cmd.append(_PEERFLIX_PORT)
     if idx is not None and idx >= 0:
         cmd.append("-i")
         cmd.append(str(idx))
     self.cmd = cmd
コード例 #10
0
ファイル: pflixproc.py プロジェクト: Kornflexx/blissflixx
 def __init__(self, torrent, idx):
   ExternalProcess.__init__(self)
   cmd = ["node", "--max-old-space-size=128",
           "/usr/local/bin/peerflix"]
   # Avoid problems with downloading torrent files
   torrent = chanutils.torrent.torrent2magnet(torrent)
   cmd.append(torrent)
   cmd.append("-q")
   cmd.append("-r")
   cmd.append("-p")
   cmd.append(_PEERFLIX_PORT)
   if idx is not None and idx >= 0:
     cmd.append("-i")
     cmd.append(str(idx))
   self.cmd = cmd 
コード例 #11
0
ファイル: omxproc.py プロジェクト: PaulBunker/blissflixx
  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)
コード例 #12
0
  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)
コード例 #13
0
ファイル: pflixproc.py プロジェクト: Kornflexx/blissflixx
 def stop(self):
   try:
     shutil.rmtree('/tmp/torrent-stream')
   except Exception:
     pass
   ExternalProcess.stop(self)
コード例 #14
0
 def __init__(self):
     ExternalProcess.__init__(self, True)
コード例 #15
0
 def start(self, args):
     if not os.path.exists(_CMD_FIFO):
         os.system("mkfifo " + _CMD_FIFO)
     ExternalProcess.start(self, args)
コード例 #16
0
ファイル: ytdlproclive.py プロジェクト: erick-guerra/Royalbox
 def __init__(self, url):
   ExternalProcess.__init__(self)
   self.url = url
コード例 #17
0
ファイル: ytdlproc.py プロジェクト: Kornflexx/blissflixx
 def __init__(self, url):
   ExternalProcess.__init__(self)
   self.url = url
コード例 #18
0
 def stop(self):
     try:
         shutil.rmtree('/tmp/torrent-stream')
     except Exception:
         pass
     ExternalProcess.stop(self)
コード例 #19
0
 def __init__(self, message):
     ExternalProcess.__init__(self)
     cmd = ['notify-send', '--expire-time', '10000', message]
     self.cmd = cmd
コード例 #20
0
ファイル: omxproc2.py プロジェクト: SalvatoreT/blissflixx
 def start(self, args):
   if not os.path.exists(_CMD_FIFO):
     os.system("mkfifo " + _CMD_FIFO)     
   ExternalProcess.start(self, args)
コード例 #21
0
 def __init__(self, url, quality='best'):
     ExternalProcess.__init__(self)
     cmd = [
         'livestreamer', url, quality, '--output', OUT_FILE, '--player-fifo'
     ]
     self.cmd = cmd
コード例 #22
0
ファイル: subsproc.py プロジェクト: Kornflexx/blissflixx
 def __init__(self, subs):
   ExternalProcess.__init__(self)
   self.subs = subs
   self.subsfile = None
コード例 #23
0
ファイル: omxproc.py プロジェクト: PaulBunker/blissflixx
 def __init__(self):
   ExternalProcess.__init__(self, True)
コード例 #24
0
 def __init__(self, cmd):
   ExternalProcess.__init__(self)
   cmd.insert(0, 'rtmpdump')
   cmd.append('-o')
   cmd.append(OUT_FILE)
   self.cmd = cmd
コード例 #25
0
 def __init__(self, subs):
     ExternalProcess.__init__(self)
     self.subs = subs
     self.subsfile = None