<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.3194" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>Greetings
all.</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>First post, so I'll
only waste a little bandwidth saying "AWESOME LIBRARY!" and move to my
issue.</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>I'm trying to
incorporate the MPEG1or2VideoRTPSource into my application. My application
needs to poke a web service to start the RTP stream, so RTSP isn't appropriate.
I just want to listen to the UDP port and capture the stream as it comes
in. I can do this in Java by just opening up a
DatagramSocket, decoding the RTP packets as they stream in, but I'd like to
use this library and other features of it.</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>I create the
BasicUsageEnvironment and TaskScheduler as:</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2> TaskScheduler
*bts = BasicTaskScheduler::createNew();<BR> BasicUsageEnvironment *bue =
BasicUsageEnvironment::createNew(*bts);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>Then I create a
Groupsock to listen on my expected UDP port:</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2> const
Port rtpPort(8898);<BR> struct in_addr inAddress;<BR>
inAddress.s_addr = our_inet_addr("0.0.0.0");</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>
Groupsock gs(*bue, inAddress, rtpPort, 1);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>And thirdly I create
the FileSink and start the playing:</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2> sink =
FileSink::createNew(*bue, "stdout");<BR> source =
MPEG1or2VideoRTPSource::createNew(*bue, &gs);</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>
sink->startPlaying(*rtp_stream->source, mySessionEndCallback,
NULL);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>Finally - Start the
eventLoop:</FONT></SPAN></DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=890275818-28102008><FONT face=Arial size=2>
bts->doEventLoop(); <BR></DIV></FONT></SPAN>
<DIV><FONT face=Arial size=2><SPAN class=890275818-28102008>At this point my
application exits with this error:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890275818-28102008></SPAN></FONT> </DIV><FONT face=Arial><FONT
size=2><SPAN class=890275818-28102008>
</SPAN>BasicTaskScheduler::SingleStep(): select() fails: Bad file
descriptor<BR></FONT></FONT>
<DIV><FONT face=Arial size=2><SPAN
class=890275818-28102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=890275818-28102008>I'm sure I'm not the
first to hit this issue, but I've yet to find a reason. If I create a NEW
TaskScheduler that isn't bound to the BasicUsageEnvironment and then call
"doEventLoop()" -- the process continues, but packets never stream. Am I
missing something thickheaded?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890275818-28102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=890275818-28102008>tia, and keep up the
good work!</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890275818-28102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890275818-28102008>Ken</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=890275818-28102008></SPAN></FONT> </DIV></BODY></HTML>