sabby3861 / idoubs

Automatically exported from code.google.com/p/idoubs
0 stars 0 forks source link

video call issue #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. checkout latest revision for doubango and idoubs and run idoubs xcode
2. make a video call from iphone to iphone (both are 4s) 
3. answer the call 

What is the expected output? What do you see instead?
Connect with video call.....

Debug output from xcode
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin 
--target=arm-apple-darwin".tty /dev/ttys001
target remote-mobile /tmp/.XcodeGDBRemote-20506-37
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
[Switching to process 11779 thread 0x0]
[Switching to process 11779 thread 0x0]
sharedlibrary apply-load-rules all
2011-08-01 16:00:35.740 idoubs[980:5a07] NgnEngine///: dummyCoCoaThread()
2011-08-01 16:00:35.750 idoubs[980:707] NgnEngine///: Working in multithreaded 
mode :)
2011-08-01 16:00:35.756 idoubs[980:707] NgnConfigurationService///: Start()
2011-08-01 16:00:35.765 idoubs[980:707] NgnNetworkService///: Start()
2011-08-01 16:00:35.779 idoubs[980:707] NgnStorageService///: Start()
2011-08-01 16:00:35.783 idoubs[980:707] NgnStorageService///: 
databasePath:/var/mobile/Applications/2852BA25-8781-4FD0-8EF3-79887284A5A7/Docum
ents/NgnDataBase.db
2011-08-01 16:00:35.793 idoubs[980:707] NgnStorageService///: found 
databaseVersion=0
2011-08-01 16:00:35.797 idoubs[980:707] NgnStorageService///: used 
databaseVersion=0
2011-08-01 16:00:35.801 idoubs[980:707] NgnStorageService///: No changes: 
database v-current=0
2011-08-01 16:00:35.813 idoubs[980:707] NgnContactService///: Start()
2011-08-01 16:00:36.963 idoubs[980:707] NgnSipService///: Start()
2011-08-01 16:00:36.966 idoubs[980:707] NgnHttpClientService///: Start()
2011-08-01 16:00:36.970 idoubs[980:707] NgnHistoryService///: Start()
2011-08-01 16:00:36.978 idoubs[980:707] NgnSoundService///: Start()
2011-08-01 16:00:37.275 idoubs[980:707] NgnSipService///: register()
2011-08-01 16:00:37.279 idoubs[980:707] NgnSipService///: 
realm='75.151.246.35', impu='sip:4128558765@75.151.81.35', impi='4128558765'
2011-08-01 16:00:37.542 idoubs[980:707] NgnSipService///: STUN=no
2011-08-01 16:00:37.546 idoubs[980:707] NgnSipService///: 
pcscf-host='75.151.246.35', pcscf-port='5060', transport='UDP', ipversion='ipv4'
 interface: en0
2011-08-01 16:00:37.557 idoubs[980:6b03] NgnSipService///: Stack started
2011-08-01 16:00:37.705 idoubs[980:707] idoubs2AppDelegate///: Multitasking IS 
supported
2011-08-01 16:00:45.541 idoubs[980:707] NgnProxyPluginMgr///: 
OnPluginCreated(1,3)
2011-08-01 16:00:45.544 idoubs[980:707] NgnProxyPluginMgr///: 
OnPluginCreated(2,1)
2011-08-01 16:00:50.110 idoubs[980:6d03] NgnProxyVideoConsumer///: 
prepareWithWidth(144,0,15)
2011-08-01 16:00:50.114 idoubs[980:6d03] NgnProxyVideoConsumer///: start()
2011-08-01 16:00:50.119 idoubs[980:6d03] NgnProxyVideoProducer///: 
prepareWithWidth(176,144,15)
2011-08-01 16:00:50.126 idoubs[980:6d03] NgnProxyVideoProducer///: start()
2011-08-01 16:00:50.130 idoubs[980:6d03] NgnProxyVideoProducer///: Starting 
Video stream
2011-08-01 16:00:50.155 idoubs[980:6d03] NgnProxyVideoProducer///: Video 
capture started
warning: The VAD has been replaced by a hack pending a complete rewrite
2011-08-01 16:00:51.383 idoubs[980:970b] NgnProxyVideoProducer///: Capture 
pixel format=NV12
picture size invalid (144x0)
    Last message repeated 1 times    Last message repeated 2 times    Last message repeated 3 times    Last message repeated 4 times    Last message repeated 5 times***ERROR: function: "tsk_realloc()" 
file: 
"/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-
ngn-stack/../../../../../doubango/branches/2.0/doubango/tinySAK/src/tsk_memory.c
" 
line: "84" 
MSG: Memory allocation failed
***ERROR: function: "tdav_codec_h263p_decode()" 
file: 
"/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-
ngn-stack/../../../../../doubango/branches/2.0/doubango/tinyDAV/src/codecs/h263/
tdav_codec_h263.c" 
line: "737" 
MSG: Failed to allocate new buffer

What version of the product or source code revision are you using? On what
operating system?
Mac - Latest source

