summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/pjsua/android/jni/pjsua.i
blob: 28f76d7eeb36164aaa1099ed6f70c4029aa0371a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
%module (directors="1") pjsua

%{
#include "pjsua_app_callback.h"
#include "../../pjsua_app.h"

#if defined(PJMEDIA_HAS_VIDEO) && PJMEDIA_HAS_VIDEO!=0
#  include <android/native_window_jni.h>
#else
#  define ANativeWindow_fromSurface(a,b) NULL
#endif
%}

/* Turn on director wrapping PjsuaAppCallback */
%feature("director") PjsuaAppCallback;

/* Convert Surface object to ANativeWindow for setIncomingVideoRenderer() */
%typemap(in) jobject surface {
    $1 = $input? (jobject)ANativeWindow_fromSurface(jenv, $input) : NULL;
}

%include "pjsua_app_callback.h"