> What's happening is that the BasicUDPSource::incomingPacketHandler1()
> function is being called too many times.
This is apparently happening due to a flaw in your runtime library and/or OS:
“select()” (called each time within the event loop) is returning an indication
that the UDP socket has incoming packet(s) available - when it doesn’t.
Unless you can fix this problem (again, in your system, not in our code), then
you’re going to have to use some other input mechanism than UDP packets. Is
the input source (running “ffmpeg”) running on the same computer as the RTSP
server? If so, then you don’t need to use network packets to communicate
between them. Instead, I suggest using a named pipe (and thus using a
“MPEG2TransportFileServerMediaSubsession” rather than a
“MPEG2TransportUDPServerMediaSubsession”.
> I modified the line to:
> if (!isCurrentlyAwaitingData()) {usleep(500);return;}
>
> And since then the CPU usage does not go up to 100% but stays around 1%! :)
Yes, of course your CPU usage drops to almost nothing if you’re spending almost
all of your time blocked in “usleep()” (and are thus unavailable to do any real
work). Obviously that’s not a real solution to your problem.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel