Need a Java based application which will connect to an RTSP stream, queue it into a buffer according to a specified length of time, and then serve it out as an RTSP stream to another client. The client will see the RTSP stream with a specified delay. The finished program will take command line arguments similar to the following:
java RTSPRelay src=SOURCE server=SERVER delay=DELAY
SOURCE is the url of the RTSP source stream such as: rtsp://login:password@[url removed, login to view]
SERVER is the IP address and port on the local machine that will serve the relayed RTSP stream. For example: 127.0.0.1:5100
DELAY is the delay time (buffer size) in seconds
The code also needs to be able to handle and recover from signal interruptions and communication errors.