[Live-devel] Sending proper packets from H264 Encoder
Ross Finlayson
finlayson at live555.com
Sun Oct 13 15:36:42 PDT 2019
What does the “Grab60FPS2()” call (in your “doGetNextFrame()” implementation) do? Does it block, waiting for the next H.264 NAL unit to become available? If so, this is *wrong*. Once again, I/O in LIVE555-based applications is asynchronous, using an event loop. Device ‘read’ operations should never block, waiting for frames (or NAL units) to come available.
Once again, I suggest using the code for the “DeviceSource” class (in “liveMedia/DeviceSource.cpp”) as a model for your “StreamSource” class.
In any case, I suggest checking the result of the call to "Grab60FPS2()”. Is it possible that "Demo.vPacket.empty()” is always true, so that you never reach the first branch of your “if” statement?
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list