[Live-devel] raw file to H.263

David Mercier DAVID.MERCIER.4 at ens.etsmtl.ca
Sun Sep 26 03:39:24 PDT 2004


Hi !

I'm trying to stream from a Fire-I camera to h263 using the live "library".

My problem is that I don't know how to get the source from the camera!!! Here is the code example:

void play() {
// Open the input file as a 'byte-stream file source':
ByteStreamFileSource* fileSource = ByteStreamFileSource::createNew(*env, inputFileName);

if (fileSource == NULL) {
*env << "Unable to open file \"" << inputFileName
<< "\" as a byte-stream file source\n";
exit(1);
}
  
FramedSource* videoES = mpegDemux->newVideoStream();

//videoSource = H263VideoStreamFramer::createNew(*env,videoES, iFramesOnly);

// Finally, start playing each sink.
*env << "Beginning to read from file...\n";
videoSink->startPlaying(*videoSource, afterPlaying, videoSink);
}

I miss one part... If my source is directly the camera, it means I don't need to implement the H263VideoStreamFramer class. Right ?

If I'm right, how do I fill the videoSource variable ? videoSink->startPlaying(*videoSource... need it!

Another question:
ByteStreamFileSource::createNew(*env, inputFileName);
needs the inputFileName... But if I get the frames directly from the cam... What is the value of inputFileName ???

Third question:
FramedSource* videoES = mpegDemux->newVideoStream();
is using the mpegDemux... If I use h263.. I guess I don't need the mpegDemux... But how do I fill the videoES variable ?

Thanks a lot !

David Mercier
ETS Student (École de Technologie Superieure)
Montreal, QC, Canada




More information about the live-devel mailing list