[asterisk-commits] mjordan: branch group/media_formats-reviewed-trunk r418711 - in /team/group/m...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 15 14:43:41 CDT 2014
Author: mjordan
Date: Tue Jul 15 14:43:35 2014
New Revision: 418711
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418711
Log:
Add minimum bytes to builtin codecs for smoothers
This patch does two things:
1. It makes the full value of the sample rate of 44kHZ SLIN 44100, as opposed
to 44000 (as this is what that rate actually is)
2. It updates the built-in codecs with their minimum byte values. These values
were pulled from the previous format static definitions in prior versions of
Asterisk.
Using this, smoothers can be created successfully.
Review: https://reviewboard.asterisk.org/r/3793/
Modified:
team/group/media_formats-reviewed-trunk/codecs/codec_resample.c
team/group/media_formats-reviewed-trunk/main/codec_builtin.c
Modified: team/group/media_formats-reviewed-trunk/codecs/codec_resample.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/codecs/codec_resample.c?view=diff&rev=418711&r1=418710&r2=418711
==============================================================================
--- team/group/media_formats-reviewed-trunk/codecs/codec_resample.c (original)
+++ team/group/media_formats-reviewed-trunk/codecs/codec_resample.c Tue Jul 15 14:43:35 2014
@@ -71,7 +71,7 @@
{
.name = "slin",
.type = AST_MEDIA_TYPE_AUDIO,
- .sample_rate = 44000,
+ .sample_rate = 44100,
},
{
.name = "slin",
Modified: team/group/media_formats-reviewed-trunk/main/codec_builtin.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/main/codec_builtin.c?view=diff&rev=418711&r1=418710&r2=418711
==============================================================================
--- team/group/media_formats-reviewed-trunk/main/codec_builtin.c (original)
+++ team/group/media_formats-reviewed-trunk/main/codec_builtin.c Tue Jul 15 14:43:35 2014
@@ -99,6 +99,7 @@
.minimum_ms = 30,
.maximum_ms = 300,
.default_ms = 30,
+ .minimum_bytes = 20,
.samples_count = g723_samples,
.get_length = g723_length,
};
@@ -120,6 +121,7 @@
.minimum_ms = 10,
.maximum_ms = 150,
.default_ms = 20,
+ .minimum_bytes = 20,
.samples_count = none_samples,
.get_length = none_length,
};
@@ -142,6 +144,7 @@
.minimum_ms = 10,
.maximum_ms = 150,
.default_ms = 20,
+ .minimum_bytes = 80,
.samples_count = ulaw_samples,
.get_length = ulaw_length,
.smooth = 1,
@@ -155,6 +158,7 @@
.minimum_ms = 10,
.maximum_ms = 150,
.default_ms = 20,
+ .minimum_bytes = 80,
.samples_count = ulaw_samples,
.get_length = ulaw_length,
.smooth = 1,
@@ -178,6 +182,7 @@
.minimum_ms = 20,
.maximum_ms = 300,
.default_ms = 20,
+ .minimum_bytes = 33,
.samples_count = gsm_samples,
.get_length = gsm_length,
.smooth = 1,
@@ -201,6 +206,7 @@
.minimum_ms = 10,
.maximum_ms = 300,
.default_ms = 20,
+ .minimum_bytes = 40,
.samples_count = g726_samples,
.get_length = g726_length,
.smooth = 1,
@@ -214,6 +220,7 @@
.minimum_ms = 10,
.maximum_ms = 300,
.default_ms = 20,
+ .minimum_bytes = 40,
.samples_count = g726_samples,
.get_length = g726_length,
.smooth = 1,
@@ -227,6 +234,7 @@
.minimum_ms = 10,
.maximum_ms = 300,
.default_ms = 20,
+ .minimum_bytes = 40,
.samples_count = g726_samples,
.get_length = g726_length,
.smooth = 1,
@@ -250,6 +258,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 160,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -263,6 +272,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 240,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -276,6 +286,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 320,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -289,6 +300,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 480,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -302,6 +314,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 640,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -311,10 +324,11 @@
.name = "slin",
.description = "16 bit Signed Linear PCM (44kHz)",
.type = AST_MEDIA_TYPE_AUDIO,
- .sample_rate = 44000,
+ .sample_rate = 44100,
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 882,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -328,6 +342,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 960,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -341,6 +356,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 1920,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -354,6 +370,7 @@
.minimum_ms = 10,
.maximum_ms = 70,
.default_ms = 20,
+ .minimum_bytes = 3840,
.samples_count = slin_samples,
.get_length = slin_length,
.smooth = 1,
@@ -377,6 +394,7 @@
.minimum_ms = 20,
.maximum_ms = 20,
.default_ms = 20,
+ .minimum_bytes = 7,
.samples_count = lpc10_samples,
.smooth = 1,
};
@@ -399,6 +417,7 @@
.minimum_ms = 10,
.maximum_ms = 230,
.default_ms = 20,
+ .minimum_bytes = 10,
.samples_count = g729_samples,
.get_length = g729_length,
.smooth = 1,
@@ -526,6 +545,7 @@
.minimum_ms = 10,
.maximum_ms = 60,
.default_ms = 20,
+ .minimum_bytes = 10,
.samples_count = speex8_samples,
};
@@ -542,6 +562,7 @@
.minimum_ms = 10,
.maximum_ms = 60,
.default_ms = 20,
+ .minimum_bytes = 10,
.samples_count = speex16_samples,
};
@@ -558,6 +579,7 @@
.minimum_ms = 10,
.maximum_ms = 60,
.default_ms = 20,
+ .minimum_bytes = 10,
.samples_count = speex32_samples,
};
@@ -574,6 +596,7 @@
.minimum_ms = 30,
.maximum_ms = 30,
.default_ms = 30,
+ .minimum_bytes = 50,
.samples_count = ilbc_samples,
.smooth = 1,
};
@@ -586,6 +609,7 @@
.minimum_ms = 10,
.maximum_ms = 150,
.default_ms = 20,
+ .minimum_bytes = 80,
.samples_count = g726_samples,
.get_length = g726_length,
.smooth = 1,
@@ -609,6 +633,7 @@
.minimum_ms = 20,
.maximum_ms = 80,
.default_ms = 20,
+ .minimum_bytes = 80,
.samples_count = siren7_samples,
.get_length = siren7_length,
};
@@ -631,6 +656,7 @@
.minimum_ms = 20,
.maximum_ms = 80,
.default_ms = 20,
+ .minimum_bytes = 120,
.samples_count = siren14_samples,
.get_length = siren14_length,
};
@@ -643,6 +669,7 @@
.minimum_ms = 10,
.maximum_ms = 150,
.default_ms = 20,
+ .minimum_bytes = 80,
.samples_count = ulaw_samples,
.get_length = ulaw_length,
.smooth = 1,
@@ -666,6 +693,7 @@
.minimum_ms = 20,
.maximum_ms = 80,
.default_ms = 20,
+ .minimum_bytes = 160,
.samples_count = g719_samples,
.get_length = g719_length,
};
@@ -678,6 +706,7 @@
.minimum_ms = 20,
.maximum_ms = 60,
.default_ms = 20,
+ .minimum_bytes = 10,
};
static struct ast_codec jpeg = {
More information about the asterisk-commits
mailing list