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/MyApp.java

    r4870 r4997  
    2929        abstract void notifyIncomingCall(MyCall call); 
    3030        abstract void notifyCallState(MyCall call); 
     31        abstract void notifyCallMediaState(MyCall call); 
    3132        abstract void notifyBuddyState(MyBuddy buddy); 
    3233} 
     
    4243 
    4344class MyCall extends Call { 
     45        public VideoWindow vidWin; 
     46         
    4447        MyCall(MyAccount acc, int call_id) { 
    4548                super(acc, call_id); 
     49                vidWin = null; 
    4650        } 
    4751 
     
    8791                                        continue; 
    8892                                } 
    89                         } 
    90                 } 
     93                        } else if (cmi.getType() == pjmedia_type.PJMEDIA_TYPE_VIDEO && 
     94                                       cmi.getStatus() == pjsua_call_media_status.PJSUA_CALL_MEDIA_ACTIVE && 
     95                                       cmi.getVideoIncomingWindowId() != pjsua2.INVALID_ID) 
     96                        { 
     97                                vidWin = cmi.getVideoWindow(); 
     98                        } 
     99                } 
     100                 
     101                MyApp.observer.notifyCallMediaState(this); 
    91102        } 
    92103} 
Note: See TracChangeset for help on using the changeset viewer.