Add callback function to be notified before the proxy audio producer need to push the buffer

This commit is contained in:
bossiel 2012-08-10 19:01:57 +00:00
parent 363d39d641
commit cdf51072df
39 changed files with 816 additions and 84 deletions

View File

@ -29,6 +29,7 @@
*/
#include "ProxyProducer.h"
#include "tsk_timer.h"
#include "tsk_memory.h"
#include "tsk_debug.h"
@ -46,12 +47,12 @@ typedef struct twrap_producer_proxy_audio_s
twrap_producer_proxy_audio_t;
#define TWRAP_PRODUCER_PROXY_AUDIO(self) ((twrap_producer_proxy_audio_t*)(self))
int twrap_producer_proxy_audio_set(tmedia_producer_t* self, const tmedia_param_t* params)
static int twrap_producer_proxy_audio_set(tmedia_producer_t* self, const tmedia_param_t* params)
{
return 0;
}
int twrap_producer_proxy_audio_prepare(tmedia_producer_t* self, const tmedia_codec_t* codec)
static int twrap_producer_proxy_audio_prepare(tmedia_producer_t* self, const tmedia_codec_t* codec)
{
ProxyPluginMgr* manager;
int ret = -1;
@ -67,13 +68,14 @@ int twrap_producer_proxy_audio_prepare(tmedia_producer_t* self, const tmedia_cod
return ret;
}
int twrap_producer_proxy_audio_start(tmedia_producer_t* self)
static int twrap_producer_proxy_audio_start(tmedia_producer_t* self)
{
ProxyPluginMgr* manager;
int ret = -1;
if((manager = ProxyPluginMgr::getInstance())){
const ProxyAudioProducer* audioProducer;
if((audioProducer = manager->findAudioProducer(TWRAP_PRODUCER_PROXY_AUDIO(self)->id)) && audioProducer->getCallback()){
const_cast<ProxyAudioProducer*>(audioProducer)->startPushCallback();
ret = audioProducer->getCallback()->start();
}
}
@ -82,7 +84,7 @@ int twrap_producer_proxy_audio_start(tmedia_producer_t* self)
return ret;
}
int twrap_producer_proxy_audio_pause(tmedia_producer_t* self)
static int twrap_producer_proxy_audio_pause(tmedia_producer_t* self)
{
ProxyPluginMgr* manager;
int ret = -1;
@ -95,13 +97,14 @@ int twrap_producer_proxy_audio_pause(tmedia_producer_t* self)
return ret;
}
int twrap_producer_proxy_audio_stop(tmedia_producer_t* self)
static int twrap_producer_proxy_audio_stop(tmedia_producer_t* self)
{
ProxyPluginMgr* manager;
int ret = -1;
if((manager = ProxyPluginMgr::getInstance())){
const ProxyAudioProducer* audioProducer;
if((audioProducer = manager->findAudioProducer(TWRAP_PRODUCER_PROXY_AUDIO(self)->id)) && audioProducer->getCallback()){
const_cast<ProxyAudioProducer*>(audioProducer)->stopPushCallback();
ret = audioProducer->getCallback()->stop();
}
}
@ -187,7 +190,7 @@ TINYWRAP_GEXTERN const tmedia_producer_plugin_def_t *twrap_producer_proxy_audio_
/* ============ ProxyAudioProducer Class ================= */
ProxyAudioProducer::ProxyAudioProducer(twrap_producer_proxy_audio_t* pProducer)
:m_pCallback(tsk_null), m_pWrappedPlugin(pProducer), ProxyPlugin(twrap_proxy_plugin_audio_producer)
:m_pCallback(tsk_null), m_pWrappedPlugin(pProducer), m_bUsePushCallback(false), m_hPushTimerMgr(tsk_null), ProxyPlugin(twrap_proxy_plugin_audio_producer)
{
m_pWrappedPlugin->id = this->getId();
m_PushBuffer.pPushBufferPtr = tsk_null;
@ -196,12 +199,21 @@ ProxyAudioProducer::ProxyAudioProducer(twrap_producer_proxy_audio_t* pProducer)
ProxyAudioProducer::~ProxyAudioProducer()
{
stopPushCallback();
}
bool ProxyAudioProducer::setPushBuffer(const void* pPushBufferPtr, unsigned nPushBufferSize)
bool ProxyAudioProducer::setPushBuffer(const void* pPushBufferPtr, unsigned nPushBufferSize, bool bUsePushCallback/*=false*/)
{
m_PushBuffer.pPushBufferPtr = pPushBufferPtr;
m_PushBuffer.nPushBufferSize = nPushBufferSize;
m_bUsePushCallback = bUsePushCallback;
if(!pPushBufferPtr || !nPushBufferSize){
return stopPushCallback();
}
else if(m_bUsePushCallback && m_pWrappedPlugin && m_pWrappedPlugin->started){
return startPushCallback();
}
return true;
}
@ -239,6 +251,58 @@ unsigned ProxyAudioProducer::getGain()
return 0;
}
bool ProxyAudioProducer::startPushCallback()
{
if(!m_bUsePushCallback){
return true;
}
if(!m_pWrappedPlugin){
TSK_DEBUG_ERROR("Not wrapping plugin");
return false;
}
if(!m_hPushTimerMgr){
if(!(m_hPushTimerMgr = tsk_timer_manager_create())){
TSK_DEBUG_ERROR("Failed to create timer manager");
return false;
}
}
if(!TSK_RUNNABLE(m_hPushTimerMgr)->started){
if((tsk_timer_manager_start(m_hPushTimerMgr)) == 0){
m_uPushTimer = tsk_timer_manager_schedule(m_hPushTimerMgr, TMEDIA_PRODUCER(m_pWrappedPlugin)->audio.ptime, &ProxyAudioProducer::pushTimerCallback, this);
}
else{
TSK_DEBUG_ERROR("Failed to start timer");
return false;
}
}
return true;
}
bool ProxyAudioProducer::stopPushCallback()
{
if(m_hPushTimerMgr){
tsk_timer_manager_destroy(&m_hPushTimerMgr);
}
return true;
}
int ProxyAudioProducer::pushTimerCallback(const void* arg, tsk_timer_id_t timer_id)
{
ProxyAudioProducer* This = (ProxyAudioProducer*)arg;
This->m_uPushTimer = tsk_timer_manager_schedule(This->m_hPushTimerMgr, TMEDIA_PRODUCER(This->m_pWrappedPlugin)->audio.ptime, &ProxyAudioProducer::pushTimerCallback, This);
if(This->m_pCallback){
if(This->m_pCallback->fillPushBuffer() == 0){
return This->push();
}
}
return 0;
}
bool ProxyAudioProducer::registerPlugin()
{
/* HACK: Unregister all other audio plugins */
@ -265,9 +329,6 @@ bool ProxyAudioProducer::registerPlugin()

View File

@ -48,6 +48,8 @@ public:
virtual int start() { return -1; }
virtual int pause() { return -1; }
virtual int stop() { return -1; }
// this function is called to signal that it's time to copy push data
virtual int fillPushBuffer(){ return -1; }
};
@ -60,12 +62,13 @@ public:
#endif
virtual ~ProxyAudioProducer();
bool setPushBuffer(const void* pPushBufferPtr, unsigned nPushBufferSize);
bool setPushBuffer(const void* pPushBufferPtr, unsigned nPushBufferSize, bool bUsePushCallback=false);
int push(const void* pBuffer=tsk_null, unsigned nSize=0);
bool setGain(unsigned nGain);
unsigned getGain();
void setCallback(ProxyAudioProducerCallback* pCallback) { m_pCallback = pCallback; }
#if !defined(SWIG)
inline bool usePushCallback(){ return m_bUsePushCallback; }
inline ProxyAudioProducerCallback* getCallback()const { return m_pCallback; }
virtual inline bool isWrapping(tsk_object_t* pWrappedPlugin){
return m_pWrappedPlugin == pWrappedPlugin;
@ -75,6 +78,14 @@ public:
return m_pWrappedPlugin ? TMEDIA_PRODUCER(m_pWrappedPlugin)->session_id : 0;
}
#if !defined(SWIG)
public:
bool startPushCallback();
bool stopPushCallback();
private:
static int pushTimerCallback(const void* arg, tsk_timer_id_t timer_id);
#endif
public:
static bool registerPlugin();
@ -85,6 +96,9 @@ private:
const void* pPushBufferPtr;
unsigned nPushBufferSize;
} m_PushBuffer;
bool m_bUsePushCallback;
void* m_hPushTimerMgr;
uint64_t m_uPushTimer;
};
/* ============ ProxyVideoProducerCallback Class ================= */

