Asterisk.org: Developer Documentation (28 Oct 2009)

Wed Oct 28 15:49:33 2009

## Asterisk developer's documentation

# ast_translator Struct Reference

`#include <translate.h>`

Collaboration diagram for ast_translator:

[legend]

## Data Fields

int | cost
void(* | destroy )(struct ast_translator_pvt *pvt)
int | dstfmt
int(* | framein )(struct ast_translator_pvt *pvt, struct ast_frame *in)
struct ast_frame *(* | frameout )(struct ast_translator_pvt *pvt)
char | name [80]
struct ast_translator_pvt *(* | newpvt )(void)
struct ast_translator * | next
struct ast_frame *(* | sample )(void)
int | srcfmt

## Detailed Description

data structure associated with a translator

Definition at line 39 of file translate.h.

## Field Documentation

int cost

Cost in milliseconds for encoding/decoding 1 second of sound

Definition at line 58 of file translate.h.

Referenced by ast_register_translator(), ast_translator_best_choice(), calc_cost(), rebuild_matrix(), and show_translation().

void(* destroy)(struct ast_translator_pvt *pvt)

Destroy translator callback

Referenced by ast_translator_free_path(), calc_cost(), and register_translator().

int dstfmt

Destination format

Definition at line 45 of file translate.h.

Referenced by ast_register_translator(), ast_unregister_translator(), drop_translator(), rebuild_matrix(), and register_translator().

int(* framein)(struct ast_translator_pvt *pvt, struct ast_frame *in)

Input frame callback

Referenced by ast_translate(), calc_cost(), and register_translator().

struct ast_frame*(* frameout)(struct ast_translator_pvt *pvt)`[read]`

Output frame callback

Referenced by calc_cost(), and register_translator().

char name[80]

Name of translator

Definition at line 41 of file translate.h.

Referenced by ast_register_translator(), ast_unregister_translator(), calc_cost(), and register_translator().

struct ast_translator_pvt*(* newpvt)(void)`[read]`

Private data associated with the translator

Referenced by ast_translator_build_path(), calc_cost(), and register_translator().

struct ast_translator* next`[read]`

For linking, not to be modified by the translator

Definition at line 60 of file translate.h.

Referenced by ast_register_translator(), ast_unregister_translator(), and rebuild_matrix().

struct ast_frame*(* sample)(void)`[read]`

Generate an example frame

Referenced by calc_cost(), and register_translator().

int srcfmt

Source format

Definition at line 43 of file translate.h.

Referenced by ast_register_translator(), ast_unregister_translator(), drop_translator(), rebuild_matrix(), and register_translator().

The documentation for this struct was generated from the following file:

- translate.h