aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/frame.h
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 22:51:48 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 22:51:48 +0000
commit4b2fc9d3e738dbb2e7dd297de2f35e571e350691 (patch)
treee611f1c508d4cbd9720858d06c92a4cfaa25dccb /include/asterisk/frame.h
parentfed34a6362c74a4f65bae5fb89bcae3f58db5f27 (diff)
Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits. - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution. (This doesn't affect anything immediately, until another codec has wb support.) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/frame.h')
-rw-r--r--include/asterisk/frame.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index b18575aaf..e51f6e638 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -243,8 +243,8 @@ extern struct ast_frame ast_null_frame;
#define AST_FORMAT_G726 (1 << 11)
/*! G.722 */
#define AST_FORMAT_G722 (1 << 12)
-/*! Maximum audio format */
-#define AST_FORMAT_MAX_AUDIO (1 << 15)
+/*! Raw 16-bit Signed Linear (16000 Hz) PCM */
+#define AST_FORMAT_SLINEAR16 (1 << 15)
/*! Maximum audio mask */
#define AST_FORMAT_AUDIO_MASK ((1 << 16)-1)
/*! JPEG Images */
@@ -261,14 +261,10 @@ extern struct ast_frame ast_null_frame;
#define AST_FORMAT_H264 (1 << 21)
/*! MPEG4 Video */
#define AST_FORMAT_MP4_VIDEO (1 << 22)
-/*! Maximum video format */
-#define AST_FORMAT_MAX_VIDEO (1 << 24)
#define AST_FORMAT_VIDEO_MASK (((1 << 25)-1) & ~(AST_FORMAT_AUDIO_MASK))
/*! T.140 Text format - ITU T.140, RFC 4351*/
#define AST_FORMAT_T140 (1 << 25)
-/*! Maximum text mask */
-#define AST_FORMAT_MAX_TEXT (1 << 26)
-#define AST_FORMAT_TEXT_MASK (((1 << 27)-1) & ~(AST_FORMAT_AUDIO_MASK) & ~(AST_FORMAT_VIDEO_MASK))
+#define AST_FORMAT_TEXT_MASK (((1 << 30)-1) & ~(AST_FORMAT_AUDIO_MASK) & ~(AST_FORMAT_VIDEO_MASK))
enum ast_control_frame_type {
AST_CONTROL_HANGUP = 1, /*!< Other end has hungup */
@@ -361,9 +357,9 @@ struct ast_option_header {
/*! \brief Definition of supported media formats (codecs) */
struct ast_format_list {
- int visible; /*!< Can we see this entry */
int bits; /*!< bitmask value */
char *name; /*!< short name */
+ int samplespersecond; /*!< Number of samples per second (8000/16000) */
char *desc; /*!< Description */
int fr_len; /*!< Single frame length in bytes */
int min_ms; /*!< Min value */