35 #include "asterisk/mod_format.h"
45 if (len >
sizeof(buf) || len < 0) {
49 res = read(fd, buf, len);
53 memset(&fr, 0,
sizeof(fr));
66 res = read(fd, buf,
sizeof(buf));
67 if (res <
sizeof(buf))
69 if (memcmp(buf + 6,
"JFIF", 4))
97 .desc =
"JPEG (Joint Picture Experts Group)",
structure associated with registering an image format
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...)
struct ast_frame * ast_frisolate(struct ast_frame *fr)
Makes a frame independent of any static storage.
int ast_image_register(struct ast_imager *imgdrv)
Register image format.
General Asterisk channel definitions for image handling.
Asterisk architecture endianess compatibility definitions.
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...
Data structure associated with a single frame of data.
enum ast_frame_type frametype
void ast_image_unregister(struct ast_imager *imgdrv)
Unregister an image format.
#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.