[asterisk-commits] mmichelson: trunk r176697 - /trunk/include/asterisk/frame.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Feb 17 15:40:10 CST 2009
Author: mmichelson
Date: Tue Feb 17 15:40:09 2009
New Revision: 176697
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176697
Log:
Clear up documentation of AST_FRIENDLY_OFFSET in frame.h
Modified:
trunk/include/asterisk/frame.h
Modified: trunk/include/asterisk/frame.h
URL: http://svn.digium.com/svn-view/asterisk/trunk/include/asterisk/frame.h?view=diff&rev=176697&r1=176696&r2=176697
==============================================================================
--- trunk/include/asterisk/frame.h (original)
+++ trunk/include/asterisk/frame.h Tue Feb 17 15:40:09 2009
@@ -194,9 +194,17 @@
for this purpose instead of having to declare one on the stack */
extern struct ast_frame ast_null_frame;
-#define AST_FRIENDLY_OFFSET 64 /*! It's polite for a a new frame to
- have this number of bytes for additional
- headers. */
+/*! \brief Offset into a frame's data buffer.
+ *
+ * By providing some "empty" space prior to the actual data of an ast_frame,
+ * this gives any consumer of the frame ample space to prepend other necessary
+ * information without having to create a new buffer.
+ *
+ * As an example, RTP can use the data from an ast_frame and simply prepend the
+ * RTP header information into the space provided by AST_FRIENDLY_OFFSET instead
+ * of having to create a new buffer with the necessary space allocated.
+ */
+#define AST_FRIENDLY_OFFSET 64
#define AST_MIN_OFFSET 32 /*! Make sure we keep at least this much handy */
/*! Need the header be free'd? */
More information about the asterisk-commits
mailing list