Optimize video processing on embedded devices such as Android
Add support for "YUV 420 SP" chroma for both producers and consumers. Resolve bugs
This commit is contained in:
parent
41929f9a07
commit
4fe287b692
|
@ -34,6 +34,9 @@
|
|||
|
||||
#include "tinydav/audio/tdav_producer_audio.h"
|
||||
|
||||
|
||||
|
||||
/* ============ Audio Media Producer Interface ================= */
|
||||
typedef struct twrap_producer_proxy_audio_s
|
||||
{
|
||||
TDAV_DECLARE_PRODUCER_AUDIO;
|
||||
|
@ -42,9 +45,6 @@ typedef struct twrap_producer_proxy_audio_s
|
|||
}
|
||||
twrap_producer_proxy_audio_t;
|
||||
|
||||
|
||||
|
||||
/* ============ Media Producer Interface ================= */
|
||||
int twrap_producer_proxy_audio_prepare(tmedia_producer_t* self, const tmedia_codec_t* codec)
|
||||
{
|
||||
if(ProxyAudioProducer::instance && codec){
|
||||
|
@ -148,11 +148,12 @@ static const tmedia_producer_plugin_def_t twrap_producer_proxy_audio_plugin_def_
|
|||
twrap_producer_proxy_audio_pause,
|
||||
twrap_producer_proxy_audio_stop
|
||||
};
|
||||
//extern "C" {
|
||||
|
||||
TINYWRAP_GEXTERN const tmedia_producer_plugin_def_t *twrap_producer_proxy_audio_plugin_def_t = &twrap_producer_proxy_audio_plugin_def_s;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
/* ============ ProxyAudioProducer Class ================= */
|
||||
ProxyAudioProducer* ProxyAudioProducer::instance = tsk_null;
|
||||
|
||||
ProxyAudioProducer::ProxyAudioProducer()
|
||||
|
@ -209,3 +210,203 @@ bool ProxyAudioProducer::registerPlugin()
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ============ Video Media Producer Interface ================= */
|
||||
typedef struct twrap_producer_proxy_video_s
|
||||
{
|
||||
TMEDIA_DECLARE_PRODUCER;
|
||||
|
||||
tsk_bool_t started;
|
||||
}
|
||||
twrap_producer_proxy_video_t;
|
||||
|
||||
int twrap_producer_proxy_video_prepare(tmedia_producer_t* self, const tmedia_codec_t* codec)
|
||||
{
|
||||
if(ProxyVideoProducer::instance && codec){
|
||||
self->video.chroma = ProxyVideoProducer::instance->getChroma();
|
||||
ProxyVideoProducer::instance->takeProducer((twrap_producer_proxy_video_t*)self);
|
||||
ProxyVideoProducer::instance->prepare(TMEDIA_CODEC_VIDEO(codec)->width, TMEDIA_CODEC_VIDEO(codec)->height, TMEDIA_CODEC_VIDEO(codec)->fps);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int twrap_producer_proxy_video_start(tmedia_producer_t* self)
|
||||
{
|
||||
twrap_producer_proxy_video_t* producer = (twrap_producer_proxy_video_t*)self;
|
||||
|
||||
if(ProxyVideoProducer::instance){
|
||||
ProxyVideoProducer::instance->start();
|
||||
}
|
||||
|
||||
producer->started = tsk_true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int twrap_producer_proxy_video_pause(tmedia_producer_t* self)
|
||||
{
|
||||
if(ProxyVideoProducer::instance){
|
||||
ProxyVideoProducer::instance->pause();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int twrap_producer_proxy_video_stop(tmedia_producer_t* self)
|
||||
{
|
||||
twrap_producer_proxy_video_t* producer = (twrap_producer_proxy_video_t*)self;
|
||||
|
||||
if(ProxyVideoProducer::instance){
|
||||
ProxyVideoProducer::instance->stop();
|
||||
ProxyVideoProducer::instance->releaseProducer((twrap_producer_proxy_video_t*)self);
|
||||
}
|
||||
|
||||
producer->started = tsk_false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Video producer object definition
|
||||
//
|
||||
/* constructor */
|
||||
static tsk_object_t* twrap_producer_proxy_video_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
twrap_producer_proxy_video_t *producer = (twrap_producer_proxy_video_t *)self;
|
||||
if(producer){
|
||||
/* init base */
|
||||
tmedia_producer_init(TMEDIA_PRODUCER(producer));
|
||||
/* init self */
|
||||
|
||||
/* do not call takeProducer() */
|
||||
}
|
||||
return self;
|
||||
}
|
||||
/* destructor */
|
||||
static tsk_object_t* twrap_producer_proxy_video_dtor(tsk_object_t * self)
|
||||
{
|
||||
twrap_producer_proxy_video_t *producer = (twrap_producer_proxy_video_t *)self;
|
||||
if(producer){
|
||||
|
||||
/* stop */
|
||||
if(producer->started){
|
||||
twrap_producer_proxy_video_stop(TMEDIA_PRODUCER(producer));
|
||||
}
|
||||
|
||||
/* deinit base */
|
||||
tmedia_producer_deinit(TMEDIA_PRODUCER(producer));
|
||||
/* deinit self */
|
||||
|
||||
/* do not call releaseProducer() */
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
/* object definition */
|
||||
static const tsk_object_def_t twrap_producer_proxy_video_def_s =
|
||||
{
|
||||
sizeof(twrap_producer_proxy_video_t),
|
||||
twrap_producer_proxy_video_ctor,
|
||||
twrap_producer_proxy_video_dtor,
|
||||
tsk_null,
|
||||
};
|
||||
/* plugin definition*/
|
||||
static const tmedia_producer_plugin_def_t twrap_producer_proxy_video_plugin_def_s =
|
||||
{
|
||||
&twrap_producer_proxy_video_def_s,
|
||||
|
||||
tmedia_video,
|
||||
"Video Proxy Producer",
|
||||
|
||||
twrap_producer_proxy_video_prepare,
|
||||
twrap_producer_proxy_video_start,
|
||||
twrap_producer_proxy_video_pause,
|
||||
twrap_producer_proxy_video_stop
|
||||
};
|
||||
|
||||
TINYWRAP_GEXTERN const tmedia_producer_plugin_def_t *twrap_producer_proxy_video_plugin_def_t = &twrap_producer_proxy_video_plugin_def_s;
|
||||
|
||||
|
||||
|
||||
/* ============ ProxyVideoProducer Class ================= */
|
||||
ProxyVideoProducer* ProxyVideoProducer::instance = tsk_null;
|
||||
|
||||
ProxyVideoProducer::ProxyVideoProducer(tmedia_chroma_t _chroma)
|
||||
:producer(tsk_null), chroma(_chroma)
|
||||
{
|
||||
}
|
||||
|
||||
ProxyVideoProducer::~ProxyVideoProducer()
|
||||
{
|
||||
this->releaseProducer(this->producer);
|
||||
|
||||
if(ProxyVideoProducer::instance == this){
|
||||
ProxyVideoProducer::instance = tsk_null;
|
||||
}
|
||||
}
|
||||
|
||||
void ProxyVideoProducer::setActivate(bool enabled)
|
||||
{
|
||||
if(enabled){
|
||||
ProxyVideoProducer::instance = this;
|
||||
}
|
||||
else{
|
||||
ProxyVideoProducer::instance = tsk_null;
|
||||
}
|
||||
}
|
||||
|
||||
int ProxyVideoProducer::push(const void* buffer, unsigned size)
|
||||
{
|
||||
if(this->producer && TMEDIA_PRODUCER(this->producer)->callback){
|
||||
return TMEDIA_PRODUCER(this->producer)->callback(TMEDIA_PRODUCER(this->producer)->callback_data, buffer, size);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
tmedia_chroma_t ProxyVideoProducer::getChroma()
|
||||
{
|
||||
return this->chroma;
|
||||
}
|
||||
|
||||
void ProxyVideoProducer::takeProducer(twrap_producer_proxy_video_t* _producer)
|
||||
{
|
||||
if(!this->producer){
|
||||
this->producer = (twrap_producer_proxy_video_t*)tsk_object_ref(_producer);
|
||||
}
|
||||
}
|
||||
|
||||
void ProxyVideoProducer::releaseProducer(twrap_producer_proxy_video_t* _producer)
|
||||
{
|
||||
TSK_OBJECT_SAFE_FREE(this->producer);
|
||||
}
|
||||
|
||||
bool ProxyVideoProducer::registerPlugin()
|
||||
{
|
||||
/* HACK: Unregister all other video plugins */
|
||||
tmedia_producer_plugin_unregister_by_type(tmedia_video);
|
||||
/* Register our proxy plugin */
|
||||
return (tmedia_producer_plugin_register(twrap_producer_proxy_video_plugin_def_t) == 0);
|
||||
}
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
#include "tinyWRAP_config.h"
|
||||
|
||||
#include "tinymedia/tmedia_common.h"
|
||||
|
||||
class ProxyAudioProducer
|
||||
{
|
||||
public:
|
||||
|
@ -60,4 +62,34 @@ private:
|
|||
struct twrap_producer_proxy_audio_s* producer;
|
||||
};
|
||||
|
||||
class ProxyVideoProducer
|
||||
{
|
||||
public:
|
||||
ProxyVideoProducer(tmedia_chroma_t chroma);
|
||||
virtual ~ProxyVideoProducer();
|
||||
|
||||
/* Callback functions */
|
||||
virtual int prepare(int width, int height, int fps) { return 0; }
|
||||
virtual int start() { return 0; }
|
||||
virtual int pause() { return 0; }
|
||||
virtual int stop() { return 0; }
|
||||
|
||||
void setActivate(bool enabled);
|
||||
int push(const void* buffer, unsigned size);
|
||||
|
||||
public:
|
||||
static bool registerPlugin();
|
||||
|
||||
#if !defined(SWIG)
|
||||
tmedia_chroma_t getChroma();
|
||||
void takeProducer(struct twrap_producer_proxy_video_s*);
|
||||
void releaseProducer(struct twrap_producer_proxy_video_s*);
|
||||
static ProxyVideoProducer* instance;
|
||||
#endif
|
||||
|
||||
private:
|
||||
struct twrap_producer_proxy_video_s* producer;
|
||||
tmedia_chroma_t chroma;
|
||||
};
|
||||
|
||||
#endif /* TINYWRAP_PRODUCER_PROXY_H */
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
%feature("director") SipCallback;
|
||||
%feature("director") ProxyAudioConsumer;
|
||||
%feature("director") ProxyAudioProducer;
|
||||
%feature("director") ProxyVideoProducer;
|
||||
|
||||
|
||||
%nodefaultctor;
|
||||
|
@ -153,4 +154,15 @@ typedef enum tsip_invite_event_type_e
|
|||
tsip_m_remote_hold,
|
||||
tsip_m_remote_resume,
|
||||
}
|
||||
tsip_invite_event_type_t;
|
||||
tsip_invite_event_type_t;
|
||||
|
||||
|
||||
|
||||
/* ====== From "tinymedia/tmedia_common.h" ====== */
|
||||
typedef enum tmedia_chroma_e
|
||||
{
|
||||
tmedia_rgb24,
|
||||
tmedia_nv21, // Yuv420 SP (used on android)
|
||||
tmedia_yuv420p, // Default
|
||||
}
|
||||
tmedia_chroma_t;
|
|
@ -14,6 +14,7 @@ sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect
|
|||
sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/DDebugCallback.java
|
||||
sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/ProxyAudioConsumer.java
|
||||
sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/ProxyAudioProducer.java
|
||||
sed -i 's/_director_connect(this, swigCPtr, swigCMemOwn, true)/_director_connect(this, swigCPtr, swigCMemOwn, false)/g' java/android/ProxyVideoProducer.java
|
||||
|
||||
|
||||
##### Python
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class ProxyVideoProducer : IDisposable {
|
||||
private HandleRef swigCPtr;
|
||||
protected bool swigCMemOwn;
|
||||
|
||||
internal ProxyVideoProducer(IntPtr cPtr, bool cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = new HandleRef(this, cPtr);
|
||||
}
|
||||
|
||||
internal static HandleRef getCPtr(ProxyVideoProducer obj) {
|
||||
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
|
||||
}
|
||||
|
||||
~ProxyVideoProducer() {
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public virtual void Dispose() {
|
||||
lock(this) {
|
||||
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPPINVOKE.delete_ProxyVideoProducer(swigCPtr);
|
||||
}
|
||||
swigCPtr = new HandleRef(null, IntPtr.Zero);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
|
||||
public ProxyVideoProducer(tmedia_chroma_t chroma) : this(tinyWRAPPINVOKE.new_ProxyVideoProducer((int)chroma), true) {
|
||||
SwigDirectorConnect();
|
||||
}
|
||||
|
||||
public virtual int prepare(int width, int height, int fps) {
|
||||
int ret = ((this.GetType() == typeof(ProxyVideoProducer)) ? tinyWRAPPINVOKE.ProxyVideoProducer_prepare(swigCPtr, width, height, fps) : tinyWRAPPINVOKE.ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(swigCPtr, width, height, fps));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual int start() {
|
||||
int ret = ((this.GetType() == typeof(ProxyVideoProducer)) ? tinyWRAPPINVOKE.ProxyVideoProducer_start(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducer_startSwigExplicitProxyVideoProducer(swigCPtr));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual int pause() {
|
||||
int ret = ((this.GetType() == typeof(ProxyVideoProducer)) ? tinyWRAPPINVOKE.ProxyVideoProducer_pause(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(swigCPtr));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public virtual int stop() {
|
||||
int ret = ((this.GetType() == typeof(ProxyVideoProducer)) ? tinyWRAPPINVOKE.ProxyVideoProducer_stop(swigCPtr) : tinyWRAPPINVOKE.ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(swigCPtr));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void setActivate(bool enabled) {
|
||||
tinyWRAPPINVOKE.ProxyVideoProducer_setActivate(swigCPtr, enabled);
|
||||
}
|
||||
|
||||
public int push(byte[] buffer, uint size) {
|
||||
int ret = tinyWRAPPINVOKE.ProxyVideoProducer_push(swigCPtr, buffer, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static bool registerPlugin() {
|
||||
bool ret = tinyWRAPPINVOKE.ProxyVideoProducer_registerPlugin();
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void SwigDirectorConnect() {
|
||||
if (SwigDerivedClassHasMethod("prepare", swigMethodTypes0))
|
||||
swigDelegate0 = new SwigDelegateProxyVideoProducer_0(SwigDirectorprepare);
|
||||
if (SwigDerivedClassHasMethod("start", swigMethodTypes1))
|
||||
swigDelegate1 = new SwigDelegateProxyVideoProducer_1(SwigDirectorstart);
|
||||
if (SwigDerivedClassHasMethod("pause", swigMethodTypes2))
|
||||
swigDelegate2 = new SwigDelegateProxyVideoProducer_2(SwigDirectorpause);
|
||||
if (SwigDerivedClassHasMethod("stop", swigMethodTypes3))
|
||||
swigDelegate3 = new SwigDelegateProxyVideoProducer_3(SwigDirectorstop);
|
||||
tinyWRAPPINVOKE.ProxyVideoProducer_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3);
|
||||
}
|
||||
|
||||
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
|
||||
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
|
||||
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ProxyVideoProducer));
|
||||
return hasDerivedMethod;
|
||||
}
|
||||
|
||||
private int SwigDirectorprepare(int width, int height, int fps) {
|
||||
return prepare(width, height, fps);
|
||||
}
|
||||
|
||||
private int SwigDirectorstart() {
|
||||
return start();
|
||||
}
|
||||
|
||||
private int SwigDirectorpause() {
|
||||
return pause();
|
||||
}
|
||||
|
||||
private int SwigDirectorstop() {
|
||||
return stop();
|
||||
}
|
||||
|
||||
public delegate int SwigDelegateProxyVideoProducer_0(int width, int height, int fps);
|
||||
public delegate int SwigDelegateProxyVideoProducer_1();
|
||||
public delegate int SwigDelegateProxyVideoProducer_2();
|
||||
public delegate int SwigDelegateProxyVideoProducer_3();
|
||||
|
||||
private SwigDelegateProxyVideoProducer_0 swigDelegate0;
|
||||
private SwigDelegateProxyVideoProducer_1 swigDelegate1;
|
||||
private SwigDelegateProxyVideoProducer_2 swigDelegate2;
|
||||
private SwigDelegateProxyVideoProducer_3 swigDelegate3;
|
||||
|
||||
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[] { };
|
||||
}
|
|
@ -33,10 +33,11 @@ namespace test
|
|||
sipCallback = new MySipCallback();
|
||||
//sipDebugCallback = new MySipDebugCallback();
|
||||
|
||||
/* Create Audio consumer */
|
||||
/* Create consumers */
|
||||
audioConsumer = new MyProxyAudioConsumer();
|
||||
/* Create Audio producer */
|
||||
/* Create producers */
|
||||
audioProducer = new MyProxyAudioProducer();
|
||||
videoProducer = new MyProxyVideoProducer(tmedia_chroma_t.tmedia_nv21);
|
||||
|
||||
|
||||
/* Create and configure the IMS/LTE stack */
|
||||
|
@ -50,6 +51,7 @@ namespace test
|
|||
/* Do it after stack creation */
|
||||
ProxyAudioConsumer.registerPlugin();
|
||||
ProxyAudioProducer.registerPlugin();
|
||||
ProxyVideoProducer.registerPlugin();
|
||||
|
||||
/* Sets Proxy-CSCF */
|
||||
success = sipStack.setProxyCSCF(PROXY_CSCF_IP, PROXY_CSCF_PORT, "udp", "ipv4");
|
||||
|
@ -66,6 +68,7 @@ namespace test
|
|||
|
||||
audioConsumer.setActivate(true);
|
||||
audioProducer.setActivate(true);
|
||||
videoProducer.setActivate(true);
|
||||
|
||||
/* Send REGISTER */
|
||||
regSession = new RegistrationSession(sipStack);
|
||||
|
@ -127,12 +130,15 @@ namespace test
|
|||
|
||||
public static void OnTimer(Object stateInfo)
|
||||
{
|
||||
byte[] bytes = new byte[320];
|
||||
uint ret = audioConsumer.pull(bytes, (uint)bytes.Length);
|
||||
byte[] bytesAudio = new byte[320];
|
||||
uint ret = audioConsumer.pull(bytesAudio, (uint)bytesAudio.Length);
|
||||
//Console.WriteLine("pull="+ret);
|
||||
|
||||
int ret2 = audioProducer.push(bytes, (uint)bytes.Length);
|
||||
int ret2 = audioProducer.push(bytesAudio, (uint)bytesAudio.Length);
|
||||
//Console.WriteLine("push=" + ret);
|
||||
|
||||
byte[] bytesVideo = new byte[38016];
|
||||
int ret3 = videoProducer.push(bytesVideo, (uint)bytesVideo.Length);
|
||||
}
|
||||
|
||||
static Timer timer;
|
||||
|
@ -145,6 +151,7 @@ namespace test
|
|||
static MySipDebugCallback sipDebugCallback;
|
||||
static MyProxyAudioConsumer audioConsumer;
|
||||
static MyProxyAudioProducer audioProducer;
|
||||
static MyProxyVideoProducer videoProducer;
|
||||
}
|
||||
|
||||
|
||||
|
@ -221,6 +228,34 @@ namespace test
|
|||
}
|
||||
}
|
||||
|
||||
public class MyProxyVideoProducer : ProxyVideoProducer
|
||||
{
|
||||
public MyProxyVideoProducer(tmedia_chroma_t chroma)
|
||||
: base(chroma)
|
||||
{
|
||||
}
|
||||
|
||||
public override int prepare(int width, int height, int fps)
|
||||
{
|
||||
return base.prepare(width, height, fps);
|
||||
}
|
||||
|
||||
public override int start()
|
||||
{
|
||||
return base.start();
|
||||
}
|
||||
|
||||
public override int pause()
|
||||
{
|
||||
return base.pause();
|
||||
}
|
||||
|
||||
public override int stop()
|
||||
{
|
||||
return base.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public class MySipCallback : SipCallback
|
||||
{
|
||||
public MySipCallback()
|
||||
|
|
|
@ -75,6 +75,9 @@
|
|||
<Compile Include="..\ProxyAudioProducer.cs">
|
||||
<Link>ProxyAudioProducer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\ProxyVideoProducer.cs">
|
||||
<Link>ProxyVideoProducer.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\PublicationEvent.cs">
|
||||
<Link>PublicationEvent.cs</Link>
|
||||
</Compile>
|
||||
|
@ -120,6 +123,9 @@
|
|||
<Compile Include="..\tinyWRAPPINVOKE.cs">
|
||||
<Link>tinyWRAPPINVOKE.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\tmedia_chroma_t.cs">
|
||||
<Link>tmedia_chroma_t.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\tsip_event_type_t.cs">
|
||||
<Link>tsip_event_type_t.cs</Link>
|
||||
</Compile>
|
||||
|
|
|
@ -25,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyDAV", "..\..\tinyDAV\ti
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyRTP", "..\..\tinyRTP\tinyRTP.vcproj", "{99B7D02F-8C70-4B45-AF3C-92313C3CEE15}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyDSHOW", "..\..\tinyDSHOW\tinyDSHOW.vcproj", "{0CCC02F1-4233-424F-AD5E-A021456E6E8D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -393,6 +395,30 @@ Global
|
|||
{99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Win32.ActiveCfg = Release|Win32
|
||||
{99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Win32.Build.0 = Release|Win32
|
||||
{99B7D02F-8C70-4B45-AF3C-92313C3CEE15}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Win32.Build.0 = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Debug|Any CPU.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Debug|Mixed Platforms.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Debug|Mixed Platforms.Build.0 = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Debug|Win32.Build.0 = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Release|Any CPU.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Release|Win32.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Release|Win32.Build.0 = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Static_Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -529,6 +529,48 @@ class tinyWRAPPINVOKE {
|
|||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyAudioProducer_director_connect")]
|
||||
public static extern void ProxyAudioProducer_director_connect(HandleRef jarg1, ProxyAudioProducer.SwigDelegateProxyAudioProducer_0 delegate0, ProxyAudioProducer.SwigDelegateProxyAudioProducer_1 delegate1, ProxyAudioProducer.SwigDelegateProxyAudioProducer_2 delegate2, ProxyAudioProducer.SwigDelegateProxyAudioProducer_3 delegate3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_new_ProxyVideoProducer")]
|
||||
public static extern IntPtr new_ProxyVideoProducer(int jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_delete_ProxyVideoProducer")]
|
||||
public static extern void delete_ProxyVideoProducer(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_prepare")]
|
||||
public static extern int ProxyVideoProducer_prepare(HandleRef jarg1, int jarg2, int jarg3, int jarg4);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer")]
|
||||
public static extern int ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(HandleRef jarg1, int jarg2, int jarg3, int jarg4);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_start")]
|
||||
public static extern int ProxyVideoProducer_start(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_startSwigExplicitProxyVideoProducer")]
|
||||
public static extern int ProxyVideoProducer_startSwigExplicitProxyVideoProducer(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_pause")]
|
||||
public static extern int ProxyVideoProducer_pause(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer")]
|
||||
public static extern int ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_stop")]
|
||||
public static extern int ProxyVideoProducer_stop(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_stopSwigExplicitProxyVideoProducer")]
|
||||
public static extern int ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(HandleRef jarg1);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_setActivate")]
|
||||
public static extern void ProxyVideoProducer_setActivate(HandleRef jarg1, bool jarg2);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_push")]
|
||||
public static extern int ProxyVideoProducer_push(HandleRef jarg1, byte[] jarg2, uint jarg3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_registerPlugin")]
|
||||
public static extern bool ProxyVideoProducer_registerPlugin();
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_ProxyVideoProducer_director_connect")]
|
||||
public static extern void ProxyVideoProducer_director_connect(HandleRef jarg1, ProxyVideoProducer.SwigDelegateProxyVideoProducer_0 delegate0, ProxyVideoProducer.SwigDelegateProxyVideoProducer_1 delegate1, ProxyVideoProducer.SwigDelegateProxyVideoProducer_2 delegate2, ProxyVideoProducer.SwigDelegateProxyVideoProducer_3 delegate3);
|
||||
|
||||
[DllImport("tinyWRAP", EntryPoint="CSharp_new_SipCallback")]
|
||||
public static extern IntPtr new_SipCallback();
|
||||
|
||||
|
|
|
@ -516,6 +516,87 @@ void SwigDirector_ProxyAudioProducer::swig_init_callbacks() {
|
|||
swig_callbackstop = 0;
|
||||
}
|
||||
|
||||
SwigDirector_ProxyVideoProducer::SwigDirector_ProxyVideoProducer(tmedia_chroma_t chroma) : ProxyVideoProducer(chroma), Swig::Director() {
|
||||
swig_init_callbacks();
|
||||
}
|
||||
|
||||
SwigDirector_ProxyVideoProducer::~SwigDirector_ProxyVideoProducer() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::prepare(int width, int height, int fps) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
int jresult = 0 ;
|
||||
int jwidth ;
|
||||
int jheight ;
|
||||
int jfps ;
|
||||
|
||||
if (!swig_callbackprepare) {
|
||||
return ProxyVideoProducer::prepare(width,height,fps);
|
||||
} else {
|
||||
jwidth = width;
|
||||
jheight = height;
|
||||
jfps = fps;
|
||||
jresult = (int) swig_callbackprepare(jwidth, jheight, jfps);
|
||||
c_result = (int)jresult;
|
||||
}
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::start() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
int jresult = 0 ;
|
||||
|
||||
if (!swig_callbackstart) {
|
||||
return ProxyVideoProducer::start();
|
||||
} else {
|
||||
jresult = (int) swig_callbackstart();
|
||||
c_result = (int)jresult;
|
||||
}
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::pause() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
int jresult = 0 ;
|
||||
|
||||
if (!swig_callbackpause) {
|
||||
return ProxyVideoProducer::pause();
|
||||
} else {
|
||||
jresult = (int) swig_callbackpause();
|
||||
c_result = (int)jresult;
|
||||
}
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::stop() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
int jresult = 0 ;
|
||||
|
||||
if (!swig_callbackstop) {
|
||||
return ProxyVideoProducer::stop();
|
||||
} else {
|
||||
jresult = (int) swig_callbackstop();
|
||||
c_result = (int)jresult;
|
||||
}
|
||||
return c_result;
|
||||
}
|
||||
|
||||
void SwigDirector_ProxyVideoProducer::swig_connect_director(SWIG_Callback0_t callbackprepare, SWIG_Callback1_t callbackstart, SWIG_Callback2_t callbackpause, SWIG_Callback3_t callbackstop) {
|
||||
swig_callbackprepare = callbackprepare;
|
||||
swig_callbackstart = callbackstart;
|
||||
swig_callbackpause = callbackpause;
|
||||
swig_callbackstop = callbackstop;
|
||||
}
|
||||
|
||||
void SwigDirector_ProxyVideoProducer::swig_init_callbacks() {
|
||||
swig_callbackprepare = 0;
|
||||
swig_callbackstart = 0;
|
||||
swig_callbackpause = 0;
|
||||
swig_callbackstop = 0;
|
||||
}
|
||||
|
||||
SwigDirector_SipCallback::SwigDirector_SipCallback() : SipCallback(), Swig::Director() {
|
||||
swig_init_callbacks();
|
||||
}
|
||||
|
@ -2046,6 +2127,179 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ProxyAudioProducer_director_connect(void *obj
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_ProxyVideoProducer(int jarg1) {
|
||||
void * jresult ;
|
||||
tmedia_chroma_t arg1 ;
|
||||
ProxyVideoProducer *result = 0 ;
|
||||
|
||||
arg1 = (tmedia_chroma_t)jarg1;
|
||||
result = (ProxyVideoProducer *)new SwigDirector_ProxyVideoProducer(arg1);
|
||||
jresult = (void *)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_delete_ProxyVideoProducer(void * jarg1) {
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_prepare(void * jarg1, int jarg2, int jarg3, int jarg4) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (int)(arg1)->prepare(arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(void * jarg1, int jarg2, int jarg3, int jarg4) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (int)(arg1)->ProxyVideoProducer::prepare(arg2,arg3,arg4);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_start(void * jarg1) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
result = (int)(arg1)->start();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_startSwigExplicitProxyVideoProducer(void * jarg1) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::start();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_pause(void * jarg1) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
result = (int)(arg1)->pause();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(void * jarg1) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::pause();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_stop(void * jarg1) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
result = (int)(arg1)->stop();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(void * jarg1) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::stop();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_ProxyVideoProducer_setActivate(void * jarg1, unsigned int jarg2) {
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
bool arg2 ;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
arg2 = jarg2 ? true : false;
|
||||
(arg1)->setActivate(arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT int SWIGSTDCALL CSharp_ProxyVideoProducer_push(void * jarg1, void * jarg2, unsigned int jarg3) {
|
||||
int jresult ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
int result;
|
||||
|
||||
arg1 = (ProxyVideoProducer *)jarg1;
|
||||
arg2 = jarg2;
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (int)(arg1)->push((void const *)arg2,arg3);
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ProxyVideoProducer_registerPlugin() {
|
||||
unsigned int jresult ;
|
||||
bool result;
|
||||
|
||||
result = (bool)ProxyVideoProducer::registerPlugin();
|
||||
jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void SWIGSTDCALL CSharp_ProxyVideoProducer_director_connect(void *objarg, SwigDirector_ProxyVideoProducer::SWIG_Callback0_t callback0, SwigDirector_ProxyVideoProducer::SWIG_Callback1_t callback1, SwigDirector_ProxyVideoProducer::SWIG_Callback2_t callback2, SwigDirector_ProxyVideoProducer::SWIG_Callback3_t callback3) {
|
||||
ProxyVideoProducer *obj = (ProxyVideoProducer *)objarg;
|
||||
SwigDirector_ProxyVideoProducer *director = dynamic_cast<SwigDirector_ProxyVideoProducer *>(obj);
|
||||
if (director) {
|
||||
director->swig_connect_director(callback0, callback1, callback2, callback3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void * SWIGSTDCALL CSharp_new_SipCallback() {
|
||||
void * jresult ;
|
||||
SipCallback *result = 0 ;
|
||||
|
|
|
@ -59,6 +59,30 @@ private:
|
|||
void swig_init_callbacks();
|
||||
};
|
||||
|
||||
class SwigDirector_ProxyVideoProducer : public ProxyVideoProducer, public Swig::Director {
|
||||
|
||||
public:
|
||||
SwigDirector_ProxyVideoProducer(tmedia_chroma_t chroma);
|
||||
virtual ~SwigDirector_ProxyVideoProducer();
|
||||
virtual int prepare(int width, int height, int fps);
|
||||
virtual int start();
|
||||
virtual int pause();
|
||||
virtual int stop();
|
||||
|
||||
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);
|
||||
|
||||
private:
|
||||
SWIG_Callback0_t swig_callbackprepare;
|
||||
SWIG_Callback1_t swig_callbackstart;
|
||||
SWIG_Callback2_t swig_callbackpause;
|
||||
SWIG_Callback3_t swig_callbackstop;
|
||||
void swig_init_callbacks();
|
||||
};
|
||||
|
||||
class SwigDirector_SipCallback : public SipCallback, public Swig::Director {
|
||||
|
||||
public:
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
public enum tmedia_chroma_t {
|
||||
tmedia_rgb24,
|
||||
tmedia_nv21,
|
||||
tmedia_yuv420p
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public class ProxyVideoProducer {
|
||||
private long swigCPtr;
|
||||
protected boolean swigCMemOwn;
|
||||
|
||||
protected ProxyVideoProducer(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ProxyVideoProducer obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if(swigCPtr != 0 && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.delete_ProxyVideoProducer(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected void swigDirectorDisconnect() {
|
||||
swigCMemOwn = false;
|
||||
delete();
|
||||
}
|
||||
|
||||
public void swigReleaseOwnership() {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.ProxyVideoProducer_change_ownership(this, swigCPtr, false);
|
||||
}
|
||||
|
||||
public void swigTakeOwnership() {
|
||||
swigCMemOwn = true;
|
||||
tinyWRAPJNI.ProxyVideoProducer_change_ownership(this, swigCPtr, true);
|
||||
}
|
||||
|
||||
public ProxyVideoProducer(tmedia_chroma_t chroma) {
|
||||
this(tinyWRAPJNI.new_ProxyVideoProducer(chroma.swigValue()), true);
|
||||
tinyWRAPJNI.ProxyVideoProducer_director_connect(this, swigCPtr, swigCMemOwn, true);
|
||||
}
|
||||
|
||||
public int prepare(int width, int height, int fps) {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_prepare(swigCPtr, this, width, height, fps) : tinyWRAPJNI.ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(swigCPtr, this, width, height, fps);
|
||||
}
|
||||
|
||||
public int start() {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_start(swigCPtr, this) : tinyWRAPJNI.ProxyVideoProducer_startSwigExplicitProxyVideoProducer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int pause() {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_pause(swigCPtr, this) : tinyWRAPJNI.ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int stop() {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_stop(swigCPtr, this) : tinyWRAPJNI.ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setActivate(boolean enabled) {
|
||||
tinyWRAPJNI.ProxyVideoProducer_setActivate(swigCPtr, this, enabled);
|
||||
}
|
||||
|
||||
public int push(java.nio.ByteBuffer buffer, long size) {
|
||||
return tinyWRAPJNI.ProxyVideoProducer_push(swigCPtr, this, buffer, size);
|
||||
}
|
||||
|
||||
public static boolean registerPlugin() {
|
||||
return tinyWRAPJNI.ProxyVideoProducer_registerPlugin();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public class ProxyVideoProducer {
|
||||
private long swigCPtr;
|
||||
protected boolean swigCMemOwn;
|
||||
|
||||
protected ProxyVideoProducer(long cPtr, boolean cMemoryOwn) {
|
||||
swigCMemOwn = cMemoryOwn;
|
||||
swigCPtr = cPtr;
|
||||
}
|
||||
|
||||
protected static long getCPtr(ProxyVideoProducer obj) {
|
||||
return (obj == null) ? 0 : obj.swigCPtr;
|
||||
}
|
||||
|
||||
protected void finalize() {
|
||||
delete();
|
||||
}
|
||||
|
||||
public synchronized void delete() {
|
||||
if(swigCPtr != 0 && swigCMemOwn) {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.delete_ProxyVideoProducer(swigCPtr);
|
||||
}
|
||||
swigCPtr = 0;
|
||||
}
|
||||
|
||||
protected void swigDirectorDisconnect() {
|
||||
swigCMemOwn = false;
|
||||
delete();
|
||||
}
|
||||
|
||||
public void swigReleaseOwnership() {
|
||||
swigCMemOwn = false;
|
||||
tinyWRAPJNI.ProxyVideoProducer_change_ownership(this, swigCPtr, false);
|
||||
}
|
||||
|
||||
public void swigTakeOwnership() {
|
||||
swigCMemOwn = true;
|
||||
tinyWRAPJNI.ProxyVideoProducer_change_ownership(this, swigCPtr, true);
|
||||
}
|
||||
|
||||
public ProxyVideoProducer(tmedia_chroma_t chroma) {
|
||||
this(tinyWRAPJNI.new_ProxyVideoProducer(chroma.swigValue()), true);
|
||||
tinyWRAPJNI.ProxyVideoProducer_director_connect(this, swigCPtr, swigCMemOwn, false);
|
||||
}
|
||||
|
||||
public int prepare(int width, int height, int fps) {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_prepare(swigCPtr, this, width, height, fps) : tinyWRAPJNI.ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(swigCPtr, this, width, height, fps);
|
||||
}
|
||||
|
||||
public int start() {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_start(swigCPtr, this) : tinyWRAPJNI.ProxyVideoProducer_startSwigExplicitProxyVideoProducer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int pause() {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_pause(swigCPtr, this) : tinyWRAPJNI.ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public int stop() {
|
||||
return (getClass() == ProxyVideoProducer.class) ? tinyWRAPJNI.ProxyVideoProducer_stop(swigCPtr, this) : tinyWRAPJNI.ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(swigCPtr, this);
|
||||
}
|
||||
|
||||
public void setActivate(boolean enabled) {
|
||||
tinyWRAPJNI.ProxyVideoProducer_setActivate(swigCPtr, this, enabled);
|
||||
}
|
||||
|
||||
public int push(java.nio.ByteBuffer buffer, long size) {
|
||||
return tinyWRAPJNI.ProxyVideoProducer_push(swigCPtr, this, buffer, size);
|
||||
}
|
||||
|
||||
public static boolean registerPlugin() {
|
||||
return tinyWRAPJNI.ProxyVideoProducer_registerPlugin();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Build tinyWRAP for Google Android Systems
|
||||
|
||||
#export CFLAGS="-Os"
|
||||
export CFLAGS="-O3 $CFLAGS"
|
||||
|
||||
for project in tinySAK tinyNET tinyIPSec tinySMS tinyHTTP tinySIGCOMP tinySDP tinyRTP tinyMEDIA tinyDAV tinySIP
|
||||
do
|
||||
|
|
|
@ -4,7 +4,8 @@ CFLAGS := $(CFLAGS_LIB) -fno-rtti -fno-exceptions -I../../_common -I../../. -I..
|
|||
-I../../../tinySDP/include -I../../../tinyMEDIA/include -I../../../tinyDAV/include -I../../../tinySIP/include
|
||||
|
||||
# Because of the static build, you need all librarires
|
||||
LDFLAGS := $(LDFLAGS_LIB) -lstdc++ -llog -ltinySAK -ltinyHTTP -ltinyIPSec -ltinySIGCOMP -ltinyNET -ltinySDP -ltinyRTP -ltinyMEDIA -ltinyDAV -ltinySIP -lm
|
||||
FFMPEG_LDFLAGS := -L../../../thirdparties/android/lib -lavutil -lswscale -lavcodec -lgcc
|
||||
LDFLAGS := $(LDFLAGS_LIB) $(FFMPEG_LDFLAGS) -lstdc++ -llog -ltinySAK -ltinyHTTP -ltinyIPSec -ltinySIGCOMP -ltinyNET -ltinySDP -ltinyRTP -ltinyMEDIA -ltinyDAV -ltinySIP -lm
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -126,6 +126,21 @@ class tinyWRAPJNI {
|
|||
public final static native boolean ProxyAudioProducer_registerPlugin();
|
||||
public final static native void ProxyAudioProducer_director_connect(ProxyAudioProducer obj, long cptr, boolean mem_own, boolean weak_global);
|
||||
public final static native void ProxyAudioProducer_change_ownership(ProxyAudioProducer obj, long cptr, boolean take_or_release);
|
||||
public final static native long new_ProxyVideoProducer(int jarg1);
|
||||
public final static native void delete_ProxyVideoProducer(long jarg1);
|
||||
public final static native int ProxyVideoProducer_prepare(long jarg1, ProxyVideoProducer jarg1_, int jarg2, int jarg3, int jarg4);
|
||||
public final static native int ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_, int jarg2, int jarg3, int jarg4);
|
||||
public final static native int ProxyVideoProducer_start(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_startSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_pause(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_stop(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native void ProxyVideoProducer_setActivate(long jarg1, ProxyVideoProducer jarg1_, boolean jarg2);
|
||||
public final static native int ProxyVideoProducer_push(long jarg1, ProxyVideoProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native boolean ProxyVideoProducer_registerPlugin();
|
||||
public final static native void ProxyVideoProducer_director_connect(ProxyVideoProducer obj, long cptr, boolean mem_own, boolean weak_global);
|
||||
public final static native void ProxyVideoProducer_change_ownership(ProxyVideoProducer obj, long cptr, boolean take_or_release);
|
||||
public final static native long new_SipCallback();
|
||||
public final static native void delete_SipCallback(long jarg1);
|
||||
public final static native int SipCallback_OnDialogEvent(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_);
|
||||
|
@ -208,6 +223,18 @@ class tinyWRAPJNI {
|
|||
public static int SwigDirector_ProxyAudioProducer_stop(ProxyAudioProducer self) {
|
||||
return self.stop();
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_prepare(ProxyVideoProducer self, int width, int height, int fps) {
|
||||
return self.prepare(width, height, fps);
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_start(ProxyVideoProducer self) {
|
||||
return self.start();
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_pause(ProxyVideoProducer self) {
|
||||
return self.pause();
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_stop(ProxyVideoProducer self) {
|
||||
return self.stop();
|
||||
}
|
||||
public static int SwigDirector_SipCallback_OnDialogEvent(SipCallback self, long e) {
|
||||
return self.OnDialogEvent((e == 0) ? null : new DialogEvent(e, false));
|
||||
}
|
||||
|
|
|
@ -403,7 +403,7 @@ namespace Swig {
|
|||
|
||||
namespace Swig {
|
||||
static jclass jclass_tinyWRAPJNI = NULL;
|
||||
static jmethodID director_methids[16];
|
||||
static jmethodID director_methids[20];
|
||||
}
|
||||
|
||||
#include "DDebug.h"
|
||||
|
@ -723,6 +723,153 @@ void SwigDirector_ProxyAudioProducer::swig_connect_director(JNIEnv *jenv, jobjec
|
|||
}
|
||||
|
||||
|
||||
SwigDirector_ProxyVideoProducer::SwigDirector_ProxyVideoProducer(JNIEnv *jenv, tmedia_chroma_t chroma) : ProxyVideoProducer(chroma), Swig::Director(jenv) {
|
||||
}
|
||||
|
||||
SwigDirector_ProxyVideoProducer::~SwigDirector_ProxyVideoProducer() {
|
||||
swig_disconnect_director_self("swigDirectorDisconnect");
|
||||
}
|
||||
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::prepare(int width, int height, int fps) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
jint jwidth ;
|
||||
jint jheight ;
|
||||
jint jfps ;
|
||||
|
||||
if (!swig_override[0]) {
|
||||
return ProxyVideoProducer::prepare(width,height,fps);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jwidth = (jint) width;
|
||||
jheight = (jint) height;
|
||||
jfps = (jint) fps;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[8], swigjobj, jwidth, jheight, jfps);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::start() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
|
||||
if (!swig_override[1]) {
|
||||
return ProxyVideoProducer::start();
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[9], swigjobj);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::pause() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
|
||||
if (!swig_override[2]) {
|
||||
return ProxyVideoProducer::pause();
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[10], swigjobj);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::stop() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
|
||||
if (!swig_override[3]) {
|
||||
return ProxyVideoProducer::stop();
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[11], swigjobj);
|
||||
if (jenv->ExceptionOccurred()) 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_ProxyVideoProducer::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
|
||||
static struct {
|
||||
const char *mname;
|
||||
const char *mdesc;
|
||||
jmethodID base_methid;
|
||||
} methods[] = {
|
||||
{
|
||||
"prepare", "(III)I", NULL
|
||||
},
|
||||
{
|
||||
"start", "()I", NULL
|
||||
},
|
||||
{
|
||||
"pause", "()I", NULL
|
||||
},
|
||||
{
|
||||
"stop", "()I", NULL
|
||||
}
|
||||
};
|
||||
|
||||
static jclass baseclass = 0 ;
|
||||
|
||||
if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
|
||||
if (!baseclass) {
|
||||
baseclass = jenv->FindClass("org/doubango/tinyWRAP/ProxyVideoProducer");
|
||||
if (!baseclass) return;
|
||||
baseclass = (jclass) jenv->NewGlobalRef(baseclass);
|
||||
}
|
||||
bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
|
||||
for (int i = 0; i < 4; ++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;
|
||||
}
|
||||
swig_override[i] = false;
|
||||
if (derived) {
|
||||
jmethodID methid = jenv->GetMethodID(jcls, methods[i].mname, methods[i].mdesc);
|
||||
swig_override[i] = (methid != methods[i].base_methid);
|
||||
jenv->ExceptionClear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SwigDirector_SipCallback::SwigDirector_SipCallback(JNIEnv *jenv) : SipCallback(), Swig::Director(jenv) {
|
||||
}
|
||||
|
||||
|
@ -745,7 +892,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[8], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[12], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -769,7 +916,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[9], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[13], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -793,7 +940,7 @@ int SwigDirector_SipCallback::OnCallEvent(CallEvent const *e) {
|
|||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((CallEvent **)&je) = (CallEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[10], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[14], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -817,7 +964,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[11], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[15], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -841,7 +988,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[12], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[16], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -865,7 +1012,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[13], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[17], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -889,7 +1036,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[14], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[18], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -913,7 +1060,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[15], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[19], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -2821,6 +2968,228 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProduce
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1ProxyVideoProducer(JNIEnv *jenv, jclass jcls, jint jarg1) {
|
||||
jlong jresult = 0 ;
|
||||
tmedia_chroma_t arg1 ;
|
||||
ProxyVideoProducer *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = (tmedia_chroma_t)jarg1;
|
||||
result = (ProxyVideoProducer *)new SwigDirector_ProxyVideoProducer(jenv,arg1);
|
||||
*(ProxyVideoProducer **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1prepare(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (int)(arg1)->prepare(arg2,arg3,arg4);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1prepareSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (int)(arg1)->ProxyVideoProducer::prepare(arg2,arg3,arg4);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->start();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1startSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::start();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1pause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->pause();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1pauseSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::pause();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->stop();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1stopSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::stop();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1setActivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
bool arg2 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
arg2 = jarg2 ? true : false;
|
||||
(arg1)->setActivate(arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1push(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (int)(arg1)->push((void const *)arg2,arg3);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1registerPlugin(JNIEnv *jenv, jclass jcls) {
|
||||
jboolean jresult = 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
result = (bool)ProxyVideoProducer::registerPlugin();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
|
||||
ProxyVideoProducer *obj = *((ProxyVideoProducer **)&objarg);
|
||||
(void)jcls;
|
||||
SwigDirector_ProxyVideoProducer *director = static_cast<SwigDirector_ProxyVideoProducer *>(obj);
|
||||
if (director) {
|
||||
director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
|
||||
ProxyVideoProducer *obj = *((ProxyVideoProducer **)&objarg);
|
||||
SwigDirector_ProxyVideoProducer *director = static_cast<SwigDirector_ProxyVideoProducer *>(obj);
|
||||
(void)jcls;
|
||||
if (director) {
|
||||
director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipCallback(JNIEnv *jenv, jclass jcls) {
|
||||
jlong jresult = 0 ;
|
||||
SipCallback *result = 0 ;
|
||||
|
@ -3717,7 +4086,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
static struct {
|
||||
const char *method;
|
||||
const char *signature;
|
||||
} methods[16] = {
|
||||
} methods[20] = {
|
||||
{
|
||||
"SwigDirector_ProxyAudioConsumer_prepare", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;III)I"
|
||||
},
|
||||
|
@ -3742,6 +4111,18 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
{
|
||||
"SwigDirector_ProxyAudioProducer_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_prepare", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;III)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_start", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_pause", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_stop", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_SipCallback_OnDialogEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
|
|
|
@ -47,6 +47,24 @@ protected:
|
|||
bool swig_override[4];
|
||||
};
|
||||
|
||||
class SwigDirector_ProxyVideoProducer : public ProxyVideoProducer, public Swig::Director {
|
||||
|
||||
public:
|
||||
void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
|
||||
SwigDirector_ProxyVideoProducer(JNIEnv *jenv, tmedia_chroma_t chroma);
|
||||
virtual ~SwigDirector_ProxyVideoProducer();
|
||||
virtual int prepare(int width, int height, int fps);
|
||||
virtual int start();
|
||||
virtual int pause();
|
||||
virtual int stop();
|
||||
public:
|
||||
bool swig_overrides(int n) {
|
||||
return (n < 4 ? swig_override[n] : false);
|
||||
}
|
||||
protected:
|
||||
bool swig_override[4];
|
||||
};
|
||||
|
||||
class SwigDirector_SipCallback : public SipCallback, public Swig::Director {
|
||||
|
||||
public:
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public enum tmedia_chroma_t {
|
||||
tmedia_rgb24,
|
||||
tmedia_nv21,
|
||||
tmedia_yuv420p;
|
||||
|
||||
public final int swigValue() {
|
||||
return swigValue;
|
||||
}
|
||||
|
||||
public static tmedia_chroma_t swigToEnum(int swigValue) {
|
||||
tmedia_chroma_t[] swigValues = tmedia_chroma_t.class.getEnumConstants();
|
||||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
||||
return swigValues[swigValue];
|
||||
for (tmedia_chroma_t swigEnum : swigValues)
|
||||
if (swigEnum.swigValue == swigValue)
|
||||
return swigEnum;
|
||||
throw new IllegalArgumentException("No enum " + tmedia_chroma_t.class + " with value " + swigValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tmedia_chroma_t() {
|
||||
this.swigValue = SwigNext.next++;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tmedia_chroma_t(int swigValue) {
|
||||
this.swigValue = swigValue;
|
||||
SwigNext.next = swigValue+1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tmedia_chroma_t(tmedia_chroma_t swigEnum) {
|
||||
this.swigValue = swigEnum.swigValue;
|
||||
SwigNext.next = this.swigValue+1;
|
||||
}
|
||||
|
||||
private final int swigValue;
|
||||
|
||||
private static class SwigNext {
|
||||
private static int next = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -126,6 +126,21 @@ class tinyWRAPJNI {
|
|||
public final static native boolean ProxyAudioProducer_registerPlugin();
|
||||
public final static native void ProxyAudioProducer_director_connect(ProxyAudioProducer obj, long cptr, boolean mem_own, boolean weak_global);
|
||||
public final static native void ProxyAudioProducer_change_ownership(ProxyAudioProducer obj, long cptr, boolean take_or_release);
|
||||
public final static native long new_ProxyVideoProducer(int jarg1);
|
||||
public final static native void delete_ProxyVideoProducer(long jarg1);
|
||||
public final static native int ProxyVideoProducer_prepare(long jarg1, ProxyVideoProducer jarg1_, int jarg2, int jarg3, int jarg4);
|
||||
public final static native int ProxyVideoProducer_prepareSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_, int jarg2, int jarg3, int jarg4);
|
||||
public final static native int ProxyVideoProducer_start(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_startSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_pause(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_pauseSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_stop(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native int ProxyVideoProducer_stopSwigExplicitProxyVideoProducer(long jarg1, ProxyVideoProducer jarg1_);
|
||||
public final static native void ProxyVideoProducer_setActivate(long jarg1, ProxyVideoProducer jarg1_, boolean jarg2);
|
||||
public final static native int ProxyVideoProducer_push(long jarg1, ProxyVideoProducer jarg1_, java.nio.ByteBuffer jarg2, long jarg3);
|
||||
public final static native boolean ProxyVideoProducer_registerPlugin();
|
||||
public final static native void ProxyVideoProducer_director_connect(ProxyVideoProducer obj, long cptr, boolean mem_own, boolean weak_global);
|
||||
public final static native void ProxyVideoProducer_change_ownership(ProxyVideoProducer obj, long cptr, boolean take_or_release);
|
||||
public final static native long new_SipCallback();
|
||||
public final static native void delete_SipCallback(long jarg1);
|
||||
public final static native int SipCallback_OnDialogEvent(long jarg1, SipCallback jarg1_, long jarg2, DialogEvent jarg2_);
|
||||
|
@ -208,6 +223,18 @@ class tinyWRAPJNI {
|
|||
public static int SwigDirector_ProxyAudioProducer_stop(ProxyAudioProducer self) {
|
||||
return self.stop();
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_prepare(ProxyVideoProducer self, int width, int height, int fps) {
|
||||
return self.prepare(width, height, fps);
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_start(ProxyVideoProducer self) {
|
||||
return self.start();
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_pause(ProxyVideoProducer self) {
|
||||
return self.pause();
|
||||
}
|
||||
public static int SwigDirector_ProxyVideoProducer_stop(ProxyVideoProducer self) {
|
||||
return self.stop();
|
||||
}
|
||||
public static int SwigDirector_SipCallback_OnDialogEvent(SipCallback self, long e) {
|
||||
return self.OnDialogEvent((e == 0) ? null : new DialogEvent(e, false));
|
||||
}
|
||||
|
|
|
@ -403,7 +403,7 @@ namespace Swig {
|
|||
|
||||
namespace Swig {
|
||||
static jclass jclass_tinyWRAPJNI = NULL;
|
||||
static jmethodID director_methids[16];
|
||||
static jmethodID director_methids[20];
|
||||
}
|
||||
|
||||
#include "DDebug.h"
|
||||
|
@ -723,6 +723,153 @@ void SwigDirector_ProxyAudioProducer::swig_connect_director(JNIEnv *jenv, jobjec
|
|||
}
|
||||
|
||||
|
||||
SwigDirector_ProxyVideoProducer::SwigDirector_ProxyVideoProducer(JNIEnv *jenv, tmedia_chroma_t chroma) : ProxyVideoProducer(chroma), Swig::Director(jenv) {
|
||||
}
|
||||
|
||||
SwigDirector_ProxyVideoProducer::~SwigDirector_ProxyVideoProducer() {
|
||||
swig_disconnect_director_self("swigDirectorDisconnect");
|
||||
}
|
||||
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::prepare(int width, int height, int fps) {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
jint jwidth ;
|
||||
jint jheight ;
|
||||
jint jfps ;
|
||||
|
||||
if (!swig_override[0]) {
|
||||
return ProxyVideoProducer::prepare(width,height,fps);
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jwidth = (jint) width;
|
||||
jheight = (jint) height;
|
||||
jfps = (jint) fps;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[8], swigjobj, jwidth, jheight, jfps);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::start() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
|
||||
if (!swig_override[1]) {
|
||||
return ProxyVideoProducer::start();
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[9], swigjobj);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::pause() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
|
||||
if (!swig_override[2]) {
|
||||
return ProxyVideoProducer::pause();
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[10], swigjobj);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null upcall object");
|
||||
}
|
||||
if (swigjobj) jenv->DeleteLocalRef(swigjobj);
|
||||
return c_result;
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::stop() {
|
||||
int c_result = SwigValueInit< int >() ;
|
||||
jint jresult = 0 ;
|
||||
JNIEnvWrapper swigjnienv(this) ;
|
||||
JNIEnv * jenv = swigjnienv.getJNIEnv() ;
|
||||
jobject swigjobj = (jobject) NULL ;
|
||||
|
||||
if (!swig_override[3]) {
|
||||
return ProxyVideoProducer::stop();
|
||||
}
|
||||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[11], swigjobj);
|
||||
if (jenv->ExceptionOccurred()) 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_ProxyVideoProducer::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {
|
||||
static struct {
|
||||
const char *mname;
|
||||
const char *mdesc;
|
||||
jmethodID base_methid;
|
||||
} methods[] = {
|
||||
{
|
||||
"prepare", "(III)I", NULL
|
||||
},
|
||||
{
|
||||
"start", "()I", NULL
|
||||
},
|
||||
{
|
||||
"pause", "()I", NULL
|
||||
},
|
||||
{
|
||||
"stop", "()I", NULL
|
||||
}
|
||||
};
|
||||
|
||||
static jclass baseclass = 0 ;
|
||||
|
||||
if (swig_set_self(jenv, jself, swig_mem_own, weak_global)) {
|
||||
if (!baseclass) {
|
||||
baseclass = jenv->FindClass("org/doubango/tinyWRAP/ProxyVideoProducer");
|
||||
if (!baseclass) return;
|
||||
baseclass = (jclass) jenv->NewGlobalRef(baseclass);
|
||||
}
|
||||
bool derived = (jenv->IsSameObject(baseclass, jcls) ? false : true);
|
||||
for (int i = 0; i < 4; ++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;
|
||||
}
|
||||
swig_override[i] = false;
|
||||
if (derived) {
|
||||
jmethodID methid = jenv->GetMethodID(jcls, methods[i].mname, methods[i].mdesc);
|
||||
swig_override[i] = (methid != methods[i].base_methid);
|
||||
jenv->ExceptionClear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SwigDirector_SipCallback::SwigDirector_SipCallback(JNIEnv *jenv) : SipCallback(), Swig::Director(jenv) {
|
||||
}
|
||||
|
||||
|
@ -745,7 +892,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[8], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[12], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -769,7 +916,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[9], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[13], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -793,7 +940,7 @@ int SwigDirector_SipCallback::OnCallEvent(CallEvent const *e) {
|
|||
swigjobj = swig_get_self(jenv);
|
||||
if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {
|
||||
*((CallEvent **)&je) = (CallEvent *) e;
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[10], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[14], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -817,7 +964,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[11], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[15], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -841,7 +988,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[12], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[16], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -865,7 +1012,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[13], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[17], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -889,7 +1036,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[14], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[18], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -913,7 +1060,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[15], swigjobj, je);
|
||||
jresult = (jint) jenv->CallStaticIntMethod(Swig::jclass_tinyWRAPJNI, Swig::director_methids[19], swigjobj, je);
|
||||
if (jenv->ExceptionOccurred()) return c_result;
|
||||
c_result = (int)jresult;
|
||||
} else {
|
||||
|
@ -2821,6 +2968,228 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyAudioProduce
|
|||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1ProxyVideoProducer(JNIEnv *jenv, jclass jcls, jint jarg1) {
|
||||
jlong jresult = 0 ;
|
||||
tmedia_chroma_t arg1 ;
|
||||
ProxyVideoProducer *result = 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = (tmedia_chroma_t)jarg1;
|
||||
result = (ProxyVideoProducer *)new SwigDirector_ProxyVideoProducer(jenv,arg1);
|
||||
*(ProxyVideoProducer **)&jresult = result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_delete_1ProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
delete arg1;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1prepare(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (int)(arg1)->prepare(arg2,arg3,arg4);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1prepareSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
arg2 = (int)jarg2;
|
||||
arg3 = (int)jarg3;
|
||||
arg4 = (int)jarg4;
|
||||
result = (int)(arg1)->ProxyVideoProducer::prepare(arg2,arg3,arg4);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1start(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->start();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1startSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::start();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1pause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->pause();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1pauseSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::pause();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1stop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->stop();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1stopSwigExplicitProxyVideoProducer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
result = (int)(arg1)->ProxyVideoProducer::stop();
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1setActivate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
bool arg2 ;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
arg2 = jarg2 ? true : false;
|
||||
(arg1)->setActivate(arg2);
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jint JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1push(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
|
||||
jint jresult = 0 ;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
int result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
(void)jarg1_;
|
||||
arg1 = *(ProxyVideoProducer **)&jarg1;
|
||||
|
||||
arg2 = jenv->GetDirectBufferAddress(jarg2);
|
||||
|
||||
arg3 = (unsigned int)jarg3;
|
||||
result = (int)(arg1)->push((void const *)arg2,arg3);
|
||||
jresult = (jint)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jboolean JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1registerPlugin(JNIEnv *jenv, jclass jcls) {
|
||||
jboolean jresult = 0 ;
|
||||
bool result;
|
||||
|
||||
(void)jenv;
|
||||
(void)jcls;
|
||||
result = (bool)ProxyVideoProducer::registerPlugin();
|
||||
jresult = (jboolean)result;
|
||||
return jresult;
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1director_1connect(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jswig_mem_own, jboolean jweak_global) {
|
||||
ProxyVideoProducer *obj = *((ProxyVideoProducer **)&objarg);
|
||||
(void)jcls;
|
||||
SwigDirector_ProxyVideoProducer *director = dynamic_cast<SwigDirector_ProxyVideoProducer *>(obj);
|
||||
if (director) {
|
||||
director->swig_connect_director(jenv, jself, jenv->GetObjectClass(jself), (jswig_mem_own == JNI_TRUE), (jweak_global == JNI_TRUE));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_ProxyVideoProducer_1change_1ownership(JNIEnv *jenv, jclass jcls, jobject jself, jlong objarg, jboolean jtake_or_release) {
|
||||
ProxyVideoProducer *obj = *((ProxyVideoProducer **)&objarg);
|
||||
SwigDirector_ProxyVideoProducer *director = dynamic_cast<SwigDirector_ProxyVideoProducer *>(obj);
|
||||
(void)jcls;
|
||||
if (director) {
|
||||
director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWIGEXPORT jlong JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_new_1SipCallback(JNIEnv *jenv, jclass jcls) {
|
||||
jlong jresult = 0 ;
|
||||
SipCallback *result = 0 ;
|
||||
|
@ -3717,7 +4086,7 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
static struct {
|
||||
const char *method;
|
||||
const char *signature;
|
||||
} methods[16] = {
|
||||
} methods[20] = {
|
||||
{
|
||||
"SwigDirector_ProxyAudioConsumer_prepare", "(Lorg/doubango/tinyWRAP/ProxyAudioConsumer;III)I"
|
||||
},
|
||||
|
@ -3742,6 +4111,18 @@ SWIGEXPORT void JNICALL Java_org_doubango_tinyWRAP_tinyWRAPJNI_swig_1module_1ini
|
|||
{
|
||||
"SwigDirector_ProxyAudioProducer_stop", "(Lorg/doubango/tinyWRAP/ProxyAudioProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_prepare", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;III)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_start", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_pause", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_ProxyVideoProducer_stop", "(Lorg/doubango/tinyWRAP/ProxyVideoProducer;)I"
|
||||
},
|
||||
{
|
||||
"SwigDirector_SipCallback_OnDialogEvent", "(Lorg/doubango/tinyWRAP/SipCallback;J)I"
|
||||
},
|
||||
|
|
|
@ -47,6 +47,24 @@ protected:
|
|||
bool swig_override[4];
|
||||
};
|
||||
|
||||
class SwigDirector_ProxyVideoProducer : public ProxyVideoProducer, public Swig::Director {
|
||||
|
||||
public:
|
||||
void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global);
|
||||
SwigDirector_ProxyVideoProducer(JNIEnv *jenv, tmedia_chroma_t chroma);
|
||||
virtual ~SwigDirector_ProxyVideoProducer();
|
||||
virtual int prepare(int width, int height, int fps);
|
||||
virtual int start();
|
||||
virtual int pause();
|
||||
virtual int stop();
|
||||
public:
|
||||
bool swig_overrides(int n) {
|
||||
return (n < 4 ? swig_override[n] : false);
|
||||
}
|
||||
protected:
|
||||
bool swig_override[4];
|
||||
};
|
||||
|
||||
class SwigDirector_SipCallback : public SipCallback, public Swig::Director {
|
||||
|
||||
public:
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.39
|
||||
*
|
||||
* Do not make changes to this file unless you know what you are doing--modify
|
||||
* the SWIG interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
package org.doubango.tinyWRAP;
|
||||
|
||||
public enum tmedia_chroma_t {
|
||||
tmedia_rgb24,
|
||||
tmedia_nv21,
|
||||
tmedia_yuv420p;
|
||||
|
||||
public final int swigValue() {
|
||||
return swigValue;
|
||||
}
|
||||
|
||||
public static tmedia_chroma_t swigToEnum(int swigValue) {
|
||||
tmedia_chroma_t[] swigValues = tmedia_chroma_t.class.getEnumConstants();
|
||||
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
|
||||
return swigValues[swigValue];
|
||||
for (tmedia_chroma_t swigEnum : swigValues)
|
||||
if (swigEnum.swigValue == swigValue)
|
||||
return swigEnum;
|
||||
throw new IllegalArgumentException("No enum " + tmedia_chroma_t.class + " with value " + swigValue);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tmedia_chroma_t() {
|
||||
this.swigValue = SwigNext.next++;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tmedia_chroma_t(int swigValue) {
|
||||
this.swigValue = swigValue;
|
||||
SwigNext.next = swigValue+1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private tmedia_chroma_t(tmedia_chroma_t swigEnum) {
|
||||
this.swigValue = swigEnum.swigValue;
|
||||
SwigNext.next = this.swigValue+1;
|
||||
}
|
||||
|
||||
private final int swigValue;
|
||||
|
||||
private static class SwigNext {
|
||||
private static int next = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -841,6 +841,50 @@ sub ACQUIRE {
|
|||
}
|
||||
|
||||
|
||||
############# Class : tinyWRAP::ProxyVideoProducer ##############
|
||||
|
||||
package tinyWRAP::ProxyVideoProducer;
|
||||
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
|
||||
@ISA = qw( tinyWRAP );
|
||||
%OWNER = ();
|
||||
%ITERATORS = ();
|
||||
sub new {
|
||||
my $pkg = shift;
|
||||
my $self = tinyWRAPc::new_ProxyVideoProducer(@_);
|
||||
bless $self, $pkg if defined($self);
|
||||
}
|
||||
|
||||
sub DESTROY {
|
||||
return unless $_[0]->isa('HASH');
|
||||
my $self = tied(%{$_[0]});
|
||||
return unless defined $self;
|
||||
delete $ITERATORS{$self};
|
||||
if (exists $OWNER{$self}) {
|
||||
tinyWRAPc::delete_ProxyVideoProducer($self);
|
||||
delete $OWNER{$self};
|
||||
}
|
||||
}
|
||||
|
||||
*prepare = *tinyWRAPc::ProxyVideoProducer_prepare;
|
||||
*start = *tinyWRAPc::ProxyVideoProducer_start;
|
||||
*pause = *tinyWRAPc::ProxyVideoProducer_pause;
|
||||
*stop = *tinyWRAPc::ProxyVideoProducer_stop;
|
||||
*setActivate = *tinyWRAPc::ProxyVideoProducer_setActivate;
|
||||
*push = *tinyWRAPc::ProxyVideoProducer_push;
|
||||
*registerPlugin = *tinyWRAPc::ProxyVideoProducer_registerPlugin;
|
||||
sub DISOWN {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
delete $OWNER{$ptr};
|
||||
}
|
||||
|
||||
sub ACQUIRE {
|
||||
my $self = shift;
|
||||
my $ptr = tied(%$self);
|
||||
$OWNER{$ptr} = 1;
|
||||
}
|
||||
|
||||
|
||||
############# Class : tinyWRAP::SipCallback ##############
|
||||
|
||||
package tinyWRAP::SipCallback;
|
||||
|
@ -1033,4 +1077,7 @@ package tinyWRAP;
|
|||
*tsip_m_local_resume_nok = *tinyWRAPc::tsip_m_local_resume_nok;
|
||||
*tsip_m_remote_hold = *tinyWRAPc::tsip_m_remote_hold;
|
||||
*tsip_m_remote_resume = *tinyWRAPc::tsip_m_remote_resume;
|
||||
*tmedia_rgb24 = *tinyWRAPc::tmedia_rgb24;
|
||||
*tmedia_nv21 = *tinyWRAPc::tmedia_nv21;
|
||||
*tmedia_yuv420p = *tinyWRAPc::tmedia_yuv420p;
|
||||
1;
|
||||
|
|
|
@ -1505,30 +1505,32 @@ SWIG_Perl_SetModule(swig_module_info *module) {
|
|||
#define SWIGTYPE_p_OptionsSession swig_types[7]
|
||||
#define SWIGTYPE_p_ProxyAudioConsumer swig_types[8]
|
||||
#define SWIGTYPE_p_ProxyAudioProducer swig_types[9]
|
||||
#define SWIGTYPE_p_PublicationEvent swig_types[10]
|
||||
#define SWIGTYPE_p_PublicationSession swig_types[11]
|
||||
#define SWIGTYPE_p_RegistrationEvent swig_types[12]
|
||||
#define SWIGTYPE_p_RegistrationSession swig_types[13]
|
||||
#define SWIGTYPE_p_SafeObject swig_types[14]
|
||||
#define SWIGTYPE_p_SipCallback swig_types[15]
|
||||
#define SWIGTYPE_p_SipEvent swig_types[16]
|
||||
#define SWIGTYPE_p_SipMessage swig_types[17]
|
||||
#define SWIGTYPE_p_SipSession swig_types[18]
|
||||
#define SWIGTYPE_p_SipStack swig_types[19]
|
||||
#define SWIGTYPE_p_SipUri swig_types[20]
|
||||
#define SWIGTYPE_p_StackEvent swig_types[21]
|
||||
#define SWIGTYPE_p_SubscriptionEvent swig_types[22]
|
||||
#define SWIGTYPE_p_SubscriptionSession swig_types[23]
|
||||
#define SWIGTYPE_p_char swig_types[24]
|
||||
#define SWIGTYPE_p_tsip_event_type_e swig_types[25]
|
||||
#define SWIGTYPE_p_tsip_invite_event_type_e swig_types[26]
|
||||
#define SWIGTYPE_p_tsip_message_event_type_e swig_types[27]
|
||||
#define SWIGTYPE_p_tsip_options_event_type_e swig_types[28]
|
||||
#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[29]
|
||||
#define SWIGTYPE_p_tsip_register_event_type_e swig_types[30]
|
||||
#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[31]
|
||||
static swig_type_info *swig_types[33];
|
||||
static swig_module_info swig_module = {swig_types, 32, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_ProxyVideoProducer swig_types[10]
|
||||
#define SWIGTYPE_p_PublicationEvent swig_types[11]
|
||||
#define SWIGTYPE_p_PublicationSession swig_types[12]
|
||||
#define SWIGTYPE_p_RegistrationEvent swig_types[13]
|
||||
#define SWIGTYPE_p_RegistrationSession swig_types[14]
|
||||
#define SWIGTYPE_p_SafeObject swig_types[15]
|
||||
#define SWIGTYPE_p_SipCallback swig_types[16]
|
||||
#define SWIGTYPE_p_SipEvent swig_types[17]
|
||||
#define SWIGTYPE_p_SipMessage swig_types[18]
|
||||
#define SWIGTYPE_p_SipSession swig_types[19]
|
||||
#define SWIGTYPE_p_SipStack swig_types[20]
|
||||
#define SWIGTYPE_p_SipUri swig_types[21]
|
||||
#define SWIGTYPE_p_StackEvent swig_types[22]
|
||||
#define SWIGTYPE_p_SubscriptionEvent swig_types[23]
|
||||
#define SWIGTYPE_p_SubscriptionSession swig_types[24]
|
||||
#define SWIGTYPE_p_char swig_types[25]
|
||||
#define SWIGTYPE_p_tmedia_chroma_e swig_types[26]
|
||||
#define SWIGTYPE_p_tsip_event_type_e swig_types[27]
|
||||
#define SWIGTYPE_p_tsip_invite_event_type_e swig_types[28]
|
||||
#define SWIGTYPE_p_tsip_message_event_type_e swig_types[29]
|
||||
#define SWIGTYPE_p_tsip_options_event_type_e swig_types[30]
|
||||
#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[31]
|
||||
#define SWIGTYPE_p_tsip_register_event_type_e swig_types[32]
|
||||
#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[33]
|
||||
static swig_type_info *swig_types[35];
|
||||
static swig_module_info swig_module = {swig_types, 34, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -5596,6 +5598,304 @@ XS(_wrap_ProxyAudioProducer_registerPlugin) {
|
|||
}
|
||||
|
||||
|
||||
XS(_wrap_new_ProxyVideoProducer) {
|
||||
{
|
||||
tmedia_chroma_t arg1 ;
|
||||
int val1 ;
|
||||
int ecode1 = 0 ;
|
||||
int argvi = 0;
|
||||
ProxyVideoProducer *result = 0 ;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: new_ProxyVideoProducer(chroma);");
|
||||
}
|
||||
ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
|
||||
if (!SWIG_IsOK(ecode1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ProxyVideoProducer" "', argument " "1"" of type '" "tmedia_chroma_t""'");
|
||||
}
|
||||
arg1 = static_cast< tmedia_chroma_t >(val1);
|
||||
result = (ProxyVideoProducer *)new ProxyVideoProducer(arg1);
|
||||
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProxyVideoProducer, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_delete_ProxyVideoProducer) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: delete_ProxyVideoProducer(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, SWIG_POINTER_DISOWN | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProxyVideoProducer" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
delete arg1;
|
||||
ST(argvi) = sv_newmortal();
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_prepare) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int val2 ;
|
||||
int ecode2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int val4 ;
|
||||
int ecode4 = 0 ;
|
||||
int argvi = 0;
|
||||
int result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 4) || (items > 4)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_prepare(self,width,height,fps);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_prepare" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyVideoProducer_prepare" "', argument " "2"" of type '" "int""'");
|
||||
}
|
||||
arg2 = static_cast< int >(val2);
|
||||
ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyVideoProducer_prepare" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
|
||||
if (!SWIG_IsOK(ecode4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyVideoProducer_prepare" "', argument " "4"" of type '" "int""'");
|
||||
}
|
||||
arg4 = static_cast< int >(val4);
|
||||
result = (int)(arg1)->prepare(arg2,arg3,arg4);
|
||||
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
|
||||
|
||||
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
|
||||
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_start) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
int result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_start(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_start" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
result = (int)(arg1)->start();
|
||||
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_pause) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
int result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_pause(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_pause" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
result = (int)(arg1)->pause();
|
||||
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_stop) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
int result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_stop(self);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_stop" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
result = (int)(arg1)->stop();
|
||||
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_setActivate) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
bool arg2 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
bool val2 ;
|
||||
int ecode2 = 0 ;
|
||||
int argvi = 0;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 2) || (items > 2)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_setActivate(self,enabled);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_setActivate" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyVideoProducer_setActivate" "', argument " "2"" of type '" "bool""'");
|
||||
}
|
||||
arg2 = static_cast< bool >(val2);
|
||||
(arg1)->setActivate(arg2);
|
||||
ST(argvi) = sv_newmortal();
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_push) {
|
||||
{
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
unsigned int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int argvi = 0;
|
||||
int result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 3) || (items > 3)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_push(self,buffer,size);");
|
||||
}
|
||||
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_push" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyVideoProducer_push" "', 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 '" "ProxyVideoProducer_push" "', argument " "3"" of type '" "unsigned int""'");
|
||||
}
|
||||
arg3 = static_cast< unsigned int >(val3);
|
||||
result = (int)(arg1)->push((void const *)arg2,arg3);
|
||||
ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
|
||||
|
||||
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
|
||||
|
||||
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_ProxyVideoProducer_registerPlugin) {
|
||||
{
|
||||
int argvi = 0;
|
||||
bool result;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 0) || (items > 0)) {
|
||||
SWIG_croak("Usage: ProxyVideoProducer_registerPlugin();");
|
||||
}
|
||||
result = (bool)ProxyVideoProducer::registerPlugin();
|
||||
ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
SWIG_croak_null();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XS(_wrap_new_SipCallback) {
|
||||
{
|
||||
int argvi = 0;
|
||||
|
@ -6778,27 +7078,6 @@ XS(_wrap_SipStack_stop) {
|
|||
|
||||
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
||||
|
||||
static void *_p_CallSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((CallSession *) x));
|
||||
}
|
||||
static void *_p_MessagingSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((MessagingSession *) x));
|
||||
}
|
||||
static void *_p_OptionsSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((OptionsSession *) x));
|
||||
}
|
||||
static void *_p_PublicationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((PublicationSession *) x));
|
||||
}
|
||||
static void *_p_RegistrationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((RegistrationSession *) x));
|
||||
}
|
||||
static void *_p_SubscriptionSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((SubscriptionSession *) x));
|
||||
}
|
||||
static void *_p_SipStackTo_p_SafeObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SafeObject *) ((SipStack *) x));
|
||||
}
|
||||
static void *_p_CallEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipEvent *) ((CallEvent *) x));
|
||||
}
|
||||
|
@ -6823,6 +7102,27 @@ static void *_p_StackEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory))
|
|||
static void *_p_MessagingEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipEvent *) ((MessagingEvent *) x));
|
||||
}
|
||||
static void *_p_CallSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((CallSession *) x));
|
||||
}
|
||||
static void *_p_MessagingSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((MessagingSession *) x));
|
||||
}
|
||||
static void *_p_OptionsSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((OptionsSession *) x));
|
||||
}
|
||||
static void *_p_PublicationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((PublicationSession *) x));
|
||||
}
|
||||
static void *_p_RegistrationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((RegistrationSession *) x));
|
||||
}
|
||||
static void *_p_SubscriptionSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((SubscriptionSession *) x));
|
||||
}
|
||||
static void *_p_SipStackTo_p_SafeObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SafeObject *) ((SipStack *) x));
|
||||
}
|
||||
static swig_type_info _swigt__p_CallEvent = {"_p_CallEvent", "CallEvent *", 0, 0, (void*)"tinyWRAP::CallEvent", 0};
|
||||
static swig_type_info _swigt__p_CallSession = {"_p_CallSession", "CallSession *", 0, 0, (void*)"tinyWRAP::CallSession", 0};
|
||||
static swig_type_info _swigt__p_DDebugCallback = {"_p_DDebugCallback", "DDebugCallback *", 0, 0, (void*)"tinyWRAP::DDebugCallback", 0};
|
||||
|
@ -6833,6 +7133,7 @@ static swig_type_info _swigt__p_OptionsEvent = {"_p_OptionsEvent", "OptionsEvent
|
|||
static swig_type_info _swigt__p_OptionsSession = {"_p_OptionsSession", "OptionsSession *", 0, 0, (void*)"tinyWRAP::OptionsSession", 0};
|
||||
static swig_type_info _swigt__p_ProxyAudioConsumer = {"_p_ProxyAudioConsumer", "ProxyAudioConsumer *", 0, 0, (void*)"tinyWRAP::ProxyAudioConsumer", 0};
|
||||
static swig_type_info _swigt__p_ProxyAudioProducer = {"_p_ProxyAudioProducer", "ProxyAudioProducer *", 0, 0, (void*)"tinyWRAP::ProxyAudioProducer", 0};
|
||||
static swig_type_info _swigt__p_ProxyVideoProducer = {"_p_ProxyVideoProducer", "ProxyVideoProducer *", 0, 0, (void*)"tinyWRAP::ProxyVideoProducer", 0};
|
||||
static swig_type_info _swigt__p_PublicationEvent = {"_p_PublicationEvent", "PublicationEvent *", 0, 0, (void*)"tinyWRAP::PublicationEvent", 0};
|
||||
static swig_type_info _swigt__p_PublicationSession = {"_p_PublicationSession", "PublicationSession *", 0, 0, (void*)"tinyWRAP::PublicationSession", 0};
|
||||
static swig_type_info _swigt__p_RegistrationEvent = {"_p_RegistrationEvent", "RegistrationEvent *", 0, 0, (void*)"tinyWRAP::RegistrationEvent", 0};
|
||||
|
@ -6848,6 +7149,7 @@ static swig_type_info _swigt__p_StackEvent = {"_p_StackEvent", "StackEvent *", 0
|
|||
static swig_type_info _swigt__p_SubscriptionEvent = {"_p_SubscriptionEvent", "SubscriptionEvent *", 0, 0, (void*)"tinyWRAP::SubscriptionEvent", 0};
|
||||
static swig_type_info _swigt__p_SubscriptionSession = {"_p_SubscriptionSession", "SubscriptionSession *", 0, 0, (void*)"tinyWRAP::SubscriptionSession", 0};
|
||||
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tmedia_chroma_e = {"_p_tmedia_chroma_e", "tmedia_chroma_t *|enum tmedia_chroma_e *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tsip_event_type_e = {"_p_tsip_event_type_e", "enum tsip_event_type_e *|tsip_event_type_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tsip_invite_event_type_e = {"_p_tsip_invite_event_type_e", "enum tsip_invite_event_type_e *|tsip_invite_event_type_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tsip_message_event_type_e = {"_p_tsip_message_event_type_e", "enum tsip_message_event_type_e *|tsip_message_event_type_t *", 0, 0, (void*)0, 0};
|
||||
|
@ -6867,6 +7169,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_OptionsSession,
|
||||
&_swigt__p_ProxyAudioConsumer,
|
||||
&_swigt__p_ProxyAudioProducer,
|
||||
&_swigt__p_ProxyVideoProducer,
|
||||
&_swigt__p_PublicationEvent,
|
||||
&_swigt__p_PublicationSession,
|
||||
&_swigt__p_RegistrationEvent,
|
||||
|
@ -6882,6 +7185,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_SubscriptionEvent,
|
||||
&_swigt__p_SubscriptionSession,
|
||||
&_swigt__p_char,
|
||||
&_swigt__p_tmedia_chroma_e,
|
||||
&_swigt__p_tsip_event_type_e,
|
||||
&_swigt__p_tsip_invite_event_type_e,
|
||||
&_swigt__p_tsip_message_event_type_e,
|
||||
|
@ -6901,6 +7205,7 @@ static swig_cast_info _swigc__p_OptionsEvent[] = { {&_swigt__p_OptionsEvent, 0,
|
|||
static swig_cast_info _swigc__p_OptionsSession[] = { {&_swigt__p_OptionsSession, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ProxyAudioConsumer[] = { {&_swigt__p_ProxyAudioConsumer, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ProxyAudioProducer[] = { {&_swigt__p_ProxyAudioProducer, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ProxyVideoProducer[] = { {&_swigt__p_ProxyVideoProducer, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_PublicationEvent[] = { {&_swigt__p_PublicationEvent, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_PublicationSession[] = { {&_swigt__p_PublicationSession, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_RegistrationEvent[] = { {&_swigt__p_RegistrationEvent, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -6916,6 +7221,7 @@ static swig_cast_info _swigc__p_StackEvent[] = { {&_swigt__p_StackEvent, 0, 0,
|
|||
static swig_cast_info _swigc__p_SubscriptionEvent[] = { {&_swigt__p_SubscriptionEvent, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_SubscriptionSession[] = { {&_swigt__p_SubscriptionSession, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tmedia_chroma_e[] = { {&_swigt__p_tmedia_chroma_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tsip_event_type_e[] = { {&_swigt__p_tsip_event_type_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tsip_invite_event_type_e[] = { {&_swigt__p_tsip_invite_event_type_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tsip_message_event_type_e[] = { {&_swigt__p_tsip_message_event_type_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -6935,6 +7241,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_OptionsSession,
|
||||
_swigc__p_ProxyAudioConsumer,
|
||||
_swigc__p_ProxyAudioProducer,
|
||||
_swigc__p_ProxyVideoProducer,
|
||||
_swigc__p_PublicationEvent,
|
||||
_swigc__p_PublicationSession,
|
||||
_swigc__p_RegistrationEvent,
|
||||
|
@ -6950,6 +7257,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_SubscriptionEvent,
|
||||
_swigc__p_SubscriptionSession,
|
||||
_swigc__p_char,
|
||||
_swigc__p_tmedia_chroma_e,
|
||||
_swigc__p_tsip_event_type_e,
|
||||
_swigc__p_tsip_invite_event_type_e,
|
||||
_swigc__p_tsip_message_event_type_e,
|
||||
|
@ -7073,6 +7381,15 @@ static swig_command_info swig_commands[] = {
|
|||
{"tinyWRAPc::ProxyAudioProducer_setActivate", _wrap_ProxyAudioProducer_setActivate},
|
||||
{"tinyWRAPc::ProxyAudioProducer_push", _wrap_ProxyAudioProducer_push},
|
||||
{"tinyWRAPc::ProxyAudioProducer_registerPlugin", _wrap_ProxyAudioProducer_registerPlugin},
|
||||
{"tinyWRAPc::new_ProxyVideoProducer", _wrap_new_ProxyVideoProducer},
|
||||
{"tinyWRAPc::delete_ProxyVideoProducer", _wrap_delete_ProxyVideoProducer},
|
||||
{"tinyWRAPc::ProxyVideoProducer_prepare", _wrap_ProxyVideoProducer_prepare},
|
||||
{"tinyWRAPc::ProxyVideoProducer_start", _wrap_ProxyVideoProducer_start},
|
||||
{"tinyWRAPc::ProxyVideoProducer_pause", _wrap_ProxyVideoProducer_pause},
|
||||
{"tinyWRAPc::ProxyVideoProducer_stop", _wrap_ProxyVideoProducer_stop},
|
||||
{"tinyWRAPc::ProxyVideoProducer_setActivate", _wrap_ProxyVideoProducer_setActivate},
|
||||
{"tinyWRAPc::ProxyVideoProducer_push", _wrap_ProxyVideoProducer_push},
|
||||
{"tinyWRAPc::ProxyVideoProducer_registerPlugin", _wrap_ProxyVideoProducer_registerPlugin},
|
||||
{"tinyWRAPc::new_SipCallback", _wrap_new_SipCallback},
|
||||
{"tinyWRAPc::delete_SipCallback", _wrap_delete_SipCallback},
|
||||
{"tinyWRAPc::SipCallback_OnDialogEvent", _wrap_SipCallback_OnDialogEvent},
|
||||
|
@ -7420,6 +7737,7 @@ XS(SWIG_init) {
|
|||
SWIG_TypeClientData(SWIGTYPE_p_SubscriptionSession, (void*) "tinyWRAP::SubscriptionSession");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_ProxyAudioConsumer, (void*) "tinyWRAP::ProxyAudioConsumer");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_ProxyAudioProducer, (void*) "tinyWRAP::ProxyAudioProducer");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_ProxyVideoProducer, (void*) "tinyWRAP::ProxyVideoProducer");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_SipCallback, (void*) "tinyWRAP::SipCallback");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_SafeObject, (void*) "tinyWRAP::SafeObject");
|
||||
SWIG_TypeClientData(SWIGTYPE_p_SipStack, (void*) "tinyWRAP::SipStack");
|
||||
|
@ -7678,6 +7996,21 @@ XS(SWIG_init) {
|
|||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tsip_m_remote_resume)));
|
||||
SvREADONLY_on(sv);
|
||||
} while(0) /*@SWIG@*/;
|
||||
/*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do {
|
||||
SV *sv = get_sv((char*) SWIG_prefix "tmedia_rgb24", TRUE | 0x2 | GV_ADDMULTI);
|
||||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_rgb24)));
|
||||
SvREADONLY_on(sv);
|
||||
} while(0) /*@SWIG@*/;
|
||||
/*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do {
|
||||
SV *sv = get_sv((char*) SWIG_prefix "tmedia_nv21", TRUE | 0x2 | GV_ADDMULTI);
|
||||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_nv21)));
|
||||
SvREADONLY_on(sv);
|
||||
} while(0) /*@SWIG@*/;
|
||||
/*@SWIG:/usr/local/share/swig/1.3.39/perl5/perltypemaps.swg,65,%set_constant@*/ do {
|
||||
SV *sv = get_sv((char*) SWIG_prefix "tmedia_yuv420p", TRUE | 0x2 | GV_ADDMULTI);
|
||||
sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(tmedia_yuv420p)));
|
||||
SvREADONLY_on(sv);
|
||||
} while(0) /*@SWIG@*/;
|
||||
ST(0) = &PL_sv_yes;
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
|
|
@ -477,6 +477,41 @@ def ProxyAudioProducer_registerPlugin():
|
|||
return _tinyWRAP.ProxyAudioProducer_registerPlugin()
|
||||
ProxyAudioProducer_registerPlugin = _tinyWRAP.ProxyAudioProducer_registerPlugin
|
||||
|
||||
class ProxyVideoProducer(_object):
|
||||
__swig_setmethods__ = {}
|
||||
__setattr__ = lambda self, name, value: _swig_setattr(self, ProxyVideoProducer, name, value)
|
||||
__swig_getmethods__ = {}
|
||||
__getattr__ = lambda self, name: _swig_getattr(self, ProxyVideoProducer, name)
|
||||
__repr__ = _swig_repr
|
||||
def __init__(self, *args):
|
||||
if self.__class__ == ProxyVideoProducer:
|
||||
_self = None
|
||||
else:
|
||||
_self = self
|
||||
this = _tinyWRAP.new_ProxyVideoProducer(_self, *args)
|
||||
try: self.this.append(this)
|
||||
except: self.this = this
|
||||
__swig_destroy__ = _tinyWRAP.delete_ProxyVideoProducer
|
||||
__del__ = lambda self : None;
|
||||
def prepare(self, *args): return _tinyWRAP.ProxyVideoProducer_prepare(self, *args)
|
||||
def start(self): return _tinyWRAP.ProxyVideoProducer_start(self)
|
||||
def pause(self): return _tinyWRAP.ProxyVideoProducer_pause(self)
|
||||
def stop(self): return _tinyWRAP.ProxyVideoProducer_stop(self)
|
||||
def setActivate(self, *args): return _tinyWRAP.ProxyVideoProducer_setActivate(self, *args)
|
||||
def push(self, *args): return _tinyWRAP.ProxyVideoProducer_push(self, *args)
|
||||
__swig_getmethods__["registerPlugin"] = lambda x: _tinyWRAP.ProxyVideoProducer_registerPlugin
|
||||
if _newclass:registerPlugin = staticmethod(_tinyWRAP.ProxyVideoProducer_registerPlugin)
|
||||
def __disown__(self):
|
||||
self.this.disown()
|
||||
_tinyWRAP.disown_ProxyVideoProducer(self)
|
||||
return weakref_proxy(self)
|
||||
ProxyVideoProducer_swigregister = _tinyWRAP.ProxyVideoProducer_swigregister
|
||||
ProxyVideoProducer_swigregister(ProxyVideoProducer)
|
||||
|
||||
def ProxyVideoProducer_registerPlugin():
|
||||
return _tinyWRAP.ProxyVideoProducer_registerPlugin()
|
||||
ProxyVideoProducer_registerPlugin = _tinyWRAP.ProxyVideoProducer_registerPlugin
|
||||
|
||||
class SipCallback(_object):
|
||||
__swig_setmethods__ = {}
|
||||
__setattr__ = lambda self, name, value: _swig_setattr(self, SipCallback, name, value)
|
||||
|
@ -609,5 +644,8 @@ tsip_m_local_resume_ok = _tinyWRAP.tsip_m_local_resume_ok
|
|||
tsip_m_local_resume_nok = _tinyWRAP.tsip_m_local_resume_nok
|
||||
tsip_m_remote_hold = _tinyWRAP.tsip_m_remote_hold
|
||||
tsip_m_remote_resume = _tinyWRAP.tsip_m_remote_resume
|
||||
tmedia_rgb24 = _tinyWRAP.tmedia_rgb24
|
||||
tmedia_nv21 = _tinyWRAP.tmedia_nv21
|
||||
tmedia_yuv420p = _tinyWRAP.tmedia_yuv420p
|
||||
|
||||
|
||||
|
|
|
@ -3131,30 +3131,32 @@ namespace Swig {
|
|||
#define SWIGTYPE_p_OptionsSession swig_types[7]
|
||||
#define SWIGTYPE_p_ProxyAudioConsumer swig_types[8]
|
||||
#define SWIGTYPE_p_ProxyAudioProducer swig_types[9]
|
||||
#define SWIGTYPE_p_PublicationEvent swig_types[10]
|
||||
#define SWIGTYPE_p_PublicationSession swig_types[11]
|
||||
#define SWIGTYPE_p_RegistrationEvent swig_types[12]
|
||||
#define SWIGTYPE_p_RegistrationSession swig_types[13]
|
||||
#define SWIGTYPE_p_SafeObject swig_types[14]
|
||||
#define SWIGTYPE_p_SipCallback swig_types[15]
|
||||
#define SWIGTYPE_p_SipEvent swig_types[16]
|
||||
#define SWIGTYPE_p_SipMessage swig_types[17]
|
||||
#define SWIGTYPE_p_SipSession swig_types[18]
|
||||
#define SWIGTYPE_p_SipStack swig_types[19]
|
||||
#define SWIGTYPE_p_SipUri swig_types[20]
|
||||
#define SWIGTYPE_p_StackEvent swig_types[21]
|
||||
#define SWIGTYPE_p_SubscriptionEvent swig_types[22]
|
||||
#define SWIGTYPE_p_SubscriptionSession swig_types[23]
|
||||
#define SWIGTYPE_p_char swig_types[24]
|
||||
#define SWIGTYPE_p_tsip_event_type_e swig_types[25]
|
||||
#define SWIGTYPE_p_tsip_invite_event_type_e swig_types[26]
|
||||
#define SWIGTYPE_p_tsip_message_event_type_e swig_types[27]
|
||||
#define SWIGTYPE_p_tsip_options_event_type_e swig_types[28]
|
||||
#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[29]
|
||||
#define SWIGTYPE_p_tsip_register_event_type_e swig_types[30]
|
||||
#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[31]
|
||||
static swig_type_info *swig_types[33];
|
||||
static swig_module_info swig_module = {swig_types, 32, 0, 0, 0, 0};
|
||||
#define SWIGTYPE_p_ProxyVideoProducer swig_types[10]
|
||||
#define SWIGTYPE_p_PublicationEvent swig_types[11]
|
||||
#define SWIGTYPE_p_PublicationSession swig_types[12]
|
||||
#define SWIGTYPE_p_RegistrationEvent swig_types[13]
|
||||
#define SWIGTYPE_p_RegistrationSession swig_types[14]
|
||||
#define SWIGTYPE_p_SafeObject swig_types[15]
|
||||
#define SWIGTYPE_p_SipCallback swig_types[16]
|
||||
#define SWIGTYPE_p_SipEvent swig_types[17]
|
||||
#define SWIGTYPE_p_SipMessage swig_types[18]
|
||||
#define SWIGTYPE_p_SipSession swig_types[19]
|
||||
#define SWIGTYPE_p_SipStack swig_types[20]
|
||||
#define SWIGTYPE_p_SipUri swig_types[21]
|
||||
#define SWIGTYPE_p_StackEvent swig_types[22]
|
||||
#define SWIGTYPE_p_SubscriptionEvent swig_types[23]
|
||||
#define SWIGTYPE_p_SubscriptionSession swig_types[24]
|
||||
#define SWIGTYPE_p_char swig_types[25]
|
||||
#define SWIGTYPE_p_tmedia_chroma_e swig_types[26]
|
||||
#define SWIGTYPE_p_tsip_event_type_e swig_types[27]
|
||||
#define SWIGTYPE_p_tsip_invite_event_type_e swig_types[28]
|
||||
#define SWIGTYPE_p_tsip_message_event_type_e swig_types[29]
|
||||
#define SWIGTYPE_p_tsip_options_event_type_e swig_types[30]
|
||||
#define SWIGTYPE_p_tsip_publish_event_type_e swig_types[31]
|
||||
#define SWIGTYPE_p_tsip_register_event_type_e swig_types[32]
|
||||
#define SWIGTYPE_p_tsip_subscribe_event_type_e swig_types[33]
|
||||
static swig_type_info *swig_types[35];
|
||||
static swig_module_info swig_module = {swig_types, 34, 0, 0, 0, 0};
|
||||
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
||||
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
||||
|
||||
|
@ -3899,6 +3901,138 @@ int SwigDirector_ProxyAudioProducer::stop() {
|
|||
}
|
||||
|
||||
|
||||
SwigDirector_ProxyVideoProducer::SwigDirector_ProxyVideoProducer(PyObject *self, tmedia_chroma_t chroma): ProxyVideoProducer(chroma), Swig::Director(self) {
|
||||
SWIG_DIRECTOR_RGTR((ProxyVideoProducer *)this, this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
SwigDirector_ProxyVideoProducer::~SwigDirector_ProxyVideoProducer() {
|
||||
}
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::prepare(int width, int height, int fps) {
|
||||
int c_result;
|
||||
swig::SwigVar_PyObject obj0;
|
||||
obj0 = SWIG_From_int(static_cast< int >(width));
|
||||
swig::SwigVar_PyObject obj1;
|
||||
obj1 = SWIG_From_int(static_cast< int >(height));
|
||||
swig::SwigVar_PyObject obj2;
|
||||
obj2 = SWIG_From_int(static_cast< int >(fps));
|
||||
if (!swig_get_self()) {
|
||||
Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyVideoProducer.__init__.");
|
||||
}
|
||||
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
|
||||
const size_t swig_method_index = 0;
|
||||
const char * const swig_method_name = "prepare";
|
||||
PyObject* method = swig_get_method(swig_method_index, swig_method_name);
|
||||
swig::SwigVar_PyObject result = PyObject_CallFunction(method, (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2);
|
||||
#else
|
||||
swig::SwigVar_PyObject result = PyObject_CallMethod(swig_get_self(), (char *)"prepare", (char *)"(OOO)" ,(PyObject *)obj0,(PyObject *)obj1,(PyObject *)obj2);
|
||||
#endif
|
||||
if (result == NULL) {
|
||||
PyObject *error = PyErr_Occurred();
|
||||
if (error != NULL) {
|
||||
Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducer.prepare'");
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::start() {
|
||||
int c_result;
|
||||
if (!swig_get_self()) {
|
||||
Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyVideoProducer.__init__.");
|
||||
}
|
||||
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
|
||||
const size_t swig_method_index = 1;
|
||||
const char * const swig_method_name = "start";
|
||||
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 *) "start", NULL);
|
||||
#endif
|
||||
if (result == NULL) {
|
||||
PyObject *error = PyErr_Occurred();
|
||||
if (error != NULL) {
|
||||
Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducer.start'");
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::pause() {
|
||||
int c_result;
|
||||
if (!swig_get_self()) {
|
||||
Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyVideoProducer.__init__.");
|
||||
}
|
||||
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
|
||||
const size_t swig_method_index = 2;
|
||||
const char * const swig_method_name = "pause";
|
||||
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 *) "pause", NULL);
|
||||
#endif
|
||||
if (result == NULL) {
|
||||
PyObject *error = PyErr_Occurred();
|
||||
if (error != NULL) {
|
||||
Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducer.pause'");
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
int SwigDirector_ProxyVideoProducer::stop() {
|
||||
int c_result;
|
||||
if (!swig_get_self()) {
|
||||
Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ProxyVideoProducer.__init__.");
|
||||
}
|
||||
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
|
||||
const size_t swig_method_index = 3;
|
||||
const char * const swig_method_name = "stop";
|
||||
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 *) "stop", NULL);
|
||||
#endif
|
||||
if (result == NULL) {
|
||||
PyObject *error = PyErr_Occurred();
|
||||
if (error != NULL) {
|
||||
Swig::DirectorMethodException::raise("Error detected when calling 'ProxyVideoProducer.stop'");
|
||||
}
|
||||
}
|
||||
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_SipCallback::SwigDirector_SipCallback(PyObject *self): SipCallback(), Swig::Director(self) {
|
||||
SWIG_DIRECTOR_RGTR((SipCallback *)this, this);
|
||||
}
|
||||
|
@ -7365,6 +7499,334 @@ SWIGINTERN PyObject *ProxyAudioProducer_swigregister(PyObject *SWIGUNUSEDPARM(se
|
|||
return SWIG_Py_Void();
|
||||
}
|
||||
|
||||
SWIGINTERN PyObject *_wrap_new_ProxyVideoProducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
PyObject *arg1 = (PyObject *) 0 ;
|
||||
tmedia_chroma_t arg2 ;
|
||||
int val2 ;
|
||||
int ecode2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
ProxyVideoProducer *result = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO:new_ProxyVideoProducer",&obj0,&obj1)) SWIG_fail;
|
||||
arg1 = obj0;
|
||||
ecode2 = SWIG_AsVal_int(obj1, &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ProxyVideoProducer" "', argument " "2"" of type '" "tmedia_chroma_t""'");
|
||||
}
|
||||
arg2 = static_cast< tmedia_chroma_t >(val2);
|
||||
if ( arg1 != Py_None ) {
|
||||
/* subclassed */
|
||||
result = (ProxyVideoProducer *)new SwigDirector_ProxyVideoProducer(arg1,arg2);
|
||||
} else {
|
||||
result = (ProxyVideoProducer *)new ProxyVideoProducer(arg2);
|
||||
}
|
||||
|
||||
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ProxyVideoProducer, SWIG_POINTER_NEW | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_delete_ProxyVideoProducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:delete_ProxyVideoProducer",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, SWIG_POINTER_DISOWN | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProxyVideoProducer" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
delete arg1;
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_prepare(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
int arg4 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int val2 ;
|
||||
int ecode2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int val4 ;
|
||||
int ecode4 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
Swig::Director *director = 0;
|
||||
bool upcall = false;
|
||||
int result;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"OOOO:ProxyVideoProducer_prepare",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_prepare" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
ecode2 = SWIG_AsVal_int(obj1, &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyVideoProducer_prepare" "', argument " "2"" of type '" "int""'");
|
||||
}
|
||||
arg2 = static_cast< int >(val2);
|
||||
ecode3 = SWIG_AsVal_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProxyVideoProducer_prepare" "', argument " "3"" of type '" "int""'");
|
||||
}
|
||||
arg3 = static_cast< int >(val3);
|
||||
ecode4 = SWIG_AsVal_int(obj3, &val4);
|
||||
if (!SWIG_IsOK(ecode4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProxyVideoProducer_prepare" "', argument " "4"" of type '" "int""'");
|
||||
}
|
||||
arg4 = static_cast< int >(val4);
|
||||
director = SWIG_DIRECTOR_CAST(arg1);
|
||||
upcall = (director && (director->swig_get_self()==obj0));
|
||||
try {
|
||||
if (upcall) {
|
||||
result = (int)(arg1)->ProxyVideoProducer::prepare(arg2,arg3,arg4);
|
||||
} else {
|
||||
result = (int)(arg1)->prepare(arg2,arg3,arg4);
|
||||
}
|
||||
} catch (Swig::DirectorException&) {
|
||||
SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_From_int(static_cast< int >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 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:ProxyVideoProducer_start",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_start" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
director = SWIG_DIRECTOR_CAST(arg1);
|
||||
upcall = (director && (director->swig_get_self()==obj0));
|
||||
try {
|
||||
if (upcall) {
|
||||
result = (int)(arg1)->ProxyVideoProducer::start();
|
||||
} else {
|
||||
result = (int)(arg1)->start();
|
||||
}
|
||||
} catch (Swig::DirectorException&) {
|
||||
SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_From_int(static_cast< int >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_pause(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 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:ProxyVideoProducer_pause",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_pause" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
director = SWIG_DIRECTOR_CAST(arg1);
|
||||
upcall = (director && (director->swig_get_self()==obj0));
|
||||
try {
|
||||
if (upcall) {
|
||||
result = (int)(arg1)->ProxyVideoProducer::pause();
|
||||
} else {
|
||||
result = (int)(arg1)->pause();
|
||||
}
|
||||
} catch (Swig::DirectorException&) {
|
||||
SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_From_int(static_cast< int >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_stop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 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:ProxyVideoProducer_stop",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_stop" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
director = SWIG_DIRECTOR_CAST(arg1);
|
||||
upcall = (director && (director->swig_get_self()==obj0));
|
||||
try {
|
||||
if (upcall) {
|
||||
result = (int)(arg1)->ProxyVideoProducer::stop();
|
||||
} else {
|
||||
result = (int)(arg1)->stop();
|
||||
}
|
||||
} catch (Swig::DirectorException&) {
|
||||
SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_From_int(static_cast< int >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_setActivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
bool arg2 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
bool val2 ;
|
||||
int ecode2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"OO:ProxyVideoProducer_setActivate",&obj0,&obj1)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_setActivate" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
ecode2 = SWIG_AsVal_bool(obj1, &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProxyVideoProducer_setActivate" "', argument " "2"" of type '" "bool""'");
|
||||
}
|
||||
arg2 = static_cast< bool >(val2);
|
||||
(arg1)->setActivate(arg2);
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_push(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *arg2 = (void *) 0 ;
|
||||
unsigned int arg3 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int res2 ;
|
||||
unsigned int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
int result;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"OOO:ProxyVideoProducer_push",&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProxyVideoProducer_push" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
|
||||
if (!SWIG_IsOK(res2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProxyVideoProducer_push" "', 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 '" "ProxyVideoProducer_push" "', argument " "3"" of type '" "unsigned int""'");
|
||||
}
|
||||
arg3 = static_cast< unsigned int >(val3);
|
||||
result = (int)(arg1)->push((void const *)arg2,arg3);
|
||||
resultobj = SWIG_From_int(static_cast< int >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_ProxyVideoProducer_registerPlugin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
bool result;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)":ProxyVideoProducer_registerPlugin")) SWIG_fail;
|
||||
result = (bool)ProxyVideoProducer::registerPlugin();
|
||||
resultobj = SWIG_From_bool(static_cast< bool >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_disown_ProxyVideoProducer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
ProxyVideoProducer *arg1 = (ProxyVideoProducer *) 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
if (!PyArg_ParseTuple(args,(char *)"O:disown_ProxyVideoProducer",&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ProxyVideoProducer, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ProxyVideoProducer" "', argument " "1"" of type '" "ProxyVideoProducer *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< ProxyVideoProducer * >(argp1);
|
||||
{
|
||||
Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
|
||||
if (director) director->swig_disown();
|
||||
}
|
||||
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *ProxyVideoProducer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *obj;
|
||||
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
|
||||
SWIG_TypeNewClientData(SWIGTYPE_p_ProxyVideoProducer, SWIG_NewClientData(obj));
|
||||
return SWIG_Py_Void();
|
||||
}
|
||||
|
||||
SWIGINTERN PyObject *_wrap_new_SipCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
PyObject *arg1 = (PyObject *) 0 ;
|
||||
|
@ -8634,6 +9096,17 @@ static PyMethodDef SwigMethods[] = {
|
|||
{ (char *)"ProxyAudioProducer_registerPlugin", _wrap_ProxyAudioProducer_registerPlugin, METH_VARARGS, NULL},
|
||||
{ (char *)"disown_ProxyAudioProducer", _wrap_disown_ProxyAudioProducer, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyAudioProducer_swigregister", ProxyAudioProducer_swigregister, METH_VARARGS, NULL},
|
||||
{ (char *)"new_ProxyVideoProducer", _wrap_new_ProxyVideoProducer, METH_VARARGS, NULL},
|
||||
{ (char *)"delete_ProxyVideoProducer", _wrap_delete_ProxyVideoProducer, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_prepare", _wrap_ProxyVideoProducer_prepare, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_start", _wrap_ProxyVideoProducer_start, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_pause", _wrap_ProxyVideoProducer_pause, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_stop", _wrap_ProxyVideoProducer_stop, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_setActivate", _wrap_ProxyVideoProducer_setActivate, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_push", _wrap_ProxyVideoProducer_push, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_registerPlugin", _wrap_ProxyVideoProducer_registerPlugin, METH_VARARGS, NULL},
|
||||
{ (char *)"disown_ProxyVideoProducer", _wrap_disown_ProxyVideoProducer, METH_VARARGS, NULL},
|
||||
{ (char *)"ProxyVideoProducer_swigregister", ProxyVideoProducer_swigregister, METH_VARARGS, NULL},
|
||||
{ (char *)"new_SipCallback", _wrap_new_SipCallback, METH_VARARGS, NULL},
|
||||
{ (char *)"delete_SipCallback", _wrap_delete_SipCallback, METH_VARARGS, NULL},
|
||||
{ (char *)"SipCallback_OnDialogEvent", _wrap_SipCallback_OnDialogEvent, METH_VARARGS, NULL},
|
||||
|
@ -8676,27 +9149,6 @@ static PyMethodDef SwigMethods[] = {
|
|||
|
||||
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
||||
|
||||
static void *_p_CallSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((CallSession *) x));
|
||||
}
|
||||
static void *_p_MessagingSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((MessagingSession *) x));
|
||||
}
|
||||
static void *_p_OptionsSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((OptionsSession *) x));
|
||||
}
|
||||
static void *_p_PublicationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((PublicationSession *) x));
|
||||
}
|
||||
static void *_p_RegistrationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((RegistrationSession *) x));
|
||||
}
|
||||
static void *_p_SubscriptionSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((SubscriptionSession *) x));
|
||||
}
|
||||
static void *_p_SipStackTo_p_SafeObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SafeObject *) ((SipStack *) x));
|
||||
}
|
||||
static void *_p_CallEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipEvent *) ((CallEvent *) x));
|
||||
}
|
||||
|
@ -8721,6 +9173,27 @@ static void *_p_StackEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory))
|
|||
static void *_p_MessagingEventTo_p_SipEvent(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipEvent *) ((MessagingEvent *) x));
|
||||
}
|
||||
static void *_p_CallSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((CallSession *) x));
|
||||
}
|
||||
static void *_p_MessagingSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((MessagingSession *) x));
|
||||
}
|
||||
static void *_p_OptionsSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((OptionsSession *) x));
|
||||
}
|
||||
static void *_p_PublicationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((PublicationSession *) x));
|
||||
}
|
||||
static void *_p_RegistrationSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((RegistrationSession *) x));
|
||||
}
|
||||
static void *_p_SubscriptionSessionTo_p_SipSession(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SipSession *) ((SubscriptionSession *) x));
|
||||
}
|
||||
static void *_p_SipStackTo_p_SafeObject(void *x, int *SWIGUNUSEDPARM(newmemory)) {
|
||||
return (void *)((SafeObject *) ((SipStack *) x));
|
||||
}
|
||||
static swig_type_info _swigt__p_CallEvent = {"_p_CallEvent", "CallEvent *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_CallSession = {"_p_CallSession", "CallSession *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_DDebugCallback = {"_p_DDebugCallback", "DDebugCallback *", 0, 0, (void*)0, 0};
|
||||
|
@ -8731,6 +9204,7 @@ static swig_type_info _swigt__p_OptionsEvent = {"_p_OptionsEvent", "OptionsEvent
|
|||
static swig_type_info _swigt__p_OptionsSession = {"_p_OptionsSession", "OptionsSession *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_ProxyAudioConsumer = {"_p_ProxyAudioConsumer", "ProxyAudioConsumer *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_ProxyAudioProducer = {"_p_ProxyAudioProducer", "ProxyAudioProducer *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_ProxyVideoProducer = {"_p_ProxyVideoProducer", "ProxyVideoProducer *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_PublicationEvent = {"_p_PublicationEvent", "PublicationEvent *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_PublicationSession = {"_p_PublicationSession", "PublicationSession *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_RegistrationEvent = {"_p_RegistrationEvent", "RegistrationEvent *", 0, 0, (void*)0, 0};
|
||||
|
@ -8746,6 +9220,7 @@ static swig_type_info _swigt__p_StackEvent = {"_p_StackEvent", "StackEvent *", 0
|
|||
static swig_type_info _swigt__p_SubscriptionEvent = {"_p_SubscriptionEvent", "SubscriptionEvent *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_SubscriptionSession = {"_p_SubscriptionSession", "SubscriptionSession *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tmedia_chroma_e = {"_p_tmedia_chroma_e", "tmedia_chroma_t *|enum tmedia_chroma_e *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tsip_event_type_e = {"_p_tsip_event_type_e", "enum tsip_event_type_e *|tsip_event_type_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tsip_invite_event_type_e = {"_p_tsip_invite_event_type_e", "enum tsip_invite_event_type_e *|tsip_invite_event_type_t *", 0, 0, (void*)0, 0};
|
||||
static swig_type_info _swigt__p_tsip_message_event_type_e = {"_p_tsip_message_event_type_e", "enum tsip_message_event_type_e *|tsip_message_event_type_t *", 0, 0, (void*)0, 0};
|
||||
|
@ -8765,6 +9240,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_OptionsSession,
|
||||
&_swigt__p_ProxyAudioConsumer,
|
||||
&_swigt__p_ProxyAudioProducer,
|
||||
&_swigt__p_ProxyVideoProducer,
|
||||
&_swigt__p_PublicationEvent,
|
||||
&_swigt__p_PublicationSession,
|
||||
&_swigt__p_RegistrationEvent,
|
||||
|
@ -8780,6 +9256,7 @@ static swig_type_info *swig_type_initial[] = {
|
|||
&_swigt__p_SubscriptionEvent,
|
||||
&_swigt__p_SubscriptionSession,
|
||||
&_swigt__p_char,
|
||||
&_swigt__p_tmedia_chroma_e,
|
||||
&_swigt__p_tsip_event_type_e,
|
||||
&_swigt__p_tsip_invite_event_type_e,
|
||||
&_swigt__p_tsip_message_event_type_e,
|
||||
|
@ -8799,6 +9276,7 @@ static swig_cast_info _swigc__p_OptionsEvent[] = { {&_swigt__p_OptionsEvent, 0,
|
|||
static swig_cast_info _swigc__p_OptionsSession[] = { {&_swigt__p_OptionsSession, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ProxyAudioConsumer[] = { {&_swigt__p_ProxyAudioConsumer, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ProxyAudioProducer[] = { {&_swigt__p_ProxyAudioProducer, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_ProxyVideoProducer[] = { {&_swigt__p_ProxyVideoProducer, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_PublicationEvent[] = { {&_swigt__p_PublicationEvent, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_PublicationSession[] = { {&_swigt__p_PublicationSession, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_RegistrationEvent[] = { {&_swigt__p_RegistrationEvent, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -8814,6 +9292,7 @@ static swig_cast_info _swigc__p_StackEvent[] = { {&_swigt__p_StackEvent, 0, 0,
|
|||
static swig_cast_info _swigc__p_SubscriptionEvent[] = { {&_swigt__p_SubscriptionEvent, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_SubscriptionSession[] = { {&_swigt__p_SubscriptionSession, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tmedia_chroma_e[] = { {&_swigt__p_tmedia_chroma_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tsip_event_type_e[] = { {&_swigt__p_tsip_event_type_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tsip_invite_event_type_e[] = { {&_swigt__p_tsip_invite_event_type_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
static swig_cast_info _swigc__p_tsip_message_event_type_e[] = { {&_swigt__p_tsip_message_event_type_e, 0, 0, 0},{0, 0, 0, 0}};
|
||||
|
@ -8833,6 +9312,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_OptionsSession,
|
||||
_swigc__p_ProxyAudioConsumer,
|
||||
_swigc__p_ProxyAudioProducer,
|
||||
_swigc__p_ProxyVideoProducer,
|
||||
_swigc__p_PublicationEvent,
|
||||
_swigc__p_PublicationSession,
|
||||
_swigc__p_RegistrationEvent,
|
||||
|
@ -8848,6 +9328,7 @@ static swig_cast_info *swig_cast_initial[] = {
|
|||
_swigc__p_SubscriptionEvent,
|
||||
_swigc__p_SubscriptionSession,
|
||||
_swigc__p_char,
|
||||
_swigc__p_tmedia_chroma_e,
|
||||
_swigc__p_tsip_event_type_e,
|
||||
_swigc__p_tsip_invite_event_type_e,
|
||||
_swigc__p_tsip_message_event_type_e,
|
||||
|
@ -9495,6 +9976,9 @@ SWIG_init(void) {
|
|||
SWIG_Python_SetConstant(d, "tsip_m_local_resume_nok",SWIG_From_int(static_cast< int >(tsip_m_local_resume_nok)));
|
||||
SWIG_Python_SetConstant(d, "tsip_m_remote_hold",SWIG_From_int(static_cast< int >(tsip_m_remote_hold)));
|
||||
SWIG_Python_SetConstant(d, "tsip_m_remote_resume",SWIG_From_int(static_cast< int >(tsip_m_remote_resume)));
|
||||
SWIG_Python_SetConstant(d, "tmedia_rgb24",SWIG_From_int(static_cast< int >(tmedia_rgb24)));
|
||||
SWIG_Python_SetConstant(d, "tmedia_nv21",SWIG_From_int(static_cast< int >(tmedia_nv21)));
|
||||
SWIG_Python_SetConstant(d, "tmedia_yuv420p",SWIG_From_int(static_cast< int >(tmedia_yuv420p)));
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
return m;
|
||||
#else
|
||||
|
|
|
@ -111,6 +111,54 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class SwigDirector_ProxyVideoProducer : public ProxyVideoProducer, public Swig::Director {
|
||||
|
||||
public:
|
||||
SwigDirector_ProxyVideoProducer(PyObject *self, tmedia_chroma_t chroma);
|
||||
virtual ~SwigDirector_ProxyVideoProducer();
|
||||
virtual int prepare(int width, int height, int fps);
|
||||
virtual int start();
|
||||
virtual int pause();
|
||||
virtual int stop();
|
||||
|
||||
|
||||
/* Internal Director utilities */
|
||||
public:
|
||||
bool swig_get_inner(const char* name) const {
|
||||
std::map<std::string, bool>::const_iterator iv = inner.find(name);
|
||||
return (iv != inner.end() ? iv->second : false);
|
||||
}
|
||||
|
||||
void swig_set_inner(const char* name, bool val) const
|
||||
{ inner[name] = val;}
|
||||
|
||||
private:
|
||||
mutable std::map<std::string, bool> inner;
|
||||
|
||||
|
||||
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
|
||||
/* VTable implementation */
|
||||
PyObject *swig_get_method(size_t method_index, const char *method_name) const {
|
||||
PyObject *method = vtable[method_index];
|
||||
if (!method) {
|
||||
swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name);
|
||||
method = PyObject_GetAttr(swig_get_self(), name);
|
||||
if (method == NULL) {
|
||||
std::string msg = "Method in class ProxyVideoProducer doesn't exist, undefined ";
|
||||
msg += method_name;
|
||||
Swig::DirectorMethodException::raise(msg.c_str());
|
||||
}
|
||||
vtable[method_index] = method;
|
||||
};
|
||||
return method;
|
||||
}
|
||||
private:
|
||||
mutable swig::SwigVar_PyObject vtable[4];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
class SwigDirector_SipCallback : public SipCallback, public Swig::Director {
|
||||
|
||||
public:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
APP := lib$(PROJECT).$(EXT)
|
||||
|
||||
FFMPEG_CFLAGS := -I../thirdparties/android/include
|
||||
FFMPEG_CFLAGS := -I../thirdparties/android/include -DHAVE_FFMPEG=1
|
||||
FFMPEG_LDFLAGS := -L../thirdparties/android/lib -lavutil -lswscale -lavcodec -lgcc
|
||||
|
||||
CFLAGS := $(CFLAGS_LIB) $(FFMPEG_CFLAGS) -I../tinySAK/src -I../tinyNET/src -I../tinySDP/include -I../tinyRTP/include -I../tinyMEDIA/include -I./include
|
||||
|
@ -18,7 +18,9 @@ OBJS += src/audio/tdav_consumer_audio.o \
|
|||
src/audio/tdav_session_audio.o
|
||||
|
||||
### video
|
||||
OBJS += src/video/tdav_session_video.o
|
||||
OBJS += src/video/tdav_converter_video.o \
|
||||
src/video/tdav_runnable_video.o \
|
||||
src/video/tdav_session_video.o
|
||||
|
||||
### msrp
|
||||
OBJS += src/msrp/tdav_consumer_msrp.o \
|
||||
|
|
|
@ -54,7 +54,11 @@ TDAV_BEGIN_DECLS
|
|||
|
||||
// configuration constants
|
||||
/* Number of historical timestamps to use in calculating jitter and jitterbuffer size */
|
||||
#define JB_HISTORY_SIZE 500
|
||||
#if defined(_WIN32_WCE) || ANDROID
|
||||
# define JB_HISTORY_SIZE 300
|
||||
#else
|
||||
# define JB_HISTORY_SIZE 500
|
||||
#endif
|
||||
/* minimum jitterbuffer size, disabled if 0 */
|
||||
#define JB_MIN_SIZE 0
|
||||
/* maximum jitterbuffer size, disabled if 0 */
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
#if HAVE_FFMPEG
|
||||
|
||||
#include "tinymedia/tmedia_common.h"
|
||||
|
||||
#include <libswscale/swscale.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
|
@ -45,9 +47,11 @@ typedef struct tdav_converter_video_s
|
|||
TSK_DECLARE_OBJECT;
|
||||
|
||||
struct SwsContext *ctx2YUV;
|
||||
struct SwsContext *ctx2RGB;
|
||||
struct SwsContext *ctx2Chroma;
|
||||
|
||||
AVFrame* rgb24Frame;
|
||||
enum PixelFormat pixfmt;
|
||||
|
||||
AVFrame* chromaFrame;
|
||||
AVFrame* yuv420Frame;
|
||||
|
||||
tsk_size_t width;
|
||||
|
@ -55,10 +59,19 @@ typedef struct tdav_converter_video_s
|
|||
}
|
||||
tdav_converter_video_t;
|
||||
|
||||
tdav_converter_video_t* tdav_converter_video_create(tsk_size_t width, tsk_size_t height);
|
||||
tdav_converter_video_t* tdav_converter_video_create(tsk_size_t width, tsk_size_t height, tmedia_chroma_t chroma);
|
||||
|
||||
tsk_size_t tdav_converter_video_2YUV420(tdav_converter_video_t* self, const void* rgb24, void** yuv420);
|
||||
tsk_size_t tdav_converter_video_2RGB24(tdav_converter_video_t* self, const void* yuv420, void** rgb24);
|
||||
tsk_size_t tdav_converter_video_2Yuv420(tdav_converter_video_t* self, const void* buffer, void** yuv420);
|
||||
tsk_size_t tdav_converter_video_2Chroma(tdav_converter_video_t* self, const void* yuv420, void** buffer);
|
||||
|
||||
#define tdav_converter_video_flip(frame, height) \
|
||||
frame->data[0] += frame->linesize[0] * (height -1);\
|
||||
frame->data[1] += frame->linesize[1] * ((height -1)/2);\
|
||||
frame->data[2] += frame->linesize[2] * ((height -1)/2);\
|
||||
\
|
||||
frame->linesize[0] *= -1;\
|
||||
frame->linesize[1] *= -1;\
|
||||
frame->linesize[2] *= -1;
|
||||
|
||||
TINYDAV_GEXTERN const tsk_object_def_t *tdav_converter_video_def_t;
|
||||
|
||||
|
|
|
@ -449,14 +449,18 @@ static tsk_object_t* tdav_session_audio_dtor(tsk_object_t * self)
|
|||
{
|
||||
tdav_session_audio_t *session = self;
|
||||
if(session){
|
||||
/* deinit base */
|
||||
tmedia_session_deinit(self);
|
||||
/* deinit self */
|
||||
TSK_OBJECT_SAFE_FREE(session->rtp_manager);
|
||||
|
||||
// Do it in this order (deinit self first)
|
||||
|
||||
/* deinit self (rtp manager should be destroyed after the producer) */
|
||||
TSK_OBJECT_SAFE_FREE(session->consumer);
|
||||
TSK_OBJECT_SAFE_FREE(session->producer);
|
||||
TSK_OBJECT_SAFE_FREE(session->rtp_manager);
|
||||
TSK_FREE(session->remote_ip);
|
||||
TSK_FREE(session->local_ip);
|
||||
|
||||
/* deinit base */
|
||||
tmedia_session_deinit(self);
|
||||
}
|
||||
|
||||
return self;
|
||||
|
|
|
@ -32,11 +32,13 @@
|
|||
|
||||
#if HAVE_FFMPEG
|
||||
|
||||
#include "tinydav/video/tdav_converter_video.h"
|
||||
|
||||
#include "tsk_time.h"
|
||||
#include "tsk_memory.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#define RTP_PAYLOAD_SIZE 900
|
||||
#define RTP_PAYLOAD_SIZE 500
|
||||
#define MODE_A_SIZE 4 /* RFC 2190 section 5.1 */
|
||||
|
||||
static void *run(void* self);
|
||||
|
@ -154,17 +156,20 @@ int tdav_codec_h263_open(tmedia_codec_t* self)
|
|||
// Encoder
|
||||
//
|
||||
h263->encoder.context = avcodec_alloc_context();
|
||||
avcodec_get_context_defaults(h263->encoder.context);
|
||||
|
||||
h263->encoder.context->pix_fmt = PIX_FMT_YUV420P;
|
||||
h263->encoder.context->time_base.num = 1;
|
||||
h263->encoder.context->time_base.den = TMEDIA_CODEC_VIDEO(h263)->fps;
|
||||
h263->encoder.context->width = TMEDIA_CODEC_VIDEO(h263)->width;
|
||||
h263->encoder.context->height = TMEDIA_CODEC_VIDEO(h263)->height;
|
||||
h263->encoder.context->max_b_frames = 0;
|
||||
//h263->encoder.context->max_b_frames = 0;
|
||||
|
||||
h263->encoder.context->thread_count = 1;
|
||||
h263->encoder.context->rtp_payload_size = 0;
|
||||
h263->encoder.context->rtp_payload_size = RTP_PAYLOAD_SIZE;
|
||||
h263->encoder.context->opaque = tsk_null;
|
||||
h263->encoder.context->gop_size = TMEDIA_CODEC_VIDEO(h263)->fps*1; /* each 2 second */
|
||||
h263->encoder.context->bit_rate = (float) (120000) * 0.8;
|
||||
h263->encoder.context->gop_size = TMEDIA_CODEC_VIDEO(h263)->fps*5; /* each 5 seconds */
|
||||
|
||||
// Picture (YUV 420)
|
||||
if(!(h263->encoder.picture = avcodec_alloc_frame())){
|
||||
|
@ -268,7 +273,7 @@ int tdav_codec_h263_close(tmedia_codec_t* self)
|
|||
return 0;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_h263_fmtp_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
tsk_size_t tdav_codec_h263_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
{
|
||||
int ret;
|
||||
int size;
|
||||
|
@ -292,9 +297,11 @@ tsk_size_t tdav_codec_h263_fmtp_encode(tmedia_codec_t* self, const void* in_data
|
|||
TSK_DEBUG_ERROR("Invalid size");
|
||||
return 0;
|
||||
}
|
||||
/* Flip */
|
||||
tdav_converter_video_flip(h263->encoder.picture, h263->encoder.context->height);
|
||||
|
||||
// Encode data
|
||||
h263->encoder.picture->pts = tsk_time_now();
|
||||
h263->encoder.picture->pts = AV_NOPTS_VALUE;
|
||||
ret = avcodec_encode_video(h263->encoder.context, h263->encoder.buffer, size, h263->encoder.picture);
|
||||
if(ret < 0){
|
||||
ret = 0;
|
||||
|
@ -309,7 +316,7 @@ tsk_size_t tdav_codec_h263_fmtp_encode(tmedia_codec_t* self, const void* in_data
|
|||
}
|
||||
}
|
||||
|
||||
if(ret > RTP_PAYLOAD_SIZE){
|
||||
if(ret/* > RTP_PAYLOAD_SIZE*/){
|
||||
tsk_buffer_t* buffer = tsk_buffer_create_null();
|
||||
tsk_buffer_takeownership(buffer, out_data, (tsk_size_t)ret);
|
||||
TSK_RUNNABLE_ENQUEUE_OBJECT(h263->runnable, buffer);
|
||||
|
@ -319,7 +326,7 @@ tsk_size_t tdav_codec_h263_fmtp_encode(tmedia_codec_t* self, const void* in_data
|
|||
return (tsk_size_t)ret;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_h263_fmtp_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
tsk_size_t tdav_codec_h263_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -395,8 +402,8 @@ static const tmedia_codec_plugin_def_t tdav_codec_h263_plugin_def_s =
|
|||
|
||||
tdav_codec_h263_open,
|
||||
tdav_codec_h263_close,
|
||||
tdav_codec_h263_fmtp_encode,
|
||||
tdav_codec_h263_fmtp_decode,
|
||||
tdav_codec_h263_encode,
|
||||
tdav_codec_h263_decode,
|
||||
tdav_codec_h263_fmtp_match,
|
||||
tdav_codec_h263_fmtp_get,
|
||||
tdav_codec_h263_fmtp_set
|
||||
|
@ -441,12 +448,12 @@ int tdav_codec_h263p_close(tmedia_codec_t* self)
|
|||
return 0;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_h263p_fmtp_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
tsk_size_t tdav_codec_h263p_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_h263p_fmtp_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
tsk_size_t tdav_codec_h263p_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -521,8 +528,8 @@ static const tmedia_codec_plugin_def_t tdav_codec_h263p_plugin_def_s =
|
|||
|
||||
tdav_codec_h263p_open,
|
||||
tdav_codec_h263p_close,
|
||||
tdav_codec_h263p_fmtp_encode,
|
||||
tdav_codec_h263p_fmtp_decode,
|
||||
tdav_codec_h263p_encode,
|
||||
tdav_codec_h263p_decode,
|
||||
tdav_codec_h263p_fmtp_match,
|
||||
tdav_codec_h263p_fmtp_get,
|
||||
tdav_codec_h263p_fmtp_set
|
||||
|
@ -558,12 +565,12 @@ int tdav_codec_h263pp_close(tmedia_codec_t* self)
|
|||
return 0;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_h263pp_fmtp_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
tsk_size_t tdav_codec_h263pp_encode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_codec_h263pp_fmtp_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
tsk_size_t tdav_codec_h263pp_decode(tmedia_codec_t* self, const void* in_data, tsk_size_t in_size, void** out_data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -638,8 +645,8 @@ static const tmedia_codec_plugin_def_t tdav_codec_h263pp_plugin_def_s =
|
|||
|
||||
tdav_codec_h263pp_open,
|
||||
tdav_codec_h263pp_close,
|
||||
tdav_codec_h263pp_fmtp_encode,
|
||||
tdav_codec_h263pp_fmtp_decode,
|
||||
tdav_codec_h263pp_encode,
|
||||
tdav_codec_h263pp_decode,
|
||||
tdav_codec_h263pp_fmtp_match,
|
||||
tdav_codec_h263pp_fmtp_get,
|
||||
tdav_codec_h263pp_fmtp_set
|
||||
|
@ -670,12 +677,20 @@ static void *run(void* self)
|
|||
size = ((const tsk_buffer_t*)curr->data)->size;
|
||||
last_index = 0, last_psc_gbsc_index = 0;
|
||||
|
||||
if(size < RTP_PAYLOAD_SIZE){
|
||||
goto last;
|
||||
}
|
||||
|
||||
for(i = 4; i<(size - 4); i++){
|
||||
if((*((uint32_t*)(pdata + i)) & 0xffff8000) == 0x00008000){ /* PSC or (GBSC) found */
|
||||
//#if ANDROID
|
||||
if(pdata[i] == 0x00 && pdata[i+1] == 0x00 && pdata[i+2]>=0x80){ /* PSC or (GBSC) found */
|
||||
//#else
|
||||
// if((*((uint32_t*)(pdata + i)) & 0xffff8000) == 0x00008000){ /* PSC or (GBSC) found */
|
||||
//#endif
|
||||
if((i - last_index) >= RTP_PAYLOAD_SIZE){
|
||||
switch(h263->type){
|
||||
case tdav_codec_h263_1996:
|
||||
tdav_codec_h263_rtp_callback((tdav_codec_h263_t*) h263, pdata + (last_psc_gbsc_index ? last_psc_gbsc_index : i),
|
||||
tdav_codec_h263_rtp_callback((tdav_codec_h263_t*) h263, pdata+last_index/*pdata + (last_psc_gbsc_index ? last_psc_gbsc_index : i)*/,
|
||||
(i - last_index), (last_index == size));
|
||||
break;
|
||||
default:
|
||||
|
@ -688,6 +703,7 @@ static void *run(void* self)
|
|||
last_psc_gbsc_index = i;
|
||||
}
|
||||
}
|
||||
last:
|
||||
if(last_index < size - 3/*PSC/GBSC size*/){
|
||||
switch(h263->type){
|
||||
case tdav_codec_h263_1996:
|
||||
|
@ -713,17 +729,82 @@ static void *run(void* self)
|
|||
|
||||
static void tdav_codec_h263_rtp_callback(tdav_codec_h263_t *self, const void *data, tsk_size_t size, tsk_bool_t marker)
|
||||
{
|
||||
// Send data over the network
|
||||
//if(TMEDIA_CODEC_VIDEO(h263)->callback){
|
||||
// TMEDIA_CODEC_VIDEO(h263)->callback(TMEDIA_CODEC_VIDEO(h263)->callback_data, buffer->data, buffer->size, 160, tsk_false);
|
||||
uint8_t* rtp; // FIXXXXXXXXXME: use one global buffer
|
||||
|
||||
if(!(rtp = tsk_calloc((size + MODE_A_SIZE), sizeof(uint8_t)))){
|
||||
TSK_DEBUG_ERROR("Failed to allocate new buffer");
|
||||
return;
|
||||
}
|
||||
else{
|
||||
memcpy((rtp + MODE_A_SIZE), data, size);
|
||||
}
|
||||
|
||||
/* http://eu.sabotage.org/www/ITU/H/H0263e.pdf section 5.1
|
||||
* 5.1.1 Picture Start Code (PSC) (22 bits) - PSC is a word of 22 bits. Its value is 0000 0000 0000 0000 1 00000.
|
||||
*
|
||||
* 5.1.1 Picture Start Code (PSC) (22 bits)
|
||||
* 5.1.2 Temporal Reference (TR) (8 bits)
|
||||
* 5.1.3 Type Information (PTYPE) (Variable Length)
|
||||
* – Bit 1: Always "1", in order to avoid start code emulation.
|
||||
* – Bit 2: Always "0", for distinction with Recommendation H.261.
|
||||
|
||||
* – Bit 3: Split screen indicator, "0" off, "1" on.
|
||||
* – Bit 4: Document camera indicator, "0" off, "1" on.
|
||||
* – Bit 5: Full Picture Freeze Release, "0" off, "1" on.
|
||||
* – Bits 6-8: Source Format, "000" forbidden, "001" sub-QCIF, "010" QCIF, "011" CIF,
|
||||
"100" 4CIF, "101" 16CIF, "110" reserved, "111" extended PTYPE.
|
||||
If bits 6-8 are not equal to "111", which indicates an extended PTYPE (PLUSPTYPE), the following
|
||||
five bits are also present in PTYPE:
|
||||
– Bit 9: Picture Coding Type, "0" INTRA (I-picture), "1" INTER (P-picture).
|
||||
– Bit 10: Optional Unrestricted Motion Vector mode (see Annex D), "0" off, "1" on.
|
||||
– Bit 11: Optional Syntax-based Arithmetic Coding mode (see Annex E), "0" off, "1" on.
|
||||
– Bit 12: Optional Advanced Prediction mode (see Annex F), "0" off, "1" on.
|
||||
– Bit 13: Optional PB-frames mode (see Annex G), "0" normal I- or P-picture, "1" PB-frame.
|
||||
*/
|
||||
if((*((uint32_t*)data) & 0xffff8000) == 0x00008000){ /* PSC */
|
||||
/* RFC 2190 -5.1 Mode A
|
||||
0 1 2 3
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|F|P|SBIT |EBIT | SRC |I|U|S|A|R |DBQ| TRB | TR |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
SRC : 3 bits
|
||||
Source format, bit 6,7 and 8 in PTYPE defined by H.263 [4], specifies
|
||||
the resolution of the current picture.
|
||||
|
||||
I: 1 bit.
|
||||
Picture coding type, bit 9 in PTYPE defined by H.263[4], "0" is
|
||||
intra-coded, "1" is inter-coded.
|
||||
*/
|
||||
uint8_t format;
|
||||
const uint8_t* ptr = (((const uint8_t*)data) + 4); // Bits 3-10 of PTYPE
|
||||
|
||||
//for(i=0;i<10;i++){
|
||||
// printf("%2x ", ((const uint8_t*)data)[i]);
|
||||
//}
|
||||
|
||||
// Format = 4,5,6
|
||||
format = ((*ptr) & 0x38)>>3;
|
||||
//int i=0;
|
||||
//i++;
|
||||
}
|
||||
|
||||
//*(rtp + 1)=0x50;
|
||||
|
||||
// Send data over the network
|
||||
if(TMEDIA_CODEC_VIDEO(self)->callback){
|
||||
TMEDIA_CODEC_VIDEO(self)->callback(TMEDIA_CODEC_VIDEO(self)->callback_data, rtp, (size + MODE_A_SIZE), (3003* (30/TMEDIA_CODEC_VIDEO(self)->fps)), marker);
|
||||
}
|
||||
|
||||
TSK_FREE(rtp);
|
||||
}
|
||||
|
||||
static void tdav_codec_h263p_rtp_callback(tdav_codec_h263_t *self, const void *data, tsk_size_t size, tsk_bool_t marker)
|
||||
{
|
||||
// Send data over the network
|
||||
//if(TMEDIA_CODEC_VIDEO(h263)->callback){
|
||||
// TMEDIA_CODEC_VIDEO(h263)->callback(TMEDIA_CODEC_VIDEO(h263)->callback_data, buffer->data, buffer->size, 160, tsk_false);
|
||||
// TMEDIA_CODEC_VIDEO(h263)->callback(TMEDIA_CODEC_VIDEO(h263)->callback_data, buffer->data, buffer->size, 160, marker);
|
||||
//}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,9 +31,22 @@
|
|||
#include "tsk_memory.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
tdav_converter_video_t* tdav_converter_video_create(tsk_size_t width, tsk_size_t height)
|
||||
tdav_converter_video_t* tdav_converter_video_create(tsk_size_t width, tsk_size_t height, tmedia_chroma_t chroma)
|
||||
{
|
||||
tdav_converter_video_t* converter;
|
||||
enum PixelFormat pixfmt;
|
||||
|
||||
switch(chroma){
|
||||
case tmedia_rgb24:
|
||||
pixfmt = PIX_FMT_RGB24;
|
||||
break;
|
||||
case tmedia_nv21:
|
||||
pixfmt = PIX_FMT_NV21;
|
||||
break;
|
||||
default:
|
||||
TSK_DEBUG_ERROR("Invalid chroma");
|
||||
return tsk_null;
|
||||
}
|
||||
|
||||
if(!(converter = tsk_object_new(tdav_converter_video_def_t))){
|
||||
TSK_DEBUG_ERROR("Failed to create Video Converter object");
|
||||
|
@ -41,18 +54,20 @@ tdav_converter_video_t* tdav_converter_video_create(tsk_size_t width, tsk_size_t
|
|||
}
|
||||
|
||||
// Set values
|
||||
converter->pixfmt = pixfmt;
|
||||
converter->width = width;
|
||||
converter->height = height;
|
||||
|
||||
return converter;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_converter_video_2YUV420(tdav_converter_video_t* self, const void* rgb24, void** yuv420)
|
||||
tsk_size_t tdav_converter_video_2Yuv420(tdav_converter_video_t* self, const void* buffer, void** yuv420)
|
||||
{
|
||||
int ret;
|
||||
int size;
|
||||
|
||||
if(!self || !rgb24 || !yuv420){
|
||||
|
||||
if(!self || !buffer || !yuv420){
|
||||
TSK_DEBUG_ERROR("Invalid parameter");
|
||||
return 0;
|
||||
}
|
||||
|
@ -60,7 +75,7 @@ tsk_size_t tdav_converter_video_2YUV420(tdav_converter_video_t* self, const void
|
|||
/* Context */
|
||||
if(!self->ctx2YUV){
|
||||
self->ctx2YUV = sws_getContext(
|
||||
self->width, self->height, PIX_FMT_BGR24,
|
||||
self->width, self->height, (self->pixfmt == PIX_FMT_RGB24) ? PIX_FMT_BGR24 : self->pixfmt,
|
||||
self->width, self->height, PIX_FMT_YUV420P,
|
||||
SWS_FAST_BILINEAR, NULL, NULL, NULL);
|
||||
|
||||
|
@ -71,8 +86,8 @@ tsk_size_t tdav_converter_video_2YUV420(tdav_converter_video_t* self, const void
|
|||
}
|
||||
|
||||
/* Pictures */
|
||||
if(!self->rgb24Frame){
|
||||
if(!(self->rgb24Frame = avcodec_alloc_frame())){
|
||||
if(!self->chromaFrame){
|
||||
if(!(self->chromaFrame = avcodec_alloc_frame())){
|
||||
TSK_DEBUG_ERROR("Failed to create RGB24 picture");
|
||||
return 0;
|
||||
}
|
||||
|
@ -94,25 +109,26 @@ tsk_size_t tdav_converter_video_2YUV420(tdav_converter_video_t* self, const void
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Wrap RGB24 buffer */
|
||||
ret = avpicture_fill((AVPicture *)self->rgb24Frame, (uint8_t*)rgb24, PIX_FMT_RGB24, self->width, self->height);
|
||||
/* Wrap the buffer */
|
||||
ret = avpicture_fill((AVPicture *)self->chromaFrame, (uint8_t*)buffer, self->pixfmt, self->width, self->height);
|
||||
/* Wrap YUV420 buffer */
|
||||
ret = avpicture_fill((AVPicture *)self->yuv420Frame, (uint8_t*)*yuv420, PIX_FMT_YUV420P, self->width, self->height);
|
||||
|
||||
/* performs conversion */
|
||||
ret = sws_scale(self->ctx2YUV, self->rgb24Frame->data, self->rgb24Frame->linesize, 0, 0,
|
||||
ret = sws_scale(self->ctx2YUV, self->chromaFrame->data, self->chromaFrame->linesize, 0, self->height,
|
||||
self->yuv420Frame->data, self->yuv420Frame->linesize);
|
||||
if(ret != 0){
|
||||
if(ret < 0){
|
||||
// delete the allocated buffer
|
||||
TSK_FREE(*yuv420);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (ret == 0) ? size : 0;
|
||||
return size;
|
||||
}
|
||||
|
||||
tsk_size_t tdav_converter_video_2RGB24(tdav_converter_video_t* self, const void* yuv420, void** rgb24)
|
||||
tsk_size_t tdav_converter_video_2Chroma(tdav_converter_video_t* self, const void* yuv420, void** buffer)
|
||||
{
|
||||
if(!self || !rgb24 || !yuv420){
|
||||
if(!self || !buffer || !yuv420){
|
||||
TSK_DEBUG_ERROR("Invalid parameter");
|
||||
return 0;
|
||||
}
|
||||
|
@ -136,14 +152,14 @@ static tsk_object_t* tdav_converter_video_dtor(tsk_object_t * self)
|
|||
{
|
||||
tdav_converter_video_t *converter = self;
|
||||
if(converter){
|
||||
if(converter->ctx2RGB){
|
||||
sws_freeContext(converter->ctx2RGB);
|
||||
if(converter->ctx2Chroma){
|
||||
sws_freeContext(converter->ctx2Chroma);
|
||||
}
|
||||
if(converter->ctx2YUV){
|
||||
sws_freeContext(converter->ctx2YUV);
|
||||
}
|
||||
if(converter->rgb24Frame){
|
||||
av_free(converter->rgb24Frame);
|
||||
if(converter->chromaFrame){
|
||||
av_free(converter->chromaFrame);
|
||||
}
|
||||
if(converter->yuv420Frame){
|
||||
av_free(converter->yuv420Frame);
|
||||
|
|
|
@ -121,13 +121,13 @@ static int tdav_session_video_producer_cb(const void* callback_data, const void*
|
|||
if((session->producer->video.chroma != tmedia_yuv420p)){
|
||||
// Create video converter if not already done
|
||||
if(!session->converter){
|
||||
if(!(session->converter = tdav_converter_video_create(TMEDIA_CODEC_VIDEO(codec)->width, TMEDIA_CODEC_VIDEO(codec)->height))){
|
||||
if(!(session->converter = tdav_converter_video_create(TMEDIA_CODEC_VIDEO(codec)->width, TMEDIA_CODEC_VIDEO(codec)->height, session->producer->video.chroma))){
|
||||
TSK_DEBUG_ERROR("Failed to create video converter");
|
||||
return -5;
|
||||
}
|
||||
}
|
||||
// convert data to yuv420p
|
||||
yuv420p_size = tdav_converter_video_2YUV420(session->converter, buffer, &yuv420p);
|
||||
yuv420p_size = tdav_converter_video_2Yuv420(session->converter, buffer, &yuv420p);
|
||||
if(!yuv420p_size || !yuv420p){
|
||||
TSK_DEBUG_ERROR("Failed to convert RGB buffer to YUV42P");
|
||||
TSK_FREE(yuv420p);
|
||||
|
@ -164,9 +164,9 @@ int tmedia_session_video_set(tmedia_session_t* self, const tmedia_param_t* param
|
|||
int ret = 0;
|
||||
tdav_session_video_t* video;
|
||||
|
||||
if(!self){
|
||||
TSK_DEBUG_ERROR("Invalid parameter");
|
||||
return -1;
|
||||
if(!self){
|
||||
TSK_DEBUG_ERROR("Invalid parameter");
|
||||
return -1;
|
||||
}
|
||||
|
||||
TSK_DEBUG_INFO("tmedia_session_video_set");
|
||||
|
@ -452,55 +452,59 @@ int tdav_session_video_set_ro(tmedia_session_t* self, const tsdp_header_M_t* m)
|
|||
|
||||
|
||||
|
||||
//=================================================================================================
|
||||
// Session Video Plugin object definition
|
||||
//
|
||||
/* constructor */
|
||||
static tsk_object_t* tdav_session_video_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
tdav_session_video_t *session = self;
|
||||
if(session){
|
||||
/* init base: called by tmedia_session_create() */
|
||||
/* init self */
|
||||
if(!(session->consumer = tmedia_consumer_create(tdav_session_video_plugin_def_t->type))){
|
||||
TSK_DEBUG_ERROR("Failed to create Video consumer");
|
||||
}
|
||||
if((session->producer = tmedia_producer_create(tdav_session_video_plugin_def_t->type))){
|
||||
tmedia_producer_set_callback(session->producer, tdav_session_video_producer_cb, self);
|
||||
}
|
||||
else{
|
||||
TSK_DEBUG_ERROR("Failed to create Video producer");
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
/* destructor */
|
||||
static tsk_object_t* tdav_session_video_dtor(tsk_object_t * self)
|
||||
{
|
||||
tdav_session_video_t *session = self;
|
||||
if(session){
|
||||
/* deinit base */
|
||||
tmedia_session_deinit(self);
|
||||
/* deinit self */
|
||||
TSK_OBJECT_SAFE_FREE(session->rtp_manager);
|
||||
TSK_OBJECT_SAFE_FREE(session->consumer);
|
||||
TSK_OBJECT_SAFE_FREE(session->producer);
|
||||
TSK_OBJECT_SAFE_FREE(session->converter);
|
||||
TSK_FREE(session->remote_ip);
|
||||
TSK_FREE(session->local_ip);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
/* object definition */
|
||||
static const tsk_object_def_t tdav_session_video_def_s =
|
||||
{
|
||||
sizeof(tdav_session_video_t),
|
||||
tdav_session_video_ctor,
|
||||
tdav_session_video_dtor,
|
||||
tmedia_session_cmp,
|
||||
};
|
||||
/* plugin definition*/
|
||||
//=================================================================================================
|
||||
// Session Video Plugin object definition
|
||||
//
|
||||
/* constructor */
|
||||
static tsk_object_t* tdav_session_video_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
tdav_session_video_t *session = self;
|
||||
if(session){
|
||||
/* init base: called by tmedia_session_create() */
|
||||
/* init self */
|
||||
if(!(session->consumer = tmedia_consumer_create(tdav_session_video_plugin_def_t->type))){
|
||||
TSK_DEBUG_ERROR("Failed to create Video consumer");
|
||||
}
|
||||
if((session->producer = tmedia_producer_create(tdav_session_video_plugin_def_t->type))){
|
||||
tmedia_producer_set_callback(session->producer, tdav_session_video_producer_cb, self);
|
||||
}
|
||||
else{
|
||||
TSK_DEBUG_ERROR("Failed to create Video producer");
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
/* destructor */
|
||||
static tsk_object_t* tdav_session_video_dtor(tsk_object_t * self)
|
||||
{
|
||||
tdav_session_video_t *session = self;
|
||||
if(session){
|
||||
|
||||
// Do it in this order (deinit self first)
|
||||
|
||||
/* deinit self (rtp manager should be destroyed after the producer) */
|
||||
TSK_OBJECT_SAFE_FREE(session->consumer);
|
||||
TSK_OBJECT_SAFE_FREE(session->producer);
|
||||
TSK_OBJECT_SAFE_FREE(session->converter);
|
||||
TSK_OBJECT_SAFE_FREE(session->rtp_manager);
|
||||
TSK_FREE(session->remote_ip);
|
||||
TSK_FREE(session->local_ip);
|
||||
|
||||
/* deinit base */
|
||||
tmedia_session_deinit(self);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
/* object definition */
|
||||
static const tsk_object_def_t tdav_session_video_def_s =
|
||||
{
|
||||
sizeof(tdav_session_video_t),
|
||||
tdav_session_video_ctor,
|
||||
tdav_session_video_dtor,
|
||||
tmedia_session_cmp,
|
||||
};
|
||||
/* plugin definition*/
|
||||
static const tmedia_session_plugin_def_t tdav_session_video_plugin_def_s =
|
||||
{
|
||||
&tdav_session_video_def_s,
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Winmm.lib $(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib $(OutDir)\tinyRTP.lib $(OutDir)\tinySDP.lib $(OutDir)\tinyMEDIA.lib $(OutDir)\tinyDSHOW.lib ..\thirdparties\win32\lib\libgcc.a ..\thirdparties\win32\lib\libmingwex.a ..\thirdparties\win32\lib\ffmpeg\libavutil.a ..\thirdparties\win32\lib\ffmpeg\libavcodec.a"
|
||||
AdditionalDependencies="Winmm.lib $(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib $(OutDir)\tinyRTP.lib $(OutDir)\tinySDP.lib $(OutDir)\tinyMEDIA.lib $(OutDir)\tinyDSHOW.lib ..\thirdparties\win32\lib\libgcc.a ..\thirdparties\win32\lib\libmingwex.a "..\thirdparties\win32\lib\ffmpeg\libavcodec.a" "..\thirdparties\win32\lib\ffmpeg\libavutil.a" "..\thirdparties\win32\lib\ffmpeg\libswscale.a""
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
|
@ -324,6 +324,14 @@
|
|||
<Filter
|
||||
Name="video"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\include\tinydav\video\tdav_converter_video.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\tinydav\video\tdav_runnable_video.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\tinydav\video\tdav_session_video.h"
|
||||
>
|
||||
|
@ -500,6 +508,14 @@
|
|||
<Filter
|
||||
Name="video"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\video\tdav_converter_video.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\video\tdav_runnable_video.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\video\tdav_session_video.c"
|
||||
>
|
||||
|
|
|
@ -25,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyRTP", "..\tinyRTP\tinyR
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySIGCOMP", "..\tinySIGCOMP\tinySIGCOMP.vcproj", "{76261DC8-25B3-43F4-9FB5-112C4AC0880E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyDSHOW", "..\tinyDSHOW\tinyDSHOW.vcproj", "{0CCC02F1-4233-424F-AD5E-A021456E6E8D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -125,6 +127,12 @@ Global
|
|||
{76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{76261DC8-25B3-43F4-9FB5-112C4AC0880E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Win32.Build.0 = Release|Win32
|
||||
{0CCC02F1-4233-424F-AD5E-A021456E6E8D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -255,12 +255,12 @@ HRESULT createSourceFilter(std::string *devicePath, IBaseFilter **sourceFilter)
|
|||
|
||||
// Ask for a device enumerator
|
||||
hr = deviceEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &enumerator, INCLUDE_CATEGORY_FLAG);
|
||||
if (FAILED(hr)){
|
||||
if(FAILED(hr)){
|
||||
goto bail;
|
||||
}
|
||||
|
||||
// hr = S_FALSE and enumerator is NULL if there is no device to enumerate
|
||||
if (!enumerator){
|
||||
if(!enumerator){
|
||||
goto bail;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ tmedia_type_t;
|
|||
typedef enum tmedia_chroma_e
|
||||
{
|
||||
tmedia_rgb24,
|
||||
tmedia_nv21, // Yuv420 SP (used on android)
|
||||
tmedia_yuv420p, // Default
|
||||
}
|
||||
tmedia_chroma_t;
|
||||
|
|
Loading…
Reference in New Issue