gmyth-stream/tests/client_ffmpeg.py
author rosfran
Thu Mar 29 23:14:32 2007 +0100 (2007-03-29)
branchtrunk
changeset 469 28879368706b
child 470 57833200a415
permissions -rw-r--r--
[svn r474] Put back the Monitor Handler starting on GMythLiveTV.
     1 import os
     2 import time
     3 import socket
     4 
     5 HOST='localhost'
     6 PORT=5000
     7 
     8 s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
     9 s.settimeout(10)
    10 
    11 arq = open('/tmp/dvb.mpg','r')
    12 
    13 mplayer = os.popen("which mplayer").read().strip()
    14 mplayer += " -noidx -"
    15 pin, pout = os.popen2(mplayer)
    16 
    17 s.connect((HOST,PORT))
    18 i = 0
    19 
    20 data = s.recv(1024)
    21 while (data != ""):
    22     pin.write(data)
    23     data = s.recv(1024)
    24