[Live-devel] Restarting RTP Session Issue
Ashfaque
ashfaque at iwavesystems.com
Thu Apr 5 23:43:14 PDT 2012
Thanks Ross for the reply.
But can you please explain me the procedure to restart the process (in connection with the Live555 streaming thread). The application will be running on an embedded device, hence it cannot be exited.
How can I restart the whole process again.
Thanks in advance.
Regards,
Ashfaque
From: Ross Finlayson
Sent: Friday, April 06, 2012 11:53 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Restarting RTP Session Issue
When I am canceling and restarting the thread on camera events I am getting following error message and streaming is not started.
Failed to create RTSP server: bind() error (port number: 8554): Address already in use
I guess the socket is not being closed on thread cancellation.
Correct. Because the *process* (which owns the socket) still exists, the socket remains open, even though the *thread* that happens to be using the socket has closed. This is because (for most operating systems, at least) the operating system knows nothing about threads; it deals with processes.
Why don't you instead simply restart the entire *process*, rather than trying to restart a thread within a still-running process?
However, having said that, the following *might* work for you (although I can't say for sure):
Add
-D ALLOW_RTSP_SERVER_PORT_REUSE=1
to the "COMPILE_OPTS =" line of your "config." file. Then, recompile "RTSPServer.cpp".
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
--------------------------------------------------------------------------------
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120406/cea7d467/attachment-0001.html>
More information about the live-devel
mailing list