35 #include "asterisk/mod_format.h"
49 #define BUF_SIZE 32768
61 if ((res = fread(&ts, 1,
sizeof(ts), s->
f)) <
sizeof(ts)) {
77 if ((res = fread(&len, 1,
sizeof(len), s->
f)) < 1)
80 mark = (len & 0x8000) ? 1 : 0;
100 if ((res = fread(&ts, 1,
sizeof(ts), s->
f)) ==
sizeof(ts)) {
102 *whennext = fs->
lastts * 4/45;
128 if ((res = fwrite(&ts, 1,
sizeof(ts), fs->
f)) !=
sizeof(ts)) {
132 len = htons(f->
datalen | mark);
133 if ((res = fwrite(&len, 1,
sizeof(len), fs->
f)) !=
sizeof(len)) {
155 if ((fd = fileno(fs->
f)) < 0) {
159 if ((cur = ftello(fs->
f)) < 0) {
164 return ftruncate(fd, cur);
169 off_t offset = ftello(fs->
f);
union ast_frame_subclass subclass
Asterisk main include file. File version handling, generic pbx functions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
#define AST_FRAME_SET_BUFFER(fr, _base, _ofs, _datalen)
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
Asterisk architecture endianess compatibility definitions.
char * ast_getformatname(format_t format)
Get the name of a format.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
if(yyss+yystacksize-1<=yyssp)
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of mem...
Data structure associated with a single frame of data.
enum ast_frame_type frametype
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
union ast_frame::@172 data
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.