gmyth-stream/tests/client_ffmpeg.py
branchtrunk
changeset 468 f4c6061f6f39
child 470 57833200a415
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gmyth-stream/tests/client_ffmpeg.py	Wed Mar 28 21:26:42 2007 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +import os
     1.5 +import time
     1.6 +import socket
     1.7 +
     1.8 +HOST='localhost'
     1.9 +PORT=5000
    1.10 +
    1.11 +s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
    1.12 +s.settimeout(10)
    1.13 +
    1.14 +arq = open('/tmp/dvb.mpg','r')
    1.15 +
    1.16 +mplayer = os.popen("which mplayer").read().strip()
    1.17 +mplayer += " -noidx -"
    1.18 +pin, pout = os.popen2(mplayer)
    1.19 +
    1.20 +s.connect((HOST,PORT))
    1.21 +i = 0
    1.22 +
    1.23 +data = s.recv(1024)
    1.24 +while (data != ""):
    1.25 +    pin.write(data)
    1.26 +    data = s.recv(1024)
    1.27 +