[Live-devel] MPEG4ESVideoRTPSource: Two frames at the price of one packet!

Cristiano Belloni belloni at imavis.com
Fri Feb 1 06:44:52 PST 2008


Hi to all, I'm implementing my MPEG4ESVideoRTPSource for a clients who 
gets non-standard MPEG4 data.

The problem is: packets are mixed. That is, when in a RTP packet a MPEG4 
frame finishes, immediately after (in the same packet) the next frame 
starts. Here's a schema of how it works:

|___frame_n_end_packet__|____frame_n+1_start_packet________|

(hope the mail clients won't mess up the ASCII schema)

I resolve the problem with a memory buffer.

Sometimes, rarely but constantly, I get a packet made of the ending part 
of a frame in the first part, then a *complete* frame in the second part:

|___frame_n_end_packet______|____complete_frame_n+1_____|

When I'm in these conditions, my own processSpecialHeader method has 
*two* frames on its hands, but can return only *one*.

Is there a way to make processSpecialHeader return more than one frame?

And if it's not, is there a way to stuff some special data in the frame 
that will be read from my custom sink, so that the sink could tell it's 
two frames instead of one and divide them accordingly?

Thank you very much,

Cristiano.

-- 
Belloni Cristiano
Imavis Srl.
www.imavis.com <http://www.imavis.com>
belloni at imavis.com <mailto://belloni@imavis.com>


More information about the live-devel mailing list