Changeset 5242 for pjproject/trunk


Ignore:
Timestamp:
Feb 18, 2016 3:15:19 AM (9 years ago)
Author:
riza
Message:

Misc (Re #1882): Add compile time option (PJMEDIA_HAS_DTMF_FLASH) to enable/disable DTMF flash as specified in rfc2833.

Location:
pjproject/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/config.h

    r5239 r5242  
    13221322#endif 
    13231323 
     1324 
    13241325/** 
    13251326 * Specify if libyuv is available. 
     
    13311332#endif 
    13321333 
     1334 
     1335/** 
     1336 * Specify if dtmf flash in RFC 2833 is available. 
     1337 */ 
     1338#ifndef PJMEDIA_HAS_DTMF_FLASH 
     1339#   define PJMEDIA_HAS_DTMF_FLASH                       1 
     1340#endif 
     1341 
     1342 
    13331343/** 
    13341344 * @} 
  • pjproject/trunk/pjmedia/include/pjmedia/stream.h

    r4739 r5242  
    343343 * @param stream        The media stream. 
    344344 * @param ascii_digit   String containing digits to be sent to remote as  
    345  *                      described on RFC 2833 section 3.10. Character 'R' is  
     345 *                      described on RFC 2833 section 3.10.  
     346 *                      If PJMEDIA_HAS_DTMF_FLASH is enabled, character 'R' is 
    346347 *                      used to represent the event type 16 (flash) as stated  
    347348 *                      in RFC 4730. 
  • pjproject/trunk/pjmedia/src/pjmedia/endpoint.c

    r5170 r5242  
    557557        attr = PJ_POOL_ZALLOC_T(pool, pjmedia_sdp_attr); 
    558558        attr->name = pj_str("fmtp"); 
     559#if defined(PJMEDIA_HAS_DTMF_FLASH) && PJMEDIA_HAS_DTMF_FLASH!= 0 
    559560        attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-16"); 
     561#else 
     562        attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-15"); 
     563#endif 
    560564        m->attr[m->attr_count++] = attr; 
    561565    } 
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r5239 r5242  
    15671567 
    15681568    /* Ignore unknown event. */ 
     1569#if defined(PJMEDIA_HAS_DTMF_FLASH) && PJMEDIA_HAS_DTMF_FLASH!= 0 
    15691570    if (event->event > 16) { 
     1571#else 
     1572    if (event->event > 15) { 
     1573#endif     
    15701574        PJ_LOG(5,(stream->port.info.name.ptr, 
    15711575                  "Ignored RTP pkt with bad DTMF event %d", 
     
    27872791                pt = 11; 
    27882792            } 
     2793#if defined(PJMEDIA_HAS_DTMF_FLASH) && PJMEDIA_HAS_DTMF_FLASH!= 0            
    27892794            else if (dig == 'r') 
    27902795            { 
    27912796                pt = 16; 
    27922797            } 
     2798#endif 
    27932799            else 
    27942800            { 
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_legacy.c

    r5170 r5242  
    12161216        char buf[128]; 
    12171217 
     1218#if defined(PJMEDIA_HAS_DTMF_FLASH) && PJMEDIA_HAS_DTMF_FLASH!= 0                
    12181219        if (!simple_input("DTMF strings to send (0-9*R#A-B)", buf, 
    12191220            sizeof(buf))) 
     1221#else 
     1222        if (!simple_input("DTMF strings to send (0-9*#A-B)", buf, 
     1223            sizeof(buf))) 
     1224#endif 
    12201225        { 
    12211226            return; 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r5185 r5242  
    48124812 
    48134813/** 
    4814  * Send DTMF digits to remote using RFC 2833 payload formats.  
     4814 * Send DTMF digits to remote using RFC 2833 payload formats. 
    48154815 * 
    48164816 * @param call_id       Call identification. 
    48174817 * @param digits        DTMF string digits to be sent as described on RFC 2833  
    4818  *                      section 3.10. Character 'R' is used to represent the  
     4818 *                      section 3.10. If PJMEDIA_HAS_DTMF_FLASH is enabled,  
     4819 *                      character 'R' is used to represent the  
    48194820 *                      event type 16 (flash) as stated in RFC 4730. 
    48204821 * 
Note: See TracChangeset for help on using the changeset viewer.