[Live-devel] Device Source

Jacky Cheung jackymaillist at gmail.com
Tue Jan 2 22:43:29 PST 2007


Hi,

I've read the faq on how to stream live source instead of from a file.

And now I am thinking how to implement the deviceSource.cpp.

In my case, my device will stream out MPEG4 frame by frame via a socket.

After reading the comment of deviceSource.cpp, seemed that I need to
implement deliverFrame() and doGetNextFrame(). However, I've got
confused with these functions.

What I think is ::doGetNextFrame() is called by the parent class for
streaming out the frame via RTP. And ::deliverFrame() is used to obtain
a new frame from device. Am I right?

If so, I think I need to add the deliverFrame() to
envir().taskScheduler().turnOnBackgroundHandling(..) and pack the
incoming frame to a buffer or queue. And one doGetNextFrame() is called,
then it should prepare fTo, fFrameSize, etc .

Am I right?

Thanks a lot

Regards,
Jacky


More information about the live-devel mailing list