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: <sb...@us...> - 2007-10-18 16:33:17
|
Revision: 1211 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1211&view=rev Author: sbalea Date: 2007-10-18 09:33:21 -0700 (Thu, 18 Oct 2007) Log Message: ----------- Fix IAX2 registration issue. Modified Paths: -------------- branches/team/mihai/echocan/lib/iaxclient_lib.c Modified: branches/team/mihai/echocan/lib/iaxclient_lib.c =================================================================== --- branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-10-17 19:59:12 UTC (rev 1210) +++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-10-18 16:33:21 UTC (rev 1211) @@ -1770,8 +1770,13 @@ #endif // first, see if this is an event for one of our calls. callNo = iaxc_find_call_by_session(e->session); - if ( callNo >= 0 ) + if ( e->etype == IAX_EVENT_NULL ) { + // Should we do something here? + // Right now we do nothing, just go with the flow + // and let the event be deallocated. + } else if ( callNo >= 0 ) + { iaxc_handle_network_event(e, callNo); } else if ( (reg = iaxc_find_registration_by_session(e->session)) != NULL ) { @@ -1791,11 +1796,6 @@ iaxci_usermsg(IAXC_STATUS, "Timeout for a non-existant session. Dropping", e->etype); - } else if ( e->etype == IAX_EVENT_NULL ) - { - // Should we do something here? - // Right now we do nothing, just go with the flow - // and let the event be deallocated. } else { iaxci_usermsg(IAXC_STATUS, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-17 19:59:08
|
Revision: 1210 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1210&view=rev Author: dohpaz Date: 2007-10-17 12:59:12 -0700 (Wed, 17 Oct 2007) Log Message: ----------- Make a copy of the current trunk for my audio work Added Paths: ----------- branches/team/elbunce/iaxclient/ Copied: branches/team/elbunce/iaxclient (from rev 1209, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-17 19:57:52
|
Revision: 1209 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1209&view=rev Author: dohpaz Date: 2007-10-17 12:57:56 -0700 (Wed, 17 Oct 2007) Log Message: ----------- Add place to put my experiments. Added Paths: ----------- branches/team/elbunce/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-17 19:56:07
|
Revision: 1208 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1208&view=rev Author: dohpaz Date: 2007-10-17 12:56:12 -0700 (Wed, 17 Oct 2007) Log Message: ----------- Ooops, meant to go one more level down. Removed Paths: ------------- branches/team/elbunce/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-17 19:54:05
|
Revision: 1207 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1207&view=rev Author: dohpaz Date: 2007-10-17 12:54:09 -0700 (Wed, 17 Oct 2007) Log Message: ----------- Create a branch for me to add/test more interesting changes. Added Paths: ----------- branches/team/elbunce/ Copied: branches/team/elbunce (from rev 1206, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-10-17 12:12:33
|
Revision: 1206 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1206&view=rev Author: sbalea Date: 2007-10-17 05:12:32 -0700 (Wed, 17 Oct 2007) Log Message: ----------- Fix documentation for iaxc_push_video Modified Paths: -------------- trunk/lib/iaxclient.h Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-10-17 06:14:39 UTC (rev 1205) +++ trunk/lib/iaxclient.h 2007-10-17 12:12:32 UTC (rev 1206) @@ -1285,7 +1285,7 @@ \brief Sends compressed video data to the currently selected call. \param data compressed video data \param size Size of the compressed video data in bytes - \param samples The number of (uncompressed) samples represented by the compressed video data. + \param fragment If true, split video frames larger than the current fragsize into multiple fragments, otherwise send the data as jumbo frames. \note Data must be in the video format that was negotiated for the current call otherwise bad magic may occur on the recieving side. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-17 06:14:35
|
Revision: 1205 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1205&view=rev Author: dohpaz Date: 2007-10-16 23:14:39 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Add documentation for iaxc_push_audio and iaxc_push_video based on Mihai Balea's email. Modified Paths: -------------- trunk/lib/iaxclient.h Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-10-17 00:22:10 UTC (rev 1204) +++ trunk/lib/iaxclient.h 2007-10-17 06:14:39 UTC (rev 1205) @@ -1269,8 +1269,29 @@ * iaxc_set_test_mode() should be called before iaxc_initialize() */ EXPORT void iaxc_set_test_mode(int); + +/*! + \brief Sends compressed audio data to the currently selected call. + \param data compressed audio data + \param size Size of the compressed audio data in bytes + \param samples The number of (uncompressed) samples represented by the compressed audio data. We normally use 20ms packets at a sampling rate of 8000Hz, so this would be 160. + + \note Data must be in the audio format that was negotiated for the current call + otherwise bad magic may occur on the recieving side. +*/ EXPORT int iaxc_push_audio(void *data, unsigned int size, unsigned int samples); + +/*! + \brief Sends compressed video data to the currently selected call. + \param data compressed video data + \param size Size of the compressed video data in bytes + \param samples The number of (uncompressed) samples represented by the compressed video data. + + \note Data must be in the video format that was negotiated for the current call + otherwise bad magic may occur on the recieving side. +*/ EXPORT int iaxc_push_video(void *data, unsigned int size, int fragment); + #ifdef __cplusplus } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-17 00:22:06
|
Revision: 1204 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1204&view=rev Author: jpgrayson Date: 2007-10-16 17:22:10 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Add ability to log stresstest output through a log file. Apply timestamp to stresstest log messages. Modified Paths: -------------- trunk/simpleclient/stresstest/file.c trunk/simpleclient/stresstest/stresstest.c Modified: trunk/simpleclient/stresstest/file.c =================================================================== --- trunk/simpleclient/stresstest/file.c 2007-10-16 23:40:00 UTC (rev 1203) +++ trunk/simpleclient/stresstest/file.c 2007-10-17 00:22:10 UTC (rev 1204) @@ -3,6 +3,12 @@ #include <stdio.h> #include "file.h" +#ifdef __GNUC__ +void mylog(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +#else +void mylog(const char * fmt, ...); +#endif + static struct ogg_stream *audio_stream; static struct ogg_stream *video_stream; @@ -27,7 +33,7 @@ { if ( os->last != NULL ) { - fprintf(stderr, "Queue inconsistency, bailing...\n"); + mylog("Queue inconsistency, bailing...\n"); return; } os->first = node; @@ -37,7 +43,7 @@ { if ( os->last == NULL ) { - fprintf(stderr, "Queue inconsistency, bailing...\n"); + mylog("Queue inconsistency, bailing...\n"); return; } os->last->next = node; @@ -65,7 +71,8 @@ struct theora_headers *th; long timestamp = 0; - //fprintf(stderr, "Got theora packet, serialno=%d, size=%d, packetno=%lld, granulepos=%lld\n", serialno, op->bytes, op->packetno, op->granulepos); + //mylog("Got theora packet, serialno=%d, size=%d, packetno=%lld, granulepos=%lld\n", + // serialno, op->bytes, op->packetno, op->granulepos); th = (struct theora_headers *)video_stream->data; @@ -118,7 +125,8 @@ audio_stream->page_count++; cnt++; - //fprintf(stderr, "Got speex packet, serialno=%ld, size=%ld, packetno=%lld, granulepos=%lld, timestamp=%ld\n", serialno, op->bytes, op->packetno, op->granulepos, timestamp); + //mylog("Got speex packet, serialno=%ld, size=%ld, packetno=%lld, granulepos=%lld, timestamp=%ld\n", + // serialno, op->bytes, op->packetno, op->granulepos, timestamp); // Ignore the first two packets, they are headers if ( cnt > 2 ) @@ -139,7 +147,7 @@ if ( memcmp(op->packet, theoraId, strlen(theoraId)) == 0 ) { - //fprintf(stderr, "Detected a Theora stream with serialno=%d\n", serialno); + //mylog("Detected a Theora stream with serialno=%d\n", serialno); oggz_set_read_callback(oggz, serialno, read_theora_cb, NULL); video_stream->serialno = serialno; @@ -152,13 +160,14 @@ read_theora_cb(oggz, op, serialno, data); } else if ( memcmp(op->packet, speexId, strlen(speexId)) == 0 ) { - //fprintf(stderr, "Detected a Speex stream with serialno=%d\n", serialno); + //mylog("Detected a Speex stream with serialno=%d\n", serialno); oggz_set_read_callback(oggz, serialno, read_speex_cb, NULL); audio_stream->serialno = serialno; read_speex_cb(oggz, op, serialno, data); } else { - fprintf(stderr, "Got unknown ogg packet, serialno=%d, size=%d, packetno=%d, granulepos=%d\n", serialno, op->bytes, op->packetno, op->granulepos); + mylog("Got unknown ogg packet, serialno=%d, size=%d, packetno=%d, granulepos=%d\n", + serialno, op->bytes, op->packetno, op->granulepos); } return 0; } @@ -171,7 +180,8 @@ audio_stream->page_count = 0; } else if ( serialno == video_stream->serialno ) { - //fprintf(stderr, "Got theora page serialno=%d, header_len=%d, body_len=%d, granulepos=%lld\n", serialno, og->header_len, og->body_len, ogg_page_granulepos(og)); + //mylog("Got theora page serialno=%d, header_len=%d, body_len=%d, granulepos=%lld\n", + // serialno, og->header_len, og->body_len, ogg_page_granulepos(og)); } return 0; } @@ -183,7 +193,9 @@ node = os->first; while ( node != NULL ) { - fprintf(stderr, "Size=%ld, Stream=%ld, packetno=%lld, timestamp=%ld\n", node->op->bytes, node->serialno, node->op->packetno, node->timestamp); + mylog("Size=%ld, Stream=%ld, packetno=%lld, timestamp=%ld\n", + node->op->bytes, node->serialno, + node->op->packetno, node->timestamp); node = node->next; } } @@ -195,9 +207,9 @@ oggz = oggz_open(filename, OGGZ_READ | OGGZ_AUTO); if ( oggz == NULL ) { - fprintf(stderr, "Error opening ogg file\n"); + mylog("Error opening ogg file\n"); } - fprintf(stderr, "Successfully opened ogg file %s\n", filename); + mylog("Successfully opened ogg file %s\n", filename); // Initialize internal streams audio_stream = calloc(1, sizeof(struct ogg_stream)); @@ -208,9 +220,9 @@ oggz_run(oggz); - //fprintf(stderr, "Audio stream, serialno=%d\n", audio_stream->serialno); + //mylog("Audio stream, serialno=%d\n", audio_stream->serialno); //dump_stream(audio_stream); - //fprintf(stderr, "Video stream, serialno=%d\n", video_stream->serialno); + //mylog("Video stream, serialno=%d\n", video_stream->serialno); //dump_stream(video_stream); oggz_close(oggz); Modified: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:40:00 UTC (rev 1203) +++ trunk/simpleclient/stresstest/stresstest.c 2007-10-17 00:22:10 UTC (rev 1204) @@ -13,6 +13,7 @@ * the GNU Lesser (Library) General Public License */ +#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -62,18 +63,43 @@ static struct timeval start_time; +static FILE * log_file = 0; + +#ifdef __GNUC__ +void mylog(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +#endif + +void mylog(const char * fmt, ...) +{ + va_list ap; + time_t t; + struct tm * tmp; + char str[1024]; + char time_str[1024]; + + t = time(0); + tmp = localtime(&t); + + strftime(time_str, sizeof(time_str), "%Y-%m-%d %H:%M:%S", tmp); + snprintf(str, sizeof(str), "stresstest: %s: %s", time_str, fmt); + + va_start(ap, fmt); + vfprintf(log_file ? log_file : stderr, str, ap); + va_end(ap); +} + /* routine used to shutdown and close nicely.*/ void hangup_and_exit(int code) { - fprintf(stderr,"Dump call\n"); + mylog("Dump call\n"); iaxc_dump_call(); - fprintf(stderr,"Sleep for 500 msec\n"); + mylog("Sleep for 500 msec\n"); iaxc_millisleep(500); - fprintf(stderr,"Stop processing thread\n"); + mylog("Stop processing thread\n"); iaxc_stop_processing_thread(); - fprintf(stderr,"Calling iaxc_shutdown..."); + mylog("Calling iaxc_shutdown...\n"); iaxc_shutdown(); - fprintf(stderr,"Exiting with code %d\n", code); + mylog("Exiting with code %d\n", code); exit(code); } @@ -87,12 +113,12 @@ void fatal_error(char *err) { - fprintf(stderr, "FATAL ERROR: %s\n", err); + mylog("FATAL ERROR: %s\n", err); exit(TEST_UNKNOWN_ERROR); } int levels_callback(float input, float output) { - //fprintf(stderr,"Input level: %f\nOutput level: %f\n",input,output); + //mylog("Input level: %f\nOutput level: %f\n", input, output); return 1; } @@ -102,12 +128,12 @@ if ( !print_netstats ) return 0; - if(i++%25 == 0) - fprintf(stderr, "RTT\t" + if ( i++ % 25 == 0 ) + mylog("RTT\t" "Rjit\tRlos%%\tRlosC\tRpkts\tRdel\tRdrop\tRooo\t" "Ljit\tLlos%%\tLlosC\tLpkts\tLdel\tLdrop\tLooo\n"); - fprintf(stderr, "%d\t" + mylog("%d\t" "%d\t%d\t%d\t%d\t%d\t%d\t%d\t" "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", @@ -154,20 +180,21 @@ iaxc_set_video_prefs(prefs); } } else - fprintf(stderr, "Text message received: %s\n", message); + mylog("Text message received: %s\n", message); } void usage() { - printf("Usage is: stresstest <options>\n\n" + printf("Usage: stresstest <options>\n\n" "available options:\n" - " -F <codec,framerate,bitrate,width,height,fragsize> set video parameters\n" + " -F <codec> <framerate> <bitrate> <width> <height> <fragsize> set video parameters\n" " -o <filename> media file to run\n" " -v stop sending video\n" " -a stop sending audio\n" " -l run file in a loop\n" - " -n dump periodic netstats to stderr\n" + " -n dump periodic netstats to log file\n" " -t <timeout> terminate after timeout seconds and report status via return code\n" + " -L <FILE> log to FILE\n" "\n" ); exit(1); @@ -175,16 +202,16 @@ int test_mode_state_callback(struct iaxc_ev_call_state s) { - printf("Call #%d state %d\n", s.callNo, s.state); + mylog("Call #%d state %d\n", s.callNo, s.state); if ( s.state & IAXC_CALL_STATE_COMPLETE ) { - fprintf(stderr, "Call answered\n"); + mylog("Call answered\n"); call_established = 1; } if (s.state == IAXC_CALL_STATE_FREE) { - fprintf(stderr,"Call terminated\n"); + mylog("Call terminated\n"); running = 0; } @@ -273,6 +300,16 @@ usage(); timeout = 1000 * atoi(argv[++i]); break; + case 'L': + if ( i+1 >= argc ) + usage(); + if ( !(log_file = fopen(argv[++i], "w")) ) + { + mylog("failed to open log \"%s\"\n", + argv[i]); + exit(1); + } + break; default: usage(); } @@ -282,15 +319,14 @@ if ( dest == NULL ) { - // We need a destination to call - fprintf(stderr, "No destination, quitting\n"); + mylog("No destination, quitting\n"); return -1; } if ( ogg_file ) load_ogg_file(ogg_file); else - fprintf(stderr, "No media file, running dry\n"); + mylog("No media file, running dry\n"); // Get start time for timeouts gettimeofday(&start_time, NULL); @@ -316,7 +352,7 @@ if (callNo <= 0) iaxc_select_call(callNo); else - fprintf(stderr, "Failed to make call to '%s'", dest); + mylog("Failed to make call to '%s'", dest); // Wait for the call to be established; while ( !call_established ) @@ -362,7 +398,7 @@ running = 0; } - fprintf(stderr, "Received %d audio frames and %d video frames\n", + mylog("Received %d audio frames and %d video frames\n", audio_frames_count, video_frames_count); if ( audio_frames_count == 0 && video_frames_count == 0 ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 23:40:00
|
Revision: 1203 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1203&view=rev Author: jpgrayson Date: 2007-10-16 16:40:00 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Avoid C99-ism. Whitespace. Modified Paths: -------------- trunk/simpleclient/stresstest/stresstest.c Modified: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:36:40 UTC (rev 1202) +++ trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:40:00 UTC (rev 1203) @@ -175,7 +175,7 @@ int test_mode_state_callback(struct iaxc_ev_call_state s) { - printf("Call #%d state %d\n",s.callNo, s.state); + printf("Call #%d state %d\n", s.callNo, s.state); if ( s.state & IAXC_CALL_STATE_COMPLETE ) { @@ -195,23 +195,23 @@ { switch ( e.type ) { - case IAXC_EVENT_LEVELS: - return levels_callback(e.ev.levels.input, e.ev.levels.output); - case IAXC_EVENT_NETSTAT: - return netstat_callback(e.ev.netstats); - case IAXC_EVENT_TEXT: - process_text_message(e.ev.text.message); - break; - case IAXC_EVENT_STATE: - return test_mode_state_callback(e.ev.call); - case IAXC_EVENT_VIDEO: - video_frames_count++; - break; - case IAXC_EVENT_AUDIO: - audio_frames_count++; - break; - default: - break; + case IAXC_EVENT_LEVELS: + return levels_callback(e.ev.levels.input, e.ev.levels.output); + case IAXC_EVENT_NETSTAT: + return netstat_callback(e.ev.netstats); + case IAXC_EVENT_TEXT: + process_text_message(e.ev.text.message); + break; + case IAXC_EVENT_STATE: + return test_mode_state_callback(e.ev.call); + case IAXC_EVENT_VIDEO: + video_frames_count++; + break; + case IAXC_EVENT_AUDIO: + audio_frames_count++; + break; + default: + break; } return 0; @@ -228,6 +228,7 @@ char *dest = NULL; char *ogg_file = NULL; int loop = 0; + int callNo; /* install signal handler to catch CRTL-Cs */ signal(SIGINT, signal_handler); @@ -311,7 +312,7 @@ iaxc_start_processing_thread(); // Dial out - int callNo = iaxc_call(dest); + callNo = iaxc_call(dest); if (callNo <= 0) iaxc_select_call(callNo); else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 23:37:07
|
Revision: 1202 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1202&view=rev Author: jpgrayson Date: 2007-10-16 16:36:40 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Make static things static. Make const things const. Make local things local. Make unused things gone. Modified Paths: -------------- trunk/simpleclient/stresstest/stresstest.c Modified: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:34:48 UTC (rev 1201) +++ trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:36:40 UTC (rev 1202) @@ -37,35 +37,31 @@ #define TEST_NO_MEDIA -2 #define TEST_UNKNOWN_ERROR -99 -//int format = IAXC_FORMAT_THEORA | IAXC_FORMAT_SPEEX; -int format = IAXC_FORMAT_H263 | IAXC_FORMAT_H263_PLUS | IAXC_FORMAT_H264 | IAXC_FORMAT_MPEG4 | IAXC_FORMAT_THEORA; -int formatp = IAXC_FORMAT_H264; //IAXC_FORMAT_THEORA; -int framerate = 15; -int bitrate = 200000; -int width = 320; -int height = 240; -int fragsize = 1400; +static const int format = + IAXC_FORMAT_H263 | + IAXC_FORMAT_H263_PLUS | + IAXC_FORMAT_H264 | + IAXC_FORMAT_MPEG4 | + IAXC_FORMAT_THEORA; +static int formatp = IAXC_FORMAT_THEORA; +static int framerate = 15; +static int bitrate = 200000; +static int width = 320; +static int height = 240; +static int fragsize = 1400; -int call_established = 0; -int running = 0; +static int call_established = 0; +static int running = 0; -// Forward declaration -void process_text_message(char *message); +static int send_video = 1; +static int send_audio = 1; +static int print_netstats = 0; +static int timeout = 0; +static int video_frames_count = 0; +static int audio_frames_count = 0; -char caption[80] = ""; +static struct timeval start_time; -int send_video = 1; -int send_audio = 1; -int print_netstats = 0; -int timeout = 0; -int video_frames_count = 0; -int audio_frames_count = 0; - -struct timeval start_time; - -// Audio-cosmetic... -struct iaxc_sound sound_ringOUT, sound_ringIN; - /* routine used to shutdown and close nicely.*/ void hangup_and_exit(int code) { @@ -163,17 +159,15 @@ void usage() { - printf( - "\n" - "Usage is: tescall <options>\n\n" + printf("Usage is: stresstest <options>\n\n" "available options:\n" - "-F <codec,framerate,bitrate,width,height,fragsize> set video parameters\n" - "-o <filename> media file to run\n" - "-v stop sending video\n" - "-a stop sending audio\n" - "-l run file in a loop\n" - "-n dump periodic netstats to stderr\n" - "-t <timeout> terminate after timeout seconds and report status via return code\n" + " -F <codec,framerate,bitrate,width,height,fragsize> set video parameters\n" + " -o <filename> media file to run\n" + " -v stop sending video\n" + " -a stop sending audio\n" + " -l run file in a loop\n" + " -n dump periodic netstats to stderr\n" + " -t <timeout> terminate after timeout seconds and report status via return code\n" "\n" ); exit(1); @@ -230,29 +224,25 @@ int main(int argc, char **argv) { - int i; - char mydest[80], *dest = NULL; - char *ogg_file = NULL; - int loop = 0; - int video_frame_index; - static struct slice_set_t slice_set; - unsigned short source_id; - struct timeval now; + int i; + char *dest = NULL; + char *ogg_file = NULL; + int loop = 0; /* install signal handler to catch CRTL-Cs */ signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); /* Parse command line */ - for(i=1;i<argc;i++) + for ( i = 1; i < argc; i++) { - if(argv[i][0] == '-') + if ( argv[i][0] == '-' ) { - switch(argv[i][1]) + switch ( argv[i][1] ) { case 'F': /* set video params */ { - formatp = 1<<atoi(argv[++i]); + formatp = 1 << atoi(argv[++i]); framerate = atoi(argv[++i]); bitrate = atoi(argv[++i]); width = atoi(argv[++i]); @@ -296,20 +286,17 @@ return -1; } - if ( ogg_file == NULL ) - fprintf(stderr, "No media file, running dry\n"); - if ( ogg_file ) - { - // Load ogg file load_ogg_file(ogg_file); - } + else + fprintf(stderr, "No media file, running dry\n"); // Get start time for timeouts gettimeofday(&start_time, NULL); // Initialize iaxclient - iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); + 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!"); @@ -333,6 +320,7 @@ // Wait for the call to be established; while ( !call_established ) { + struct timeval now; gettimeofday(&now, NULL); if ( timeout > 0 && msecdiff(&start_time, &now) > timeout ) hangup_and_exit(TEST_NO_CONNECTION); @@ -342,6 +330,8 @@ running = 1; while ( running ) { + struct timeval now; + // We only need this if we actually want to send something if ( ogg_file && ( send_audio || send_video ) ) { @@ -351,7 +341,9 @@ if ( !loop && audio_is_eos() ) break; if ( send_audio && op != NULL && op->bytes > 0 ) - iaxc_push_audio(op->packet, op->bytes, SPEEX_SAMPLING_RATE / 1000 * SPEEX_FRAME_DURATION); + iaxc_push_audio(op->packet, op->bytes, + SPEEX_SAMPLING_RATE * + SPEEX_FRAME_DURATION / 1000); op = get_next_video_op(); if ( !loop && video_is_eos() ) @@ -369,7 +361,9 @@ running = 0; } - fprintf(stderr, "Received %d audio frames and %d video frames\n", audio_frames_count, video_frames_count); + fprintf(stderr, "Received %d audio frames and %d video frames\n", + audio_frames_count, video_frames_count); + if ( audio_frames_count == 0 && video_frames_count == 0 ) hangup_and_exit(TEST_NO_MEDIA); else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 23:34:44
|
Revision: 1201 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1201&view=rev Author: jpgrayson Date: 2007-10-16 16:34:48 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Remove trailing whitespace. Modified Paths: -------------- trunk/simpleclient/stresstest/file.c trunk/simpleclient/stresstest/stresstest.c Modified: trunk/simpleclient/stresstest/file.c =================================================================== --- trunk/simpleclient/stresstest/file.c 2007-10-16 23:32:32 UTC (rev 1200) +++ trunk/simpleclient/stresstest/file.c 2007-10-16 23:34:48 UTC (rev 1201) @@ -17,7 +17,7 @@ memcpy(node->op, op, sizeof(*op)); node->op->packet = malloc(op->bytes); memcpy(node->op->packet, op->packet, op->bytes); - + return node; } @@ -46,13 +46,13 @@ } } -/* +/* * We're forced to use a dirty hack here, due to Theora's idiotic API * Theora needs three separate pieces of data, called headers to initialize * its internal decoder structure. After all three pieces have been received, - * we can call theora_decode_init. - * We use a counter and a flag to make sure we have decoded our three headers and then - * we call theora_decode_init so we can initialize a theora_state structure. + * we can call theora_decode_init. + * We use a counter and a flag to make sure we have decoded our three headers and then + * we call theora_decode_init so we can initialize a theora_state structure. * We use the ts structure to convert a granule position into an actual timestamp. * There are many ways in which this can fail, but we rely on having all three headers * at the beginning of the ogg video bitstream. @@ -64,27 +64,27 @@ struct op_node *node; struct theora_headers *th; long timestamp = 0; - + //fprintf(stderr, "Got theora packet, serialno=%d, size=%d, packetno=%lld, granulepos=%lld\n", serialno, op->bytes, op->packetno, op->granulepos); - + th = (struct theora_headers *)video_stream->data; - + if ( theora_packet_isheader(op) ) { theora_decode_header(&(th->ti), &(th->tc), op); th->header_count++; } - + if ( th->header_count >= 3 && !th->have_headers ) { theora_decode_init(&(th->ts), &(th->ti)); th->have_headers = 1; } - + if ( th->have_headers ) { double d; - + d = theora_granule_time(&(th->ts), op->granulepos); timestamp = (long)(d * 1000); } @@ -98,13 +98,13 @@ video_stream->page_ts = timestamp; video_stream->page_count = 0; } - + if ( !theora_packet_isheader(op) ) { node = create_node(op, serialno, timestamp); append_node(video_stream, node); } - + return 0; } @@ -113,42 +113,42 @@ struct op_node *node; long timestamp; static int cnt = 0; - + timestamp = audio_stream->page_ts + audio_stream->page_count * SPEEX_FRAME_DURATION; audio_stream->page_count++; - + cnt++; //fprintf(stderr, "Got speex packet, serialno=%ld, size=%ld, packetno=%lld, granulepos=%lld, timestamp=%ld\n", serialno, op->bytes, op->packetno, op->granulepos, timestamp); - + // Ignore the first two packets, they are headers if ( cnt > 2 ) { node = create_node(op, serialno, timestamp); append_node(audio_stream, node); } - + return 0; } int read_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) { struct theora_headers *th; - + const char theoraId[] = "\x80theora"; const char speexId[] = "Speex "; - + if ( memcmp(op->packet, theoraId, strlen(theoraId)) == 0 ) { //fprintf(stderr, "Detected a Theora stream with serialno=%d\n", serialno); oggz_set_read_callback(oggz, serialno, read_theora_cb, NULL); video_stream->serialno = serialno; - + // Initialize theora specific data fields th = (struct theora_headers *)calloc(1, sizeof(struct theora_headers)); theora_info_init(&(th->ti)); theora_comment_init(&(th->tc)); video_stream->data = th; - + read_theora_cb(oggz, op, serialno, data); } else if ( memcmp(op->packet, speexId, strlen(speexId)) == 0 ) { @@ -179,7 +179,7 @@ void dump_stream(struct ogg_stream *os) { struct op_node *node; - + node = os->first; while ( node != NULL ) { @@ -198,21 +198,21 @@ fprintf(stderr, "Error opening ogg file\n"); } fprintf(stderr, "Successfully opened ogg file %s\n", filename); - + // Initialize internal streams audio_stream = calloc(1, sizeof(struct ogg_stream)); video_stream = calloc(1, sizeof(struct ogg_stream)); - + oggz_set_read_callback(oggz, -1, read_cb, NULL); oggz_set_read_page(oggz, -1, read_page_cb, NULL); - + oggz_run(oggz); - + //fprintf(stderr, "Audio stream, serialno=%d\n", audio_stream->serialno); //dump_stream(audio_stream); //fprintf(stderr, "Video stream, serialno=%d\n", video_stream->serialno); //dump_stream(video_stream); - + oggz_close(oggz); } @@ -221,27 +221,27 @@ ogg_packet *op; struct timeval tv; long time_now; - + if ( os == NULL ) return NULL; - + gettimeofday(&tv, NULL); time_now = tv.tv_sec * 1000 + tv.tv_usec / 1000; - + if ( os->current == NULL ) { // point to the beginning of the stream and reset the time base os->base_ts = time_now; os->current = os->first; } - - op = NULL; + + op = NULL; if ( os->current->timestamp < time_now - os->base_ts ) { op = os->current->op; os->current = os->current->next; } - + return op; } Modified: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:32:32 UTC (rev 1200) +++ trunk/simpleclient/stresstest/stresstest.c 2007-10-16 23:34:48 UTC (rev 1201) @@ -83,13 +83,13 @@ void signal_handler(int signum) { - if ( signum == SIGTERM || signum == SIGINT ) + if ( signum == SIGTERM || signum == SIGINT ) { running = 0; } } -void fatal_error(char *err) +void fatal_error(char *err) { fprintf(stderr, "FATAL ERROR: %s\n", err); exit(TEST_UNKNOWN_ERROR); @@ -102,10 +102,10 @@ int netstat_callback(struct iaxc_ev_netstats n) { static int i; - + if ( !print_netstats ) return 0; - + if(i++%25 == 0) fprintf(stderr, "RTT\t" "Rjit\tRlos%%\tRlosC\tRpkts\tRdel\tRdrop\tRooo\t" @@ -140,7 +140,7 @@ void process_text_message(char *message) { unsigned int prefs; - + if ( strncmp(message, "CONTROL:", strlen("CONTROL:")) == 0 ) { message += strlen("CONTROL:"); @@ -162,7 +162,7 @@ } void usage() -{ +{ printf( "\n" "Usage is: tescall <options>\n\n" @@ -188,7 +188,7 @@ fprintf(stderr, "Call answered\n"); call_established = 1; } - if (s.state == IAXC_CALL_STATE_FREE) + if (s.state == IAXC_CALL_STATE_FREE) { fprintf(stderr,"Call terminated\n"); running = 0; @@ -199,7 +199,7 @@ int test_mode_callback(iaxc_event e) { - switch ( e.type ) + switch ( e.type ) { case IAXC_EVENT_LEVELS: return levels_callback(e.ev.levels.input, e.ev.levels.output); @@ -230,7 +230,7 @@ int main(int argc, char **argv) { - int i; + int i; char mydest[80], *dest = NULL; char *ogg_file = NULL; int loop = 0; @@ -238,15 +238,15 @@ static struct slice_set_t slice_set; unsigned short source_id; struct timeval now; - + /* install signal handler to catch CRTL-Cs */ signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); - + /* Parse command line */ for(i=1;i<argc;i++) { - if(argv[i][0] == '-') + if(argv[i][0] == '-') { switch(argv[i][1]) { @@ -285,44 +285,44 @@ default: usage(); } - } else + } else dest=argv[i]; } - + if ( dest == NULL ) { // We need a destination to call fprintf(stderr, "No destination, quitting\n"); return -1; } - + if ( ogg_file == NULL ) fprintf(stderr, "No media file, running dry\n"); - + if ( ogg_file ) { // Load ogg file load_ogg_file(ogg_file); } - + // Get start time for timeouts gettimeofday(&start_time, NULL); - + // Initialize iaxclient iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); iaxc_set_test_mode(1); - if (iaxc_initialize(MAX_CALLS)) + if (iaxc_initialize(MAX_CALLS)) fatal_error("cannot initialize iaxclient!"); - + iaxc_set_formats(IAXC_FORMAT_SPEEX, IAXC_FORMAT_SPEEX); iaxc_video_bypass_jitter(0); iaxc_set_audio_prefs(IAXC_AUDIO_PREF_RECV_REMOTE_ENCODED); iaxc_set_video_prefs(IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED); - iaxc_set_event_callback(test_mode_callback); - + iaxc_set_event_callback(test_mode_callback); + // Crank the engine iaxc_start_processing_thread(); - + // Dial out int callNo = iaxc_call(dest); if (callNo <= 0) @@ -338,7 +338,7 @@ hangup_and_exit(TEST_NO_CONNECTION); iaxc_millisleep(5); } - + running = 1; while ( running ) { @@ -346,29 +346,29 @@ if ( ogg_file && ( send_audio || send_video ) ) { ogg_packet *op; - + op = get_next_audio_op(); if ( !loop && audio_is_eos() ) break; if ( send_audio && op != NULL && op->bytes > 0 ) iaxc_push_audio(op->packet, op->bytes, SPEEX_SAMPLING_RATE / 1000 * SPEEX_FRAME_DURATION); - + op = get_next_video_op(); if ( !loop && video_is_eos() ) break; if ( send_video && op != NULL && op->bytes > 0 ) iaxc_push_video(op->packet, op->bytes, 1); } - + // Tight spinloops are bad, mmmkay? iaxc_millisleep(5); - + // Exit after a positive timeout gettimeofday(&now, NULL); if ( timeout > 0 && msecdiff(&start_time, &now) > timeout ) running = 0; } - + fprintf(stderr, "Received %d audio frames and %d video frames\n", audio_frames_count, video_frames_count); if ( audio_frames_count == 0 && video_frames_count == 0 ) hangup_and_exit(TEST_NO_MEDIA); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 23:32:28
|
Revision: 1200 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1200&view=rev Author: jpgrayson Date: 2007-10-16 16:32:32 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Remove crusty .cvsignore files and relevant references to them. Modified Paths: -------------- trunk/simpleclient/testcall/Makefile.am Removed Paths: ------------- trunk/lib/libiax2/.cvsignore trunk/lib/libiax2/src/.cvsignore trunk/simpleclient/testcall/.cvsignore Deleted: trunk/lib/libiax2/.cvsignore =================================================================== --- trunk/lib/libiax2/.cvsignore 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/lib/libiax2/.cvsignore 2007-10-16 23:32:32 UTC (rev 1200) @@ -1,21 +0,0 @@ -libtool -config.status -config.guess -config.sub -ltconfig -ltmain.sh -install-sh -mkinstalldirs -missing -aclocal.m4 -configure -config.h.in -stamp-h.in -Makefile.in -config.log -config.cache -Makefile -stamp-h -libtool -iax.spec -iax-config Deleted: trunk/lib/libiax2/src/.cvsignore =================================================================== --- trunk/lib/libiax2/src/.cvsignore 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/lib/libiax2/src/.cvsignore 2007-10-16 23:32:32 UTC (rev 1200) @@ -1,8 +0,0 @@ -Makefile.in -Makefile -.deps -.libs -iax.lo -md5.lo -libiax.la - Deleted: trunk/simpleclient/testcall/.cvsignore =================================================================== --- trunk/simpleclient/testcall/.cvsignore 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/simpleclient/testcall/.cvsignore 2007-10-16 23:32:32 UTC (rev 1200) @@ -1,2 +0,0 @@ -testcall -testcall.exe Modified: trunk/simpleclient/testcall/Makefile.am =================================================================== --- trunk/simpleclient/testcall/Makefile.am 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/simpleclient/testcall/Makefile.am 2007-10-16 23:32:32 UTC (rev 1200) @@ -8,5 +8,5 @@ AM_CPPFLAGS += -DPOSIXSLEEP endif -EXTRA_DIST = .cvsignore testcall-jb.c testcall.vcproj +EXTRA_DIST = testcall-jb.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 14:45:09
|
Revision: 1199 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1199&view=rev Author: jpgrayson Date: 2007-10-16 07:45:13 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Remove references to commercial vss h264 codec. Modified Paths: -------------- branches/2.0/lib/video.c Modified: branches/2.0/lib/video.c =================================================================== --- branches/2.0/lib/video.c 2007-10-16 14:42:57 UTC (rev 1198) +++ branches/2.0/lib/video.c 2007-10-16 14:45:13 UTC (rev 1199) @@ -24,9 +24,6 @@ #include "codec_ffmpeg.h" #endif #include "codec_theora.h" -#ifdef USE_H264_VSS -#include "codec_h264_vss.h" -#endif #define VIDEO_BUFSIZ (1<<19) @@ -222,11 +219,6 @@ } #endif -#ifdef USE_H264_VSS - if ( allowed & IAXC_FORMAT_H264 ) - real_allowed |= IAXC_FORMAT_H264; -#endif - if ( !real_pref ) { fprintf(stderr, "Audio-only client!\n"); @@ -251,9 +243,6 @@ | IAXC_FORMAT_MPEG4 | IAXC_FORMAT_H264; #endif -#ifdef USE_H264_VSS - iaxc_video_format_allowed |= IAXC_FORMAT_H264; -#endif iaxc_video_format_allowed |= IAXC_FORMAT_THEORA; } } @@ -337,14 +326,6 @@ #endif case IAXC_FORMAT_H264: -#ifdef USE_H264_VSS - return codec_video_h264_new(format, - iaxc_video_width, - iaxc_video_height, - iaxc_video_framerate, - iaxc_video_bitrate, - iaxc_video_fragsize); -#endif #ifdef USE_FFMPEG return codec_video_ffmpeg_new(format, iaxc_video_width, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 14:42:55
|
Revision: 1198 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1198&view=rev Author: jpgrayson Date: 2007-10-16 07:42:57 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Backport fix for ringbuffer issue where non-sse2 x86 cpus would barf (illegal instruction) on the fence instructions. More info here: http://sourceforge.net/mailarchive/forum.php?thread_name=470E4EF8.6090202%40gmail.com&forum_name=iaxclient-devel Modified Paths: -------------- branches/2.0/lib/ringbuffer.c Modified: branches/2.0/lib/ringbuffer.c =================================================================== --- branches/2.0/lib/ringbuffer.c 2007-10-16 14:40:56 UTC (rev 1197) +++ branches/2.0/lib/ringbuffer.c 2007-10-16 14:42:57 UTC (rev 1198) @@ -104,10 +104,15 @@ # define rb_FullMemoryBarrier() asm volatile("sync":::"memory") # define rb_ReadMemoryBarrier() asm volatile("sync":::"memory") # define rb_WriteMemoryBarrier() asm volatile("sync":::"memory") -# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) +# elif defined( __SSE2__ ) # define rb_FullMemoryBarrier() asm volatile("mfence":::"memory") # define rb_ReadMemoryBarrier() asm volatile("lfence":::"memory") # define rb_WriteMemoryBarrier() asm volatile("sfence":::"memory") +# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) +# define DO_X86_RUNTIME_CPU_DETECTION +# define rb_FullMemoryBarrier() if ( have_sse2 ) asm volatile("mfence":::"memory") +# define rb_ReadMemoryBarrier() if ( have_sse2 ) asm volatile("lfence":::"memory") +# define rb_WriteMemoryBarrier() if ( have_sse2 ) asm volatile("sfence":::"memory") # else # ifdef ALLOW_SMP_DANGERS # warning Memory barriers not defined on this system or system unknown @@ -144,12 +149,32 @@ # endif #endif +#ifdef DO_X86_RUNTIME_CPU_DETECTION +#define cpuid(func, ax, bx, cx, dx) \ + __asm__ __volatile__ ("xchgl\t%%ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchgl\t%%ebx, %1\n\t" \ + : "=a" (ax), "=r" (bx), "=c" (cx), "=d" (dx) \ + : "0" (func)) + +static int have_sse2 = 0; +#endif + /*************************************************************************** * Initialize FIFO. * numBytes must be power of 2, returns -1 if not. */ long rb_InitializeRingBuffer( rb_RingBuffer *rbuf, long numBytes, void *dataPtr ) { +#ifdef DO_X86_RUNTIME_CPU_DETECTION + /* See http://softpixel.com/~cwright/programming/simd/cpuid.php + * for a good description of how all this works. + */ + int a, b, c, d; + cpuid(1, a, b, c, d); + have_sse2 = d & (1 << 26); +#endif + if( ((numBytes-1) & numBytes) != 0) return -1; /* Not Power of two. */ rbuf->bufferSize = numBytes; rbuf->buffer = (char *)dataPtr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 14:40:55
|
Revision: 1197 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1197&view=rev Author: jpgrayson Date: 2007-10-16 07:40:56 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Backport fix for properly capitalized "QuickTime". Modified Paths: -------------- branches/2.0/lib/Makefile.am Modified: branches/2.0/lib/Makefile.am =================================================================== --- branches/2.0/lib/Makefile.am 2007-10-15 14:10:41 UTC (rev 1196) +++ branches/2.0/lib/Makefile.am 2007-10-16 14:40:56 UTC (rev 1197) @@ -49,7 +49,7 @@ if MACOSX SRCS += $(SRCS_MACOSX) -AM_LDFLAGS += -framework Quicktime +AM_LDFLAGS += -framework QuickTime endif MACOSX if USE_LOCAL_GSM This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-10-15 14:10:45
|
Revision: 1196 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1196&view=rev Author: sbalea Date: 2007-10-15 07:10:41 -0700 (Mon, 15 Oct 2007) Log Message: ----------- Synchronize with trunk rev 1195 Revision Links: -------------- http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1195&view=rev Modified Paths: -------------- branches/team/mihai/echocan/lib/Makefile.am branches/team/mihai/echocan/lib/iaxclient_lib.c branches/team/mihai/echocan/lib/ringbuffer.c branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am Modified: branches/team/mihai/echocan/lib/Makefile.am =================================================================== --- branches/team/mihai/echocan/lib/Makefile.am 2007-10-12 16:56:38 UTC (rev 1195) +++ branches/team/mihai/echocan/lib/Makefile.am 2007-10-15 14:10:41 UTC (rev 1196) @@ -57,7 +57,7 @@ if MACOSX SRCS += $(SRCS_MACOSX) -AM_LDFLAGS += -framework Quicktime +AM_LDFLAGS += -framework QuickTime if VIDEO SRCS += $(SRCS_MACOSX_VIDEO) endif Modified: branches/team/mihai/echocan/lib/iaxclient_lib.c =================================================================== --- branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-10-12 16:56:38 UTC (rev 1195) +++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-10-15 14:10:41 UTC (rev 1196) @@ -1201,6 +1201,7 @@ (calls[callNo].state & IAXC_CALL_STATE_RINGING) ) { calls[callNo].state &= ~IAXC_CALL_STATE_RINGING; + calls[callNo].state |= IAXC_CALL_STATE_COMPLETE; iaxci_do_state_callback(callNo); iaxci_usermsg(IAXC_STATUS,"Call %d progress", callNo); Modified: branches/team/mihai/echocan/lib/ringbuffer.c =================================================================== --- branches/team/mihai/echocan/lib/ringbuffer.c 2007-10-12 16:56:38 UTC (rev 1195) +++ branches/team/mihai/echocan/lib/ringbuffer.c 2007-10-15 14:10:41 UTC (rev 1196) @@ -104,10 +104,15 @@ # define rb_FullMemoryBarrier() asm volatile("sync":::"memory") # define rb_ReadMemoryBarrier() asm volatile("sync":::"memory") # define rb_WriteMemoryBarrier() asm volatile("sync":::"memory") -# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) +# elif defined( __SSE2__ ) # define rb_FullMemoryBarrier() asm volatile("mfence":::"memory") # define rb_ReadMemoryBarrier() asm volatile("lfence":::"memory") # define rb_WriteMemoryBarrier() asm volatile("sfence":::"memory") +# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) +# define DO_X86_RUNTIME_CPU_DETECTION +# define rb_FullMemoryBarrier() if ( have_sse2 ) asm volatile("mfence":::"memory") +# define rb_ReadMemoryBarrier() if ( have_sse2 ) asm volatile("lfence":::"memory") +# define rb_WriteMemoryBarrier() if ( have_sse2 ) asm volatile("sfence":::"memory") # else # ifdef ALLOW_SMP_DANGERS # warning Memory barriers not defined on this system or system unknown @@ -144,12 +149,32 @@ # endif #endif +#ifdef DO_X86_RUNTIME_CPU_DETECTION +#define cpuid(func, ax, bx, cx, dx) \ + __asm__ __volatile__ ("xchgl\t%%ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchgl\t%%ebx, %1\n\t" \ + : "=a" (ax), "=r" (bx), "=c" (cx), "=d" (dx) \ + : "0" (func)) + +static int have_sse2 = 0; +#endif + /*************************************************************************** * Initialize FIFO. * numBytes must be power of 2, returns -1 if not. */ long rb_InitializeRingBuffer( rb_RingBuffer *rbuf, long numBytes, void *dataPtr ) { +#ifdef DO_X86_RUNTIME_CPU_DETECTION + /* See http://softpixel.com/~cwright/programming/simd/cpuid.php + * for a good description of how all this works. + */ + int a, b, c, d; + cpuid(1, a, b, c, d); + have_sse2 = d & (1 << 26); +#endif + if( ((numBytes-1) & numBytes) != 0) return -1; /* Not Power of two. */ rbuf->bufferSize = numBytes; rbuf->buffer = (char *)dataPtr; Modified: branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am =================================================================== --- branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am 2007-10-12 16:56:38 UTC (rev 1195) +++ branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am 2007-10-15 14:10:41 UTC (rev 1196) @@ -10,7 +10,7 @@ -framework AudioUnit \ -framework Carbon \ -framework CoreAudio \ - -framework Quicktime + -framework QuickTime endif EXTRA_DIST = stresstest.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-12 16:56:36
|
Revision: 1195 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1195&view=rev Author: jpgrayson Date: 2007-10-12 09:56:38 -0700 (Fri, 12 Oct 2007) Log Message: ----------- Do runtime detection of SSE2 for x86 variants when necessary. We use inline SSE2 assembly for memory fences on x86 machines when building with gcc. Non-SSE2 machines do not need these memory barriers (in theory) and will crash if these instructions are issued. This fixes the case where iaxclient caused program crashes on non-SSE2 x86 machines. Modified Paths: -------------- trunk/lib/ringbuffer.c Modified: trunk/lib/ringbuffer.c =================================================================== --- trunk/lib/ringbuffer.c 2007-10-11 20:10:25 UTC (rev 1194) +++ trunk/lib/ringbuffer.c 2007-10-12 16:56:38 UTC (rev 1195) @@ -104,10 +104,15 @@ # define rb_FullMemoryBarrier() asm volatile("sync":::"memory") # define rb_ReadMemoryBarrier() asm volatile("sync":::"memory") # define rb_WriteMemoryBarrier() asm volatile("sync":::"memory") -# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) +# elif defined( __SSE2__ ) # define rb_FullMemoryBarrier() asm volatile("mfence":::"memory") # define rb_ReadMemoryBarrier() asm volatile("lfence":::"memory") # define rb_WriteMemoryBarrier() asm volatile("sfence":::"memory") +# elif defined( __i386__ ) || defined( __i486__ ) || defined( __i586__ ) || defined( __i686__ ) +# define DO_X86_RUNTIME_CPU_DETECTION +# define rb_FullMemoryBarrier() if ( have_sse2 ) asm volatile("mfence":::"memory") +# define rb_ReadMemoryBarrier() if ( have_sse2 ) asm volatile("lfence":::"memory") +# define rb_WriteMemoryBarrier() if ( have_sse2 ) asm volatile("sfence":::"memory") # else # ifdef ALLOW_SMP_DANGERS # warning Memory barriers not defined on this system or system unknown @@ -144,12 +149,32 @@ # endif #endif +#ifdef DO_X86_RUNTIME_CPU_DETECTION +#define cpuid(func, ax, bx, cx, dx) \ + __asm__ __volatile__ ("xchgl\t%%ebx, %1\n\t" \ + "cpuid\n\t" \ + "xchgl\t%%ebx, %1\n\t" \ + : "=a" (ax), "=r" (bx), "=c" (cx), "=d" (dx) \ + : "0" (func)) + +static int have_sse2 = 0; +#endif + /*************************************************************************** * Initialize FIFO. * numBytes must be power of 2, returns -1 if not. */ long rb_InitializeRingBuffer( rb_RingBuffer *rbuf, long numBytes, void *dataPtr ) { +#ifdef DO_X86_RUNTIME_CPU_DETECTION + /* See http://softpixel.com/~cwright/programming/simd/cpuid.php + * for a good description of how all this works. + */ + int a, b, c, d; + cpuid(1, a, b, c, d); + have_sse2 = d & (1 << 26); +#endif + if( ((numBytes-1) & numBytes) != 0) return -1; /* Not Power of two. */ rbuf->bufferSize = numBytes; rbuf->buffer = (char *)dataPtr; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-11 20:10:21
|
Revision: 1194 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1194&view=rev Author: dohpaz Date: 2007-10-11 13:10:25 -0700 (Thu, 11 Oct 2007) Log Message: ----------- Fix case of QuickTime framework so things will build for folks with case sensitive file systems on Mac OS X. Modified Paths: -------------- trunk/lib/Makefile.am trunk/simpleclient/stresstest/Makefile.am Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-10-11 19:49:59 UTC (rev 1193) +++ trunk/lib/Makefile.am 2007-10-11 20:10:25 UTC (rev 1194) @@ -57,7 +57,7 @@ if MACOSX SRCS += $(SRCS_MACOSX) -AM_LDFLAGS += -framework Quicktime +AM_LDFLAGS += -framework QuickTime if VIDEO SRCS += $(SRCS_MACOSX_VIDEO) endif Modified: trunk/simpleclient/stresstest/Makefile.am =================================================================== --- trunk/simpleclient/stresstest/Makefile.am 2007-10-11 19:49:59 UTC (rev 1193) +++ trunk/simpleclient/stresstest/Makefile.am 2007-10-11 20:10:25 UTC (rev 1194) @@ -10,7 +10,7 @@ -framework AudioUnit \ -framework Carbon \ -framework CoreAudio \ - -framework Quicktime + -framework QuickTime endif EXTRA_DIST = stresstest.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-10-11 19:49:55
|
Revision: 1193 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1193&view=rev Author: dohpaz Date: 2007-10-11 12:49:59 -0700 (Thu, 11 Oct 2007) Log Message: ----------- If an outgoing calls ringing has stopped do to incoming audio, the call is complete. Modified Paths: -------------- trunk/lib/iaxclient_lib.c Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-10-11 17:42:33 UTC (rev 1192) +++ trunk/lib/iaxclient_lib.c 2007-10-11 19:49:59 UTC (rev 1193) @@ -1201,6 +1201,7 @@ (calls[callNo].state & IAXC_CALL_STATE_RINGING) ) { calls[callNo].state &= ~IAXC_CALL_STATE_RINGING; + calls[callNo].state |= IAXC_CALL_STATE_COMPLETE; iaxci_do_state_callback(callNo); iaxci_usermsg(IAXC_STATUS,"Call %d progress", callNo); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-10-11 17:42:32
|
Revision: 1192 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1192&view=rev Author: sbalea Date: 2007-10-11 10:42:33 -0700 (Thu, 11 Oct 2007) Log Message: ----------- Synchronize with trunk rev 1191 Revision Links: -------------- http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1191&view=rev Modified Paths: -------------- branches/team/mihai/echocan/lib/iaxclient_lib.c branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am Modified: branches/team/mihai/echocan/lib/iaxclient_lib.c =================================================================== --- branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-10-10 18:42:43 UTC (rev 1191) +++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-10-11 17:42:33 UTC (rev 1192) @@ -1702,9 +1702,9 @@ if ( !video_format ) { iaxci_usermsg(IAXC_NOTICE, - "Notice: could not negotiate common video codec"); + "Notice: could not negotiate common video codec"); iaxci_usermsg(IAXC_NOTICE, - "Notice: switching to audio-only call"); + "Notice: switching to audio-only call"); } } #endif /* USE_VIDEO */ Modified: branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am =================================================================== --- branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am 2007-10-10 18:42:43 UTC (rev 1191) +++ branches/team/mihai/echocan/simpleclient/stresstest/Makefile.am 2007-10-11 17:42:33 UTC (rev 1192) @@ -4,4 +4,13 @@ AM_CPPFLAGS=-I$(top_srcdir)/lib $(SDL_CFLAGS) $(OGGZ_CFLAGS) $(THEORA_CFLAGS) stresstest_LDADD=$(top_builddir)/lib/libiaxclient.la $(OGGZ_LIBS) $(THEORA_LIBS) +if MACOSX +stresstest_LDFLAGS = \ + -framework AudioToolbox \ + -framework AudioUnit \ + -framework Carbon \ + -framework CoreAudio \ + -framework Quicktime +endif + EXTRA_DIST = stresstest.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-10 18:42:40
|
Revision: 1191 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1191&view=rev Author: jpgrayson Date: 2007-10-10 11:42:43 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Fix gratuitious whitespace issue. Modified Paths: -------------- trunk/lib/iaxclient_lib.c Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-10-10 18:42:17 UTC (rev 1190) +++ trunk/lib/iaxclient_lib.c 2007-10-10 18:42:43 UTC (rev 1191) @@ -1702,9 +1702,9 @@ if ( !video_format ) { iaxci_usermsg(IAXC_NOTICE, - "Notice: could not negotiate common video codec"); + "Notice: could not negotiate common video codec"); iaxci_usermsg(IAXC_NOTICE, - "Notice: switching to audio-only call"); + "Notice: switching to audio-only call"); } } #endif /* USE_VIDEO */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-10 18:42:14
|
Revision: 1190 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1190&view=rev Author: jpgrayson Date: 2007-10-10 11:42:17 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Link stresstest with dependent frameworks on Mac. Fixes static build. Modified Paths: -------------- trunk/simpleclient/stresstest/Makefile.am Modified: trunk/simpleclient/stresstest/Makefile.am =================================================================== --- trunk/simpleclient/stresstest/Makefile.am 2007-10-10 15:27:36 UTC (rev 1189) +++ trunk/simpleclient/stresstest/Makefile.am 2007-10-10 18:42:17 UTC (rev 1190) @@ -4,4 +4,13 @@ AM_CPPFLAGS=-I$(top_srcdir)/lib $(SDL_CFLAGS) $(OGGZ_CFLAGS) $(THEORA_CFLAGS) stresstest_LDADD=$(top_builddir)/lib/libiaxclient.la $(OGGZ_LIBS) $(THEORA_LIBS) +if MACOSX +stresstest_LDFLAGS = \ + -framework AudioToolbox \ + -framework AudioUnit \ + -framework Carbon \ + -framework CoreAudio \ + -framework Quicktime +endif + EXTRA_DIST = stresstest.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-10-10 15:27:33
|
Revision: 1189 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1189&view=rev Author: sbalea Date: 2007-10-10 08:27:36 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Merge change from trunk: another instance of iaxci_msecdiff in stresstest Modified Paths: -------------- branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c Modified: branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c =================================================================== --- branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-10 15:23:33 UTC (rev 1188) +++ branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-10 15:27:36 UTC (rev 1189) @@ -365,7 +365,7 @@ // Exit after a positive timeout gettimeofday(&now, NULL); - if ( timeout > 0 && iaxci_msecdiff(&now, &start_time) > timeout ) + if ( timeout > 0 && msecdiff(&start_time, &now) > timeout ) running = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-10-10 15:23:34
|
Revision: 1188 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1188&view=rev Author: sbalea Date: 2007-10-10 08:23:33 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Get another instance of iaxci_msecdiff Modified Paths: -------------- trunk/simpleclient/stresstest/stresstest.c Modified: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- trunk/simpleclient/stresstest/stresstest.c 2007-10-10 15:13:04 UTC (rev 1187) +++ trunk/simpleclient/stresstest/stresstest.c 2007-10-10 15:23:33 UTC (rev 1188) @@ -365,7 +365,7 @@ // Exit after a positive timeout gettimeofday(&now, NULL); - if ( timeout > 0 && iaxci_msecdiff(&now, &start_time) > timeout ) + if ( timeout > 0 && msecdiff(&start_time, &now) > timeout ) running = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-10-10 15:13:01
|
Revision: 1187 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1187&view=rev Author: sbalea Date: 2007-10-10 08:13:04 -0700 (Wed, 10 Oct 2007) Log Message: ----------- Merge change from trunk: do not depend on internal APIs in sample clients Modified Paths: -------------- branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c Modified: branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c =================================================================== --- branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-10 15:10:47 UTC (rev 1186) +++ branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-10 15:13:04 UTC (rev 1187) @@ -223,6 +223,11 @@ return 0; } +long msecdiff(struct timeval *t0, struct timeval *t1) +{ + return (t1->tv_sec - t0->tv_sec) * 1000L + (t1->tv_usec - t0->tv_usec) / 1000L; +} + int main(int argc, char **argv) { int i; @@ -329,7 +334,7 @@ while ( !call_established ) { gettimeofday(&now, NULL); - if ( timeout > 0 && iaxci_msecdiff(&now, &start_time) > timeout ) + if ( timeout > 0 && msecdiff(&start_time, &now) > timeout ) hangup_and_exit(TEST_NO_CONNECTION); iaxc_millisleep(5); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |