Ignore:
Timestamp:
Aug 21, 2015 6:00:46 AM (9 years ago)
Author:
riza
Message:

Re #1879:

  • Implement set video codec param in PJSUA2 API
  • Fix bug in videoCodecEnum and updateCodecInfoList
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua2/media.hpp

    r5139 r5165  
    19421942 
    19431943/** 
    1944  * Codec parameters, corresponds to pjmedia_codec_param or 
    1945  * pjmedia_vid_codec_param. 
     1944 * Codec parameters, corresponds to pjmedia_codec_param. 
    19461945 */ 
    19471946typedef void *CodecParam; 
    19481947 
     1948/** 
     1949 * Structure of codec specific parameters which contains name=value pairs. 
     1950 * The codec specific parameters are to be used with SDP according to 
     1951 * the standards (e.g: RFC 3555) in SDP 'a=fmtp' attribute. 
     1952 */ 
     1953typedef struct CodecFmtp 
     1954{ 
     1955    string name; 
     1956    string val; 
     1957} CodecFmtp; 
     1958 
     1959/** Array of codec fmtp */ 
     1960typedef std::vector<CodecFmtp> CodecFmtpVector; 
     1961 
     1962/** 
     1963 * Detailed codec attributes used in configuring a codec and in querying 
     1964 * the capability of codec factories.  
     1965 * 
     1966 * Please note that codec parameter also contains SDP specific setting, 
     1967 * #decFmtp and #encFmtp, which may need to be set appropriately based on 
     1968 * the effective setting. See each codec documentation for more detail. 
     1969 */ 
     1970struct VidCodecParam 
     1971{ 
     1972    pjmedia_dir         dir;            /**< Direction                      */ 
     1973    pjmedia_vid_packing packing;        /**< Packetization strategy.        */ 
     1974 
     1975    struct 
     1976    MediaFormatVideo    encFmt;         /**< Encoded format                 */ 
     1977    CodecFmtpVector     encFmtp;        /**< Encoder fmtp params            */ 
     1978    unsigned            encMtu;         /**< MTU or max payload size setting*/ 
     1979 
     1980    struct 
     1981    MediaFormatVideo    decFmt;         /**< Decoded format                 */ 
     1982    CodecFmtpVector     decFmtp;        /**< Decoder fmtp params            */ 
     1983 
     1984    bool                ignoreFmtp;     /**< Ignore fmtp params. If set to 
     1985                                             true, the codec will apply 
     1986                                             format settings specified in 
     1987                                             encFmt and decFmt only.        */ 
     1988 
     1989    void fromPj(const pjmedia_vid_codec_param &param); 
     1990 
     1991    pjmedia_vid_codec_param toPj() const; 
     1992 
     1993private: 
     1994    void setCodecFmtp(const pjmedia_codec_fmtp &in_fmtp,  
     1995                      CodecFmtpVector &out_fmtp); 
     1996 
     1997    void getCodecFmtp(const CodecFmtpVector &in_fmtp, 
     1998                      pjmedia_codec_fmtp &out_fmtp) const; 
     1999 
     2000}; 
     2001 
    19492002 
    19502003/** 
Note: See TracChangeset for help on using the changeset viewer.