Asterisk - The Open Source Telephony Project GIT-master-7e7a603
ex_codec2.h
Go to the documentation of this file.
1/*! \file
2 * \brief 8-bit raw data
3 *
4 * Copyright (C) 2016, Alexander Traud
5 *
6 * Distributed under the terms of the GNU General Public License
7 *
8 */
9
10#include "asterisk/format_cache.h" /* for ast_format_codec2 */
11#include "asterisk/frame.h" /* for ast_frame, etc */
12
13static uint8_t ex_codec2[] = {
14 0xea, 0xca, 0x14, 0x85, 0x91, 0x78,
15};
16
17static struct ast_frame *codec2_sample(void)
18{
19 static struct ast_frame f = {
21 .datalen = sizeof(ex_codec2),
23 .mallocd = 0,
24 .offset = 0,
25 .src = __PRETTY_FUNCTION__,
26 .data.ptr = ex_codec2,
27 };
28
30
31 return &f;
32}
#define CODEC2_SAMPLES
Definition: codec_codec2.c:48
static struct ast_frame * codec2_sample(void)
Definition: ex_codec2.h:17
static uint8_t ex_codec2[]
Definition: ex_codec2.h:13
Media Format Cache API.
struct ast_format * ast_format_codec2
Built-in cached Codec 2 format.
Definition: format_cache.c:226
Asterisk internal frame definitions.
@ AST_FRAME_VOICE
struct ast_format * format
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
enum ast_frame_type frametype
const char * src