Merge H.263+ support (bug #3709)
authorMark Spencer <markster@digium.com>
Sat, 5 Mar 2005 20:57:49 +0000 (20:57 +0000)
committerMark Spencer <markster@digium.com>
Sat, 5 Mar 2005 20:57:49 +0000 (20:57 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5149 65c4cc65-6c06-0410-ace0-fbb531ad65f3

frame.c
include/asterisk/frame.h
rtp.c

diff --git a/frame.c b/frame.c
index 3cf54ee..0750fec 100755 (executable)
--- a/frame.c
+++ b/frame.c
@@ -420,6 +420,7 @@ static struct ast_format_list AST_FORMAT_LIST[] = {
        { 1, AST_FORMAT_PNG, "png", "PNG image"},
        { 1, AST_FORMAT_H261, "h261", "H.261 Video" },
        { 1, AST_FORMAT_H263, "h263", "H.263 Video" },
+       { 1, AST_FORMAT_H263_PLUS, "h263p", "H.263+ Video" },
        { 0, 0, "nothing", "undefined" },
        { 0, 0, "nothing", "undefined" },
        { 0, 0, "nothing", "undefined" },
@@ -559,7 +560,7 @@ static int show_codecs(int fd, int argc, char *argv[])
 
        if ((argc == 2) || (!strcasecmp(argv[1],"video"))) {
                found = 1;
-               for (i=18;i<20;i++) {
+               for (i=18;i<21;i++) {
                        snprintf(hex,25,"(0x%x)",1<<i);
                        ast_cli(fd, "%11u (1 << %2d) %10s  video   %5s   (%s)\n",1 << i,i,hex,ast_getformatname(1<<i),ast_codec2str(1<<i));
                }
index 70137bd..11018a6 100755 (executable)
@@ -192,6 +192,8 @@ struct ast_frame_chain {
 #define AST_FORMAT_H261                (1 << 18)
 /*! H.263 Video */
 #define AST_FORMAT_H263                (1 << 19)
+/*! H.263+ Video */
+#define AST_FORMAT_H263_PLUS   (1 << 20)
 /*! Max one */
 #define AST_FORMAT_MAX_VIDEO   (1 << 24)
 
diff --git a/rtp.c b/rtp.c
index 4cb5979..037b123 100755 (executable)
--- a/rtp.c
+++ b/rtp.c
@@ -666,6 +666,7 @@ static struct {
   {{1, AST_FORMAT_PNG}, "video", "PNG"},
   {{1, AST_FORMAT_H261}, "video", "H261"},
   {{1, AST_FORMAT_H263}, "video", "H263"},
+  {{1, AST_FORMAT_H263_PLUS}, "video", "h263-1998"},
 };
 
 /* Static (i.e., well-known) RTP payload types for our "AST_FORMAT..."s:
@@ -690,6 +691,7 @@ static struct rtpPayloadType static_RTP_PT[MAX_RTP_PT] = {
   [26] = {1, AST_FORMAT_JPEG},
   [31] = {1, AST_FORMAT_H261},
   [34] = {1, AST_FORMAT_H263},
+  [103] = {1, AST_FORMAT_H263_PLUS},
   [97] = {1, AST_FORMAT_ILBC},
   [101] = {0, AST_RTP_DTMF},
   [110] = {1, AST_FORMAT_SPEEX},
@@ -1400,6 +1402,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
                /* fall through to... */
        case AST_FORMAT_H261:
        case AST_FORMAT_H263:
+       case AST_FORMAT_H263_PLUS:
        case AST_FORMAT_G723_1:
        case AST_FORMAT_LPC10:
        case AST_FORMAT_SPEEX: