diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-04-09 22:31:38 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-04-09 22:31:38 +0000 |
commit | 957fff010c04043f7ed26dced42a8fcfb3491ef8 (patch) | |
tree | c42bcd5da05109819a93ae3a8fd2a949160761d4 /include/asterisk | |
parent | 70f18e5f31bca6f86233f1f124f11f9ea2b676a8 (diff) |
rename FR_SET_BUF to AST_FRAME_SET_BUFFER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/frame.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 21b596928..099e20080 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -111,7 +111,15 @@ struct ast_frame { struct ast_frame *next; }; -#define FR_SET_BUF(fr, _base, _ofs, _datalen) \ +/*! + * Set the various field of a frame to point to a buffer. + * Typically you set the base address of the buffer, the offset as + * AST_FRIENDLY_OFFSET, and the datalen as the amount of bytes queued. + * The remaining things (to be done manually) is set the number of + * samples, which cannot be derived from the datalen unless you know + * the number of bits per sample. + */ +#define AST_FRAME_SET_BUFFER(fr, _base, _ofs, _datalen) \ { \ (fr)->data = (char *)_base + (_ofs); \ (fr)->offset = (_ofs); \ |