I've written a network stream reader by deriving from the UMC::DataReader class. It's taken me a long time but I finally have it working correctly and I can now receive and display MPEG-4 traffic from IP cameras.
The only remaining problem is that the when I call splitter.Init(pNetworkReader) in my code, the splitter takes 5-10 seconds to initialise. Could someone tell me why this is and how I can resolve it? (If I capture traffic from an IP camera and save it to file, and then replay it using UMC::FIOReader I see no such delay.)
Are you sure? Did you mean 4MB (megabytes) i.e. 4194304 bytes? or 4Mb (megabits) i.e.524288 bytes?
I hope you mean megabits. This would feel about right in terms of the volume of a CIF video stream (352x288) coming from an MPEG-4 IP camera. It wouldtake ~5 seconds to accumulate 4 megabits, or ~40 seconds for 4 megabytes.
Is there a way around this? Obviously this sort of delay when viewing live video is unacceptable to users. It makes trying to view any kind of network video using the UMC seemlike a waste of time.
Would it be possible tomodify the splitter to remove this delay?
It can't be the 4 megabyte buffer causing the splitter's initialisation delay then. Otherwise I'd be seeing delays of 40-60 seconds. This is not the case. I see delays of 5-10 seconds. There must be something else causing the delay. Do you have any other ideas?