39#define TEST_CATEGORY "/main/core_format/" 
   72    .
name = 
"test_core_format_codec",
 
   73    .description = 
"Unit test codec used by test_core_format",
 
 
  149        if (!memcmp(pvt1, pvt2, 
sizeof(*pvt1))) {
 
 
  195    if (!strcmp(
name, 
"one")) {
 
  197    } 
else if (!strcmp(
name, 
"two")) {
 
 
  210    if (!strcmp(
name, 
"one")) {
 
  212    } 
else if (!strcmp(
name, 
"two")) {
 
 
  260        info->name = __PRETTY_FUNCTION__;
 
  262        info->summary = 
"Format creation unit test";
 
  264            "Test creation of a format";
 
 
  306        info->name = __PRETTY_FUNCTION__;
 
  308        info->summary = 
"Format creation w/ attributes unit test";
 
  310            "Test creation of a format with attributes";
 
  332    if (!format_w_attr) {
 
 
  357        info->name = __PRETTY_FUNCTION__;
 
  359        info->summary = 
"Format attribute retrieval unit test";
 
  361            "Test retrieval of format attributes";
 
  380    if (!format_w_attr) {
 
 
  407        info->name = __PRETTY_FUNCTION__;
 
  409        info->summary = 
"Format cloning unit test";
 
  411            "Test cloning of a format";
 
  433    if (!format_w_attr) {
 
  449    } 
else if (clone == format) {
 
  466    } 
else if (clone == format_w_attr) {
 
 
  489        info->name = __PRETTY_FUNCTION__;
 
  491        info->summary = 
"Format comparison unit test";
 
  493            "Test comparison of two different formats with same codec";
 
 
  545        info->name = __PRETTY_FUNCTION__;
 
  547        info->summary = 
"Format comparison unit test";
 
  549            "Test comparison of two different formats with different codec";
 
 
  596        info->name = __PRETTY_FUNCTION__;
 
  598        info->summary = 
"Format with attributes comparison unit test";
 
  600            "Test comparison of two different formats with attributes with same codec";
 
 
  658        info->name = __PRETTY_FUNCTION__;
 
  660        info->summary = 
"Joint format unit test";
 
  662            "Test joint format creation using two different formats with same codec";
 
 
  709        info->name = __PRETTY_FUNCTION__;
 
  711        info->summary = 
"Joint format attribute unit test";
 
  713            "Test joint format creation using two different formats with attributes and with same codec";
 
  753    ast_test_validate(
test, strcmp(
"a=fmtp:100 one=5;two=0\r\n", 
ast_str_buffer(fmtp)) == 0);
 
 
  772        info->name = __PRETTY_FUNCTION__;
 
  774        info->summary = 
"Joint format unit test";
 
  776            "Test that there is no joint format between two different formats with different codec";
 
 
  823        info->name = __PRETTY_FUNCTION__;
 
  825        info->summary = 
"Format copying unit test";
 
  827            "Test copying of a format";
 
  849    } 
else if (
copy != format) {
 
 
  865        info->name = __PRETTY_FUNCTION__;
 
  867        info->summary = 
"Format attribute setting unit test";
 
  869            "Test that attribute setting on a format without an interface fails";
 
 
  904        info->name = __PRETTY_FUNCTION__;
 
  906        info->summary = 
"Format attribute retrieval unit test";
 
  908            "Test that attribute retrieval on a format without an interface fails";
 
 
  942        info->name = __PRETTY_FUNCTION__;
 
  944        info->summary = 
"Format sdp parse unit test";
 
  946            "Test that sdp parsing on a format without an interface fails";
 
  965    if (generated != format) {
 
 
  982        info->name = __PRETTY_FUNCTION__;
 
  984        info->summary = 
"Format sdp parse/generate unit test";
 
  986            "Test that sdp parsing and generation on a format with an interface succeeds";
 
 1005    if (format == generated) {
 
 1012    ast_test_validate(
test, strcmp(
"a=fmtp:8 one=1000;two=256\r\n", 
ast_str_buffer(fmtp)) == 0);
 
 
struct sla_ringing_trunk * first
static int copy(char *infile, char *outfile)
Utility function to copy a file.
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
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.
#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
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
#define ast_str_alloca(init_len)
char *attribute_pure ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
Represents a media codec within Asterisk.
const char * name
Name for this codec.
Support for dynamic strings.
Contains all the initialization information required to store a new test definition.
Tracking object used to verify format attribute callbacks.
int format_parse_sdp_fmtp
int format_generate_sdp_fmtp
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
#define AST_TEST_DEFINE(hdr)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.