40    .description = 
"Unit test codec",
 
 
   49    .
name = 
"unit_test_double",
 
   50    .description = 
"Unit test codec",
 
 
   59    .
name = 
"unit_test_unknown",
 
   60    .description = 
"Unit test codec",
 
 
   69    .
name = 
"unit_test_audio_without_rate",
 
   70    .description = 
"Unit test codec",
 
 
   78    .
name = 
"unit_test_audio_get",
 
   79    .description = 
"Unit test codec",
 
 
   88    .
name = 
"unit_test_audio_get_unknown",
 
   89    .description = 
"Unit test codec",
 
 
   98    .
name = 
"unit_test_audio_get_id",
 
   99    .description = 
"Unit test codec",
 
 
  111        info->name = 
"codec_register";
 
  112        info->category = 
"/main/core_codec/";
 
  113        info->summary = 
"codec registration unit test";
 
  115            "Test registration of a core codec that is known to be unknown";
 
 
  133        info->name = 
"codec_register_twice";
 
  134        info->category = 
"/main/core_codec/";
 
  135        info->summary = 
"codec registration unit test";
 
  137            "Test double registration of a core codec to confirm it fails";
 
 
  160        info->name = 
"codec_register_unknown";
 
  161        info->category = 
"/main/core_codec/";
 
  162        info->summary = 
"codec registration unit test";
 
  164            "Test that registration of an unknown codec type fails";
 
 
  182        info->name = 
"codec_register_audio_no_sample_rate";
 
  183        info->category = 
"/main/core_codec/";
 
  184        info->summary = 
"codec registration unit test";
 
  186            "Test that registration of an audio codec without sample rate fails";
 
 
  206        info->name = 
"codec_get";
 
  207        info->category = 
"/main/core_codec/";
 
  208        info->summary = 
"codec get unit test";
 
  210            "Test that getting of a known codec succeeds";
 
 
  245        info->name = 
"codec_get_unregistered";
 
  246        info->category = 
"/main/core_codec/";
 
  247        info->summary = 
"codec get unit test";
 
  249            "Test that getting of a codec that is not registered fails";
 
 
  271        info->name = 
"codec_get_unknown";
 
  272        info->category = 
"/main/core_codec/";
 
  273        info->summary = 
"codec get unit test";
 
  275            "Test that getting of a known codec using name and unknown type succeeds";
 
 
  311        info->name = 
"codec_get_unknown";
 
  312        info->category = 
"/main/core_codec/";
 
  313        info->summary = 
"codec get unit test";
 
  315            "Test that getting of a known codec using name and unknown type succeeds";
 
 
Asterisk main include file. File version handling, generic pbx functions.
struct ast_codec * ast_codec_get(const char *name, enum ast_media_type type, unsigned int sample_rate)
Retrieve a codec given a name, type, and sample rate.
struct ast_codec * ast_codec_get_by_id(int id)
Retrieve a codec given the unique identifier.
#define ast_codec_register(codec)
This function is used to register a codec with the Asterisk core. Registering allows it to be passed ...
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
Represents a media codec within Asterisk.
unsigned int sample_rate
Sample rate (number of samples carried in a second)
enum ast_media_type type
Type of media this codec contains.
const char * name
Name for this codec.
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
#define AST_TEST_DEFINE(hdr)
static struct ast_codec audio_without_rate
static struct ast_codec audio_get
static struct ast_codec doubly
static struct ast_codec unknown
static int load_module(void)
static struct ast_codec audio_get_unknown
static int unload_module(void)
static struct ast_codec audio_get_id
static struct ast_codec known_unknown
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.