Wed Jan 8 2020 09:49:47

Asterisk developer's documentation


ex_g726.h
Go to the documentation of this file.
1 /*! \file
2  * \brief 4-bit G.726 data
3  *
4  * Copyright (C) 2008, Digium, Inc.
5  *
6  * Distributed under the terms of the GNU General Public License
7  *
8  */
9 
10 static uint8_t ex_g726[] = {
11  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
16 };
17 
18 static struct ast_frame *g726_sample(void)
19 {
20  static struct ast_frame f = {
22  .subclass.codec = AST_FORMAT_G726,
23  .datalen = sizeof(ex_g726),
24  .samples = ARRAY_LEN(ex_g726) * 2, /* 2 samples per byte */
25  .mallocd = 0,
26  .offset = 0,
27  .src = __PRETTY_FUNCTION__,
28  .data.ptr = ex_g726,
29  };
30 
31  return &f;
32 }
#define ARRAY_LEN(a)
Definition: isdn_lib.c:42
static struct ast_frame * g726_sample(void)
Definition: ex_g726.h:18
static uint8_t ex_g726[]
Definition: ex_g726.h:10
#define AST_FORMAT_G726
Definition: frame.h:264
static struct ast_format f[]
Definition: format_g726.c:181
Data structure associated with a single frame of data.
Definition: frame.h:142
enum ast_frame_type frametype
Definition: frame.h:144
int samples
Definition: frame.h:150