Hi Ross,
I add a class H264VideoUDPSource to live555 for my IP Camera project. when
played by VLC, its picture does not updated,and i can see a lot of picture drop
in VLC information.
code is like this:class H264VideoUDPSource: public FramedSource
void H264VideoUDPSource::doGetNextFrame() {
//fill a h264 frame
...
//set timestamp, since it is live source, i guess it can be wall clock time?
gettimeofday(&fPresentationTime, NULL);
//live source don't need set duration
//fDurationInMicroseconds
nextTask() = envir().taskScheduler().scheduleDelayedTask(0,
(TaskFunc*)FramedSource::afterGetting, this);
}
//------
I also try another way, when played in VLC, video is ok, but it get pause
every few seconds.
// Set the 'presentation time':
if (fPresentationTime.tv_sec == 0 && fPresentationTime.tv_usec == 0)
gettimeofday(&fPresentationTime, NULL);
else
{
// Increment by the play time of the previous frame:
unsigned uSeconds = fPresentationTime.tv_usec + 1000000/25; //25fps, the
real frame speed from camera is about 5~7frames/s
fPresentationTime.tv_sec += uSeconds/1000000;
fPresentationTime.tv_usec = uSeconds%1000000;
}
Thank you!
jerry yang
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel