Asterisk - The Open Source Telephony Project
GIT-master-f36a736
codecs
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
13
static
uint8_t
ex_codec2
[] = {
14
0xea, 0xca, 0x14, 0x85, 0x91, 0x78,
15
};
16
17
static
struct
ast_frame
*
codec2_sample
(
void
)
18
{
19
static
struct
ast_frame
f = {
20
.
frametype
=
AST_FRAME_VOICE
,
21
.datalen =
sizeof
(
ex_codec2
),
22
.
samples
=
CODEC2_SAMPLES
,
23
.
mallocd
= 0,
24
.
offset
= 0,
25
.
src
= __PRETTY_FUNCTION__,
26
.
data
.ptr =
ex_codec2
,
27
};
28
29
f.
subclass
.
format
=
ast_format_codec2
;
30
31
return
&f;
32
}
CODEC2_SAMPLES
#define CODEC2_SAMPLES
Definition:
codec_codec2.c:48
codec2_sample
static struct ast_frame * codec2_sample(void)
Definition:
ex_codec2.h:17
ex_codec2
static uint8_t ex_codec2[]
Definition:
ex_codec2.h:13
format_cache.h
Media Format Cache API.
ast_format_codec2
struct ast_format * ast_format_codec2
Built-in cached Codec 2 format.
Definition:
format_cache.c:226
frame.h
Asterisk internal frame definitions.
AST_FRAME_VOICE
@ AST_FRAME_VOICE
Definition:
include/asterisk/frame.h:101
ast_frame_subclass::format
struct ast_format * format
Definition:
include/asterisk/frame.h:155
ast_frame
Data structure associated with a single frame of data.
Definition:
include/asterisk/frame.h:165
ast_frame::subclass
struct ast_frame_subclass subclass
Definition:
include/asterisk/frame.h:169
ast_frame::data
union ast_frame::@226 data
ast_frame::samples
int samples
Definition:
include/asterisk/frame.h:173
ast_frame::frametype
enum ast_frame_type frametype
Definition:
include/asterisk/frame.h:167
ast_frame::mallocd
int mallocd
Definition:
include/asterisk/frame.h:175
ast_frame::offset
int offset
Definition:
include/asterisk/frame.h:179
ast_frame::src
const char * src
Definition:
include/asterisk/frame.h:181
Generated on Wed Dec 18 2024 20:04:15 for Asterisk - The Open Source Telephony Project by
1.9.4