summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-02-17 21:40:09 +0000
committerMark Michelson <mmichelson@digium.com>2009-02-17 21:40:09 +0000
commit6d60de7efad8e4d8adb5d2f9f6e3c5981c4d855d (patch)
tree6da358c2b50b3d6c2760f12d1375935507ca5c6b
parent57b89131a347e972e1d371b736554c918c8848b5 (diff)
Clear up documentation of AST_FRIENDLY_OFFSET in frame.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--include/asterisk/frame.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index 4a18bdbac..bb547962c 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -194,9 +194,17 @@ struct ast_frame {
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? */