[Live-devel] SingleStep():select() fails

Melms, Kenneth X. -ND Kenneth.X.Melms.-ND at espn.com
Tue Oct 28 12:08:17 PDT 2008


Greetings all.

First post, so I'll only waste a little bandwidth saying "AWESOME LIBRARY!" and move to my issue.

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.

I create the BasicUsageEnvironment and TaskScheduler as:

  TaskScheduler *bts = BasicTaskScheduler::createNew();
  BasicUsageEnvironment *bue = BasicUsageEnvironment::createNew(*bts);
Then I create a Groupsock to listen on my expected UDP port:

   const Port rtpPort(8898);
   struct in_addr inAddress;
   inAddress.s_addr = our_inet_addr("0.0.0.0");

   Groupsock gs(*bue, inAddress, rtpPort, 1);
And thirdly I create the FileSink and start the playing:

   sink = FileSink::createNew(*bue, "stdout");
   source = MPEG1or2VideoRTPSource::createNew(*bue, &gs);
   sink->startPlaying(*rtp_stream->source, mySessionEndCallback, NULL);
Finally - Start the eventLoop:

   bts->doEventLoop();
At this point my application exits with this error:

  BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor

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?

tia, and keep up the good work!

Ken

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081028/2db9ec47/attachment.html>


More information about the live-devel mailing list