Let me know if you need any further details...

Original issue reported on code.google.com by ridg3w...@gmail.com on 1 Aug 2011 at 8:08

GoogleCodeExporter commented 9 years ago
Is anyone else seeing this?  Did we do something wrong with the setup?  Let us 
know what we can do to help fix....

Original comment by ridg3w...@gmail.com on 3 Aug 2011 at 1:24

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 6 Aug 2011 at 2:58

GoogleCodeExporter commented 9 years ago
Ok I've dug a little deeper.  Just tested my asterisk 1.8 server config with 
xlite and can do video chat there.  When I use the idoubs client (latest 
checkout from today Aug 8th) it crashes.  

MSG: Failed to allocate new buffer
    Last message repeated 2 times    Last message repeated 3 times    Last message repeated 4 times    Last message repeated 5 times***ERROR: function: "tsk_realloc()" 
file: 
"/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-
ngn-stack/../../../../../doubango/branches/2.0/doubango/tinySAK/src/tsk_memory.c
" 
line: "84" 
MSG: Memory allocation failed
***ERROR: function: "tdav_codec_h263p_decode()" 
file: 
"/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-
ngn-stack/../../../../../doubango/branches/2.0/doubango/tinyDAV/src/codecs/h263/
tdav_codec_h263.c" 
line: "737" 
MSG: Failed to allocate new buffer

Is anyone using asterisk and if so what codec / config ?

Original comment by ridg3w...@gmail.com on 8 Aug 2011 at 8:12

GoogleCodeExporter commented 9 years ago
According to your trace, you are using H263-1996.
Could you please try with any other codec?

Original comment by boss...@yahoo.fr on 8 Aug 2011 at 9:29

GoogleCodeExporter commented 9 years ago
Your server probably rewrite the sdp and remove some mandatory parameters.
Please also attach the network trace if you want help.

Original comment by boss...@yahoo.fr on 8 Aug 2011 at 9:43

GoogleCodeExporter commented 9 years ago
Ok Seem to have the right codec now and have it working on iphone to iphone 
with asterisk.  Now I'm testing IPad 2 to both an idoubs iphone client and 
xlite.  Getting the following crash on the ipad after they connect

#0  yuv2yuv1_C (c=<value temporarily unavailable, due to optimizations>, 
lumSrc=0x18f3200, chrSrc=0x18f4400, alpSrc=0x0, dest=0x1680165 "\006", 
uDest=0xf100ef "", vDest=0xf500f3 "", aDest=0x0, dstW=176, chrDstW=88) at 
swscale_template.c:992
#1  0x000ada20 in swScale_C (c=0x5336000, src=0x2fdfe42c, srcStride=0x2fdfe3fc, 
srcSliceY=0, srcSliceH=144, dst=0x2fdfe41c, dstStride=0x2fdfe40c) at 
swscale_template.c:2807
#2  0x000ac21c in sws_scale (c=0x5336000, src=<value temporarily unavailable, 
due to optimizations>, srcStride=0x116d0f0, srcSliceY=0, srcSliceH=144, 
dst=0x116d1b0, dstStride=0x116d1c0) at swscale.c:1951
#3  0x00225b36 in tdav_converter_video_convert (self=0x116e190, 
buffer=0x4e07000, output=0x11e4be0, output_max_size=0x11e4be4) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-n
gn-stack/../../../../../doubango/branches/2.0/doubango/tinyDAV/src/video/tdav_co
nverter_video.c:171
#4  0x002268f2 in tdav_session_video_producer_enc_cb (callback_data=0x11e4b80, 
buffer=0x4e07000, size=38016) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-n
gn-stack/../../../../../doubango/branches/2.0/doubango/tinyDAV/src/video/tdav_se
ssion_video.c:211
#5  0x00188e6c in -[NgnProxyVideoProducer(VideoCapture) timerBlankPacketsTick:] 
(self=0x69a530, _cmd=0x242caa, timer=0x6c5fb0) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-n
gn-stack/media/NgnProxyVideoProducer.mm:290
#6  0x309b17cc in __NSFireTimer ()
#7  0x36402a46 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#8  0x36404eca in __CFRunLoopDoTimer ()
#9  0x36405844 in __CFRunLoopRun ()
#10 0x36395ec2 in CFRunLoopRunSpecific ()
#11 0x36395dca in CFRunLoopRunInMode ()
#12 0x34ce241e in GSEventRunModal ()
#13 0x34ce24ca in GSEventRun ()
#14 0x3495ad68 in -[UIApplication _run] ()
#15 0x34958806 in UIApplicationMain ()
#16 0x000029f2 in main (argc=1, argv=0x2fdff560) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/idoub
s/main.m:25

Any suggestions here?

Original comment by ridg3w...@gmail.com on 9 Aug 2011 at 8:36

GoogleCodeExporter commented 9 years ago
Updated to lastet revisions for doubango and idoubs today and am still seeing 
the same issue going from Ipad 2 to idoubs iphone or xlite client.

Let me know what i can send to help here

