![]() |
Home page |
Mailing list |
Docs
Collaboration diagram for ast_format:Asterisk developer's documentation :: Codename Pineapple
ast_format Struct Reference
#include <file.h>

Definition at line 64 of file file.h.
Public Member Functions | |
| AST_LIST_ENTRY (ast_format) list | |
Data Fields | |
| int | buf_size |
| void(* | close )(struct ast_filestream *) |
| int | desc_size |
| char | exts [80] |
| int | format |
| char *(* | getcomment )(struct ast_filestream *) |
| ast_module * | module |
| char | name [80] |
| int(* | open )(struct ast_filestream *s) |
| ast_frame *(* | read )(struct ast_filestream *, int *whennext) |
| int(* | rewrite )(struct ast_filestream *s, const char *comment) |
| int(* | seek )(struct ast_filestream *, off_t, int) |
| off_t(* | tell )(struct ast_filestream *fs) |
| int(* | trunc )(struct ast_filestream *fs) |
| int(* | write )(struct ast_filestream *, struct ast_frame *) |
|
|
Retrieve file comment |
|
|
If the handler needs a buffer (for read, typically) and/or a private descriptor, put here the required size (in bytes) and the support routine will allocate them for you, pointed by s->buf and s->private, respectively. When allocating a buffer, remember to leave AST_FRIENDLY_OFFSET spare bytes at the bginning. Definition at line 106 of file file.h. Referenced by __ast_format_register(). |
|
|
Do any closing actions, if any. The descriptor and structure are closed and destroyed by the generic routines, so they must not be done here. Referenced by ast_closestream(). |
|
|
size of frame buffer, if any, aligned to 8 bytes. |
|
|
Name of format Definition at line 66 of file file.h. Referenced by __ast_format_register(), ast_filehelper(), and show_file_formats(). |
|
|
Extensions (separated by | if more than one) this format can read. First is assumed for writing (e.g. .mp3) Definition at line 68 of file file.h. Referenced by ast_closestream(), ast_streamfile(), ast_writestream(), and show_file_formats(). |
|
|
|
|
|
size of private descriptor, if any Definition at line 109 of file file.h. Referenced by __ast_format_register(), ast_closestream(), and fn_wrapper(). |
|
|
Definition at line 65 of file file.h. Referenced by __ast_format_register(), ast_format_unregister(), ast_writestream(), fn_wrapper(), and show_file_formats(). |
|
|
Prepare an input stream for playback. Return 0 on success, -1 on error. The FILE is already open (in s->f) so this function only needs to perform any applicable validity checks on the file. If none is required, the function can be omitted. Referenced by fn_wrapper(). |
|
|
Read the next frame from the filestream (if available) and report when to get next frame (in samples) |
|
|
Prepare a stream for output, and comment it appropriately if applicable. Return 0 on success, -1 on error. Same as the open, the FILE is already open so the function just needs to prepare any header and other fields, if any. The function can be omitted if nothing is needed. Referenced by fn_wrapper(). |
|
|
seek num samples into file, whence - like a normal seek but with offset in samples Referenced by ast_seekstream(). |
|
|
trunc file to current position Referenced by ast_tellstream(). |
|
|
Referenced by ast_truncstream(). |
|
|
Write a frame to a channel Referenced by ast_writestream(). |