[Live-devel] file input/jpeg streaming

Ross Finlayson finlayson at live.com
Sun Nov 9 18:33:53 PST 2003


At 03:06 PM 11/7/03, you wrote:

>I'd like to create a program similar to the testMPEG1or2VideoStreamer app
>that reads in .ppm files and then streams as JPEG.  I'm guessing that I'll
>have to write a subclass of JPEGVideoSource

Yes.

>which will read in the file,
>store it in YUV format, and ensure that type(), qFactor(), width(),
>height() return the appropriate values.

Plus, of course, you need to compress each image into JPEG format before 
streaming it.

>However, I'm not sure how to implement the doGetNextFrame() or
>getPlayTime() functions (I still haven't wrapped my brain around the 
>entire library
>either).  I'd think there'd have to be some pointer to the YUV data which
>gets packaged by the JPEGVideoRTPSink

A "JPEGVideoRTPSink" won't be fed YUV data; instead, it'll be fed JPEG 
data.  So, your "JPEGVideoRTPSource" subclass will also need to perform 
JPEG compression.

For a model of how to write a new source object, see the code for 
"DeviceSource" ("liveMedia/DeviceSource.cpp" and 
"liveMedia/include/DeviceSource.hh").


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list