<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
span.EmailStyle17
{font-family:"Calibri","sans-serif";
color:windowtext}
.MsoChpDefault
{}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
{}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">We have been facing this problem of live streaming stopping exactly after half an hour.</p>
<p class="MsoNormal">The same code works on Linux OS but windows this issue is there. The readData function does not get called,</p>
<p class="MsoNormal">And it does not get into the loop <b><span style="font-size:10.0pt; font-family:"Courier New"">isCurrentlyAwaitingData</span></b><span style="font-size:8.0pt; font-family:"Courier New"">.</span></p>
<p class="MsoNormal">So <b><span style="font-size:10.0pt; font-family:"Courier New"">incomingDataHandler1</span></b><span style="font-size:8.0pt; font-family:"Courier New"">
</span>itself is not getting called.</p>
<p class="MsoNormal">Under what conditions will live stop calling <b><span style="font-size:10.0pt; font-family:"Courier New"">incomingDataHandler1</span></b><span style="font-size:8.0pt; font-family:"Courier New"">
</span>?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"; color:blue">void</span><span style="font-size:8.0pt; font-family:"Courier New""> LiveInputSource:: incomingDataHandler1()</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">{</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">int</span> ret;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">if</span> (!isCurrentlyAwaitingData()) </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> {</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> printf(“<span style="color:#A31515">isCurrentlyAwaitingData\n"</span>);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">return</span> ;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> }</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> ret = readData();</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">if</span> (ret < 0 )</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> {</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> handleClosure (<span style="color:blue">this</span>);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> printf(<span style="color:#A31515">"handleClosure (this)\n"</span>);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> }</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">else</span> <span style="color:blue">if</span> (ret == 0 )</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> {</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">int</span> uSecsToDelay = 50000 ;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> nextTask() = envir().taskScheduler().scheduleDelayedTask (uSecsToDelay, (TaskFunc*)incomingDataHandler,
<span style="color:blue">this</span>);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> }</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">else</span> {</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> nextTask() = envir().taskScheduler().scheduleDelayedTask (0, (TaskFunc*)afterGetting,
<span style="color:blue">this</span>);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> }</span></p>
<p class="MsoNormal"><span style="font-size:8.0pt; font-family:"Courier New"">}</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Courier New""> </span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"; color:blue">int</span><span style="font-size:8.0pt; font-family:"Courier New""> LiveInputVideoSource:: readData()</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">{</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:green">/* Get frame from queue */</span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> queue_get (frame, &frame_len);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">if</span> (frame_len == 0)</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> {</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> return -1;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> }</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> <span style="color:green">/* Copy frame to fTo */</span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> memcpy (fTo, frame, frame_len);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> fFrameSize = frame_len;</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> <span style="color:green">/* Presentation Time */</span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New""> gettimeofday (&fPresentationTime);</span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt; font-family:"Courier New"">
<span style="color:blue">return</span> 1;</span></p>
<p class="MsoNormal"><span style="font-size:8.0pt; font-family:"Courier New"">}</span><span style="font-size:8.0pt"></span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Priya</p>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
http://www.mindtree.com/email/disclaimer.html<br>
</font>
</body>
</html>