[Live-devel] RTSP Client subclassing questions.

belloni at imavis.com belloni at imavis.com
Fri Jan 18 21:04:23 PST 2008


>>  > I'm saying that you might not need to write any new (sub)classes at
>>>  all.  Can you tell me some more about what your data looks like -
>>>  i.e., what video codec are you using, and how is the data different
>>>  from the standard?
>>>
>>It's MPEG-4 data, 1440 bytes a packet.
>
> MPEG-4 frames are variable-length, and so cannot always be 1440 bytes
> in length.

Maybe there is a misunderstanding.
The server will send RTP packets, payload size of 1440 bytes if they are
starting or middle frame packet. If they are ending frame packets, packet
length will  be variable:

[...]
---frame n starts
RTP packet - 1440 bytes payload
RTP packet - 1440 bytes payload
RTP packet - ? (< 1440) bytes payload
---frame n ends
---frame n+1 starts
RTP packet - 1440 bytes payload
RTP packet - 1440 bytes payload
RTP packet - 1440 bytes payload
RTP packet - 1440 bytes payload
RTP packet - ? (< 1440) bytes payload
---frame n+1 ends
[...]

What I'm asking is:

1) Is there a way to set up a function that's called every time an RTP
packet is received?

2) If there is, will the packtes be in order (i.e. function for packet n
is called _after_ function for packet n-1 and _before_ packet n+1)?

Alternatively, packets will normally have the mark flag set to "true" to
mark the boundaries  between a frame and the next.

3) Is there a way to set up a function that's called every time an RTP
frame  is received?



More information about the live-devel mailing list