|
Asterisk - The Open Source Telephony Project GIT-master-27fb039
|
General Asterisk channel definitions for image handling. More...

Go to the source code of this file.
Data Structures | |
| struct | ast_imager |
| structure associated with registering an image format More... | |
Functions | |
| int | ast_image_init (void) |
| Initialize image stuff Initializes all the various image stuff. Basically just registers the cli stuff. | |
| int | ast_image_register (struct ast_imager *imgdrv) |
| Register image format. | |
| void | ast_image_unregister (struct ast_imager *imgdrv) |
| Unregister an image format. | |
| struct ast_frame * | ast_read_image (const char *filename, const char *preflang, struct ast_format *format) |
| Make an image. | |
| int | ast_send_image (struct ast_channel *chan, const char *filename) |
| Sends an image. | |
| int | ast_supports_images (struct ast_channel *chan) |
| Check for image support on a channel. | |
General Asterisk channel definitions for image handling.
Definition in file image.h.
| int ast_image_init | ( | void | ) |
Initialize image stuff Initializes all the various image stuff. Basically just registers the cli stuff.
Definition at line 212 of file image.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_register_cleanup(), cli_image, and image_shutdown().
Referenced by asterisk_daemon().
| int ast_image_register | ( | struct ast_imager * | imgdrv | ) |
Register image format.
| imgdrv | Populated ast_imager structure with info to register Registers an image format |
Definition at line 48 of file image.c.
References AST_RWLIST_INSERT_HEAD, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, ast_imager::desc, and ast_imager::name.
| void ast_image_unregister | ( | struct ast_imager * | imgdrv | ) |
Unregister an image format.
| imgdrv | pointer to the ast_imager structure you wish to unregister Unregisters the image format passed in. |
Definition at line 57 of file image.c.
References AST_RWLIST_REMOVE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, ast_imager::desc, and ast_imager::name.
| struct ast_frame * ast_read_image | ( | const char * | filename, |
| const char * | preflang, | ||
| struct ast_format * | format | ||
| ) |
Make an image.
| filename | filename of image to prepare |
| preflang | preferred language to get the image...? |
| format | the format of the file, NULL for any image format Make an image from a filename ??? No estoy positivo |
| an | ast_frame on success |
| NULL | on failure |
Definition at line 101 of file image.c.
References ast_copy_string(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_log, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, buf, errno, ast_imager::exts, file_exists(), ast_imager::format, ast_imager::identify, len(), LOG_WARNING, make_filename(), ast_imager::name, NULL, ast_imager::read_image, and strsep().
Referenced by ast_send_image().
| int ast_send_image | ( | struct ast_channel * | chan, |
| const char * | filename | ||
| ) |
Sends an image.
| chan | channel to send image on |
| filename | filename of image to send (minus extension) Sends an image on the given channel. |
| 0 | on success |
| -1 | on error |
Definition at line 158 of file image.c.
References ast_channel_language(), ast_frfree, ast_read_image(), NULL, and ast_channel_tech::send_image.
Referenced by handle_sendimage().
| int ast_supports_images | ( | struct ast_channel * | chan | ) |