[Live-devel] doEventLoop()
Austin Snow
asnow at pathfindertv.net
Sun Dec 28 16:39:53 PST 2008
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
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20081228/2cdbadbd/attachment.html>
More information about the live-devel
mailing list