<HTML><HEAD></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Thanks Ross for the reply.</DIV>
<DIV> </DIV>
<DIV>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. </DIV>
<DIV>How can I restart the whole process again.</DIV>
<DIV> </DIV>
<DIV>Thanks in advance.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Ashfaque</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=finlayson@live555.com
href="mailto:finlayson@live555.com">Ross Finlayson</A> </DIV>
<DIV><B>Sent:</B> Friday, April 06, 2012 11:53 AM</DIV>
<DIV><B>To:</B> <A title=live-devel@ns.live555.com
href="mailto:live-devel@ns.live555.com">LIVE555 Streaming Media - development
& use</A> </DIV>
<DIV><B>Subject:</B> Re: [Live-devel] Restarting RTP Session
Issue</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV>
<BLOCKQUOTE type="cite">
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>When I am canceling and restarting the thread on camera events I am
getting following error message and streaming is not started.</DIV>
<DIV> </DIV>
<DIV><STRONG><EM>Failed to create RTSP server: bind() error (port number:
8554): Address already in use</EM></STRONG></DIV>
<DIV> </DIV>
<DIV>I guess the socket is not being closed on thread
cancellation.</DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<DIV> </DIV>
<DIV>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.</DIV>
<DIV> </DIV>
<DIV>Why don't you instead simply restart the entire *process*, rather than
trying to restart a thread within a still-running process?</DIV>
<DIV> </DIV>
<DIV>However, having said that, the following *might* work for you (although I
can't say for sure):</DIV>
<DIV>Add</DIV>
<DIV>
<DIV><SPAN style="WHITE-SPACE: pre" class=Apple-tab-span></SPAN>-D
ALLOW_RTSP_SERVER_PORT_REUSE=1</DIV>
<DIV>to the "COMPILE_OPTS =" line of your "config." file. Then,
recompile "RTSPServer.cpp".</DIV></DIV><BR><BR>
<DIV apple-content-edited="true"><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span><SPAN
style="WIDOWS: 2; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; FONT: medium helvetica; WHITE-SPACE: normal; ORPHANS: 2; COLOR: rgb(0,0,0); WORD-SPACING: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"
class=Apple-style-span>Ross Finlayson<BR>Live Networks, Inc.<BR><A
href="http://www.live555.com/">http://www.live555.com/</A></SPAN></SPAN>
</DIV><BR>
<P>
<HR>
_______________________________________________<BR>live-devel mailing
list<BR>live-devel@lists.live555.com<BR>http://lists.live555.com/mailman/listinfo/live-devel<BR></DIV></DIV></DIV></BODY></HTML>