Thanks Ross,
So there is not any way to push data (frame data) into a deivceSource?

I have modified DeviceSource.cpp deliverFrame to deliverFrame(void *data, int len) to pass data into it. And in the function follows;

if (!isCurrentlyAwaitingData()) return; // we're not ready for the data yet

  // Deliver the data here:
        fMaxSize = 1048576;
        memcpy(fTo, data, len);
printf("Frame sent, len=%d\n", len);\\lets me know when a frame is accepted // After delivering the data, inform the reader that it is now available:
  FramedSource::afterGetting(this);

The isCurrentlyAwaitingData returns most of the time, meaning only about every 1.3 seconds a frame is accepted.

My input is defined and used as below;

 MPEG4VideoStreamDiscreteFramer* videoSource;
.
.
  DeviceParameters params;
  fileSource = DeviceSource::createNew(*env, params);
.
.
  FramedSource* videoES = fileSource;
videoSource = MPEG4VideoStreamDiscreteFramer::createNew(*env, videoES);
        
  // Finally, start playing:
  *env << "Beginning to read from file...\n";
  videoSink->startPlaying(*videoSource, afterPlaying, videoSink);
.
.

The rest of the code is based in testMPEG4VideoStreamer.cpp

Thanks
Austin

On Dec 26, 2008, at 8:38 PM, Ross Finlayson wrote:

The call to doGetNextFrame (doGetNextFrame(void *data, int len) in my code) only happens when data is present.

No, that's not true! The "doGetNextFrame()" (virtual) function is called by the "FramedSource::getNextFrame()" function, which is called by the downstream object whenever it wants new data. I.e., it's the downstream object that decides when that function gets called.

--

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to