Changeset 3078 for pjproject/trunk/pjmedia/include/pjmedia/codec.h
- Timestamp:
- Jan 27, 2010 11:48:31 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/codec.h
r2875 r3078 29 29 #include <pjmedia/port.h> 30 30 #include <pj/list.h> 31 #include <pj/pool.h> 31 32 32 33 PJ_BEGIN_DECL … … 245 246 * Structure of codec specific parameters which contains name=value pairs. 246 247 * The codec specific parameters are to be used with SDP according to 247 * the standards (e.g: RFC 3555) .248 * the standards (e.g: RFC 3555) in SDP 'a=fmtp' attribute. 248 249 */ 249 250 typedef struct pjmedia_codec_fmtp 250 251 { 251 pj_uint8_t cnt; 252 pj_uint8_t cnt; /**< Number of parameters. */ 252 253 struct param { 253 pj_str_t name; 254 pj_str_t val; 255 } param [PJMEDIA_CODEC_MAX_FMTP_CNT]; 254 pj_str_t name; /**< Parameter name. */ 255 pj_str_t val; /**< Parameter value. */ 256 } param [PJMEDIA_CODEC_MAX_FMTP_CNT]; /**< The parameters. */ 256 257 } pjmedia_codec_fmtp; 257 258 258 259 /** 259 * Detailed codec attributes used both to configure a codec and to query 260 * the capability of codec factories. 260 * Detailed codec attributes used in configuring a codec and in querying 261 * the capability of codec factories. Default attributes of any codecs could 262 * be queried using #pjmedia_codec_mgr_get_default_param() and modified 263 * using #pjmedia_codec_mgr_set_default_param(). 264 * 265 * Please note that codec parameter also contains SDP specific setting, 266 * #dec_fmtp and #enc_fmtp, which may need to be set appropriately based on 267 * the effective setting. See each codec documentation for more detail. 261 268 */ 262 269 typedef struct pjmedia_codec_param … … 629 636 630 637 638 /** 639 * Opaque declaration of default codecs parameters. 640 */ 641 typedef struct pjmedia_codec_default_param pjmedia_codec_default_param; 642 631 643 /** 632 644 * Codec manager maintains array of these structs for each supported … … 639 651 pjmedia_codec_priority prio; /**< Priority. */ 640 652 pjmedia_codec_factory *factory; /**< The factory. */ 653 pjmedia_codec_default_param *param; /**< Default codecs 654 parameters. */ 641 655 }; 642 656 … … 649 663 typedef struct pjmedia_codec_mgr 650 664 { 665 /** Media endpoint instance. */ 666 pj_pool_factory *pf; 667 668 /** Codec manager pool. */ 669 pj_pool_t *pool; 670 671 /** Codec manager mutex. */ 672 pj_mutex_t *mutex; 673 651 674 /** List of codec factories registered to codec manager. */ 652 pjmedia_codec_factory factory_list;653 654 /** Number of supported code sc. */655 unsigned codec_cnt;675 pjmedia_codec_factory factory_list; 676 677 /** Number of supported codecs. */ 678 unsigned codec_cnt; 656 679 657 680 /** Array of codec descriptor. */ 658 struct pjmedia_codec_desc codec_desc[PJMEDIA_CODEC_MGR_MAX_CODECS];681 struct pjmedia_codec_desc codec_desc[PJMEDIA_CODEC_MGR_MAX_CODECS]; 659 682 660 683 } pjmedia_codec_mgr; … … 667 690 * 668 691 * @param mgr Codec manager instance. 692 * @param pf Pool factory instance. 669 693 * 670 694 * @return PJ_SUCCESS on success. 671 695 */ 672 PJ_DECL(pj_status_t) pjmedia_codec_mgr_init(pjmedia_codec_mgr *mgr); 696 PJ_DECL(pj_status_t) pjmedia_codec_mgr_init(pjmedia_codec_mgr *mgr, 697 pj_pool_factory *pf); 698 699 700 /** 701 * Destroy codec manager. Normally this function is called by pjmedia 702 * endpoint's deinitialization code. 703 * 704 * @param mgr Codec manager instance. 705 * 706 * @return PJ_SUCCESS on success. 707 */ 708 PJ_DECL(pj_status_t) pjmedia_codec_mgr_destroy(pjmedia_codec_mgr *mgr); 673 709 674 710 … … 822 858 pjmedia_codec_param *param ); 823 859 860 861 /** 862 * Set default codec param for the specified codec info. 863 * 864 * @param mgr The codec manager instance. Application can get the 865 * instance by calling #pjmedia_endpt_get_codec_mgr(). 866 * @param info The codec info, which default parameter's is being 867 * updated. 868 * @param param The new default codec parameter. Set to NULL to reset 869 * codec parameter to library default settings. 870 * 871 * @return PJ_SUCCESS on success. 872 */ 873 PJ_DECL(pj_status_t) 874 pjmedia_codec_mgr_set_default_param( pjmedia_codec_mgr *mgr, 875 const pjmedia_codec_info *info, 876 const pjmedia_codec_param *param ); 877 878 824 879 /** 825 880 * Request the codec manager to allocate one instance of codec with the
Note: See TracChangeset
for help on using the changeset viewer.