Ignore:
Timestamp:
Feb 22, 2006 12:06:39 PM (18 years ago)
Author:
bennylp
Message:

RFC 2833 support!

File:
1 edited

Legend:

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

    r214 r215  
    7272    pj_sockaddr_in      rem_addr;   /**< Remote RTP address                 */ 
    7373    pjmedia_codec_info  fmt;        /**< Codec format info.                 */ 
    74     unsigned            tx_event_pt;/**< Outgoing pt for telephone-events.  */ 
    75     unsigned            rx_event_pt;/**< Incoming pt for telephone-events.  */ 
     74    int                 tx_event_pt;/**< Outgoing pt for telephone-events.  */ 
     75    int                 rx_event_pt;/**< Incoming pt for telephone-events.  */ 
    7676    pj_uint32_t         ssrc;       /**< RTP SSRC.                          */ 
    7777    int                 jb_min;     /**< Jitter buffer min delay.           */ 
     
    111111 *                      buffer needs to preallocate some storage. 
    112112 * @param info          Stream information. 
     113 * @param user_data     Arbitrary user data (for future callback feature). 
    113114 * @param p_stream      Pointer to receive the media stream. 
    114115 * 
     
    118119                                           pj_pool_t *pool, 
    119120                                           const pjmedia_stream_info *info, 
     121                                           void *user_data, 
    120122                                           pjmedia_stream **p_stream); 
    121123 
     
    192194 * 
    193195 * @param stream        The media stream. 
    194  * @param digit         A single digit ('0123456789*#ABCD'). 
     196 * @param ascii_digit   String containing digits to be sent to remote. 
     197 *                      Currently the maximum number of digits are 32. 
    195198 * 
    196199 * @return              PJ_SUCCESS on success. 
    197200 */ 
    198201PJ_DECL(pj_status_t) pjmedia_stream_dial_dtmf(pjmedia_stream *stream, 
    199                                               const pj_str_t *digit_char); 
    200  
     202                                              const pj_str_t *ascii_digit); 
     203 
     204 
     205/** 
     206 * Check if the stream has incoming DTMF digits in the incoming DTMF 
     207 * queue. Incoming DTMF digits received via RFC 2833 mechanism are 
     208 * saved in the incoming digits queue. 
     209 * 
     210 * @param stream        The media stream. 
     211 * 
     212 * @return              Non-zero (PJ_TRUE) if the stream has received DTMF 
     213 *                      digits in the . 
     214 */ 
     215PJ_DECL(pj_bool_t) pjmedia_stream_check_dtmf(pjmedia_stream *stream); 
     216 
     217 
     218/** 
     219 * Retrieve the incoming DTMF digits from the stream. Note that the digits 
     220 * buffer will not be NULL terminated. 
     221 * 
     222 * @param stream        The media stream. 
     223 * @param ascii_digits  Buffer to receive the digits. The length of this 
     224 *                      buffer is indicated in the "size" argument. 
     225 * @param size          On input, contains the maximum digits to be copied 
     226 *                      to the buffer. 
     227 *                      On output, it contains the actual digits that has 
     228 *                      been copied to the buffer. 
     229 * 
     230 * @return              Non-zero (PJ_TRUE) if the stream has received DTMF 
     231 *                      digits in the . 
     232 */ 
     233PJ_DECL(pj_status_t) pjmedia_stream_get_dtmf( pjmedia_stream *stream, 
     234                                              char *ascii_digits, 
     235                                              unsigned *size); 
    201236 
    202237 
Note: See TracChangeset for help on using the changeset viewer.