80    res = stat(filename, &st);
 
 
   88    if (filename[0] == 
'/') {
 
   90            snprintf(
buf, 
len, 
"%s-%s.%s", filename, preflang, 
ext);
 
   92            snprintf(
buf, 
len, 
"%s.%s", filename, 
ext);
 
 
  119            e = 
strsep(&stringp, 
"|");
 
  131                e = 
strsep(&stringp, 
"|");
 
  139        fd = open(
buf, O_RDONLY);
 
  143                lseek(fd, 0, SEEK_SET);
 
 
  174#define FORMAT "%10s %10s %50s %10s\n" 
  175#define FORMAT2 "%10s %10s %50s %10s\n" 
  181        e->
command = 
"core show image formats";
 
  183            "Usage: core show image formats\n" 
  184            "       Displays currently registered image formats (if any).\n";
 
  191    ast_cli(
a->fd, 
FORMAT, 
"Name", 
"Extensions", 
"Description", 
"Format");
 
  192    ast_cli(
a->fd, 
FORMAT, 
"----", 
"----------", 
"-----------", 
"------");
 
  199    ast_cli(
a->fd, 
"\n%d image format%s registered.\n", count_fmt, count_fmt == 1 ? 
"" : 
"s");
 
 
void ast_cli_unregister_multiple(void)
char * strsep(char **str, const char *delims)
Asterisk main include file. File version handling, generic pbx functions.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
General Asterisk PBX channel definitions.
const char * ast_channel_language(const struct ast_channel *chan)
Standard Command Line Interface.
#define AST_CLI_DEFINE(fn, txt,...)
void ast_cli(int fd, const char *fmt,...)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
Generic File Format Support. Should be included by clients of the file handling routines....
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
int ast_image_register(struct ast_imager *img)
Register image format.
int ast_send_image(struct ast_channel *chan, const char *filename)
Sends an image.
static char * handle_core_show_image_formats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
int ast_image_init(void)
Initialize image stuff Initializes all the various image stuff. Basically just registers the cli stuf...
static int file_exists(char *filename)
int ast_supports_images(struct ast_channel *chan)
Check for image support on a channel.
void ast_image_unregister(struct ast_imager *img)
Unregister an image format.
static void make_filename(char *buf, int len, const char *filename, const char *preflang, char *ext)
struct ast_frame * ast_read_image(const char *filename, const char *preflang, struct ast_format *format)
Make an image.
static void image_shutdown(void)
static struct ast_cli_entry cli_image[]
General Asterisk channel definitions for image handling.
#define ast_verb(level,...)
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized.
#define AST_RWLIST_REMOVE
#define AST_RWLIST_TRAVERSE
#define AST_RWLIST_INSERT_HEAD
Asterisk locking-related definitions:
Asterisk file paths, configured in asterisk.conf.
const char * ast_config_AST_DATA_DIR
Scheduler Routines (derived from cheops)
static force_inline int attribute_pure ast_strlen_zero(const char *s)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Structure to describe a channel "technology", ie a channel driver See for examples:
int(*const send_image)(struct ast_channel *chan, struct ast_frame *frame)
Display or send an image.
Main Channel structure associated with a channel.
descriptor for a cli entry.
Data structure associated with a single frame of data.
structure associated with registering an image format
struct ast_format * format
struct ast_frame *(* read_image)(int fd, int len)
Support for translation of data formats. translate.c.