[Live-devel] RTSP Client subclassing questions.

Cristiano Belloni belloni at imavis.com
Fri Jan 18 07:05:12 PST 2008


Ross Finlayson wrote:
>> Ross Finlayson wrote:
>>     
>>>>  However, I need some info: the camera I'm contacting does not send normal
>>>>  video frames, but custom ones. I need to unpack every RTP packet (_in
>>>>  order_), read the custom headers, reconstruct the frames and decode them
>>>>  on the fly.
>>>>    
>>>>         
>>>  Because your 'custom headers' are not RTP-specific, but are instead
>>>  part of your payload, you should not write any new RTP-specific code
>>>  for this.  Instead, just have the object that reads from your
>>>  "RTPSource" (subclass) object do the processing/decoding of these
>>>  custom frames.
>>>
>>>  
>>>       
>> Ehm, sorry, I didn't understand your answer. Do you mean I should
>> subclass RTPSource?
>>     
>
> 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. At the start of each packet 
there's a 16 or 6 bytes header that I must read, depending on the fact 
the packet starts a frame or is a middle/ending packet.

I'd need to analyze the payload of every RTP packet I receive, read the 
header, accumulate the MPEG-4 data following the header and, as soon as 
I have an MPEG-4 frame, pass it to a decoder.

Is there something like a function that is called everytime I get an RTP 
packet, so I can examine its payload?

-- 
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