50#define BUF_SIZE (5*FRAME_TIME)
70 ast_debug(1,
"Created filestream G.726-%dk.\n", 40 - s->
rate * 8);
158 off_t offset = 0,
min = 0, cur,
max, distance;
160 if ((cur = ftello(fs->
f)) < 0) {
165 if (fseeko(fs->
f, 0, SEEK_END) < 0) {
170 if ((
max = ftello(fs->
f)) < 0) {
176 distance = sample_offset / 2;
177 if (whence == SEEK_SET) {
180 offset = distance + cur;
181 }
else if (whence == SEEK_END) {
182 offset =
max - distance;
186 offset = offset >
max ?
max : offset;
187 offset = offset <
min ?
min : offset;
189 return fseeko(fs->
f, offset, SEEK_SET);
199 return ftello(fs->
f) << 1;
Asterisk main include file. File version handling, generic pbx functions.
Asterisk architecture endianess compatibility definitions.
#define AST_FRAME_SET_BUFFER(fr, _base, _ofs, _datalen)
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
#define ast_debug(level,...)
Log a DEBUG message.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
struct ast_frame fr
frame produced by read, typically
struct ast_format * format
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data