Ignore:
Timestamp:
Jan 21, 2014 10:59:25 AM (11 years ago)
Author:
nanang
Message:

Re #1519 [into SVN trunk]: AudioMedia? objects must not be destroyed before unregistered from conf bridge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/pjsua2_demo.cpp

    r4704 r4708  
    9292void MyCall::onCallState(OnCallStateParam &prm) 
    9393{ 
     94    PJ_UNUSED_ARG(prm); 
     95 
    9496    CallInfo ci = getInfo(); 
    9597    std::cout << "*** Call: " <<  ci.remoteUri << " [" << ci.stateText 
     
    205207} 
    206208 
     209 
     210void mainProg3() throw(Error) 
     211{ 
     212    Endpoint ep; 
     213 
     214    // Create library 
     215    ep.libCreate(); 
     216 
     217    // Init library 
     218    EpConfig ep_cfg; 
     219    ep.libInit( ep_cfg ); 
     220 
     221    // Start library 
     222    ep.libStart(); 
     223    std::cout << "*** PJSUA2 STARTED ***" << std::endl; 
     224 
     225    // Create player and recorder 
     226    { 
     227        AudioMediaPlayer amp; 
     228        amp.createPlayer("../../tests/pjsua/wavs/input.16.wav"); 
     229 
     230        AudioMediaRecorder amr; 
     231        amr.createRecorder("recorder_test_output.wav"); 
     232 
     233        amp.startTransmit(ep.audDevManager().getPlaybackDevMedia()); 
     234        amp.startTransmit(amr); 
     235 
     236        pj_thread_sleep(5000); 
     237    } 
     238 
     239    ep.libDestroy(); 
     240} 
     241 
     242 
    207243void mainProg() throw(Error) 
    208244{ 
     
    272308    { 
    273309        Endpoint ep; 
    274         ep.natDetectType(); 
    275         { 
    276         } 
    277310    } 
    278311 
    279312    try { 
    280         mainProg1(); 
     313        mainProg3(); 
    281314        std::cout << "Success" << std::endl; 
    282315    } catch (Error & err) { 
Note: See TracChangeset for help on using the changeset viewer.