[Asterisk-video] video RTP question

Gallmeier, Jonathan Jonathan.Gallmeier at polycom.com
Mon Aug 24 08:59:27 CDT 2009


Thanks. I appreciate your comment.

I spent a little time reading the RTP code in rtp.c. As it turns out,
the 12 bytes prior to the frame data contains the RTP header. The header
appears to be copied when a copy of the frame is made. All I needed to
do to recover the header is index _backwards_ 12 bytes from the ptr
field in the frame structure. 

Even though Asterisk is a multi-protocol PBX, RTP is commonly used to
handle real-time video transport. Both H.323 and SIP encapsulate RTP. I
don't know what the overall roadmap looks like for Asterisk video
support, but handling RTP headers should be pretty high on the list. The
simple reason is that compressed video frames tend to span multiple RTP
packets and there are rules on how the video bitstream can be split up.
Stripping the RTP headers early means that someone else down the line
would need to partially decode the video bitstream to properly re-create
the RTP header in order to bridge to another protocol. The compute
required for this is not insignificant when you consider scaling the PBX
to a large number of users. I don't know if this makes sense, but I
think that it is important to consider if video is to be a major feature
of Asterisk. At the very least, ensure that protocols do not break the
existing behavior.

Jonathan


> -----Original Message-----
> From: asterisk-video-bounces at lists.digium.com [mailto:asterisk-video-
> bounces at lists.digium.com] On Behalf Of Olle E. Johansson
> Sent: Saturday, August 22, 2009 3:38 AM
> To: Development discussion of video media support in Asterisk
> Subject: Re: [Asterisk-video] video RTP question
> 
> 
> 20 aug 2009 kl. 16.35 skrev Gallmeier, Jonathan:
> 
> > I have a very basic question regarding how the RTP headers are
> > handled within the Asterisk video channels. I discovered that the
> > RTP headers are stripped off for the audio channels, leaving the
> > compressed audio bitstream. Adding them back in is reasonably
> > trivial in my soft phone sip bridge application that I'm writing.
> >
> > For video, is the same thing done? Are the RTP headers stripped off,
> > leaving only the compressed video bitstream? Is there an easy way to
> > tell Asterisk channels to leave the RTP headers intact within an
> > Asterisk channel so that I don't have to partially parse the
> > bitstream to determine RTP header parameters when the video frame is
> > broken between multiple RTP packets? Unfortunately, I have to give
> > my smart phone RTP packets with headers. It won't accept simple
> > video bistreams.
> >
> 
> Asterisk is a multiprotocol PBX and onl a limited set of the channels
> actually use RTP. So internally, Asterisk doesn't use RTP framing at
> all.
> 
> /O
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video



More information about the asterisk-video mailing list