[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Questino on Gnuradio as the client and VLC as the ser
[Discuss-gnuradio] Questino on Gnuradio as the client and VLC as the server
Fri, 20 Feb 2009 15:55:41 -0800 (PST)
I am using USRP to receive video streaming, and feed the data to a socket as
the client. Then, I open a vlc as the server to open the network stream via
UDP. The code is shown below.
# the server
# the client, which is inserted into benchmark_rx.py in
def rx_callback(ok, payload):
print "ok = %5s pktno = %4d n_rcvd = %4d n_right = %4d" % (ok,
pktno, n_rcvd, n_right)
clientHost = 'localhost' # servername is localhost'
clientPort = 2002 # use arbitrary port > 1024
dgramSock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM ) #
create a UDP socket
dgramSock.connect((clientHost,clientPort)) # connect to server on
for ndx_data in rxdata:
dgramSock.sendto( ndx_data, (clientHost, clientPort) )
# send the data
data = dgramSock.recv(4096) # receive up to 4096
My questions are:
1, I don't think the client(Gnuradio) and the server(VLC) are connected via
2, Is it correct that I write the received data to a client UDP socket?
3, If I change the server to the following(don't use VLC as the server), I
can play serverfile.mpeg using VLC. However, I don't want vlc to open from
serverHost = ''
serverPort = 2002
dgramSock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
dgramSock.bind( (serverHost, serverPort) )
msg, (addr, port) = dgramSock.recvfrom(4096)
print 'Server connected by', addr,port
#print 'Server got ',msg
dgramSock.sendto( msg, (addr, port) )
fd = open('serverfile.mpeg','a')
Overall, I want to play the realtime video that I received from USRP. Can
anyone help me with these questions? I really appreciate.
View this message in context:
Sent from the GnuRadio mailing list archive at Nabble.com.
|[Prev in Thread]
||[Next in Thread]|
- [Discuss-gnuradio] Questino on Gnuradio as the client and VLC as the server,
Brook Lin <=