View File

@ -40,8 +40,13 @@ public class ProxyAudioProducer : ProxyPlugin {
}
}
public bool setPushBuffer(byte[] pPushBufferPtr, uint nPushBufferSize, bool bUsePushCallback) {
bool ret = tinyWRAPPINVOKE.ProxyAudioProducer_setPushBuffer__SWIG_0(swigCPtr, pPushBufferPtr, nPushBufferSize, bUsePushCallback);
return ret;
}
public bool setPushBuffer(byte[] pPushBufferPtr, uint nPushBufferSize) {
bool ret = tinyWRAPPINVOKE.ProxyAudioProducer_setPushBuffer(swigCPtr, pPushBufferPtr, nPushBufferSize);
bool ret = tinyWRAPPINVOKE.ProxyAudioProducer_setPushBuffer__SWIG_1(swigCPtr, pPushBufferPtr, nPushBufferSize);
return ret;
}

View File

@ -65,6 +65,11 @@ public class ProxyAudioProducerCallback : IDisposable {
return ret;
}
public virtual int fillPushBuffer() {
int ret = (SwigDerivedClassHasMethod("fillPushBuffer", swigMethodTypes4) ? tinyWRAPPINVOKE.ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(swigCPtr) : tinyWRAPPINVOKE.ProxyAudioProducerCallback_fillPushBuffer(swigCPtr));
return ret;
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0))
swigDelegate0 = new SwigDelegateProxyAudioProducerCallback_0(SwigDirectorprepare);
@ -74,7 +79,9 @@ public class ProxyAudioProducerCallback : IDisposable {
swigDelegate2 = new SwigDelegateProxyAudioProducerCallback_2(SwigDirectorpause);
if (SwigDerivedClassHasMethod("stop", swigMethodTypes3))
swigDelegate3 = new SwigDelegateProxyAudioProducerCallback_3(SwigDirectorstop);
tinyWRAPPINVOKE.ProxyAudioProducerCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3);
if (SwigDerivedClassHasMethod("fillPushBuffer", swigMethodTypes4))
swigDelegate4 = new SwigDelegateProxyAudioProducerCallback_4(SwigDirectorfillPushBuffer);
tinyWRAPPINVOKE.ProxyAudioProducerCallback_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
@ -99,20 +106,27 @@ public class ProxyAudioProducerCallback : IDisposable {
return stop();
}
private int SwigDirectorfillPushBuffer() {
return fillPushBuffer();
}
public delegate int SwigDelegateProxyAudioProducerCallback_0(int ptime, int rate, int channels);
public delegate int SwigDelegateProxyAudioProducerCallback_1();
public delegate int SwigDelegateProxyAudioProducerCallback_2();
public delegate int SwigDelegateProxyAudioProducerCallback_3();
public delegate int SwigDelegateProxyAudioProducerCallback_4();
private SwigDelegateProxyAudioProducerCallback_0 swigDelegate0;
private SwigDelegateProxyAudioProducerCallback_1 swigDelegate1;
private SwigDelegateProxyAudioProducerCallback_2 swigDelegate2;
private SwigDelegateProxyAudioProducerCallback_3 swigDelegate3;
private SwigDelegateProxyAudioProducerCallback_4 swigDelegate4;
private static Type[] swigMethodTypes0 = new Type[] { typeof(int), typeof(int), typeof(int) };
private static Type[] swigMethodTypes1 = new Type[] { };
private static Type[] swigMethodTypes2 = new Type[] { };
private static Type[] swigMethodTypes3 = new Type[] { };
private static Type[] swigMethodTypes4 = new Type[] { };
}
}

View File

