Ignore:
Timestamp:
Mar 22, 2015 8:53:03 AM (10 years ago)
Author:
nanang
Message:

Re #1790:

  • Removed android_opengl_get_surface() for renderer view setup, Java application can directly supply Surface object as renderer window.
  • Added renderer view on pjsua CLI app sample.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/swig/pjsua2.i

    r4996 r5014  
    102102%template(CodecInfoVector)              std::vector<pj::CodecInfo*>; 
    103103 
    104 %include "pjsua2/media.hpp" 
    105 // Create an interface for android_opengl_get_surface() 
     104/* pj::WindowHandle::setWindow() receives Surface object */ 
    106105#if defined(SWIGJAVA) && defined(__ANDROID__) 
    107 %inline %{ 
    108 extern "C" { 
    109     void* android_opengl_get_surface(jobject surface); 
     106%{#include <android/native_window_jni.h>%} 
     107%ignore pj::WindowHandle::display; 
     108%ignore pj::WindowHandle::window; 
     109%typemap(in) jobject surface { 
     110    $1 = (jobject)ANativeWindow_fromSurface(jenv, $input); 
    110111} 
    111 %} 
     112%extend pj::WindowHandle { 
     113    void setWindow(jobject surface) { $self->window = surface; } 
     114} 
    112115#endif 
    113116 
     117%include "pjsua2/media.hpp" 
    114118%include "pjsua2/presence.hpp" 
    115119%include "pjsua2/account.hpp" 
Note: See TracChangeset for help on using the changeset viewer.