Ignore:
Timestamp:
Feb 11, 2015 5:15:29 AM (7 years ago)
Author:
nanang
Message:

Close #1814: Add audio frame preview callbacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c

    r4857 r4982  
    16781678} 
    16791679 
     1680static pj_status_t on_aud_prev_play_frame(void *user_data, pjmedia_frame *frame) 
     1681{ 
     1682    PJ_UNUSED_ARG(user_data); 
     1683    (*pjsua_var.media_cfg.on_aud_prev_play_frame)(frame); 
     1684    return PJ_SUCCESS; 
     1685} 
     1686 
     1687static pj_status_t on_aud_prev_rec_frame(void *user_data, pjmedia_frame *frame) 
     1688{ 
     1689    PJ_UNUSED_ARG(user_data); 
     1690    (*pjsua_var.media_cfg.on_aud_prev_rec_frame)(frame); 
     1691    return PJ_SUCCESS; 
     1692} 
     1693 
    16801694/* Open sound device with the setting. */ 
    16811695static pj_status_t open_snd_dev(pjmedia_snd_port_param *param) 
     
    17051719    PJ_ASSERT_RETURN(pjsua_var.snd_pool, PJ_ENOMEM); 
    17061720 
     1721    /* Setup preview callbacks, if configured */ 
     1722    if (pjsua_var.media_cfg.on_aud_prev_play_frame) 
     1723        param->on_play_frame = &on_aud_prev_play_frame; 
     1724    if (pjsua_var.media_cfg.on_aud_prev_rec_frame) 
     1725        param->on_rec_frame = &on_aud_prev_rec_frame; 
    17071726 
    17081727    PJ_LOG(4,(THIS_FILE, "Opening sound device %s@%d/%d/%dms", 
Note: See TracChangeset for help on using the changeset viewer.