@ -1227,14 +1227,23 @@ class tinyWRAPPINVOKE {
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback")]
public static extern int ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducerCallback_fillPushBuffer")]
public static extern int ProxyAudioProducerCallback_fillPushBuffer(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback")]
public static extern int ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducerCallback_director_connect")]
public static extern void ProxyAudioProducerCallback_director_connect(HandleRef jarg1, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_0 delegate0, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_1 delegate1, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_2 delegate2, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_3 delegate3);
public static extern void ProxyAudioProducerCallback_director_connect(HandleRef jarg1, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_0 delegate0, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_1 delegate1, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_2 delegate2, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_3 delegate3, ProxyAudioProducerCallback.SwigDelegateProxyAudioProducerCallback_4 delegate4);
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_ProxyAudioProducer")]
public static extern void delete_ProxyAudioProducer(HandleRef jarg1);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_setPushBuffer")]
public static extern bool ProxyAudioProducer_setPushBuffer(HandleRef jarg1, byte[] jarg2, uint jarg3);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_setPushBuffer__SWIG_0")]
public static extern bool ProxyAudioProducer_setPushBuffer__SWIG_0(HandleRef jarg1, byte[] jarg2, uint jarg3, bool jarg4);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_setPushBuffer__SWIG_1")]
public static extern bool ProxyAudioProducer_setPushBuffer__SWIG_1(HandleRef jarg1, byte[] jarg2, uint jarg3);
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_push__SWIG_0")]
public static extern int ProxyAudioProducer_push__SWIG_0(HandleRef jarg1, byte[] jarg2, uint jarg3);

View File

@ -769,11 +769,25 @@ int SwigDirector_ProxyAudioProducerCallback::stop() {
return c_result;
}
void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop) {
int SwigDirector_ProxyAudioProducerCallback::fillPushBuffer() {
int c_result = SwigValueInit< int >() ;
int jresult = 0 ;
if (!swig_callbackfillPushBuffer) {
return ProxyAudioProducerCallback::fillPushBuffer();
} else {
jresult = (int) swig_callbackfillPushBuffer();
c_result = (int)jresult;
}
return c_result;
}
void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop, SWIG_Callback4_t callbackfillPushBuffer) {
swig_callbackprepare = callbackprepare;
swig_callbackstart = callbackstart;
swig_callbackpause = callbackpause;
swig_callbackstop = callbackstop;
swig_callbackfillPushBuffer = callbackfillPushBuffer;
}
void SwigDirector_ProxyAudioProducerCallback::swig_init_callbacks() {
@ -781,6 +795,7 @@ void SwigDirector_ProxyAudioProducerCallback::swig_init_callbacks() {
swig_callbackstart = 0;
swig_callbackpause = 0;
swig_callbackstop = 0;
swig_callbackfillPushBuffer = 0;
}
SwigDirector_ProxyVideoProducerCallback::SwigDirector_ProxyVideoProducerCallback() : ProxyVideoProducerCallback(), Swig::Director() {
@ -5504,11 +5519,35 @@ SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducerCallback_stopSwigExplicitPro
}
SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioProducerCallback_director_connect(void *objarg, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback0_t callback0, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback1_t callback1, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback2_t callback2, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback3_t callback3) {
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducerCallback_fillPushBuffer(void * jarg1) {
int jresult ;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
int result;
arg1 = (ProxyAudioProducerCallback *)jarg1;
result = (int)(arg1)->fillPushBuffer();
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(void * jarg1) {
int jresult ;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
int result;
arg1 = (ProxyAudioProducerCallback *)jarg1;
result = (int)(arg1)->ProxyAudioProducerCallback::fillPushBuffer();
jresult = result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioProducerCallback_director_connect(void *objarg, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback0_t callback0, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback1_t callback1, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback2_t callback2, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback3_t callback3, SwigDirector_ProxyAudioProducerCallback::SWIG_Callback4_t callback4) {
ProxyAudioProducerCallback *obj = (ProxyAudioProducerCallback *)objarg;
SwigDirector_ProxyAudioProducerCallback *director = dynamic_cast<SwigDirector_ProxyAudioProducerCallback *>(obj);
if (director) {
director->swig_connect_director(callback0, callback1, callback2, callback3);
director->swig_connect_director(callback0, callback1, callback2, callback3, callback4);
}
}
@ -5521,7 +5560,25 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ProxyAudioProducer(void * jarg1) {
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyAudioProducer_setPushBuffer(void * jarg1, void * jarg2, unsigned int jarg3) {
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyAudioProducer_setPushBuffer__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3, unsigned int jarg4) {
unsigned int jresult ;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
unsigned int arg3 ;
bool arg4 ;
bool result;
arg1 = (ProxyAudioProducer *)jarg1;
arg2 = jarg2;
arg3 = (unsigned int)jarg3;
arg4 = jarg4 ? true : false;
result = (bool)(arg1)->setPushBuffer((void const *)arg2,arg3,arg4);
jresult = result;
return jresult;
}
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyAudioProducer_setPushBuffer__SWIG_1(void * jarg1, void * jarg2, unsigned int jarg3) {
unsigned int jresult ;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;

View File

@ -116,18 +116,21 @@ public:
virtual int start();
virtual int pause();
virtual int stop();
virtual int fillPushBuffer();
typedef int (SWIGSTDCALL* SWIG_Callback0_t)(int, int, int);
typedef int (SWIGSTDCALL* SWIG_Callback1_t)();
typedef int (SWIGSTDCALL* SWIG_Callback2_t)();
typedef int (SWIGSTDCALL* SWIG_Callback3_t)();
void swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop);
typedef int (SWIGSTDCALL* SWIG_Callback4_t)();
void swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop, SWIG_Callback4_t callbackfillPushBuffer);
private:
SWIG_Callback0_t swig_callbackprepare;
SWIG_Callback1_t swig_callbackstart;
SWIG_Callback2_t swig_callbackpause;
SWIG_Callback3_t swig_callbackstop;
SWIG_Callback4_t swig_callbackfillPushBuffer;
void swig_init_callbacks();
};

View File

@ -35,8 +35,12 @@ public class ProxyAudioProducer extends ProxyPlugin {
super.delete();
}
public boolean setPushBuffer(java.nio.ByteBuffer pPushBufferPtr, long nPushBufferSize, boolean bUsePushCallback) {
return tinyWRAPJNI.ProxyAudioProducer_setPushBuffer__SWIG_0(swigCPtr, this, pPushBufferPtr, nPushBufferSize, bUsePushCallback);
}
public boolean setPushBuffer(java.nio.ByteBuffer pPushBufferPtr, long nPushBufferSize) {
return tinyWRAPJNI.ProxyAudioProducer_setPushBuffer(swigCPtr, this, pPushBufferPtr, nPushBufferSize);
return tinyWRAPJNI.ProxyAudioProducer_setPushBuffer__SWIG_1(swigCPtr, this, pPushBufferPtr, nPushBufferSize);
}
public int push(java.nio.ByteBuffer pBuffer, long nSize) {

View File

@ -71,4 +71,8 @@ public class ProxyAudioProducerCallback {
return (getClass() == ProxyAudioProducerCallback.class) ? tinyWRAPJNI.ProxyAudioProducerCallback_stop(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(swigCPtr, this);
}
public int fillPushBuffer() {
return (getClass() == ProxyAudioProducerCallback.class) ? tinyWRAPJNI.ProxyAudioProducerCallback_fillPushBuffer(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(swigCPtr, this);
}
}

View File

@ -35,8 +35,12 @@ public class ProxyAudioProducer extends ProxyPlugin {
super.delete();
}
public boolean setPushBuffer(java.nio.ByteBuffer pPushBufferPtr, long nPushBufferSize, boolean bUsePushCallback) {
return tinyWRAPJNI.ProxyAudioProducer_setPushBuffer__SWIG_0(swigCPtr, this, pPushBufferPtr, nPushBufferSize, bUsePushCallback);
}
public boolean setPushBuffer(java.nio.ByteBuffer pPushBufferPtr, long nPushBufferSize) {
return tinyWRAPJNI.ProxyAudioProducer_setPushBuffer(swigCPtr, this, pPushBufferPtr, nPushBufferSize);
return tinyWRAPJNI.ProxyAudioProducer_setPushBuffer__SWIG_1(swigCPtr, this, pPushBufferPtr, nPushBufferSize);
}
public int push(java.nio.ByteBuffer pBuffer, long nSize) {

View File

@ -71,4 +71,8 @@ public class ProxyAudioProducerCallback {
return (getClass() == ProxyAudioProducerCallback.class) ? tinyWRAPJNI.ProxyAudioProducerCallback_stop(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(swigCPtr, this);
}
public int fillPushBuffer() {
return (getClass() == ProxyAudioProducerCallback.class) ? tinyWRAPJNI.ProxyAudioProducerCallback_fillPushBuffer(swigCPtr, this) : tinyWRAPJNI.ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(swigCPtr, this);
}
}

View File

@ -359,10 +359,13 @@ public class tinyWRAPJNI {
public final static native int ProxyAudioProducerCallback_pauseSwigExplicitProxyAudioProducerCallback(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_stop(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_fillPushBuffer(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native void ProxyAudioProducerCallback_director_connect(ProxyAudioProducerCallback obj, long cptr, boolean mem_own, boolean weak_global);
public final static native void ProxyAudioProducerCallback_change_ownership(ProxyAudioProducerCallback obj, long cptr, boolean take_or_release);
public final static native void delete_ProxyAudioProducer(long jarg1);
public final static native boolean ProxyAudioProducer_setPushBuffer(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native boolean ProxyAudioProducer_setPushBuffer__SWIG_0(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3, boolean jarg4);
public final static native boolean ProxyAudioProducer_setPushBuffer__SWIG_1(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native int ProxyAudioProducer_push__SWIG_0(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native int ProxyAudioProducer_push__SWIG_1(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2);
public final static native int ProxyAudioProducer_push__SWIG_2(long jarg1, ProxyAudioProducer jarg1_);
@ -639,6 +642,9 @@ public class tinyWRAPJNI {
public static int SwigDirector_ProxyAudioProducerCallback_stop(ProxyAudioProducerCallback self) {
return self.stop();
}
public static int SwigDirector_ProxyAudioProducerCallback_fillPushBuffer(ProxyAudioProducerCallback self) {
return self.fillPushBuffer();
}
public static int SwigDirector_ProxyVideoProducerCallback_prepare(ProxyVideoProducerCallback self, int width, int height, int fps) {
return self.prepare(width, height, fps);
}

View File

@ -402,7 +402,7 @@ namespace Swig {
namespace Swig {
namespace {
jclass jclass_tinyWRAPJNI = NULL;
jmethodID director_methids[35];
jmethodID director_methids[36];
}
}
@ -1194,6 +1194,28 @@ int SwigDirector_ProxyAudioProducerCallback::stop() {
return c_result;
}
int SwigDirector_ProxyAudioProducerCallback::fillPushBuffer() {
int c_result = SwigValueInit< int >() ;
jint jresult = 0 ;
JNIEnvWrapper swigjnienv(this) ;
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
jobject swigjobj = (jobject) NULL ;
if (!swig_override[4]) {
return ProxyAudioProducerCallback::fillPushBuffer();
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[20], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
}
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
return c_result;
}
void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
static struct {
const char *mname;
@ -1211,6 +1233,9 @@ void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(JNIEnv *jenv
},
{
"stop", "()I", NULL
},
{
"fillPushBuffer", "()I", NULL
}
};
@ -1223,7 +1248,7 @@ void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(JNIEnv *jenv
baseclass = (jclass) jenv->NewGlobalRef(baseclass);
}
bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
for (int i = 0; i < 4; ++i) {
for (int i = 0; i < 5; ++i) {
if (!methods[i].base_methid) {
methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc);
if (!methods[i].base_methid) return;
@ -1265,7 +1290,7 @@ int SwigDirector_ProxyVideoProducerCallback::prepare(int width, int height, int
jwidth = (jint) width;
jheight = (jint) height;
jfps = (jint) fps;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[20], swigjobj, jwidth, jheight, jfps);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[21], swigjobj, jwidth, jheight, jfps);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1287,7 +1312,7 @@ int SwigDirector_ProxyVideoProducerCallback::start() {
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[21], swigjobj);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[22], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1309,7 +1334,7 @@ int SwigDirector_ProxyVideoProducerCallback::pause() {
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[22], swigjobj);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[23], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1331,7 +1356,7 @@ int SwigDirector_ProxyVideoProducerCallback::stop() {
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[23], swigjobj);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[24], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1408,7 +1433,7 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((DialogEvent **)&je) = (DialogEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[24], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[25], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1432,7 +1457,7 @@ int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((StackEvent **)&je) = (StackEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[25], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[26], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1456,7 +1481,7 @@ int SwigDirector_SipCallback::OnInviteEvent(InviteEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((InviteEvent **)&je) = (InviteEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[26], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[27], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1480,7 +1505,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((MessagingEvent **)&je) = (MessagingEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[27], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1504,7 +1529,7 @@ int SwigDirector_SipCallback::OnInfoEvent(InfoEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((InfoEvent **)&je) = (InfoEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1528,7 +1553,7 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((OptionsEvent **)&je) = (OptionsEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1552,7 +1577,7 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((PublicationEvent **)&je) = (PublicationEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1576,7 +1601,7 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((RegistrationEvent **)&je) = (RegistrationEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1600,7 +1625,7 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((SubscriptionEvent **)&je) = (SubscriptionEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1692,7 +1717,7 @@ int SwigDirector_XcapCallback::onEvent(XcapEvent const *e) const {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((XcapEvent **)&je) = (XcapEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[34], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1760,7 +1785,7 @@ int SwigDirector_MsrpCallback::OnEvent(MsrpEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((MsrpEvent **)&je) = (MsrpEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[34], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[35], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -7852,6 +7877,36 @@ SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProduce
}
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducerCallback_1fillPushBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ProxyAudioProducerCallback **)&jarg1;
result = (int)(arg1)->fillPushBuffer();
jresult = (jint)result;
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducerCallback_1fillPushBufferSwigExplicitProxyAudioProducerCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ProxyAudioProducerCallback **)&jarg1;
result = (int)(arg1)->ProxyAudioProducerCallback::fillPushBuffer();
jresult = (jint)result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducerCallback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
ProxyAudioProducerCallback *obj = *((ProxyAudioProducerCallback **)&objarg);
(void)jcls;
@ -7882,7 +7937,30 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyAudi
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setPushBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setPushBuffer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jboolean jarg4) {
jboolean jresult = 0 ;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
unsigned int arg3 ;
bool arg4 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ProxyAudioProducer **)&jarg1;
arg2 = jenv->GetDirectBufferAddress(jarg2);
arg3 = (unsigned int)jarg3;
arg4 = jarg4 ? true : false;
result = (bool)(arg1)->setPushBuffer((void const *)arg2,arg3,arg4);
jresult = (jboolean)result;
return jresult;
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setPushBuffer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
jboolean jresult = 0 ;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
@ -11772,7 +11850,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
static struct {
const char *method;
const char *signature;
} methods[35] = {
} methods[36] = {
{
"SwigDirector_DDebugCallback_OnDebugInfo", "(Lorg/doubango/tinyWRAP/DDebugCallback;Ljava/lang/String;)I"
},
@ -11833,6 +11911,9 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
{
"SwigDirector_ProxyAudioProducerCallback_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioProducerCallback;)I"
},
{
"SwigDirector_ProxyAudioProducerCallback_fillPushBuffer", "(Lorg/doubango/tinyWRAP/ProxyAudioProducerCallback;)I"
},
{
"SwigDirector_ProxyVideoProducerCallback_prepare", "(Lorg/doubango/tinyWRAP/ProxyVideoProducerCallback;III)I"
},

View File

@ -93,12 +93,13 @@ public:
virtual int start();
virtual int pause();
virtual int stop();
virtual int fillPushBuffer();
public:
bool swig_overrides(int n) {
return (n < 4 ? swig_override[n] : false);
return (n < 5 ? swig_override[n] : false);
}
protected:
bool swig_override[4];
bool swig_override[5];
};
class SwigDirector_ProxyVideoProducerCallback : public ProxyVideoProducerCallback, public Swig::Director {

View File

@ -359,10 +359,13 @@ public class tinyWRAPJNI {
public final static native int ProxyAudioProducerCallback_pauseSwigExplicitProxyAudioProducerCallback(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_stop(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_stopSwigExplicitProxyAudioProducerCallback(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_fillPushBuffer(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native int ProxyAudioProducerCallback_fillPushBufferSwigExplicitProxyAudioProducerCallback(long jarg1, ProxyAudioProducerCallback jarg1_);
public final static native void ProxyAudioProducerCallback_director_connect(ProxyAudioProducerCallback obj, long cptr, boolean mem_own, boolean weak_global);
public final static native void ProxyAudioProducerCallback_change_ownership(ProxyAudioProducerCallback obj, long cptr, boolean take_or_release);
public final static native void delete_ProxyAudioProducer(long jarg1);
public final static native boolean ProxyAudioProducer_setPushBuffer(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native boolean ProxyAudioProducer_setPushBuffer__SWIG_0(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3, boolean jarg4);
public final static native boolean ProxyAudioProducer_setPushBuffer__SWIG_1(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native int ProxyAudioProducer_push__SWIG_0(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
public final static native int ProxyAudioProducer_push__SWIG_1(long jarg1, ProxyAudioProducer jarg1_, java.nio.ByteBuffer jarg2);
public final static native int ProxyAudioProducer_push__SWIG_2(long jarg1, ProxyAudioProducer jarg1_);
@ -639,6 +642,9 @@ public class tinyWRAPJNI {
public static int SwigDirector_ProxyAudioProducerCallback_stop(ProxyAudioProducerCallback self) {
return self.stop();
}
public static int SwigDirector_ProxyAudioProducerCallback_fillPushBuffer(ProxyAudioProducerCallback self) {
return self.fillPushBuffer();
}
public static int SwigDirector_ProxyVideoProducerCallback_prepare(ProxyVideoProducerCallback self, int width, int height, int fps) {
return self.prepare(width, height, fps);
}

View File

@ -402,7 +402,7 @@ namespace Swig {
namespace Swig {
namespace {
jclass jclass_tinyWRAPJNI = NULL;
jmethodID director_methids[35];
jmethodID director_methids[36];
}
}
@ -1194,6 +1194,28 @@ int SwigDirector_ProxyAudioProducerCallback::stop() {
return c_result;
}
int SwigDirector_ProxyAudioProducerCallback::fillPushBuffer() {
int c_result = SwigValueInit< int >() ;
jint jresult = 0 ;
JNIEnvWrapper swigjnienv(this) ;
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
jobject swigjobj = (jobject) NULL ;
if (!swig_override[4]) {
return ProxyAudioProducerCallback::fillPushBuffer();
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[20], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
}
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
return c_result;
}
void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
static struct {
const char *mname;
@ -1211,6 +1233,9 @@ void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(JNIEnv *jenv
},
{
"stop", "()I", NULL
},
{
"fillPushBuffer", "()I", NULL
}
};
@ -1223,7 +1248,7 @@ void SwigDirector_ProxyAudioProducerCallback::swig_connect_director(JNIEnv *jenv
baseclass = (jclass) jenv->NewGlobalRef(baseclass);
}
bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
for (int i = 0; i < 4; ++i) {
for (int i = 0; i < 5; ++i) {
if (!methods[i].base_methid) {
methods[i].base_methid = jenv->GetMethodID(baseclass, methods[i].mname, methods[i].mdesc);
if (!methods[i].base_methid) return;
@ -1265,7 +1290,7 @@ int SwigDirector_ProxyVideoProducerCallback::prepare(int width, int height, int
jwidth = (jint) width;
jheight = (jint) height;
jfps = (jint) fps;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[20], swigjobj, jwidth, jheight, jfps);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[21], swigjobj, jwidth, jheight, jfps);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1287,7 +1312,7 @@ int SwigDirector_ProxyVideoProducerCallback::start() {
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[21], swigjobj);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[22], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1309,7 +1334,7 @@ int SwigDirector_ProxyVideoProducerCallback::pause() {
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[22], swigjobj);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[23], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1331,7 +1356,7 @@ int SwigDirector_ProxyVideoProducerCallback::stop() {
}
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[23], swigjobj);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[24], swigjobj);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1408,7 +1433,7 @@ int SwigDirector_SipCallback::OnDialogEvent(DialogEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((DialogEvent **)&je) = (DialogEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[24], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[25], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1432,7 +1457,7 @@ int SwigDirector_SipCallback::OnStackEvent(StackEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((StackEvent **)&je) = (StackEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[25], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[26], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1456,7 +1481,7 @@ int SwigDirector_SipCallback::OnInviteEvent(InviteEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((InviteEvent **)&je) = (InviteEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[26], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[27], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1480,7 +1505,7 @@ int SwigDirector_SipCallback::OnMessagingEvent(MessagingEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((MessagingEvent **)&je) = (MessagingEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[27], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1504,7 +1529,7 @@ int SwigDirector_SipCallback::OnInfoEvent(InfoEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((InfoEvent **)&je) = (InfoEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[28], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1528,7 +1553,7 @@ int SwigDirector_SipCallback::OnOptionsEvent(OptionsEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((OptionsEvent **)&je) = (OptionsEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[29], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1552,7 +1577,7 @@ int SwigDirector_SipCallback::OnPublicationEvent(PublicationEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((PublicationEvent **)&je) = (PublicationEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[30], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1576,7 +1601,7 @@ int SwigDirector_SipCallback::OnRegistrationEvent(RegistrationEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((RegistrationEvent **)&je) = (RegistrationEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[31], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1600,7 +1625,7 @@ int SwigDirector_SipCallback::OnSubscriptionEvent(SubscriptionEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((SubscriptionEvent **)&je) = (SubscriptionEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[32], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1692,7 +1717,7 @@ int SwigDirector_XcapCallback::onEvent(XcapEvent const *e) const {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((XcapEvent **)&je) = (XcapEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[33], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[34], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -1760,7 +1785,7 @@ int SwigDirector_MsrpCallback::OnEvent(MsrpEvent const *e) {
swigjobj = swig_get_self(jenv);
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
*((MsrpEvent **)&je) = (MsrpEvent *) e;
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[34], swigjobj, je);
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[35], swigjobj, je);
if (jenv->ExceptionCheck() == JNI_TRUE) return c_result;
c_result = (int)jresult;
} else {
@ -7852,6 +7877,36 @@ SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProduce
}
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducerCallback_1fillPushBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ProxyAudioProducerCallback **)&jarg1;
result = (int)(arg1)->fillPushBuffer();
jresult = (jint)result;
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducerCallback_1fillPushBufferSwigExplicitProxyAudioProducerCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ProxyAudioProducerCallback **)&jarg1;
result = (int)(arg1)->ProxyAudioProducerCallback::fillPushBuffer();
jresult = (jint)result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducerCallback_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
ProxyAudioProducerCallback *obj = *((ProxyAudioProducerCallback **)&objarg);
(void)jcls;
@ -7882,7 +7937,30 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyAudi
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setPushBuffer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setPushBuffer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3, jboolean jarg4) {
jboolean jresult = 0 ;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
unsigned int arg3 ;
bool arg4 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(ProxyAudioProducer **)&jarg1;
arg2 = jenv->GetDirectBufferAddress(jarg2);
arg3 = (unsigned int)jarg3;
arg4 = jarg4 ? true : false;
result = (bool)(arg1)->setPushBuffer((void const *)arg2,arg3,arg4);
jresult = (jboolean)result;
return jresult;
}
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProducer_1setPushBuffer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
jboolean jresult = 0 ;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
@ -11772,7 +11850,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
static struct {
const char *method;
const char *signature;
} methods[35] = {
} methods[36] = {
{
"SwigDirector_DDebugCallback_OnDebugInfo", "(Lorg/doubango/tinyWRAP/DDebugCallback;Ljava/lang/String;)I"
},
@ -11833,6 +11911,9 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
{
"SwigDirector_ProxyAudioProducerCallback_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioProducerCallback;)I"
},
{
"SwigDirector_ProxyAudioProducerCallback_fillPushBuffer", "(Lorg/doubango/tinyWRAP/ProxyAudioProducerCallback;)I"
},
{
"SwigDirector_ProxyVideoProducerCallback_prepare", "(Lorg/doubango/tinyWRAP/ProxyVideoProducerCallback;III)I"
},

View File

@ -93,12 +93,13 @@ public:
virtual int start();
virtual int pause();
virtual int stop();
virtual int fillPushBuffer();
public:
bool swig_overrides(int n) {
return (n < 4 ? swig_override[n] : false);
return (n < 5 ? swig_override[n] : false);
}
protected:
bool swig_override[4];
bool swig_override[5];
};
class SwigDirector_ProxyVideoProducerCallback : public ProxyVideoProducerCallback, public Swig::Director {

View File

@ -1550,6 +1550,7 @@ sub DESTROY {
*start = *tinyWRAPc::ProxyAudioProducerCallback_start;
*pause = *tinyWRAPc::ProxyAudioProducerCallback_pause;
*stop = *tinyWRAPc::ProxyAudioProducerCallback_stop;
*fillPushBuffer = *tinyWRAPc::ProxyAudioProducerCallback_fillPushBuffer;
sub DISOWN {
my $self = shift;
my $ptr = tied(%$self);

View File

@ -16790,6 +16790,34 @@ XS(_wrap_ProxyAudioProducerCallback_stop) {
}
XS(_wrap_ProxyAudioProducerCallback_fillPushBuffer) {
{
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int argvi = 0;
int result;
dXSARGS;
if ((items < 1) || (items > 1)) {
SWIG_croak("Usage: ProxyAudioProducerCallback_fillPushBuffer(self);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducerCallback, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducerCallback_fillPushBuffer" "', argument " "1"" of type '" "ProxyAudioProducerCallback *""'");
}
arg1 = reinterpret_cast< ProxyAudioProducerCallback * >(argp1);
result = (int)(arg1)->fillPushBuffer();
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_delete_ProxyAudioProducer) {
{
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
@ -16817,7 +16845,63 @@ XS(_wrap_delete_ProxyAudioProducer) {
}
XS(_wrap_ProxyAudioProducer_setPushBuffer) {
XS(_wrap_ProxyAudioProducer_setPushBuffer__SWIG_0) {
{
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
unsigned int arg3 ;
bool arg4 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
unsigned int val3 ;
int ecode3 = 0 ;
bool val4 ;
int ecode4 = 0 ;
int argvi = 0;
bool result;
dXSARGS;
if ((items < 4) || (items > 4)) {
SWIG_croak("Usage: ProxyAudioProducer_setPushBuffer(self,pPushBufferPtr,nPushBufferSize,bUsePushCallback);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "1"" of type '" "ProxyAudioProducer *""'");
}
arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1);
res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "2"" of type '" "void const *""'");
}
ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "3"" of type '" "unsigned int""'");
}
arg3 = static_cast< unsigned int >(val3);
ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "4"" of type '" "bool""'");
}
arg4 = static_cast< bool >(val4);
result = (bool)(arg1)->setPushBuffer((void const *)arg2,arg3,arg4);
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
XSRETURN(argvi);
fail:
SWIG_croak_null();
}
}
XS(_wrap_ProxyAudioProducer_setPushBuffer__SWIG_1) {
{
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
@ -16863,6 +16947,116 @@ XS(_wrap_ProxyAudioProducer_setPushBuffer) {
}
XS(_wrap_ProxyAudioProducer_setPushBuffer) {
dXSARGS;
{
unsigned long _index = 0;
SWIG_TypeRank _rank = 0;
if (items == 3) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ProxyAudioProducer, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
void *ptr = 0;
int res = SWIG_ConvertPtr(ST(1), &ptr, 0, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_1;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 1;
if (_rank == _rankm) goto dispatch;
}
}
check_1:
if (items == 4) {
SWIG_TypeRank _ranki = 0;
SWIG_TypeRank _rankm = 0;
SWIG_TypeRank _pi = 1;
int _v = 0;
{
void *vptr = 0;
int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ProxyAudioProducer, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
void *ptr = 0;
int res = SWIG_ConvertPtr(ST(1), &ptr, 0, 0);
_v = SWIG_CheckState(res);
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
{
{
int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
_v = SWIG_CheckState(res);
}
}
if (!_v) goto check_2;
_ranki += _v*_pi;
_rankm += _pi;
_pi *= SWIG_MAXCASTRANK;
if (!_index || (_ranki < _rank)) {
_rank = _ranki; _index = 2;
if (_rank == _rankm) goto dispatch;
}
}
check_2:
dispatch:
switch(_index) {
case 1:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_ProxyAudioProducer_setPushBuffer__SWIG_1); return;
case 2:
++PL_markstack_ptr; SWIG_CALLXS(_wrap_ProxyAudioProducer_setPushBuffer__SWIG_0); return;
}
}
croak("No matching function for overloaded 'ProxyAudioProducer_setPushBuffer'");
XSRETURN(0);
}
XS(_wrap_ProxyAudioProducer_push__SWIG_0) {
{
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
@ -24201,6 +24395,7 @@ static swig_command_info swig_commands[] = {
{"tinyWRAPc::ProxyAudioProducerCallback_start", _wrap_ProxyAudioProducerCallback_start},
{"tinyWRAPc::ProxyAudioProducerCallback_pause", _wrap_ProxyAudioProducerCallback_pause},
{"tinyWRAPc::ProxyAudioProducerCallback_stop", _wrap_ProxyAudioProducerCallback_stop},
{"tinyWRAPc::ProxyAudioProducerCallback_fillPushBuffer", _wrap_ProxyAudioProducerCallback_fillPushBuffer},
{"tinyWRAPc::delete_ProxyAudioProducer", _wrap_delete_ProxyAudioProducer},
{"tinyWRAPc::ProxyAudioProducer_setPushBuffer", _wrap_ProxyAudioProducer_setPushBuffer},
{"tinyWRAPc::ProxyAudioProducer_push", _wrap_ProxyAudioProducer_push},

View File

@ -1109,6 +1109,7 @@ class ProxyAudioProducerCallback(_object):
def start(self): return _tinyWRAP.ProxyAudioProducerCallback_start(self)
def pause(self): return _tinyWRAP.ProxyAudioProducerCallback_pause(self)
def stop(self): return _tinyWRAP.ProxyAudioProducerCallback_stop(self)
def fillPushBuffer(self): return _tinyWRAP.ProxyAudioProducerCallback_fillPushBuffer(self)
def __disown__(self):
self.this.disown()
_tinyWRAP.disown_ProxyAudioProducerCallback(self)

View File

@ -4893,6 +4893,35 @@ int SwigDirector_ProxyAudioProducerCallback::stop() {
}
int SwigDirector_ProxyAudioProducerCallback::fillPushBuffer() {
int c_result;
if (!swig_get_self()) {
Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyAudioProducerCallback.__init__.");
}
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
const size_t swig_method_index = 4;
const char * const swig_method_name = "fillPushBuffer";
PyObject* method = swig_get_method(swig_method_index, swig_method_name);
swig::SwigVar_PyObject result = PyObject_CallFunction(method, NULL, NULL);
#else
swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *) "fillPushBuffer", NULL);
#endif
if (!result) {
PyObject *error = PyErr_Occurred();
if (error) {
Swig::DirectorMethodException::raise("Error detected when calling 'ProxyAudioProducerCallback.fillPushBuffer'");
}
}
int swig_val;
int swig_res = SWIG_AsVal_int(result, &swig_val);
if (!SWIG_IsOK(swig_res)) {
Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""int""'");
}
c_result = static_cast< int >(swig_val);
return (int) c_result;
}
SwigDirector_ProxyVideoProducerCallback::SwigDirector_ProxyVideoProducerCallback(PyObject *self): ProxyVideoProducerCallback(), Swig::Director(self) {
SWIG_DIRECTOR_RGTR((ProxyVideoProducerCallback *)this, this);
}
@ -17050,6 +17079,40 @@ fail:
}
SWIGINTERN PyObject *_wrap_ProxyAudioProducerCallback_fillPushBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
Swig::Director *director = 0;
bool upcall = false;
int result;
if (!PyArg_ParseTuple(args,(char *)"O:ProxyAudioProducerCallback_fillPushBuffer",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducerCallback, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducerCallback_fillPushBuffer" "', argument " "1"" of type '" "ProxyAudioProducerCallback *""'");
}
arg1 = reinterpret_cast< ProxyAudioProducerCallback * >(argp1);
director = SWIG_DIRECTOR_CAST(arg1);
upcall = (director && (director->swig_get_self()==obj0));
try {
if (upcall) {
result = (int)(arg1)->ProxyAudioProducerCallback::fillPushBuffer();
} else {
result = (int)(arg1)->fillPushBuffer();
}
} catch (Swig::DirectorException&) {
SWIG_fail;
}
resultobj = SWIG_From_int(static_cast< int >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_disown_ProxyAudioProducerCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ProxyAudioProducerCallback *arg1 = (ProxyAudioProducerCallback *) 0 ;
@ -17103,7 +17166,54 @@ fail:
}
SWIGINTERN PyObject *_wrap_ProxyAudioProducer_setPushBuffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
SWIGINTERN PyObject *_wrap_ProxyAudioProducer_setPushBuffer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
unsigned int arg3 ;
bool arg4 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 ;
unsigned int val3 ;
int ecode3 = 0 ;
bool val4 ;
int ecode4 = 0 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
PyObject * obj3 = 0 ;
bool result;
if (!PyArg_ParseTuple(args,(char *)"OOOO:ProxyAudioProducer_setPushBuffer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyAudioProducer, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "1"" of type '" "ProxyAudioProducer *""'");
}
arg1 = reinterpret_cast< ProxyAudioProducer * >(argp1);
res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "2"" of type '" "void const *""'");
}
ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "3"" of type '" "unsigned int""'");
}
arg3 = static_cast< unsigned int >(val3);
ecode4 = SWIG_AsVal_bool(obj3, &val4);
if (!SWIG_IsOK(ecode4)) {
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyAudioProducer_setPushBuffer" "', argument " "4"" of type '" "bool""'");
}
arg4 = static_cast< bool >(val4);
result = (bool)(arg1)->setPushBuffer((void const *)arg2,arg3,arg4);
resultobj = SWIG_From_bool(static_cast< bool >(result));
return resultobj;
fail:
return NULL;
}
SWIGINTERN PyObject *_wrap_ProxyAudioProducer_setPushBuffer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
void *arg2 = (void *) 0 ;
@ -17141,6 +17251,72 @@ fail:
}
SWIGINTERN PyObject *_wrap_ProxyAudioProducer_setPushBuffer(PyObject *self, PyObject *args) {
int argc;
PyObject *argv[5];
int ii;
if (!PyTuple_Check(args)) SWIG_fail;
argc = args ? (int)PyObject_Length(args) : 0;
for (ii = 0; (ii < 4) && (ii < argc); ii++) {
argv[ii] = PyTuple_GET_ITEM(args,ii);
}
if (argc == 3) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ProxyAudioProducer, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *ptr = 0;
int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_ProxyAudioProducer_setPushBuffer__SWIG_1(self, args);
}
}
}
}
if (argc == 4) {
int _v;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ProxyAudioProducer, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *ptr = 0;
int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
{
int res = SWIG_AsVal_bool(argv[3], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_ProxyAudioProducer_setPushBuffer__SWIG_0(self, args);
}
}
}
}
}
fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProxyAudioProducer_setPushBuffer'.\n"
" Possible C/C++ prototypes are:\n"
" ProxyAudioProducer::setPushBuffer(void const *,unsigned int,bool)\n"
" ProxyAudioProducer::setPushBuffer(void const *,unsigned int)\n");
return 0;
}
SWIGINTERN PyObject *_wrap_ProxyAudioProducer_push__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ProxyAudioProducer *arg1 = (ProxyAudioProducer *) 0 ;
@ -23385,6 +23561,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"ProxyAudioProducerCallback_start", _wrap_ProxyAudioProducerCallback_start, METH_VARARGS, NULL},
{ (char *)"ProxyAudioProducerCallback_pause", _wrap_ProxyAudioProducerCallback_pause, METH_VARARGS, NULL},
{ (char *)"ProxyAudioProducerCallback_stop", _wrap_ProxyAudioProducerCallback_stop, METH_VARARGS, NULL},
{ (char *)"ProxyAudioProducerCallback_fillPushBuffer", _wrap_ProxyAudioProducerCallback_fillPushBuffer, METH_VARARGS, NULL},
{ (char *)"disown_ProxyAudioProducerCallback", _wrap_disown_ProxyAudioProducerCallback, METH_VARARGS, NULL},
{ (char *)"ProxyAudioProducerCallback_swigregister", ProxyAudioProducerCallback_swigregister, METH_VARARGS, NULL},
{ (char *)"delete_ProxyAudioProducer", _wrap_delete_ProxyAudioProducer, METH_VARARGS, NULL},

View File

@ -216,6 +216,7 @@ public:
virtual int start();
virtual int pause();
virtual int stop();
virtual int fillPushBuffer();
/* Internal Director utilities */
@ -249,7 +250,7 @@ private:
return method;
}
private:
mutable swig::SwigVar_PyObject vtable[4];
mutable swig::SwigVar_PyObject vtable[5];
#endif
};

View File

@ -101,9 +101,6 @@
#else
# include "tinydav/audio/tdav_speakup_jitterbuffer.h"
#endif
#if TELEPRESENCE
# include "tinydav/video/tdav_video_jitterbuffer.h"
#endif
#if HAVE_FFMPEG
# include <libavcodec/avcodec.h>
@ -271,9 +268,6 @@ int tdav_init()
#else
tmedia_jitterbuffer_plugin_register(tdav_speakup_jitterbuffer_plugin_def_t);
#endif
#if TELEPRESENCE
tmedia_jitterbuffer_plugin_register(tdav_video_jitterbuffer_plugin_def_t);
#endif
return ret;
}
@ -632,9 +626,6 @@ int tdav_deinit()
#else
tmedia_jitterbuffer_plugin_unregister(tdav_speakup_jitterbuffer_plugin_def_t);
#endif
#if TELEPRESENCE
tmedia_jitterbuffer_plugin_unregister(tdav_video_jitterbuffer_plugin_def_t);
#endif
return ret;
}

View File

@ -144,6 +144,17 @@ int main()
{
do
{
int y, x;
for(y = 0; y < 16; ++y){
printf("{");
for(x = 0; x < 16; ++x){
printf("%d, ", (2 * ( y / 8 ) + ( x / 8 )));
}
printf("}\n");
}
/* Print copyright information */
printf("Doubango Project\nCopyright (C) 2009 Mamadou Diop \n\n");

View File

@ -75,17 +75,17 @@
<td>
HTML5 SIP client using <a href="http://code.google.com/p/webrtc2sip/" target="_blank">
webrtc2sip</a> Gateway.<br />
<a style='margin: 1px' class="btn btn-small" href="http://www.sipml5.org" target="_blank">
<a style='margin: 1px' class="btn btn-small" href="http://www.sipml5.org?svn=7" target="_blank">
Enjoy our live demo &raquo;</a>
</td>
</tr>
<tr>
<td>
<a style='width: 65px; margin: 1px' class="btn btn-primary btn-small" href="http://code.google.com/p/webrtc4ie/"
target="_blank">webrtc4ie &raquo;</a>
<a style='width: 65px; margin: 1px' class="btn btn-primary btn-small" href="http://code.google.com/p/webrtc4all/"
target="_blank">webrtc4all &raquo;</a>
</td>
<td>
WebRTC extension for Microsoft Internet Explorer.
WebRTC extension for Safari, Opera, Firefox and IE.
</td>
</tr>
<tr>
@ -137,7 +137,7 @@
target="_blank">webrtc2sip &raquo;</a>
</td>
<td>
<a href="http://en.wikipedia.org/wiki/WebRTC"></a>WebRTC to SIP Gateway.
<a href="http://en.wikipedia.org/wiki/WebRTC"></a>Commercial-grade WebRTC to SIP Gateway.
</td>
</tr>
<tr>