Ignore:
Timestamp:
Mar 18, 2015 12:02:51 PM (9 years ago)
Author:
ming
Message:

Re #1823 (pjsua2 video api): sample usage of Video Window API in pjsua2 app for android

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/java/android/src/org/pjsip/pjsua2/app/MainActivity.java

    r4870 r4997  
    6262                public final static int REG_STATE = 3; 
    6363                public final static int BUDDY_STATE = 4; 
     64                public final static int CALL_MEDIA_STATE = 5; 
    6465        } 
    6566 
     
    171172                        if (CallActivity.handler_ != null) { 
    172173                                Message m2 = Message.obtain(CallActivity.handler_, MSG_TYPE.CALL_STATE, ci); 
     174                                m2.sendToTarget(); 
     175                        } 
     176                         
     177                } else if (m.what == MSG_TYPE.CALL_MEDIA_STATE) { 
     178                         
     179                        /* Forward the message to CallActivity */ 
     180                        if (CallActivity.handler_ != null) { 
     181                                Message m2 = Message.obtain(CallActivity.handler_, MSG_TYPE.CALL_MEDIA_STATE, null); 
    173182                                m2.sendToTarget(); 
    174183                        } 
     
    333342                 
    334343                MyCall call = new MyCall(account, -1); 
    335                 CallOpParam prm = new CallOpParam(); 
    336                 CallSetting opt = prm.getOpt(); 
    337                 opt.setAudioCount(1); 
    338                 opt.setVideoCount(0); 
     344                CallOpParam prm = new CallOpParam(true); 
    339345 
    340346                try { 
     
    503509        } 
    504510         
     511        public void notifyCallMediaState(MyCall call) { 
     512                Message m = Message.obtain(handler, MSG_TYPE.CALL_MEDIA_STATE, null); 
     513                m.sendToTarget(); 
     514        } 
     515         
    505516        public void notifyBuddyState(MyBuddy buddy) { 
    506517                Message m = Message.obtain(handler, MSG_TYPE.BUDDY_STATE, buddy); 
Note: See TracChangeset for help on using the changeset viewer.