About VAV_ImageStreaming
Simple free application to stream image from mobile phone to a tcp socket server.
(This version is beta and only tested on samsung galaxy note).
To retrieved a jpeg image, you only have to cherck start of file 0xFFD8 and end of file 0xFFD9.
For example in python you have only to do :
from socket import *
import threading
import thread
def handler(clientsock,addr):
while 1:
data = clientsock.recv(BUFSIZ)
if not data:
break
msg = 'echoed:... ' + data
clientsock.send(msg)
clientsock.close()
if __name__=='__main__':
HOST = ''
PORT = 8013
BUFSIZ = 1024
ADDR = (HOST, PORT)
serversock = socket(AF_INET, SOCK_STREAM)
serversock.bind(ADDR)
serversock.listen(2)
while 1:
print 'waiting for connection...'
clientsock, addr = serversock.accept()
print '...connected from:', addr
data =""
fullData =""
while data:
data= clientsock.recv(4096)
fullData+=fullData
startOfFrame = fullData.find("xFFxD8")
endOfFrame = fullData.find("xFFxD9")
if ((startOfFrame != -1) and (endOfFrame != -1) ):
print "file find"
jpegFile = fullData[startOfFrame:endOfFrame+1+1]
myFile =open("./toto.jpeg","wb")
myFile.write(jpegFile)
myFile.close()
fullData =""
Download and install
VAV_ImageStreaming version 1.0 on your
Android device!
Downloaded 50+ times, content rating: Not rated
Android package:
com.wru.vav_imagestreaming, download VAV_ImageStreaming.apk