[Live-devel] RTSP Client subclassing questions.

Ross Finlayson finlayson at live555.com
Thu Jan 17 13:52:19 PST 2008


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


>The question is: what method of what class should I subclass to have
>access to every single packet in sequence order?

You don't need to write any new code for this.  Our RTP reception 
code automatically ensures that incoming RTP packets are delivered in 
the correct order (based on RTP sequence number).


>Another quick question: instead of passing a starting UDP port to the
>client, can I pass an already-open UDP socket? The cameras will send
>packets to the same ports, if I let them decide, and if two or more
>instances of the client run at once, it will bring chaos & destruction,
>because they will try to bind to the same port.

I'm not sure I totally understand this question.  However, if you 
look at how "openRTSP" implements the "-p <startingPortNumber>" 
option, then that should give you the information you need.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list