diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2008-08-25 13:58:25 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2008-08-25 13:58:25 +0000 |
commit | 920d97341f9c044fd012f6b41fff01e4c9563a16 (patch) | |
tree | d34b163083b56edc8c7196667a05000da4091358 /pjmedia/include | |
parent | 6ddea349e453f1a4147ab10f55726079c1bc4d96 (diff) |
Ticket #599:
- Added "dec_fmtp" and "enc_fmtp" fields to pjmedia_codec_param.setting.
- Codec factory puts its default parameters in "dec_fmtp" field.
- pjmedia_stream_info_from_sdp() puts the "fmtp" attribute in SDP to pjmedia_codec_param.
- Special treatment for fmtp "bitrate" parameter (of G722.1) during SDP negotiation
- Added maxptime field in stream_info.
- Replaced iLBC's fmtp "mode" implementation to use general fmtp mechanism.
- Added some test scripts for G722.1 bitrate negotiation.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2236 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia-codec/types.h | 4 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/codec.h | 19 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/stream.h | 1 |
3 files changed, 21 insertions, 3 deletions
diff --git a/pjmedia/include/pjmedia-codec/types.h b/pjmedia/include/pjmedia-codec/types.h index 32f55250..a749b576 100644 --- a/pjmedia/include/pjmedia-codec/types.h +++ b/pjmedia/include/pjmedia-codec/types.h @@ -61,7 +61,9 @@ enum PJMEDIA_RTP_PT_G726_24, /**< G726 @ 24Kbps */ /* PJMEDIA_RTP_PT_G726_32,*/ /**< G726 @ 32Kbps, static? */ PJMEDIA_RTP_PT_G726_40, /**< G726 @ 40Kbps */ - PJMEDIA_RTP_PT_G722_1, /**< G722.1 (16-32Kbps) */ + PJMEDIA_RTP_PT_G722_1_16, /**< G722.1 (16Kbps) */ + PJMEDIA_RTP_PT_G722_1_24, /**< G722.1 (24Kbps) */ + PJMEDIA_RTP_PT_G722_1_32, /**< G722.1 (32Kbps) */ }; diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h index 55459f41..0241e229 100644 --- a/pjmedia/include/pjmedia/codec.h +++ b/pjmedia/include/pjmedia/codec.h @@ -238,6 +238,21 @@ typedef struct pjmedia_codec_info unsigned channel_cnt; /**< Channel count. */ } pjmedia_codec_info; +#define PJMEDIA_CODEC_MAX_FMTP_CNT 8 + +/** + * Structure of codec specific parameters which contains name=value pairs. + * The codec specific parameters are to be used with SDP according to + * the standards (e.g: RFC 3555). + */ +typedef struct pjmedia_codec_fmtp +{ + pj_uint8_t cnt; + struct param { + pj_str_t name; + pj_str_t val; + } param [PJMEDIA_CODEC_MAX_FMTP_CNT]; +} pjmedia_codec_fmtp; /** * Detailed codec attributes used both to configure a codec and to query @@ -277,8 +292,8 @@ typedef struct pjmedia_codec_param unsigned penh:1; /**< Perceptual Enhancement */ unsigned plc:1; /**< Packet loss concealment */ unsigned reserved:1; /**< Reserved, must be zero. */ - pj_uint8_t enc_fmtp_mode; /**< Mode param in fmtp (def:0) */ - pj_uint8_t dec_fmtp_mode; /**< Mode param in fmtp (def:0) */ + pjmedia_codec_fmtp enc_fmtp;/**< Encoder's fmtp params. */ + pjmedia_codec_fmtp dec_fmtp;/**< Decoder's fmtp params. */ } setting; } pjmedia_codec_param; diff --git a/pjmedia/include/pjmedia/stream.h b/pjmedia/include/pjmedia/stream.h index 59ae0749..b14ef377 100644 --- a/pjmedia/include/pjmedia/stream.h +++ b/pjmedia/include/pjmedia/stream.h @@ -108,6 +108,7 @@ struct pjmedia_stream_info pjmedia_codec_info fmt; /**< Incoming codec format info. */ pjmedia_codec_param *param; /**< Optional codec param. */ unsigned tx_pt; /**< Outgoing codec paylaod type. */ + unsigned tx_maxptime;/**< Outgoing codec max ptime. */ int tx_event_pt;/**< Outgoing pt for telephone-events. */ int rx_event_pt;/**< Incoming pt for telephone-events. */ pj_uint32_t ssrc; /**< RTP SSRC. */ |