[Live-devel] Fwd: Sink taking too long to call doGetNextFrame - bad fDurationInMicroseconds?

Christian Frahm frahm.c at googlemail.com
Sun Jun 17 09:11:29 PDT 2007


Hello to everyone,

Im currently developing a source class which reads from a USB DVB-T device.
The aim is to select 1 audio and 1 video stream and stream them (in PES
format) separatelly to another host in our network. To demultiplex the
MPEG-TS stream, I have modified mplex and built it into my code.

For testing purposes, I filter out only 1 video stream, connected my class
to a MPEG1or2VideoDiscreteFramer and used a MPEG1or2VideoRTPSink to stream.

Now - MPEG PES can be very large (up to 65535 bytes). So the first problem
is: the MPEG1or2VideoRTPSink has fMaxSize set o 60000 bytes - so sometimes I
get erros because it says I should make MPEG1or2VideoRTPSink's buffer
larger. Anyone can tell how I do that?

However, the biggest problem is that (after adding some timestamps to my
debugs) - *may times* MPEG1or2VideoDiscreteFramer takes up to half a second
to call my goGetNextFrame( ). In the trace below, such a situation is shown.
Every seems to be working fine then this happens. I can assure that the PES
packets are all well-formed. Would there be any reason for the
MPEG1or2VideoDiscreteFramer/MPEG1or2VideoRTPSink to take so long in calling
my function again?
System has more than enough resources.

By the way, I always set fDurationInMicroseconds=0 and
gettimeofday(&fPresentationTime, NULL); inside deliverFrame( ). Is this
correct? Does this influence the rate at which sinks ask for more data from
a source?

Thank you very much in advance,
Christian Frahm


************** TRACE *************

doGetNextFrame() - 2007-06-16 12:18:03.985
PES Size:15008
End of doGetNextFrame() - 2007-06-16 12:18:03.985
deliverFrame() - 2007-06-16 12:18:03.985
******* Copying PES to OutBuffer *************
Deliver Frame(): we have 15008 bytes to deliver. (fMaxSize = 60800.
End of deliverFrame() - 2007-06-16 12:18:03.985

doGetNextFrame() - 2007-06-16 12:18:03.985
PES Size:34952
End of doGetNextFrame() - 2007-06-16 12:18:03.986
deliverFrame() - 2007-06-16 12:18:03.986
******* Copying PES to OutBuffer *************
Deliver Frame(): we have 34952 bytes to deliver. (fMaxSize = 60800.
End of deliverFrame() - 2007-06-16 12:18:03.986
============= almost 400 ms!!!!!!!!!!!!!!!! ==================
doGetNextFrame() - 2007-06-16 12:18:04.343
PES Size:15080
End of doGetNextFrame() - 2007-06-16 12:18: 04.343
deliverFrame() - 2007-06-16 12:18:04.343
******* Copying PES to OutBuffer *************
Deliver Frame(): we have 15080 bytes to deliver. (fMaxSize = 60800.
End of deliverFrame() - 2007-06-16 12:18:04.344
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070617/3966b3c7/attachment.html 


More information about the live-devel mailing list