(gdb) bt
#0  yuv2yuv1_C (c=<value temporarily unavailable, due to optimizations>, 
lumSrc=0xa2de00, chrSrc=0xa2f000, alpSrc=0x0, dest=0x10000 
"\031Fg\362\242\357\001\232\024K{D\033h\020F\031Fg\362\232\357\003F\032F\021K{D\
033h\020F\031Fg\362\220\357\001\233\002\223\rK{D\033h\003\223\002\252\fK{D\033h\
020F\031Fg\362\210\357\247\361", uDest=0x30002 
"\020P\335\370`\340\210\277\004FS\370%0\\\370%\020\v\353\003", vDest=0x50004 
"b\023\234E\201\362\213\202\337\370\2442\363X\002+A\363p\203\003\"\246K\362P\004
3\363X\002+A\363e\203\003\"\337\370\2142\362P\337\370\2002\363X\003+\001\362\217
\202\337\350\023\360\265\n\261\n\255\n\227\n\215\n\337\370\340!\263P\256\346O\35
2\016 \316\353", aDest=0x0, dstW=176, chrDstW=88) at swscale_template.c:992
#1  0x000f17e0 in swScale_C (c=0x53b4000, src=0x2fdfe42c, srcStride=0x2fdfe3fc, 
srcSliceY=0, srcSliceH=144, dst=0x2fdfe41c, dstStride=0x2fdfe40c) at 
swscale_template.c:2807
#2  0x000effdc in sws_scale (c=0x53b4000, src=<value temporarily unavailable, 
due to optimizations>, srcStride=0x676830, srcSliceY=0, srcSliceH=144, 
dst=0x675ca0, dstStride=0x675cb0) at swscale.c:1951
#3  0x00269e06 in tdav_converter_video_convert (self=0x677b80, 
buffer=0x5374000, output=0x11afc00, output_max_size=0x11afc04) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-n
gn-stack/../../../../../doubango/branches/2.0/doubango/tinyDAV/src/video/tdav_co
nverter_video.c:171
#4  0x0026abc2 in tdav_session_video_producer_enc_cb (callback_data=0x11afba0, 
buffer=0x5374000, size=38016) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-n
gn-stack/../../../../../doubango/branches/2.0/doubango/tinyDAV/src/video/tdav_se
ssion_video.c:211
#5  0x001ccedc in -[NgnProxyVideoProducer(VideoCapture) timerBlankPacketsTick:] 
(self=0x11b0020, _cmd=0x28983a, timer=0x677820) at 
/Users/waynescholar/Documents/iphonedev/mydoubs/iPhone/idoubs/branches/2.0/ios-n
gn-stack/media/NgnProxyVideoProducer.mm:290
#6  0x309b17cc in __NSFireTimer ()
#7  0x36402a46 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#8  0x36404eca in __CFRunLoopDoTimer ()
#9  0x36405844 in __CFRunLoopRun ()
#10 0x36395ec2 in CFRunLoopRunSpecific ()
#11 0x36395dca in CFRunLoopRunInMode ()
#12 0x34ce241e in GSEventRunModal ()
#13 0x34ce24ca in GSEventRun ()
#14 0x3495ad68 in -[UIApplication _run] ()
#15 0x34958806 in UIApplicationMain ()

Original comment by wscho...@getabby.com on 11 Aug 2011 at 8:39

GoogleCodeExporter commented 9 years ago
Found a Solution to this in NgnProxyVideoProducer method timerBlankPacketsTick 
change the buffer multipler to 2.f from 1.5f and it works.  

case tmedia_nv12:
                buffer_size = 2.f * mWidth * mHeight;
              //  buffer_size = 1.5f * mWidth * mHeight;
                break;
            case tmedia_uyvy422:
                buffer_size = 2.f * mWidth * mHeight;
                break;
            case tmedia_rgb32:
                buffer_size = 4.f * mWidth * mHeight;
                break;

Original comment by wscho...@getabby.com on 12 Aug 2011 at 6:45

GoogleCodeExporter commented 9 years ago
I found the same problem on ipad2, see doubango Issue 58.
Did breakpoint, I found error buffer value when send blank packet.

I Comment this line in NgnProxyVideoProducer.mm  
//_producer->enc_cb.callback(_producer->enc_cb.callback_data,butter_ptr,buffer_s
ize);
this OK.

I think your solution is better one.

We need check it and found the true reason.

Original comment by zrsh...@gmail.com on 16 Aug 2011 at 2:05

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 18 Aug 2011 at 6:05

GoogleCodeExporter commented 9 years ago
Revision 178 should fix the issue.
As I cannot reproduce it I'm waiting for your feedbacks :)

Original comment by boss...@yahoo.fr on 18 Aug 2011 at 6:11

GoogleCodeExporter commented 9 years ago
So far so good.  Looks like it resolved the issue.  I will keep testing and 
keep you updated.

Original comment by wscho...@getabby.com on 19 Aug 2011 at 6:28

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 8 Sep 2011 at 7:04