You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(68) |
Jul
(27) |
Aug
(1) |
Sep
(9) |
Oct
(16) |
Nov
(64) |
Dec
(18) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(11) |
Feb
(5) |
Mar
(20) |
Apr
(9) |
May
(8) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
(11) |
Oct
(34) |
Nov
(23) |
Dec
(34) |
2005 |
Jan
(41) |
Feb
(25) |
Mar
(25) |
Apr
(32) |
May
(27) |
Jun
(9) |
Jul
(36) |
Aug
(6) |
Sep
(3) |
Oct
(11) |
Nov
(2) |
Dec
(21) |
2006 |
Jan
(14) |
Feb
(8) |
Mar
(18) |
Apr
(6) |
May
|
Jun
(17) |
Jul
(14) |
Aug
(26) |
Sep
(34) |
Oct
(24) |
Nov
(48) |
Dec
(64) |
2007 |
Jan
(72) |
Feb
(21) |
Mar
(50) |
Apr
(41) |
May
(35) |
Jun
(50) |
Jul
(33) |
Aug
(32) |
Sep
(50) |
Oct
(85) |
Nov
(43) |
Dec
(33) |
2008 |
Jan
(10) |
Feb
(29) |
Mar
(15) |
Apr
(45) |
May
(5) |
Jun
(2) |
Jul
(14) |
Aug
(3) |
Sep
|
Oct
|
Nov
(3) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
(9) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jpg...@us...> - 2007-12-19 15:42:20
|
Revision: 1316 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1316&view=rev Author: jpgrayson Date: 2007-12-19 07:42:24 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Apply patch from Lee Howard to improve timestamp semantics in libiax2. >From the tracker... I'm attaching a patch that includes various fixes/improvements to timestamping on iax2 frames in libiax2. Namely: 1) If the *next* miniframe will cause the timestamp to wrap then we need to send a full voice frame now (the one previous to the wrap). If we wait until the wrap occurs then we are leaving it up to the PBX to interpret the wrap. 2) e->ts needs to be properly set for all frames, and not just certain ones. 3) When constructing the timestamp be overly cautious about doing it and keep wrapping under check. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-19 15:38:37 UTC (rev 1315) +++ trunk/lib/libiax2/src/iax.c 2007-12-19 15:42:24 UTC (rev 1316) @@ -1051,7 +1051,7 @@ struct iax_frame *fr; int res; int sendmini=0; - unsigned int lastsent; + unsigned int nextpred; unsigned int fts; if (!pvt) @@ -1060,14 +1060,15 @@ return -1; } - /* this must come before the next call to calc_timestamp() since - calc_timestamp() will change lastsent to the returned value */ - lastsent = pvt->lastsent; - /* Calculate actual timestamp */ fts = calc_timestamp(pvt, ts, f); - if (((fts & 0xFFFF0000L) == (lastsent & 0xFFFF0000L)) + /* If the next predicted VOICE timestamp will overflow the 16-bit + portion of the timestamp then we send a full VOICE frame to + keep the 32-bit portion of the timestamp synchronized. */ + nextpred = pvt->nextpred; + + if (((fts & 0xFFFF0000L) == (nextpred & 0xFFFF0000L)) /* High two bits are the same on timestamp, or sending on a trunk */ && (f->frametype == AST_FRAME_VOICE) /* is a voice frame */ && @@ -1083,7 +1084,7 @@ /* Bitmask taken from chan_iax2.c... I must ask Mark Spencer for this? I think not... */ if ( f->frametype == AST_FRAME_VIDEO ) { - if (((fts & 0xFFFF8000L) == (lastsent & 0xFFFF8000L)) + if (((fts & 0xFFFF8000L) == (nextpred & 0xFFFF8000L)) /* High two bits are the same on timestamp, or sending on a trunk */ && ((f->subclass & ~0x01) == pvt->svideoformat) /* is the same type */ ) @@ -2497,7 +2498,7 @@ /* don't run last_ts backwards; i.e. for retransmits and the like */ if (ts > session->last_ts && - (fh->type == AST_FRAME_IAX && + ((fh->type == AST_FRAME_IAX || fh->type == AST_FRAME_VOICE) && subclass != IAX_COMMAND_ACK && subclass != IAX_COMMAND_PONG && subclass != IAX_COMMAND_LAGRP)) @@ -2621,6 +2622,7 @@ */ e->etype = -1; e->session = session; + e->ts = ts; switch(fh->type) { case AST_FRAME_DTMF: e->etype = IAX_EVENT_DTMF; @@ -2633,7 +2635,6 @@ case AST_FRAME_VOICE: e->etype = IAX_EVENT_VOICE; e->subclass = subclass; - e->ts = ts; session->voiceformat = subclass; if (datalen) { memcpy(e->data, fh->iedata, datalen); @@ -2714,17 +2715,14 @@ case IAX_COMMAND_LAGRQ: /* Pass this along for later handling */ e->etype = IAX_EVENT_LAGRQ; - e->ts = ts; e = schedule_delivery(e, ts, updatehistory); break; case IAX_COMMAND_POKE: e->etype = IAX_EVENT_POKE; - e->ts = ts; break; case IAX_COMMAND_PING: /* PINGS and PONGS don't get scheduled; */ e->etype = IAX_EVENT_PING; - e->ts = ts; break; case IAX_COMMAND_PONG: e->etype = IAX_EVENT_PONG; @@ -2893,7 +2891,6 @@ case AST_FRAME_VIDEO: e->etype = IAX_EVENT_VIDEO; e->subclass = subclass; - e->ts = ts; session->videoformat = e->subclass; memcpy(e->data, fh->iedata, datalen); e->datalen = datalen; @@ -3011,7 +3008,8 @@ e->subclass = session->voiceformat; e->datalen = datalen; memcpy(e->data, mh->data, datalen); - e->ts = (session->last_ts & 0xFFFF0000) | ntohs(mh->ts); + e->ts = (session->last_ts & 0xFFFF0000L) | (ntohs(mh->ts) & 0xFFFF); + e->ts = unwrap_timestamp(e->ts, session->last_ts); return schedule_delivery(e, e->ts, 1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-19 15:38:34
|
Revision: 1315 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1315&view=rev Author: jpgrayson Date: 2007-12-19 07:38:37 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Apply patch from Lee Howard to remove duplicate table entry for IAX_IE_CODEC_PREFS. Modified Paths: -------------- trunk/lib/libiax2/src/iax2-parser.c Modified: trunk/lib/libiax2/src/iax2-parser.c =================================================================== --- trunk/lib/libiax2/src/iax2-parser.c 2007-12-19 15:35:27 UTC (rev 1314) +++ trunk/lib/libiax2/src/iax2-parser.c 2007-12-19 15:38:37 UTC (rev 1315) @@ -159,7 +159,6 @@ { IAX_IE_CAPABILITY, "CAPABILITY", dump_int }, { IAX_IE_FORMAT, "FORMAT", dump_int }, { IAX_IE_LANGUAGE, "LANGUAGE", dump_string }, - { IAX_IE_CODEC_PREFS, "CODEC_PREFS", dump_string }, { IAX_IE_VERSION, "VERSION", dump_short }, { IAX_IE_ADSICPE, "ADSICPE", dump_short }, { IAX_IE_DNID, "DNID", dump_string }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-19 15:35:24
|
Revision: 1314 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1314&view=rev Author: jpgrayson Date: 2007-12-19 07:35:27 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Apply patch from Lee Howard to fix libiax2 build on OpenBSD. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-19 15:32:10 UTC (rev 1313) +++ trunk/lib/libiax2/src/iax.c 2007-12-19 15:35:27 UTC (rev 1314) @@ -30,7 +30,6 @@ #include <winsock.h> #include <time.h> #include <stdlib.h> -#include <malloc.h> #include <stdarg.h> #include <stdio.h> #include <limits.h> @@ -76,9 +75,9 @@ #include <arpa/inet.h> #include <time.h> -#ifndef MACOSX +#if !defined(MACOSX) && !defined(__OpenBSD__) #include <malloc.h> -#ifndef SOLARIS +#if !defined(SOLARIS) #include <error.h> #endif #endif @@ -97,7 +96,7 @@ #ifdef MACOSX #define IAX_SOCKOPTS MSG_DONTWAIT #else -#ifdef SOLARIS +#if defined(SOLARIS) || defined(__OpenBSD__) #define IAX_SOCKOPTS MSG_DONTWAIT #else /* Linux and others */ #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-19 15:32:10
|
Revision: 1313 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1313&view=rev Author: jpgrayson Date: 2007-12-19 07:32:10 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Apply patch from Lee Howard to free REGACK sessions. >From tracker report... With libiax2 registrations are handled in an independent session. This way a registration may be maintained during a long call, for example. (A registration is only maintained by REGREQ...REGACK - authenticated calls do not perpetuate a registration.) Once REGACK is received the session is over with, just like after a HANGUP or a REJECT. So the patch attached fixes this. I think that in iaxclient you have a coping mechanism to work around this libiax2 bug (I think by manually destroying the session in iaxclient), but I think that the right thing to do is to fix libiax2. I don't think that the application really should be destroying sessions, anyway. The intelligent library should be smart enough to handle that. The symptoms of the problem is that after a re-registration occurs incoming calls, for example, are not delivered (don't cause a ring) to the client. I suspect that REGREJ also should be handled similarly, but I'm not in a position to test this. Looking at the Asterisk codebase it appears that both REGACK and REGREJ cause the session to be destroyed. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-19 15:27:29 UTC (rev 1312) +++ trunk/lib/libiax2/src/iax.c 2007-12-19 15:32:10 UTC (rev 1313) @@ -1600,6 +1600,7 @@ */ case IAX_EVENT_REJECT: case IAX_EVENT_HANGUP: + case IAX_EVENT_REGACK: /* Destroy this session -- it's no longer valid */ destroy_session(event->session); return event; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-19 15:27:27
|
Revision: 1312 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1312&view=rev Author: jpgrayson Date: 2007-12-19 07:27:29 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Apply patch from Lee Howard to clarify/fix a bit of md5pass code. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-19 15:25:09 UTC (rev 1311) +++ trunk/lib/libiax2/src/iax.c 2007-12-19 15:27:29 UTC (rev 1312) @@ -1015,7 +1015,7 @@ { int x; for (x=0;x<16;x++) - out += sprintf(out, "%2.2x", (int)in[x]); + sprintf(out + (x << 1), "%2.2x", (int)in[x]); } static unsigned char compress_subclass(int subclass) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-19 15:25:09
|
Revision: 1311 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1311&view=rev Author: jpgrayson Date: 2007-12-19 07:25:09 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Apply patch from Lee Howard to fix plaintext authentication. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-17 16:14:11 UTC (rev 1310) +++ trunk/lib/libiax2/src/iax.c 2007-12-19 15:25:09 UTC (rev 1311) @@ -1929,7 +1929,7 @@ convert_reply(realreply, (unsigned char *) reply); iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, realreply); } else { - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, password); + iax_ie_append_str(&ied, IAX_IE_PASSWORD, password); } return send_command(session, AST_FRAME_IAX, IAX_COMMAND_AUTHREP, 0, ied.buf, ied.pos, -1); } @@ -1954,7 +1954,7 @@ convert_reply(realreply, (unsigned char *) reply); iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, realreply); } else { - iax_ie_append_str(&ied, IAX_IE_MD5_RESULT, password); + iax_ie_append_str(&ied, IAX_IE_PASSWORD, password); } return send_command(session, AST_FRAME_IAX, IAX_COMMAND_REGREQ, 0, ied.buf, ied.pos, -1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-17 16:14:06
|
Revision: 1310 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1310&view=rev Author: jpgrayson Date: 2007-12-17 08:14:11 -0800 (Mon, 17 Dec 2007) Log Message: ----------- Patch from Lee Howard. http://sourceforge.net/tracker/index.php?func=detail&aid=1850454&group_id=72851&atid=535896 Add libiax api function to enable/disable the jitterbuffer. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-17 16:10:00 UTC (rev 1309) +++ trunk/lib/libiax2/src/iax.c 2007-12-17 16:14:11 UTC (rev 1310) @@ -128,6 +128,9 @@ /* Video frames bypass jitterbuffer */ static int video_bypass_jitterbuffer = 0; +/* To use or not to use the jitterbuffer */ +static int iax_use_jitterbuffer = 1; + /* UDP Socket (file descriptor) */ static int netfd = -1; @@ -249,6 +252,16 @@ debug = 0; } +void iax_enable_jitterbuffer(void) +{ + iax_use_jitterbuffer = 1; +} + +void iax_disable_jitterbuffer(void) +{ + iax_use_jitterbuffer = 0; +} + void iax_set_private(struct iax_session *s, void *ptr) { s->pvt = ptr; @@ -2342,7 +2355,9 @@ /* insert into jitterbuffer */ /* TODO: Perhaps we could act immediately if it's not droppable and late */ - if ( e->etype == IAX_EVENT_VIDEO && video_bypass_jitterbuffer ) + if ( !iax_use_jitterbuffer || + (e->etype == IAX_EVENT_VIDEO && + video_bypass_jitterbuffer) ) { iax_sched_add(e, NULL, NULL, NULL, 0); return NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-17 16:09:57
|
Revision: 1309 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1309&view=rev Author: jpgrayson Date: 2007-12-17 08:10:00 -0800 (Mon, 17 Dec 2007) Log Message: ----------- Patch from Lee Howard. http://sourceforge.net/tracker/index.php?func=detail&aid=1850449&group_id=72851&atid=535896 Remove duplicate function definitions. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-14 04:49:05 UTC (rev 1308) +++ trunk/lib/libiax2/src/iax.c 2007-12-17 16:10:00 UTC (rev 1309) @@ -332,22 +332,6 @@ static int transfer_id = 1; /* for attended transfer */ -void iax_set_private(struct iax_session *s, void *ptr) -{ - s->pvt = ptr; -} - -void *iax_get_private(struct iax_session *s) -{ - return s->pvt; -} - -void iax_set_sendto(struct iax_session *s, iax_sendto_t ptr) -{ - s->sendto = ptr; -} - - unsigned int iax_session_get_capability(struct iax_session *s) { return s->capability; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-14 04:49:01
|
Revision: 1308 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1308&view=rev Author: dohpaz Date: 2007-12-13 20:49:05 -0800 (Thu, 13 Dec 2007) Log Message: ----------- Merge up to trunk r1307. Modified Paths: -------------- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c branches/team/elbunce/iaxclient/lib/video.c Modified: branches/team/elbunce/iaxclient/lib/iaxclient_lib.c =================================================================== --- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-12 22:19:44 UTC (rev 1307) +++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-14 04:49:05 UTC (rev 1308) @@ -139,8 +139,13 @@ MUTEXLOCK(&iaxc_lock); } +int try_iaxc_lock() +{ + return MUTEXTRYLOCK(&iaxc_lock); +} + // Unlock the library and post any events that were queued in the meantime -static void put_iaxc_lock() +void put_iaxc_lock() { iaxc_event *prev, *event; Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h 2007-12-12 22:19:44 UTC (rev 1307) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h 2007-12-14 04:49:05 UTC (rev 1308) @@ -17,6 +17,9 @@ #if defined(_MSC_VER) /* disable zero-sized array in struct/union warning */ #pragma warning(disable:4200) +#endif + +#ifdef WIN32 #define socklen_t int #endif Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-12 22:19:44 UTC (rev 1307) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-14 04:49:05 UTC (rev 1308) @@ -908,7 +908,7 @@ struct sockaddr_in sin; socklen_t sinlen; int flags; - int bufsize = 256 * 1024; + int bufsize = 128 * 1024; if (netfd > -1) { @@ -998,10 +998,18 @@ if (setsockopt(netfd, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, sizeof(bufsize)) < 0) { - DEBU(G "Unable to set buffer size."); - IAXERROR "Unable to set buffer size."); + DEBU(G "Unable to set receive buffer size."); + IAXERROR "Unable to set receive buffer size."); } + /* set send buffer size too */ + if (setsockopt(netfd, SOL_SOCKET, SO_SNDBUF, (char *)&bufsize, + sizeof(bufsize)) < 0) + { + DEBU(G "Unable to set send buffer size."); + IAXERROR "Unable to set send buffer size."); + } + portno = ntohs(sin.sin_port); DEBU(G "Started on port %d\n", portno); } Modified: branches/team/elbunce/iaxclient/lib/video.c =================================================================== --- branches/team/elbunce/iaxclient/lib/video.c 2007-12-12 22:19:44 UTC (rev 1307) +++ branches/team/elbunce/iaxclient/lib/video.c 2007-12-14 04:49:05 UTC (rev 1308) @@ -124,6 +124,10 @@ extern int test_mode; extern struct iaxc_call * calls; +/* to prevent clearing a call while in capture callback */ +extern __inline int try_iaxc_lock(); +extern __inline void put_iaxc_lock(); + EXPORT unsigned int iaxc_get_video_prefs(void) { return vinfo.prefs; @@ -644,20 +648,35 @@ 0); /* timestamp (ms) */ } + /* Don't block waiting for this lock. If the main thread has the lock + * for the purpose of dumping the call, it may request that video + * capture stop - which would block until this callback returned. + */ + if ( try_iaxc_lock() ) + { + /* give it a second try */ + iaxc_millisleep(5); + if ( try_iaxc_lock() ) + { + fprintf(stderr, "skipping processing of a video frame\n"); + return 0; + } + } + if ( selected_call < 0 ) - return 0; + goto callback_done; call = &calls[selected_call]; if ( !call || !(call->state & (IAXC_CALL_STATE_COMPLETE | IAXC_CALL_STATE_OUTGOING)) ) { - return 0; + goto callback_done; } if ( call->vformat == 0 ) { - return -1; + goto callback_failed; } if ( !need_encode ) @@ -674,7 +693,7 @@ call->vencoder = 0; } - return 0; + goto callback_done; } else { @@ -693,7 +712,8 @@ fprintf(stderr, "ERROR: failed to create codec " "for format 0x%08x\n", call->vformat); - return -1; + + goto callback_failed; } fprintf(stderr, "created encoder codec %s\n", @@ -705,7 +725,7 @@ &slice_set) ) { fprintf(stderr, "failed to encode captured video\n"); - return -1; + goto callback_failed; } } @@ -724,7 +744,7 @@ if ( !call->session ) { fprintf(stderr, "not sending video to sessionless call\n"); - return -1; + goto callback_failed; } for ( i = 0; i < slice_set.num_slices; ++i ) @@ -752,7 +772,7 @@ fprintf(stderr, "failed sending slice call %d " "size %d\n", selected_call, slice_set.size[i]); - return -1; + goto callback_failed; } /* More statistics */ @@ -768,7 +788,13 @@ maybe_send_stats(call); +callback_done: + put_iaxc_lock(); return 0; + +callback_failed: + put_iaxc_lock(); + return -1; } static int prepare_for_capture() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2007-12-12 22:19:41
|
Revision: 1307 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1307&view=rev Author: bcholew Date: 2007-12-12 14:19:44 -0800 (Wed, 12 Dec 2007) Log Message: ----------- Decrease socket buffer size from 256KB to 128KB. That seems like enough. Help avoid packet loss by increasing socket's output buffer to the same size as it's input buffer. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-12 22:13:49 UTC (rev 1306) +++ trunk/lib/libiax2/src/iax.c 2007-12-12 22:19:44 UTC (rev 1307) @@ -899,7 +899,7 @@ struct sockaddr_in sin; socklen_t sinlen; int flags; - int bufsize = 256 * 1024; + int bufsize = 128 * 1024; if (netfd > -1) { @@ -989,10 +989,18 @@ if (setsockopt(netfd, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, sizeof(bufsize)) < 0) { - DEBU(G "Unable to set buffer size."); - IAXERROR "Unable to set buffer size."); + DEBU(G "Unable to set receive buffer size."); + IAXERROR "Unable to set receive buffer size."); } + /* set send buffer size too */ + if (setsockopt(netfd, SOL_SOCKET, SO_SNDBUF, (char *)&bufsize, + sizeof(bufsize)) < 0) + { + DEBU(G "Unable to set send buffer size."); + IAXERROR "Unable to set send buffer size."); + } + portno = ntohs(sin.sin_port); DEBU(G "Started on port %d\n", portno); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2007-12-12 22:13:54
|
Revision: 1306 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1306&view=rev Author: bcholew Date: 2007-12-12 14:13:49 -0800 (Wed, 12 Dec 2007) Log Message: ----------- Use iaxc_lock to protect struct iaxc_call calls[] array from concurrent access by libvidcap's callback thread and main processing thread. Make put_iaxc_lock() not static - to allow video.c to call it. Add try_iaxc_lock(). Modified Paths: -------------- trunk/lib/iaxclient_lib.c trunk/lib/video.c Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-12-07 15:41:28 UTC (rev 1305) +++ trunk/lib/iaxclient_lib.c 2007-12-12 22:13:49 UTC (rev 1306) @@ -138,8 +138,13 @@ MUTEXLOCK(&iaxc_lock); } +int try_iaxc_lock() +{ + return MUTEXTRYLOCK(&iaxc_lock); +} + // Unlock the library and post any events that were queued in the meantime -static void put_iaxc_lock() +void put_iaxc_lock() { iaxc_event *prev, *event; Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-12-07 15:41:28 UTC (rev 1305) +++ trunk/lib/video.c 2007-12-12 22:13:49 UTC (rev 1306) @@ -123,6 +123,10 @@ extern int test_mode; extern struct iaxc_call * calls; +/* to prevent clearing a call while in capture callback */ +extern __inline int try_iaxc_lock(); +extern __inline void put_iaxc_lock(); + EXPORT unsigned int iaxc_get_video_prefs(void) { return vinfo.prefs; @@ -643,22 +647,37 @@ 0); /* timestamp (ms) */ } + /* Don't block waiting for this lock. If the main thread has the lock + * for the purpose of dumping the call, it may request that video + * capture stop - which would block until this callback returned. + */ + if ( try_iaxc_lock() ) + { + /* give it a second try */ + iaxc_millisleep(5); + if ( try_iaxc_lock() ) + { + fprintf(stderr, "skipping processing of a video frame\n"); + return 0; + } + } + if ( selected_call < 0 ) - return 0; + goto callback_done; call = &calls[selected_call]; if ( !call || !(call->state & (IAXC_CALL_STATE_COMPLETE | IAXC_CALL_STATE_OUTGOING)) ) { - return 0; + goto callback_done; } if ( call->vformat == 0 ) { fprintf(stderr, "video format not set for call %d\n", selected_call); - return -1; + goto callback_failed; } if ( !need_encode ) @@ -675,7 +694,7 @@ call->vencoder = 0; } - return 0; + goto callback_done; } else { @@ -694,7 +713,8 @@ fprintf(stderr, "ERROR: failed to create codec " "for format 0x%08x\n", call->vformat); - return -1; + + goto callback_failed; } fprintf(stderr, "created encoder codec %s\n", @@ -706,7 +726,7 @@ &slice_set) ) { fprintf(stderr, "failed to encode captured video\n"); - return -1; + goto callback_failed; } } @@ -725,7 +745,7 @@ if ( !call->session ) { fprintf(stderr, "not sending video to sessionless call\n"); - return -1; + goto callback_failed; } for ( i = 0; i < slice_set.num_slices; ++i ) @@ -753,7 +773,7 @@ fprintf(stderr, "failed sending slice call %d " "size %d\n", selected_call, slice_set.size[i]); - return -1; + goto callback_failed; } /* More statistics */ @@ -769,7 +789,13 @@ maybe_send_stats(call); +callback_done: + put_iaxc_lock(); return 0; + +callback_failed: + put_iaxc_lock(); + return -1; } static int prepare_for_capture() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-07 15:41:24
|
Revision: 1305 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1305&view=rev Author: jpgrayson Date: 2007-12-07 07:41:28 -0800 (Fri, 07 Dec 2007) Log Message: ----------- Fix mingw build problem (hopefully). Modified Paths: -------------- trunk/lib/libiax2/src/iax-client.h Modified: trunk/lib/libiax2/src/iax-client.h =================================================================== --- trunk/lib/libiax2/src/iax-client.h 2007-12-06 13:58:28 UTC (rev 1304) +++ trunk/lib/libiax2/src/iax-client.h 2007-12-07 15:41:28 UTC (rev 1305) @@ -17,6 +17,9 @@ #if defined(_MSC_VER) /* disable zero-sized array in struct/union warning */ #pragma warning(disable:4200) +#endif + +#ifdef WIN32 #define socklen_t int #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-06 13:58:28
|
Revision: 1304 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1304&view=rev Author: dohpaz Date: 2007-12-06 05:58:28 -0800 (Thu, 06 Dec 2007) Log Message: ----------- Start register refresh up to 3 seconds before expiration, allow time for resend. Modified Paths: -------------- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c Modified: branches/team/elbunce/iaxclient/lib/iaxclient_lib.c =================================================================== --- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-06 06:10:21 UTC (rev 1303) +++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-06 13:58:28 UTC (rev 1304) @@ -749,9 +749,9 @@ for ( cur = registrations; cur != NULL; cur = cur->next ) { - // If there is less than one second before the registration is about + // If there is less than three seconds before the registration is about // to expire, renew it. - if ( iaxci_usecdiff(&now, &cur->last) > (cur->refresh - 1) * 1000 *1000 ) + if ( iaxci_usecdiff(&now, &cur->last) > (cur->refresh - 3) * 1000 *1000 ) { if ( cur->session != NULL ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-06 06:10:20
|
Revision: 1303 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1303&view=rev Author: dohpaz Date: 2007-12-05 22:10:21 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Merge up to trunk of r1302. Modified Paths: -------------- branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h 2007-12-06 06:05:28 UTC (rev 1302) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax-client.h 2007-12-06 06:10:21 UTC (rev 1303) @@ -17,9 +17,6 @@ #if defined(_MSC_VER) /* disable zero-sized array in struct/union warning */ #pragma warning(disable:4200) -#endif - -#ifndef LINUX #define socklen_t int #endif Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-06 06:05:28 UTC (rev 1302) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-06 06:10:21 UTC (rev 1303) @@ -3113,7 +3113,7 @@ if (ntohs(fh->scallno) & IAX_FLAG_FULL) { /* Full size header */ - if (len < sizeof(struct ast_iax2_full_hdr)) { + if ((size_t)len < sizeof(struct ast_iax2_full_hdr)) { DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); return NULL; @@ -3132,7 +3132,7 @@ DEBU(G "No session?\n"); return NULL; } else { - if (len < sizeof(struct ast_iax2_mini_hdr)) { + if ((size_t)len < sizeof(struct ast_iax2_mini_hdr)) { DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); return NULL; Modified: branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c =================================================================== --- branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c 2007-12-06 06:05:28 UTC (rev 1302) +++ branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c 2007-12-06 06:10:21 UTC (rev 1303) @@ -1,18 +1,21 @@ /* -* vtestcall: make a single video test call with IAXCLIENT +* stresstest: simple program for applying IAX2 protocol stress to asterisk. * -* IAX Support for talking to Asterisk and other Gnophone clients +* Copyrights: +* Copyright (C) 2007, Wimba, Inc. * -* Copyright (C) 1999, Linux Support Services, Inc. -* -* Mark Spencer <mar...@li...> -* Stefano Falsetto <fal...@gn...> +* Contributors: * Mihai Balea <mihai AT hates DOT ms> +* Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of -* the GNU Lesser (Library) General Public License +* the GNU Lesser (Library) General Public License. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -256,7 +259,6 @@ char *dest = NULL; char *ogg_file = NULL; int loop = 0; - int callNo; /* install signal handler to catch CRTL-Cs */ signal(SIGINT, signal_handler); @@ -319,8 +321,11 @@ default: usage(); } - } else + } + else + { dest = argv[i]; + } } if ( dest == NULL ) @@ -341,6 +346,7 @@ iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); iaxc_set_test_mode(1); + if (iaxc_initialize(MAX_CALLS)) fatal_error("cannot initialize iaxclient!"); @@ -351,14 +357,12 @@ iaxc_set_event_callback(test_mode_callback); // Crank the engine - iaxc_start_processing_thread(); + if ( iaxc_start_processing_thread() < 0 ) + fatal_error("failed iaxc_start_processing_thread()\n"); // Dial out - callNo = iaxc_call(dest); - if (callNo <= 0) - iaxc_select_call(callNo); - else - mylog("Failed to make call to '%s'", dest); + if ( iaxc_call(dest) < 0 ) + fatal_error("failed iaxc_call()"); // Wait for the call to be established; while ( !call_established && running ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-06 06:05:29
|
Revision: 1302 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1302&view=rev Author: dohpaz Date: 2007-12-05 22:05:28 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Add iaxc_register_ex() API to support passing a registration refresh time. Tweak transfer diagnostics. Modified Paths: -------------- branches/team/elbunce/iaxclient/lib/iaxclient.h branches/team/elbunce/iaxclient/lib/iaxclient_lib.c branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c Modified: branches/team/elbunce/iaxclient/lib/iaxclient.h =================================================================== --- branches/team/elbunce/iaxclient/lib/iaxclient.h 2007-12-05 23:36:59 UTC (rev 1301) +++ branches/team/elbunce/iaxclient/lib/iaxclient.h 2007-12-06 06:05:28 UTC (rev 1302) @@ -793,6 +793,17 @@ EXPORT int iaxc_register(const char * user, const char * pass, const char * host); /*! + Registers the IAXClient instance with an IAX server + \param user The username to register as + \param pass The password to register with + \param host The address of the host/peer to register with + \param refresh The registration refresh period + + \return The registration id number upon success; -1 otherwise. +*/ +EXPORT int iaxc_register_ex(const char * user, const char * pass, const char * host, int refresh); + +/*! Respond to incoming call \a callNo as busy. */ EXPORT void iaxc_send_busy_on_incoming_call(int callNo); Modified: branches/team/elbunce/iaxclient/lib/iaxclient_lib.c =================================================================== --- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-05 23:36:59 UTC (rev 1301) +++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-06 06:05:28 UTC (rev 1302) @@ -80,8 +80,6 @@ struct iaxc_registration *next; }; -static int registration_timeout = 60; - static int next_registration_id = 0; static struct iaxc_registration *registrations = NULL; @@ -753,7 +751,7 @@ { // If there is less than one second before the registration is about // to expire, renew it. - if ( iaxci_usecdiff(&now, &cur->last) > cur->refresh - 1 * 1000 *1000 ) + if ( iaxci_usecdiff(&now, &cur->last) > (cur->refresh - 1) * 1000 *1000 ) { if ( cur->session != NULL ) { @@ -765,7 +763,7 @@ iaxci_usermsg(IAXC_ERROR, "Can't make new registration session"); return; } - iax_register(cur->session, cur->host, cur->user, cur->pass, registration_timeout); + iax_register(cur->session, cur->host, cur->user, cur->pass, cur->refresh); cur->last = now; } } @@ -1247,6 +1245,11 @@ EXPORT int iaxc_register(const char * user, const char * pass, const char * host) { + iaxc_register_ex(user, pass, host, 60); +} + +EXPORT int iaxc_register_ex(const char * user, const char * pass, const char * host, int refresh) +{ struct iaxc_registration *newreg; newreg = (struct iaxc_registration *)malloc(sizeof (struct iaxc_registration)); @@ -1266,14 +1269,14 @@ } gettimeofday(&newreg->last,NULL); - newreg->refresh = (registration_timeout - 2) *1000*1000; /* 2 seconds before registration timeout, in usecs */ + newreg->refresh = refresh; strncpy(newreg->host, host, 256); strncpy(newreg->user, user, 256); strncpy(newreg->pass, pass, 256); - /* send out the initial registration with registration_timeout seconds */ - iax_register(newreg->session, host, user, pass, registration_timeout); + /* send out the initial registration with refresh seconds */ + iax_register(newreg->session, host, user, pass, refresh); /* add it to the list; */ newreg->id = ++next_registration_id; Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-05 23:36:59 UTC (rev 1301) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-06 06:05:28 UTC (rev 1302) @@ -1429,8 +1429,8 @@ s1->transferpeer = s0->callno; DEBU(G "iax_setup_transfer(%d, %d) transfer_id=%d\n", s0->callno, s1->callno, transfer_id); - DEBU(G "\torg: callno=%d peercallno=%d peeraddr=%s\n", s0->callno, s0->peercallno, inet_ntoa(s0->peeraddr.sin_addr)); - DEBU(G "\tnew: callno=%d peercallno=%d peeraddr=%s\n", s1->callno, s1->peercallno, inet_ntoa(s1->peeraddr.sin_addr)); + DEBU(G "\torg: callno=%d peercallno=%d peeraddr=%s peerport=%d\n", s0->callno, s0->peercallno, inet_ntoa(s0->peeraddr.sin_addr), ntohs(s0->peeraddr.sin_port)); + DEBU(G "\tnew: callno=%d peercallno=%d peeraddr=%s peerport=%d\n", s1->callno, s1->peercallno, inet_ntoa(s1->peeraddr.sin_addr), ntohs(s1->peeraddr.sin_port)); res = send_command(s0, AST_FRAME_IAX, IAX_COMMAND_TXREQ, 0, ied0.buf, ied0.pos, -1); if (res < 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-05 23:36:55
|
Revision: 1301 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1301&view=rev Author: jpgrayson Date: 2007-12-05 15:36:59 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Use cast to avoid signed/unsigned comparison warnings. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-05 23:36:23 UTC (rev 1300) +++ trunk/lib/libiax2/src/iax.c 2007-12-05 23:36:59 UTC (rev 1301) @@ -3102,7 +3102,7 @@ if (ntohs(fh->scallno) & IAX_FLAG_FULL) { /* Full size header */ - if (len < sizeof(struct ast_iax2_full_hdr)) { + if ((size_t)len < sizeof(struct ast_iax2_full_hdr)) { DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); return NULL; @@ -3121,7 +3121,7 @@ DEBU(G "No session?\n"); return NULL; } else { - if (len < sizeof(struct ast_iax2_mini_hdr)) { + if ((size_t)len < sizeof(struct ast_iax2_mini_hdr)) { DEBU(G "Short header received from %s\n", inet_ntoa(sin->sin_addr)); IAXERROR "Short header received from %s\n", inet_ntoa(sin->sin_addr)); return NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-05 23:36:18
|
Revision: 1300 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1300&view=rev Author: jpgrayson Date: 2007-12-05 15:36:23 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Only redefine socklen_t when using Microsoft's compiler. Modified Paths: -------------- trunk/lib/libiax2/src/iax-client.h Modified: trunk/lib/libiax2/src/iax-client.h =================================================================== --- trunk/lib/libiax2/src/iax-client.h 2007-12-05 23:29:41 UTC (rev 1299) +++ trunk/lib/libiax2/src/iax-client.h 2007-12-05 23:36:23 UTC (rev 1300) @@ -17,9 +17,6 @@ #if defined(_MSC_VER) /* disable zero-sized array in struct/union warning */ #pragma warning(disable:4200) -#endif - -#ifndef LINUX #define socklen_t int #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-12-05 23:29:37
|
Revision: 1299 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1299&view=rev Author: jpgrayson Date: 2007-12-05 15:29:41 -0800 (Wed, 05 Dec 2007) Log Message: ----------- Fix header. Improve error checking. Modified Paths: -------------- trunk/simpleclient/stresstest/stresstest.c Modified: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- trunk/simpleclient/stresstest/stresstest.c 2007-12-04 13:24:13 UTC (rev 1298) +++ trunk/simpleclient/stresstest/stresstest.c 2007-12-05 23:29:41 UTC (rev 1299) @@ -1,18 +1,21 @@ /* -* vtestcall: make a single video test call with IAXCLIENT +* stresstest: simple program for applying IAX2 protocol stress to asterisk. * -* IAX Support for talking to Asterisk and other Gnophone clients +* Copyrights: +* Copyright (C) 2007, Wimba, Inc. * -* Copyright (C) 1999, Linux Support Services, Inc. -* -* Mark Spencer <mar...@li...> -* Stefano Falsetto <fal...@gn...> +* Contributors: * Mihai Balea <mihai AT hates DOT ms> +* Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of -* the GNU Lesser (Library) General Public License +* the GNU Lesser (Library) General Public License. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -256,7 +259,6 @@ char *dest = NULL; char *ogg_file = NULL; int loop = 0; - int callNo; /* install signal handler to catch CRTL-Cs */ signal(SIGINT, signal_handler); @@ -319,8 +321,11 @@ default: usage(); } - } else + } + else + { dest = argv[i]; + } } if ( dest == NULL ) @@ -341,6 +346,7 @@ iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); iaxc_set_test_mode(1); + if (iaxc_initialize(MAX_CALLS)) fatal_error("cannot initialize iaxclient!"); @@ -351,14 +357,12 @@ iaxc_set_event_callback(test_mode_callback); // Crank the engine - iaxc_start_processing_thread(); + if ( iaxc_start_processing_thread() < 0 ) + fatal_error("failed iaxc_start_processing_thread()\n"); // Dial out - callNo = iaxc_call(dest); - if (callNo <= 0) - iaxc_select_call(callNo); - else - mylog("Failed to make call to '%s'", dest); + if ( iaxc_call(dest) < 0 ) + fatal_error("failed iaxc_call()"); // Wait for the call to be established; while ( !call_established && running ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-04 13:24:08
|
Revision: 1298 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1298&view=rev Author: dohpaz Date: 2007-12-04 05:24:13 -0800 (Tue, 04 Dec 2007) Log Message: ----------- Use consistant registration timeout. Schedule registration refresh 2 seconds before expiration to better allow for packet retry. Modified Paths: -------------- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c Modified: branches/team/elbunce/iaxclient/lib/iaxclient_lib.c =================================================================== --- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-04 05:15:51 UTC (rev 1297) +++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-12-04 13:24:13 UTC (rev 1298) @@ -80,6 +80,8 @@ struct iaxc_registration *next; }; +static int registration_timeout = 60; + static int next_registration_id = 0; static struct iaxc_registration *registrations = NULL; @@ -763,7 +765,7 @@ iaxci_usermsg(IAXC_ERROR, "Can't make new registration session"); return; } - iax_register(cur->session, cur->host, cur->user, cur->pass, 60); + iax_register(cur->session, cur->host, cur->user, cur->pass, registration_timeout); cur->last = now; } } @@ -1264,14 +1266,14 @@ } gettimeofday(&newreg->last,NULL); - newreg->refresh = 60*1000*1000; /* 60 seconds, in usecs */ + newreg->refresh = (registration_timeout - 2) *1000*1000; /* 2 seconds before registration timeout, in usecs */ strncpy(newreg->host, host, 256); strncpy(newreg->user, user, 256); strncpy(newreg->pass, pass, 256); - /* send out the initial registration timeout 300 seconds */ - iax_register(newreg->session, host, user, pass, 300); + /* send out the initial registration with registration_timeout seconds */ + iax_register(newreg->session, host, user, pass, registration_timeout); /* add it to the list; */ newreg->id = ++next_registration_id; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-04 05:15:48
|
Revision: 1297 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1297&view=rev Author: dohpaz Date: 2007-12-03 21:15:51 -0800 (Mon, 03 Dec 2007) Log Message: ----------- Merge up to trunk of r1296. Modified Paths: -------------- branches/team/elbunce/iaxclient/contrib/win/vs2005/libiaxclient.vcproj branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c branches/team/elbunce/iaxclient/lib/video.c Removed Paths: ------------- branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.vcproj Property Changed: ---------------- branches/team/elbunce/iaxclient/contrib/win/vs2005/testcall.vcproj branches/team/elbunce/iaxclient/simpleclient/iaxcomm/QUICKSTART branches/team/elbunce/iaxclient/simpleclient/iaxcomm/iaxcomm.htb branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP0.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP1.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP2.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP3.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP4.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP5.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP6.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP7.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP8.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP9.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KPPOUND.bmp branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KPSTAR.bmp Modified: branches/team/elbunce/iaxclient/contrib/win/vs2005/libiaxclient.vcproj =================================================================== --- branches/team/elbunce/iaxclient/contrib/win/vs2005/libiaxclient.vcproj 2007-12-03 16:27:40 UTC (rev 1296) +++ branches/team/elbunce/iaxclient/contrib/win/vs2005/libiaxclient.vcproj 2007-12-04 05:15:51 UTC (rev 1297) @@ -40,7 +40,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -104,7 +104,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" RuntimeLibrary="2" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -167,7 +167,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" RuntimeLibrary="2" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -239,7 +239,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" Property changes on: branches/team/elbunce/iaxclient/contrib/win/vs2005/testcall.vcproj ___________________________________________________________________ Name: svn:executable - * Modified: branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c =================================================================== --- branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-03 16:27:40 UTC (rev 1296) +++ branches/team/elbunce/iaxclient/lib/libiax2/src/iax.c 2007-12-04 05:15:51 UTC (rev 1297) @@ -488,6 +488,10 @@ s->sendto = iax_sendto; s->pingid = -1; +#ifdef USE_VOICE_TS_PREDICTION + s->nextpred = 0; +#endif + s->jb = jb_new(); if ( !s->jb ) { @@ -546,13 +550,14 @@ static void add_ms(struct timeval *tv, int ms) { tv->tv_usec += ms * 1000; - if(tv->tv_usec > 1000000) { - tv->tv_usec -= 1000000; - tv->tv_sec++; + if (tv->tv_usec > 999999) { + tv->tv_sec += tv->tv_usec / 1000000; + tv->tv_usec %= 1000000; } - if(tv->tv_usec < 0) { - tv->tv_usec += 1000000; - tv->tv_sec--; + + if (tv->tv_usec < 0) { + tv->tv_sec += (tv->tv_usec / 1000000 - 1); + tv->tv_usec = (tv->tv_usec % 1000000) + 1000000; } } #endif @@ -653,7 +658,7 @@ #ifdef USE_VOICE_TS_PREDICTION /* set next predicted ts based on 8khz samples */ if(voice) - session->nextpred = session->nextpred + f->samples / 8; + session->nextpred += f->samples / 8; #endif return ms; Modified: branches/team/elbunce/iaxclient/lib/video.c =================================================================== --- branches/team/elbunce/iaxclient/lib/video.c 2007-12-03 16:27:40 UTC (rev 1296) +++ branches/team/elbunce/iaxclient/lib/video.c 2007-12-04 05:15:51 UTC (rev 1297) @@ -563,7 +563,7 @@ * vidcap_src_release() fails during capture. * * We'll defer the release until the end-application's main thread - * requires the release - if either iaxc_set_video_prefs(), + * requires the release - if either iaxc_set_video_prefs(), * iaxc_video_device_set() or video_destroy() are called. */ @@ -572,6 +572,12 @@ return -1; } + if ( cap_info->video_data_size < 1 ) + { + fprintf(stderr, "FYI: callback with no data\n"); + return 0; + } + if ( vinfo.prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE ) return 0; @@ -1019,7 +1025,7 @@ capture_callback, 0)) ) { MUTEXUNLOCK(&vinfo.camera_lock); - fprintf(stderr, "failed to start video capture: %d\n", + fprintf(stderr, "failed to start video capture: %d\n", ret); return -1; } @@ -1322,8 +1328,8 @@ } EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, - int *num_devs, int *id_selected) -{ + int *num_devs, int *id_selected) +{ int new_device_count; int old_device_count; struct vidcap_src_info *new_src_list; @@ -1331,13 +1337,15 @@ struct iaxc_video_device *new_iaxc_dev_list; struct iaxc_video_device *old_iaxc_dev_list; int found_selected_device = 0; - int list_changed = 0; + int list_changed; int i, n; + if ( !vinfo.sapi ) + return -1; + /* update libvidcap's device list */ new_device_count = vidcap_src_list_update(vinfo.sapi); - if ( new_device_count != vinfo.device_count ) - list_changed = 1; + list_changed = new_device_count != vinfo.device_count; if ( new_device_count < 0 ) { @@ -1346,16 +1354,17 @@ return -1; } - new_src_list = (struct vidcap_src_info *)malloc(new_device_count * - sizeof(struct vidcap_src_info)); + new_src_list = calloc(new_device_count, sizeof(struct vidcap_src_info)); + if ( !new_src_list ) { fprintf(stderr, "ERROR: failed updated source allocation\n"); return -1; } - new_iaxc_dev_list = (struct iaxc_video_device *)malloc( - new_device_count * sizeof(struct iaxc_video_device)); + new_iaxc_dev_list = calloc(new_device_count, + sizeof(struct iaxc_video_device)); + if ( !new_iaxc_dev_list ) { free(new_src_list); @@ -1366,7 +1375,7 @@ /* get an updated libvidcap device list */ if ( vidcap_src_list_get(vinfo.sapi, new_device_count, new_src_list) ) { - fprintf(stderr, "ERROR: failed vidcap_srcList_get()\n"); + fprintf(stderr, "ERROR: failed vidcap_srcList_get().\n"); free(new_src_list); free(new_iaxc_dev_list); @@ -1374,7 +1383,6 @@ } /* build a new iaxclient video source list */ - found_selected_device = 0; for ( n = 0; n < new_device_count; n++ ) { new_iaxc_dev_list[n].name = strdup(new_src_list[n].description); @@ -1454,11 +1462,11 @@ *num_devs = vinfo.device_count; *id_selected = vinfo.selected_device_id; - return list_changed; -} + return list_changed; +} -EXPORT int iaxc_video_device_set(int capture_dev_id) -{ +EXPORT int iaxc_video_device_set(int capture_dev_id) +{ int ret = 0; int dev_num = 0; @@ -1584,16 +1592,18 @@ goto bail; } - vinfo.vc_src_info = (struct vidcap_src_info *)malloc(vinfo.device_count * + vinfo.vc_src_info = calloc(vinfo.device_count, sizeof(struct vidcap_src_info)); + if ( !vinfo.vc_src_info ) { fprintf(stderr, "ERROR: failed vinfo field allocations\n"); goto bail; } - vinfo.devices = (struct iaxc_video_device *)malloc(vinfo.device_count * + vinfo.devices = calloc(vinfo.device_count, sizeof(struct iaxc_video_device)); + if ( !vinfo.devices ) { fprintf(stderr, "ERROR: failed vinfo field allocation\n"); @@ -1637,7 +1647,7 @@ fprintf(stderr, "ERROR: failed vidcap_srcs_notify()\n"); goto late_bail; } - + vinfo.prefs = IAXC_VIDEO_PREF_RECV_LOCAL_RAW | IAXC_VIDEO_PREF_RECV_REMOTE_RAW | @@ -1657,6 +1667,11 @@ free(vinfo.devices); bail: + if ( vinfo.sapi ) + { + vidcap_sapi_release(vinfo.sapi); + vinfo.sapi = 0; + } vidcap_destroy(vinfo.vc); vinfo.vc = 0; return -1; @@ -1682,7 +1697,7 @@ if ( vinfo.src ) vidcap_src_release(vinfo.src); - + vidcap_destroy(vinfo.vc); vinfo.vc = 0; @@ -1723,7 +1738,7 @@ * we are saying that the "camera is working" if there exists * more than zero cameras. */ - return vidcap_src_list_update(vinfo.sapi) > 0; + return vinfo.sapi && vidcap_src_list_update(vinfo.sapi) > 0; } int video_send_stats(struct iaxc_call * call) @@ -1757,27 +1772,27 @@ EXPORT int iaxc_push_video(void *data, unsigned int size, int fragment) { struct iaxc_call *call; - + if (selected_call < 0) return -1; - + call = &calls[selected_call]; if ( vinfo.prefs & IAXC_VIDEO_PREF_SEND_DISABLE ) return 0; - + //fprintf(stderr, "iaxc_push_video: sending video size %d\n", size); - + // Fragment if needed if ( fragment ) { static struct slice_set_t slice_set; int i; - + if ( !vinfo.sc ) vinfo.sc = create_slicer_context((unsigned short)rand(), vfinfo.fragsize); - + slice(data, size, &slice_set, vinfo.sc); for ( i = 0 ; i < slice_set.num_slices ; i++ ) { Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/QUICKSTART ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/iaxcomm.htb ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP0.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP1.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP2.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP3.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP4.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP5.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP6.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP7.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP8.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KP9.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KPPOUND.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: branches/team/elbunce/iaxclient/simpleclient/iaxcomm/rc/bitmaps/KPSTAR.bmp ___________________________________________________________________ Name: svn:executable - * Deleted: branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.vcproj =================================================================== --- branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.vcproj 2007-12-03 16:27:40 UTC (rev 1296) +++ branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.vcproj 2007-12-04 05:15:51 UTC (rev 1297) @@ -1,235 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="vtestcall" - ProjectGUID="{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" - RootNamespace="vtestcall" - Keyword="ManagedCProj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\debug" - IntermediateDirectory=".\debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - ManagedExtensions="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" - MinimalRebuild="false" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - BufferSecurityCheck="false" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - CompileAs="2" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - IgnoreImportLibrary="false" - AdditionalOptions="/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCD.lib " - AdditionalDependencies="dsound.lib iaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib videolib.lib libiax2.lib gsm.lib portaudio.lib libspeex.lib strmiids.lib portmixerd.lib" - ShowProgress="0" - OutputFile="$(OutDir)\$(ProjectName).exe" - LinkIncremental="2" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\lib\Debug;"$(SDL_DIR)\lib";"$(PSDK_DIR)\lib";..\..\lib\portmixer\winproj" - IgnoreAllDefaultLibraries="false" - GenerateDebugInformation="true" - AssemblyDebug="0" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="release" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - ManagedExtensions="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" - MinimalRebuild="false" - BasicRuntimeChecks="0" - RuntimeLibrary="2" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="dsound.lib iaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib videolib.lib libiax2.lib gsm.lib portaudio.lib libspeex.lib strmiids.lib portmixer.lib" - LinkIncremental="1" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\lib\Release;"$(SDL_DIR)\lib";"$(PSDK_DIR)\lib";..\..\lib\portmixer\winproj" - IgnoreDefaultLibraryNames="msvcrtd.lib;msvcrt.lib;libcmtd.lib" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - <AssemblyReference - RelativePath="mscorlib.dll" - AssemblyName="mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=IA64" - /> - <AssemblyReference - RelativePath="System.dll" - AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" - /> - <AssemblyReference - RelativePath="System.Data.dll" - AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" - /> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\vtestcall.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="1" - /> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </Filter> - <File - RelativePath=".\ReadMe.txt" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2007-12-03 16:27:35
|
Revision: 1296 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1296&view=rev Author: bcholew Date: 2007-12-03 08:27:40 -0800 (Mon, 03 Dec 2007) Log Message: ----------- Initialize session variable - avoiding possible garbage in calc_timestamp(). Reduce assumptions made in add_ms(), and don't permit tv_usec to exceed 999999. Modified Paths: -------------- trunk/lib/libiax2/src/iax.c Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-03 15:55:43 UTC (rev 1295) +++ trunk/lib/libiax2/src/iax.c 2007-12-03 16:27:40 UTC (rev 1296) @@ -481,6 +481,10 @@ s->sendto = iax_sendto; s->pingid = -1; +#ifdef USE_VOICE_TS_PREDICTION + s->nextpred = 0; +#endif + s->jb = jb_new(); if ( !s->jb ) { @@ -539,13 +543,14 @@ static void add_ms(struct timeval *tv, int ms) { tv->tv_usec += ms * 1000; - if(tv->tv_usec > 1000000) { - tv->tv_usec -= 1000000; - tv->tv_sec++; + if (tv->tv_usec > 999999) { + tv->tv_sec += tv->tv_usec / 1000000; + tv->tv_usec %= 1000000; } - if(tv->tv_usec < 0) { - tv->tv_usec += 1000000; - tv->tv_sec--; + + if (tv->tv_usec < 0) { + tv->tv_sec += (tv->tv_usec / 1000000 - 1); + tv->tv_usec = (tv->tv_usec % 1000000) + 1000000; } } #endif @@ -646,7 +651,7 @@ #ifdef USE_VOICE_TS_PREDICTION /* set next predicted ts based on 8khz samples */ if(voice) - session->nextpred = session->nextpred + f->samples / 8; + session->nextpred += f->samples / 8; #endif return ms; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2007-12-03 15:55:38
|
Revision: 1295 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1295&view=rev Author: bcholew Date: 2007-12-03 07:55:43 -0800 (Mon, 03 Dec 2007) Log Message: ----------- Screen-out video capture callbacks with no data. Protect against case of no sapi when getting the video device list. Use calloc instead of malloc. Remove some C99-isms. Whitespace. Modified Paths: -------------- trunk/lib/video.c Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-11-30 13:07:16 UTC (rev 1294) +++ trunk/lib/video.c 2007-12-03 15:55:43 UTC (rev 1295) @@ -562,7 +562,7 @@ * vidcap_src_release() fails during capture. * * We'll defer the release until the end-application's main thread - * requires the release - if either iaxc_set_video_prefs(), + * requires the release - if either iaxc_set_video_prefs(), * iaxc_video_device_set() or video_destroy() are called. */ @@ -571,6 +571,12 @@ return -1; } + if ( cap_info->video_data_size < 1 ) + { + fprintf(stderr, "FYI: callback with no data\n"); + return 0; + } + if ( vinfo.prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE ) return 0; @@ -1018,7 +1024,7 @@ capture_callback, 0)) ) { MUTEXUNLOCK(&vinfo.camera_lock); - fprintf(stderr, "failed to start video capture: %d\n", + fprintf(stderr, "failed to start video capture: %d\n", ret); return -1; } @@ -1321,8 +1327,8 @@ } EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, - int *num_devs, int *id_selected) -{ + int *num_devs, int *id_selected) +{ int new_device_count; int old_device_count; struct vidcap_src_info *new_src_list; @@ -1330,13 +1336,15 @@ struct iaxc_video_device *new_iaxc_dev_list; struct iaxc_video_device *old_iaxc_dev_list; int found_selected_device = 0; - int list_changed = 0; + int list_changed; int i, n; + if ( !vinfo.sapi ) + return -1; + /* update libvidcap's device list */ new_device_count = vidcap_src_list_update(vinfo.sapi); - if ( new_device_count != vinfo.device_count ) - list_changed = 1; + list_changed = new_device_count != vinfo.device_count; if ( new_device_count < 0 ) { @@ -1345,16 +1353,17 @@ return -1; } - new_src_list = (struct vidcap_src_info *)malloc(new_device_count * - sizeof(struct vidcap_src_info)); + new_src_list = calloc(new_device_count, sizeof(struct vidcap_src_info)); + if ( !new_src_list ) { fprintf(stderr, "ERROR: failed updated source allocation\n"); return -1; } - new_iaxc_dev_list = (struct iaxc_video_device *)malloc( - new_device_count * sizeof(struct iaxc_video_device)); + new_iaxc_dev_list = calloc(new_device_count, + sizeof(struct iaxc_video_device)); + if ( !new_iaxc_dev_list ) { free(new_src_list); @@ -1365,7 +1374,7 @@ /* get an updated libvidcap device list */ if ( vidcap_src_list_get(vinfo.sapi, new_device_count, new_src_list) ) { - fprintf(stderr, "ERROR: failed vidcap_srcList_get()\n"); + fprintf(stderr, "ERROR: failed vidcap_srcList_get().\n"); free(new_src_list); free(new_iaxc_dev_list); @@ -1373,7 +1382,6 @@ } /* build a new iaxclient video source list */ - found_selected_device = 0; for ( n = 0; n < new_device_count; n++ ) { new_iaxc_dev_list[n].name = strdup(new_src_list[n].description); @@ -1453,11 +1461,11 @@ *num_devs = vinfo.device_count; *id_selected = vinfo.selected_device_id; - return list_changed; -} + return list_changed; +} -EXPORT int iaxc_video_device_set(int capture_dev_id) -{ +EXPORT int iaxc_video_device_set(int capture_dev_id) +{ int ret = 0; int dev_num = 0; @@ -1583,16 +1591,18 @@ goto bail; } - vinfo.vc_src_info = (struct vidcap_src_info *)malloc(vinfo.device_count * + vinfo.vc_src_info = calloc(vinfo.device_count, sizeof(struct vidcap_src_info)); + if ( !vinfo.vc_src_info ) { fprintf(stderr, "ERROR: failed vinfo field allocations\n"); goto bail; } - vinfo.devices = (struct iaxc_video_device *)malloc(vinfo.device_count * + vinfo.devices = calloc(vinfo.device_count, sizeof(struct iaxc_video_device)); + if ( !vinfo.devices ) { fprintf(stderr, "ERROR: failed vinfo field allocation\n"); @@ -1636,7 +1646,7 @@ fprintf(stderr, "ERROR: failed vidcap_srcs_notify()\n"); goto late_bail; } - + vinfo.prefs = IAXC_VIDEO_PREF_RECV_LOCAL_RAW | IAXC_VIDEO_PREF_RECV_REMOTE_RAW | @@ -1656,6 +1666,11 @@ free(vinfo.devices); bail: + if ( vinfo.sapi ) + { + vidcap_sapi_release(vinfo.sapi); + vinfo.sapi = 0; + } vidcap_destroy(vinfo.vc); vinfo.vc = 0; return -1; @@ -1681,7 +1696,7 @@ if ( vinfo.src ) vidcap_src_release(vinfo.src); - + vidcap_destroy(vinfo.vc); vinfo.vc = 0; @@ -1722,7 +1737,7 @@ * we are saying that the "camera is working" if there exists * more than zero cameras. */ - return vidcap_src_list_update(vinfo.sapi) > 0; + return vinfo.sapi && vidcap_src_list_update(vinfo.sapi) > 0; } int video_send_stats(struct iaxc_call * call) @@ -1756,27 +1771,27 @@ EXPORT int iaxc_push_video(void *data, unsigned int size, int fragment) { struct iaxc_call *call; - + if (selected_call < 0) return -1; - + call = &calls[selected_call]; if ( vinfo.prefs & IAXC_VIDEO_PREF_SEND_DISABLE ) return 0; - + //fprintf(stderr, "iaxc_push_video: sending video size %d\n", size); - + // Fragment if needed if ( fragment ) { static struct slice_set_t slice_set; int i; - + if ( !vinfo.sc ) vinfo.sc = create_slicer_context((unsigned short)rand(), vfinfo.fragsize); - + slice(data, size, &slice_set, vinfo.sc); for ( i = 0 ; i < slice_set.num_slices ; i++ ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-11-30 13:07:20
|
Revision: 1294 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1294&view=rev Author: jpgrayson Date: 2007-11-30 05:07:16 -0800 (Fri, 30 Nov 2007) Log Message: ----------- Remove bogus vcproj file. Removed Paths: ------------- trunk/simpleclient/stresstest/stresstest.vcproj Deleted: trunk/simpleclient/stresstest/stresstest.vcproj =================================================================== --- trunk/simpleclient/stresstest/stresstest.vcproj 2007-11-28 21:04:34 UTC (rev 1293) +++ trunk/simpleclient/stresstest/stresstest.vcproj 2007-11-30 13:07:16 UTC (rev 1294) @@ -1,235 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="vtestcall" - ProjectGUID="{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" - RootNamespace="vtestcall" - Keyword="ManagedCProj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\debug" - IntermediateDirectory=".\debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - ManagedExtensions="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" - MinimalRebuild="false" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - BufferSecurityCheck="false" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - CompileAs="2" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - IgnoreImportLibrary="false" - AdditionalOptions="/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCD.lib " - AdditionalDependencies="dsound.lib iaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib videolib.lib libiax2.lib gsm.lib portaudio.lib libspeex.lib strmiids.lib portmixerd.lib" - ShowProgress="0" - OutputFile="$(OutDir)\$(ProjectName).exe" - LinkIncremental="2" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\lib\Debug;"$(SDL_DIR)\lib";"$(PSDK_DIR)\lib";..\..\lib\portmixer\winproj" - IgnoreAllDefaultLibraries="false" - GenerateDebugInformation="true" - AssemblyDebug="0" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="release" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - ManagedExtensions="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" - MinimalRebuild="false" - BasicRuntimeChecks="0" - RuntimeLibrary="2" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="dsound.lib iaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib videolib.lib libiax2.lib gsm.lib portaudio.lib libspeex.lib strmiids.lib portmixer.lib" - LinkIncremental="1" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\lib\Release;"$(SDL_DIR)\lib";"$(PSDK_DIR)\lib";..\..\lib\portmixer\winproj" - IgnoreDefaultLibraryNames="msvcrtd.lib;msvcrt.lib;libcmtd.lib" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - <AssemblyReference - RelativePath="mscorlib.dll" - AssemblyName="mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=IA64" - /> - <AssemblyReference - RelativePath="System.dll" - AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" - /> - <AssemblyReference - RelativePath="System.Data.dll" - AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" - /> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\vtestcall.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="1" - /> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </Filter> - <File - RelativePath=".\ReadMe.txt" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-11-28 21:04:34
|
Revision: 1293 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1293&view=rev Author: jpgrayson Date: 2007-11-28 13:04:34 -0800 (Wed, 28 Nov 2007) Log Message: ----------- Adjust version to 2.0.2. Modified Paths: -------------- tags/2.0.2/configure.ac Modified: tags/2.0.2/configure.ac =================================================================== --- tags/2.0.2/configure.ac 2007-11-28 21:03:08 UTC (rev 1292) +++ tags/2.0.2/configure.ac 2007-11-28 21:04:34 UTC (rev 1293) @@ -3,7 +3,7 @@ AC_PREREQ(2.59) dnl Package version -m4_define(IAXC_VERSION, [2.0-svn]) +m4_define(IAXC_VERSION, [2.0.2]) AC_INIT(iaxclient, IAXC_VERSION, [jpg...@gm...]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-11-28 21:03:03
|
Revision: 1292 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1292&view=rev Author: jpgrayson Date: 2007-11-28 13:03:08 -0800 (Wed, 28 Nov 2007) Log Message: ----------- Tag iaxclient 2.0.2. Added Paths: ----------- tags/2.0.2/ Copied: tags/2.0.2 (from rev 1291, branches/2.0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |