-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcodec_evs.patch
58 lines (54 loc) · 1.42 KB
/
codec_evs.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--- include/asterisk/format_cache.h (Asterisk 13.13.1)
+++ include/asterisk/format_cache.h (working copy)
@@ -234,2 +234,7 @@
/*!
+ * \brief Built-in cached 3GPP EVS format.
+ */
+extern struct ast_format *ast_format_evs;
+
+/*!
* \brief Initialize format cache support within the core.
--- main/codec_builtin.c (Asterisk 13.13.1)
+++ main/codec_builtin.c (working copy)
@@ -855,2 +855,13 @@
+
+static struct ast_codec evs = {
+ .name = "evs",
+ .description = "3GPP EVS",
+ .type = AST_MEDIA_TYPE_AUDIO,
+ .sample_rate = 16000,
+ .minimum_ms = 20,
+ .maximum_ms = 300,
+ .default_ms = 20,
+};
+
#define CODEC_REGISTER_AND_CACHE(codec) \
@@ -887,2 +898,4 @@
+ res |= CODEC_REGISTER_AND_CACHE(evs);
+
res |= CODEC_REGISTER_AND_CACHE(g723);
--- main/format_cache.c (Asterisk 13.13.1)
+++ main/format_cache.c (working copy)
@@ -220,2 +220,7 @@
/*!
+ * \brief Built-in cached 3GPP EVS format.
+ */
+struct ast_format *ast_format_evs;
+
+/*!
* \brief Built-in cached t140 format.
@@ -302,2 +307,4 @@
+ ao2_replace(ast_format_evs, NULL);
+
ao2_replace(ast_format_g723, NULL);
@@ -416,2 +423,4 @@
ao2_replace(ast_format_g719, format);
+ } else if (!strcmp(name, "evs")) {
+ ao2_replace(ast_format_evs, format);
} else if (!strcmp(name, "opus")) {
--- main/rtp_engine.c (Asterisk 13.13.1)
+++ main/rtp_engine.c (working copy)
@@ -2307,2 +2307,4 @@
add_static_payload(107, ast_format_opus, 0);
+
+ ast_rtp_engine_load_format(ast_format_evs);