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-11-05 15:29:10
|
Revision: 1266
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1266&view=rev
Author: sbalea
Date: 2007-11-05 07:29:12 -0800 (Mon, 05 Nov 2007)
Log Message:
-----------
Synchronize with trunk rev 1265
Revision Links:
--------------
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1265&view=rev
Modified Paths:
--------------
branches/team/mihai/echocan/lib/iaxclient.h
branches/team/mihai/echocan/lib/iaxclient_lib.c
branches/team/mihai/echocan/lib/video.c
Modified: branches/team/mihai/echocan/lib/iaxclient.h
===================================================================
--- branches/team/mihai/echocan/lib/iaxclient.h 2007-11-05 15:09:32 UTC (rev 1265)
+++ branches/team/mihai/echocan/lib/iaxclient.h 2007-11-05 15:29:12 UTC (rev 1266)
@@ -819,6 +819,11 @@
EXPORT void iaxc_send_text(const char * text);
/*!
+ Sends \a text to call \a callNo
+*/
+EXPORT void iaxc_send_text_call(int callNo, const char * text);
+
+/*!
Sends a URL across the currently selected call
\param url The URL to send across.
\param link If non-zero the URL is a link
@@ -1135,9 +1140,14 @@
EXPORT int iaxc_set_audio_prefs(unsigned int prefs);
/*!
- Get video capture device information:
+ Get video capture device information.
+ WARNING: the array pointed to by parameter 'devs' below is owned
+ by iaxclient, and may be freed on subsequent calls to
+ this function.
\param devs Returns an array of iaxc_video_device structures.
- The array will will be valid as long as iaxc is initialized.
+ The array will only be valid until this function is
+ called again (if the device list changes), or until
+ iaxc is shutdown.
\param nDevs Returns the number of devices in the devs array
\param devId Returns the id of the currently selected video capture device
Modified: branches/team/mihai/echocan/lib/iaxclient_lib.c
===================================================================
--- branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-05 15:09:32 UTC (rev 1265)
+++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-05 15:29:12 UTC (rev 1266)
@@ -1512,6 +1512,17 @@
}
}
+EXPORT void iaxc_send_text_call(int callNo, const char * text)
+{
+ if ( callNo < 0 || !(calls[callNo].state & IAXC_CALL_STATE_ACTIVE) )
+ return;
+
+ get_iaxc_lock();
+ if ( calls[callNo].state & IAXC_CALL_STATE_ACTIVE )
+ iax_send_text(calls[callNo].session, text);
+ put_iaxc_lock();
+}
+
EXPORT void iaxc_send_url(const char * url, int link)
{
if ( selected_call >= 0 )
Modified: branches/team/mihai/echocan/lib/video.c
===================================================================
--- branches/team/mihai/echocan/lib/video.c 2007-11-05 15:09:32 UTC (rev 1265)
+++ branches/team/mihai/echocan/lib/video.c 2007-11-05 15:29:12 UTC (rev 1266)
@@ -557,6 +557,15 @@
cap_info->error_status);
vinfo.capturing = 0;
+ /* NOTE:
+ * We want to release now, but we're in the capture callback thread.
+ * 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(),
+ * iaxc_video_device_set() or video_destroy() are called.
+ */
+
evt.type = IAXC_EVENT_VIDCAP_ERROR;
iaxci_post_event(evt);
return -1;
@@ -967,20 +976,19 @@
!(prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED)) )
{
MUTEXLOCK(&vinfo.camera_lock);
- if ( vinfo.capturing )
+ if ( vinfo.capturing && vinfo.src &&
+ vidcap_src_capture_stop(vinfo.src) )
{
- if ( vidcap_src_capture_stop(vinfo.src) )
- fprintf(stderr, "failed vidcap_src_capture_stop\n");
+ fprintf(stderr, "failed vidcap_src_capture_stop\n");
+ }
- vinfo.capturing = 0;
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release a video source\n");
+ }
- if ( vinfo.src && vidcap_src_release(vinfo.src) )
- {
- fprintf(stderr, "failed to release a video source\n");
- }
-
- vinfo.src = 0;
- }
+ vinfo.src = 0;
+ vinfo.capturing = 0;
MUTEXUNLOCK(&vinfo.camera_lock);
}
else
@@ -1371,19 +1379,17 @@
new_iaxc_dev_list[n].name = strdup(new_src_list[n].description);
new_iaxc_dev_list[n].id_string = strdup(new_src_list[n].identifier);
- /* this device may have been here all along
- * Check if it has, and re-assign that device id
+ /* This device may have been here all along.
+ * If it has, re-assign that device id
* else assign a new id
*/
for ( i = 0; i < vinfo.device_count; i++ )
{
- if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
+ /* check both the device name and its unique identifier */
+ if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) &&
+ !strcmp(new_iaxc_dev_list[n].id_string,
+ vinfo.devices[i].id_string) )
{
- /*fprintf(stderr, "EXISTING DEVICE: %s - (id=%d) '%s'\n",
- new_iaxc_dev_list[n].name,
- vinfo.devices[i].id,
- new_iaxc_dev_list[n].id_string);
- */
new_iaxc_dev_list[n].id = vinfo.devices[i].id;
if ( vinfo.selected_device_id == new_iaxc_dev_list[n].id )
@@ -1394,10 +1400,6 @@
if ( i == vinfo.device_count )
{
new_iaxc_dev_list[n].id = vinfo.next_id++;
- fprintf(stderr, "NEW DEVICE: %s - (id=%d) '%s'\n",
- new_iaxc_dev_list[n].name,
- new_iaxc_dev_list[n].id,
- new_iaxc_dev_list[n].id_string);
list_changed = 1;
}
@@ -1440,9 +1442,16 @@
free(old_iaxc_dev_list);
}
+ /* If we can't find the selected device, defer releasing it.
+ * It'll happen when we set a new device, or shutdown
+ */
+
+ if ( !found_selected_device )
+ vinfo.selected_device_id = -1;
+
*devs = vinfo.devices;
*num_devs = vinfo.device_count;
- *id_selected = found_selected_device ? vinfo.selected_device_id : -1;
+ *id_selected = vinfo.selected_device_id;
return list_changed;
}
@@ -1486,6 +1495,12 @@
vinfo.selected_device_id = capture_dev_id;
+ if ( vinfo.capturing && vinfo.src &&
+ vidcap_src_capture_stop(vinfo.src) )
+ {
+ fprintf(stderr, "failed to stop video capture\n");
+ }
+
if ( vinfo.src && vidcap_src_release(vinfo.src) )
{
fprintf(stderr, "failed to release video source\n");
@@ -1530,12 +1545,14 @@
memset(&vinfo, 0, sizeof(vinfo));
+ vinfo.width = vfinfo.width;
+ vinfo.height = vfinfo.height;
+ vinfo.selected_device_id = -1;
+ vinfo.next_id = starting_id;
+
MUTEXINIT(&vinfo.camera_lock);
MUTEXINIT(&vinfo.dev_list_lock);
- vinfo.width = vfinfo.width;
- vinfo.height = vfinfo.height;
-
if ( !(vinfo.vc = vidcap_initialize()) )
{
fprintf(stderr, "ERROR: failed vidcap_initialize\n");
@@ -1558,8 +1575,6 @@
vinfo.sapi_info.description,
vinfo.sapi_info.identifier);
- vinfo.selected_device_id = -1;
-
vinfo.device_count = vidcap_src_list_update(vinfo.sapi);
if ( vinfo.device_count < 0 )
{
@@ -1604,13 +1619,12 @@
* these ids may diverge as devices are added
* and removed.
*/
- vinfo.devices[i].id = i + starting_id;
+ vinfo.devices[i].id = vinfo.next_id++;
}
- vinfo.next_id = vinfo.devices[vinfo.device_count - 1].id + 1;
- /* set default source - the first device */
if ( vinfo.device_count )
{
+ /* set default source - the first device */
iaxc_video_device_set(vinfo.devices[0].id);
}
@@ -1649,9 +1663,25 @@
int video_destroy(void)
{
+ int i;
+
if ( !vinfo.vc )
return -1;
+ free(vinfo.vc_src_info);
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ free((void *)vinfo.devices[i].name);
+ free((void *)vinfo.devices[i].id_string);
+ }
+ free(vinfo.devices);
+
+ if ( vinfo.capturing && vinfo.src )
+ vidcap_src_capture_stop(vinfo.src);
+
+ if ( vinfo.src )
+ vidcap_src_release(vinfo.src);
+
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-05 15:09:34
|
Revision: 1265
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1265&view=rev
Author: sbalea
Date: 2007-11-05 07:09:32 -0800 (Mon, 05 Nov 2007)
Log Message:
-----------
Merge change from the elbunce branch: add ability to send text messages to an active call
Modified Paths:
--------------
trunk/lib/iaxclient.h
trunk/lib/iaxclient_lib.c
Modified: trunk/lib/iaxclient.h
===================================================================
--- trunk/lib/iaxclient.h 2007-11-04 19:17:58 UTC (rev 1264)
+++ trunk/lib/iaxclient.h 2007-11-05 15:09:32 UTC (rev 1265)
@@ -819,6 +819,11 @@
EXPORT void iaxc_send_text(const char * text);
/*!
+ Sends \a text to call \a callNo
+*/
+EXPORT void iaxc_send_text_call(int callNo, const char * text);
+
+/*!
Sends a URL across the currently selected call
\param url The URL to send across.
\param link If non-zero the URL is a link
Modified: trunk/lib/iaxclient_lib.c
===================================================================
--- trunk/lib/iaxclient_lib.c 2007-11-04 19:17:58 UTC (rev 1264)
+++ trunk/lib/iaxclient_lib.c 2007-11-05 15:09:32 UTC (rev 1265)
@@ -1510,6 +1510,17 @@
}
}
+EXPORT void iaxc_send_text_call(int callNo, const char * text)
+{
+ if ( callNo < 0 || !(calls[callNo].state & IAXC_CALL_STATE_ACTIVE) )
+ return;
+
+ get_iaxc_lock();
+ if ( calls[callNo].state & IAXC_CALL_STATE_ACTIVE )
+ iax_send_text(calls[callNo].session, text);
+ put_iaxc_lock();
+}
+
EXPORT void iaxc_send_url(const char * url, int link)
{
if ( selected_call >= 0 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2007-11-04 19:17:54
|
Revision: 1264
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1264&view=rev
Author: dohpaz
Date: 2007-11-04 11:17:58 -0800 (Sun, 04 Nov 2007)
Log Message:
-----------
Merge up to trunk r1263.
Modified Paths:
--------------
branches/team/elbunce/iaxclient/lib/iaxclient_lib.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-11-02 21:05:49 UTC (rev 1263)
+++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-11-04 19:17:58 UTC (rev 1264)
@@ -679,7 +679,25 @@
video_destroy();
#endif
}
-
+
+ /* destroy enocders and decoders for all existing calls */
+ if ( calls )
+ {
+ int i;
+ for ( i=0 ; i<max_calls ; i++ )
+ {
+ if ( calls[i].encoder )
+ calls[i].encoder->destroy(calls[i].encoder);
+ if ( calls[i].decoder )
+ calls[i].decoder->destroy(calls[i].decoder);
+ if ( calls[i].vencoder )
+ calls[i].vdecoder->destroy(calls[i].vencoder);
+ if ( calls[i].vdecoder )
+ calls[i].vencoder->destroy(calls[i].vdecoder);
+ }
+ free(calls);
+ calls = NULL;
+ }
put_iaxc_lock();
#ifdef WIN32
closesocket(iax_get_fd()); //fd:
Modified: branches/team/elbunce/iaxclient/lib/video.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/video.c 2007-11-02 21:05:49 UTC (rev 1263)
+++ branches/team/elbunce/iaxclient/lib/video.c 2007-11-04 19:17:58 UTC (rev 1264)
@@ -557,6 +557,15 @@
cap_info->error_status);
vinfo.capturing = 0;
+ /* NOTE:
+ * We want to release now, but we're in the capture callback thread.
+ * 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(),
+ * iaxc_video_device_set() or video_destroy() are called.
+ */
+
evt.type = IAXC_EVENT_VIDCAP_ERROR;
iaxci_post_event(evt);
return -1;
@@ -969,20 +978,19 @@
fprintf(stderr, "We SHOULD be STOPPING capture here! vinfo.capturing=%d\n", vinfo.capturing);
MUTEXLOCK(&vinfo.camera_lock);
- if ( vinfo.capturing )
+ if ( vinfo.capturing && vinfo.src &&
+ vidcap_src_capture_stop(vinfo.src) )
{
- if ( vidcap_src_capture_stop(vinfo.src) )
- fprintf(stderr, "failed vidcap_src_capture_stop\n");
+ fprintf(stderr, "failed vidcap_src_capture_stop\n");
+ }
- vinfo.capturing = 0;
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release a video source\n");
+ }
- if ( vinfo.src && vidcap_src_release(vinfo.src) )
- {
- fprintf(stderr, "failed to release a video source\n");
- }
-
- vinfo.src = 0;
- }
+ vinfo.src = 0;
+ vinfo.capturing = 0;
MUTEXUNLOCK(&vinfo.camera_lock);
}
else
@@ -1379,7 +1387,10 @@
*/
for ( i = 0; i < vinfo.device_count; i++ )
{
- if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
+ /* check both the device name and its unique identifier */
+ if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) &&
+ !strcmp(new_iaxc_dev_list[n].id_string,
+ vinfo.devices[i].id_string) )
{
new_iaxc_dev_list[n].id = vinfo.devices[i].id;
@@ -1433,9 +1444,16 @@
free(old_iaxc_dev_list);
}
+ /* If we can't find the selected device, defer releasing it.
+ * It'll happen when we set a new device, or shutdown
+ */
+
+ if ( !found_selected_device )
+ vinfo.selected_device_id = -1;
+
*devs = vinfo.devices;
*num_devs = vinfo.device_count;
- *id_selected = found_selected_device ? vinfo.selected_device_id : -1;
+ *id_selected = vinfo.selected_device_id;
return list_changed;
}
@@ -1479,6 +1497,12 @@
vinfo.selected_device_id = capture_dev_id;
+ if ( vinfo.capturing && vinfo.src &&
+ vidcap_src_capture_stop(vinfo.src) )
+ {
+ fprintf(stderr, "failed to stop video capture\n");
+ }
+
if ( vinfo.src && vidcap_src_release(vinfo.src) )
{
fprintf(stderr, "failed to release video source\n");
@@ -1654,6 +1678,12 @@
}
free(vinfo.devices);
+ if ( vinfo.capturing && vinfo.src )
+ vidcap_src_capture_stop(vinfo.src);
+
+ if ( vinfo.src )
+ vidcap_src_release(vinfo.src);
+
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-11-02 21:05:45
|
Revision: 1263
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1263&view=rev
Author: bcholew
Date: 2007-11-02 14:05:49 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Be careful not to use vinfo.src if it's not valid. If the selected vidcap device is removed, set the selected device id to -1. Before releasing a source be sure that capture has been stopped. Cleanup before calling vidcap_destroy().
Modified Paths:
--------------
trunk/lib/video.c
Modified: trunk/lib/video.c
===================================================================
--- trunk/lib/video.c 2007-11-02 17:07:22 UTC (rev 1262)
+++ trunk/lib/video.c 2007-11-02 21:05:49 UTC (rev 1263)
@@ -557,6 +557,15 @@
cap_info->error_status);
vinfo.capturing = 0;
+ /* NOTE:
+ * We want to release now, but we're in the capture callback thread.
+ * 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(),
+ * iaxc_video_device_set() or video_destroy() are called.
+ */
+
evt.type = IAXC_EVENT_VIDCAP_ERROR;
iaxci_post_event(evt);
return -1;
@@ -967,20 +976,19 @@
!(prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED)) )
{
MUTEXLOCK(&vinfo.camera_lock);
- if ( vinfo.capturing )
+ if ( vinfo.capturing && vinfo.src &&
+ vidcap_src_capture_stop(vinfo.src) )
{
- if ( vidcap_src_capture_stop(vinfo.src) )
- fprintf(stderr, "failed vidcap_src_capture_stop\n");
+ fprintf(stderr, "failed vidcap_src_capture_stop\n");
+ }
- vinfo.capturing = 0;
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release a video source\n");
+ }
- if ( vinfo.src && vidcap_src_release(vinfo.src) )
- {
- fprintf(stderr, "failed to release a video source\n");
- }
-
- vinfo.src = 0;
- }
+ vinfo.src = 0;
+ vinfo.capturing = 0;
MUTEXUNLOCK(&vinfo.camera_lock);
}
else
@@ -1434,9 +1442,16 @@
free(old_iaxc_dev_list);
}
+ /* If we can't find the selected device, defer releasing it.
+ * It'll happen when we set a new device, or shutdown
+ */
+
+ if ( !found_selected_device )
+ vinfo.selected_device_id = -1;
+
*devs = vinfo.devices;
*num_devs = vinfo.device_count;
- *id_selected = found_selected_device ? vinfo.selected_device_id : -1;
+ *id_selected = vinfo.selected_device_id;
return list_changed;
}
@@ -1480,6 +1495,12 @@
vinfo.selected_device_id = capture_dev_id;
+ if ( vinfo.capturing && vinfo.src &&
+ vidcap_src_capture_stop(vinfo.src) )
+ {
+ fprintf(stderr, "failed to stop video capture\n");
+ }
+
if ( vinfo.src && vidcap_src_release(vinfo.src) )
{
fprintf(stderr, "failed to release video source\n");
@@ -1655,6 +1676,12 @@
}
free(vinfo.devices);
+ if ( vinfo.capturing && vinfo.src )
+ vidcap_src_capture_stop(vinfo.src);
+
+ if ( vinfo.src )
+ vidcap_src_release(vinfo.src);
+
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2007-11-02 17:07:22
|
Revision: 1262
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1262&view=rev
Author: dohpaz
Date: 2007-11-02 10:07:22 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Add ability to send text to a particular call.
Modified Paths:
--------------
branches/team/elbunce/iaxclient/lib/iaxclient.h
branches/team/elbunce/iaxclient/lib/iaxclient_lib.c
Modified: branches/team/elbunce/iaxclient/lib/iaxclient.h
===================================================================
--- branches/team/elbunce/iaxclient/lib/iaxclient.h 2007-11-02 16:41:54 UTC (rev 1261)
+++ branches/team/elbunce/iaxclient/lib/iaxclient.h 2007-11-02 17:07:22 UTC (rev 1262)
@@ -861,6 +861,11 @@
EXPORT void iaxc_send_text(const char * text);
/*!
+ Sends \a text to call \a callNo
+*/
+EXPORT void iaxc_send_text_call(int callNo, const char * text);
+
+/*!
Sends a URL across the currently selected call
\param url The URL to send across.
\param link If non-zero the URL is a link
Modified: branches/team/elbunce/iaxclient/lib/iaxclient_lib.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-11-02 16:41:54 UTC (rev 1261)
+++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-11-02 17:07:22 UTC (rev 1262)
@@ -1501,6 +1501,17 @@
}
}
+EXPORT void iaxc_send_text_call(int callNo, const char * text)
+{
+ if ( callNo < 0 || !(calls[callNo].state & IAXC_CALL_STATE_ACTIVE) )
+ return;
+
+ get_iaxc_lock();
+ if ( calls[callNo].state & IAXC_CALL_STATE_ACTIVE )
+ iax_send_text(calls[callNo].session, text);
+ put_iaxc_lock();
+}
+
EXPORT void iaxc_send_url(const char * url, int link)
{
if ( selected_call >= 0 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-02 16:41:50
|
Revision: 1261
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1261&view=rev
Author: sbalea
Date: 2007-11-02 09:41:54 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Merge from trunk: make sure that all encoders and decoders are properly
destroyed upon iaxclient shutdown
Modified Paths:
--------------
branches/2.0/lib/iaxclient_lib.c
Modified: branches/2.0/lib/iaxclient_lib.c
===================================================================
--- branches/2.0/lib/iaxclient_lib.c 2007-11-02 16:32:05 UTC (rev 1260)
+++ branches/2.0/lib/iaxclient_lib.c 2007-11-02 16:41:54 UTC (rev 1261)
@@ -651,7 +651,25 @@
audio_driver.destroy(&audio_driver);
video_destroy();
-
+
+ /* destroy enocders and decoders for all existing calls */
+ if ( calls )
+ {
+ int i;
+ for ( i=0 ; i<max_calls ; i++ )
+ {
+ if ( calls[i].encoder )
+ calls[i].encoder->destroy(calls[i].encoder);
+ if ( calls[i].decoder )
+ calls[i].decoder->destroy(calls[i].decoder);
+ if ( calls[i].vencoder )
+ calls[i].vdecoder->destroy(calls[i].vencoder);
+ if ( calls[i].vdecoder )
+ calls[i].vencoder->destroy(calls[i].vdecoder);
+ }
+ free(calls);
+ calls = NULL;
+ }
put_iaxc_lock();
#ifdef WIN32
closesocket(iax_get_fd()); //fd:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-02 16:32:13
|
Revision: 1260
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1260&view=rev
Author: sbalea
Date: 2007-11-02 09:32:05 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Merge from trunk: make sure that encoders and decoders are properly destroyed
upon iaxclient shutdown. Fix provided by Teri Schoech
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-11-02 16:30:27 UTC (rev 1259)
+++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-02 16:32:05 UTC (rev 1260)
@@ -672,7 +672,25 @@
video_destroy();
#endif
}
-
+
+ /* destroy enocders and decoders for all existing calls */
+ if ( calls )
+ {
+ int i;
+ for ( i=0 ; i<max_calls ; i++ )
+ {
+ if ( calls[i].encoder )
+ calls[i].encoder->destroy(calls[i].encoder);
+ if ( calls[i].decoder )
+ calls[i].decoder->destroy(calls[i].decoder);
+ if ( calls[i].vencoder )
+ calls[i].vdecoder->destroy(calls[i].vencoder);
+ if ( calls[i].vdecoder )
+ calls[i].vencoder->destroy(calls[i].vdecoder);
+ }
+ free(calls);
+ calls = NULL;
+ }
put_iaxc_lock();
#ifdef WIN32
closesocket(iax_get_fd()); //fd:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-02 16:30:23
|
Revision: 1259
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1259&view=rev
Author: sbalea
Date: 2007-11-02 09:30:27 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Make sure that encoders and decoders are properly destroyed upon iaxclient
shutdown. Fix provided by Teri Schoech.
Modified Paths:
--------------
trunk/lib/iaxclient_lib.c
Modified: trunk/lib/iaxclient_lib.c
===================================================================
--- trunk/lib/iaxclient_lib.c 2007-11-02 16:15:36 UTC (rev 1258)
+++ trunk/lib/iaxclient_lib.c 2007-11-02 16:30:27 UTC (rev 1259)
@@ -670,7 +670,25 @@
video_destroy();
#endif
}
-
+
+ /* destroy enocders and decoders for all existing calls */
+ if ( calls )
+ {
+ int i;
+ for ( i=0 ; i<max_calls ; i++ )
+ {
+ if ( calls[i].encoder )
+ calls[i].encoder->destroy(calls[i].encoder);
+ if ( calls[i].decoder )
+ calls[i].decoder->destroy(calls[i].decoder);
+ if ( calls[i].vencoder )
+ calls[i].vdecoder->destroy(calls[i].vencoder);
+ if ( calls[i].vdecoder )
+ calls[i].vencoder->destroy(calls[i].vdecoder);
+ }
+ free(calls);
+ calls = NULL;
+ }
put_iaxc_lock();
#ifdef WIN32
closesocket(iax_get_fd()); //fd:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-02 16:15:39
|
Revision: 1258
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1258&view=rev
Author: sbalea
Date: 2007-11-02 09:15:36 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Properly destroy st and ec states in audio_destroy
Modified Paths:
--------------
branches/team/mihai/echocan/lib/audio_encode.c
Modified: branches/team/mihai/echocan/lib/audio_encode.c
===================================================================
--- branches/team/mihai/echocan/lib/audio_encode.c 2007-11-02 14:26:56 UTC (rev 1257)
+++ branches/team/mihai/echocan/lib/audio_encode.c 2007-11-02 16:15:36 UTC (rev 1258)
@@ -499,6 +499,18 @@
int audio_destroy()
{
+ MUTEXLOCK(&audio_lock);
+ if ( st )
+ {
+ speex_preprocess_state_destroy(st);
+ st = NULL;
+ }
+ if ( ec )
+ {
+ speex_echo_state_destroy(ec);
+ ec = NULL;
+ }
+ MUTEXUNLOCK(&audio_lock);
MUTEXDESTROY(&audio_lock);
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-02 14:27:00
|
Revision: 1257
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1257&view=rev
Author: sbalea
Date: 2007-11-02 07:26:56 -0700 (Fri, 02 Nov 2007)
Log Message:
-----------
Initialize and destroy audio_lock.
Modified Paths:
--------------
branches/team/mihai/echocan/lib/audio_encode.c
branches/team/mihai/echocan/lib/audio_encode.h
branches/team/mihai/echocan/lib/iaxclient_lib.c
Modified: branches/team/mihai/echocan/lib/audio_encode.c
===================================================================
--- branches/team/mihai/echocan/lib/audio_encode.c 2007-11-01 21:15:30 UTC (rev 1256)
+++ branches/team/mihai/echocan/lib/audio_encode.c 2007-11-02 14:26:56 UTC (rev 1257)
@@ -491,3 +491,15 @@
return 0;
}
+int audio_initialize()
+{
+ MUTEXINIT(&audio_lock);
+ return 0;
+}
+
+int audio_destroy()
+{
+ MUTEXDESTROY(&audio_lock);
+ return 0;
+}
+
Modified: branches/team/mihai/echocan/lib/audio_encode.h
===================================================================
--- branches/team/mihai/echocan/lib/audio_encode.h 2007-11-01 21:15:30 UTC (rev 1256)
+++ branches/team/mihai/echocan/lib/audio_encode.h 2007-11-02 14:26:56 UTC (rev 1257)
@@ -55,6 +55,9 @@
struct iaxc_call;
struct iax_event;
+int audio_initialize();
+int audio_destroy();
+
int audio_send_encoded_audio(struct iaxc_call * most_recent_answer, int callNo,
void * data, int iEncodeType, int samples);
Modified: branches/team/mihai/echocan/lib/iaxclient_lib.c
===================================================================
--- branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-01 21:15:30 UTC (rev 1256)
+++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-02 14:26:56 UTC (rev 1257)
@@ -620,6 +620,7 @@
if ( !test_mode )
{
+ audio_initialize();
#ifndef AUDIO_ALSA
if ( pa_initialize(&audio_driver, 8000) )
{
@@ -666,6 +667,7 @@
if ( !test_mode )
{
audio_driver.destroy(&audio_driver);
+ audio_destroy();
#ifdef USE_VIDEO
video_destroy();
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-11-01 21:15:26
|
Revision: 1256
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1256&view=rev
Author: bcholew
Date: 2007-11-01 14:15:30 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
When checking for changes to the vidcap device list, look at the device's unique id_string. Otherwise two identical webcams would confuse us.
Modified Paths:
--------------
trunk/lib/video.c
Modified: trunk/lib/video.c
===================================================================
--- trunk/lib/video.c 2007-11-01 17:37:41 UTC (rev 1255)
+++ trunk/lib/video.c 2007-11-01 21:15:30 UTC (rev 1256)
@@ -1377,7 +1377,10 @@
*/
for ( i = 0; i < vinfo.device_count; i++ )
{
- if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
+ /* check both the device name and its unique identifier */
+ if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) &&
+ !strcmp(new_iaxc_dev_list[n].id_string,
+ vinfo.devices[i].id_string) )
{
new_iaxc_dev_list[n].id = vinfo.devices[i].id;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2007-11-01 17:37:46
|
Revision: 1255
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1255&view=rev
Author: dohpaz
Date: 2007-11-01 10:37:41 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
Merge up to trunk of r1254.
Modified Paths:
--------------
branches/team/elbunce/iaxclient/README.VisualStudio
branches/team/elbunce/iaxclient/contrib/tcl/iaxclient.c
branches/team/elbunce/iaxclient/contrib/win/vs2005/iaxclient.sln
branches/team/elbunce/iaxclient/lib/audio_portaudio.c
branches/team/elbunce/iaxclient/lib/codec_theora.c
branches/team/elbunce/iaxclient/lib/codec_ulaw.c
branches/team/elbunce/iaxclient/lib/iaxclient.h
branches/team/elbunce/iaxclient/lib/iaxclient_lib.c
branches/team/elbunce/iaxclient/lib/portmixer/px_win_wmme/px_win_wmme.c
branches/team/elbunce/iaxclient/lib/slice.c
branches/team/elbunce/iaxclient/lib/slice.h
branches/team/elbunce/iaxclient/lib/video.c
branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c
branches/team/elbunce/iaxclient/simpleclient/vtestcall/vtestcall.c
Added Paths:
-----------
branches/team/elbunce/iaxclient/contrib/win/vs2005/libvidcap.vcproj
Modified: branches/team/elbunce/iaxclient/README.VisualStudio
===================================================================
--- branches/team/elbunce/iaxclient/README.VisualStudio 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/README.VisualStudio 2007-11-01 17:37:41 UTC (rev 1255)
@@ -28,18 +28,19 @@
http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf
2) Obtain dependencies. At the time of this writing, portaudio-v19,
- libogg 1.1.3, speex 1.2beta1, and libtheora 1.0alpha7 are required.
+ libogg 1.1.3, speex 1.2beta1, libtheora 1.0alpha7, and libvidcap are required.
Source for these dependencies are available here:
http://portaudio.com/archives/pa_snapshot_v19.tar.gz
http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
http://downloads.xiph.org/releases/speex/speex-1.2beta1.tar.gz
http://downloads.xiph.org/releases/theora/libtheora-1.0alpha7.tar.gz
+ http://downloads.sourceforge.net/libvidcap/libvidcap-0.1.tar.gz
In order to build with the vcproj files provided by iaxclient,
these dependent libraries must be moved to be peer directories to
the iaxclient source directory. They also must have the following
- names: libogg, speex, and libtheora. So the final directory
+ names: libogg, speex, libtheora and libvidcap. So the final directory
layout would be as follows:
C:\...\whereever\iaxclient
@@ -47,6 +48,7 @@
C:\...\whereever\libogg
C:\...\whereever\speex
C:\...\whereever\libtheora
+ C:\...\whereever\libvidcap
2) Open the solution file: contrib/win/vs2005/iaxclient.sln
Modified: branches/team/elbunce/iaxclient/contrib/tcl/iaxclient.c
===================================================================
--- branches/team/elbunce/iaxclient/contrib/tcl/iaxclient.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/contrib/tcl/iaxclient.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -600,7 +600,9 @@
}
if (objc == 2) {
- line = iaxc_selected_call();
+ // Problems reported coming from this line.
+ // If including it again you must be very sure of exactly what you do!
+ //line = iaxc_selected_call();
}
if (objc == 3) {
@@ -614,7 +616,9 @@
if (result == TCL_OK) {
iaxc_call(num);
- iaxc_select_call(line);
+ // Problems reported coming from this line.
+ // If including it again you must be very sure of exactly what you do!
+ //iaxc_select_call(line);
}
return result;
}
Modified: branches/team/elbunce/iaxclient/contrib/win/vs2005/iaxclient.sln
===================================================================
--- branches/team/elbunce/iaxclient/contrib/win/vs2005/iaxclient.sln 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/contrib/win/vs2005/iaxclient.sln 2007-11-01 17:37:41 UTC (rev 1255)
@@ -7,14 +7,14 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}"
ProjectSection(ProjectDependencies) = postProject
+ {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A}
+ {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569}
+ {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
+ {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}
+ {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
+ {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8}
+ {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE}
{3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C}
- {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE}
- {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8}
- {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
- {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}
- {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
- {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569}
- {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}"
@@ -34,6 +34,11 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "..\..\..\simpleclient\vtestcall\vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_dll|Win32 = Debug_dll|Win32
@@ -122,6 +127,14 @@
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release_dll|Win32.Build.0 = Release|Win32
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.ActiveCfg = Release|Win32
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.Build.0 = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.ActiveCfg = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.Build.0 = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.Build.0 = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.ActiveCfg = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.Build.0 = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.ActiveCfg = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Copied: branches/team/elbunce/iaxclient/contrib/win/vs2005/libvidcap.vcproj (from rev 1252, trunk/contrib/win/vs2005/libvidcap.vcproj)
===================================================================
--- branches/team/elbunce/iaxclient/contrib/win/vs2005/libvidcap.vcproj (rev 0)
+++ branches/team/elbunce/iaxclient/contrib/win/vs2005/libvidcap.vcproj 2007-11-01 17:37:41 UTC (rev 1255)
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libvidcap"
+ ProjectGUID="{F5166D99-32BB-40D5-BE95-6F97F72C44CE}"
+ RootNamespace="libvidcap"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(OutDir)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include""
+ PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(OutDir)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include""
+ PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_i420.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_rgb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_yuy2.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\hotlist.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi_dshow.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sliding_window.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\vidcap.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\include\vidcap\converters.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\hotlist.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\LocklessQueue.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi_context.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sliding_window.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\include\vidcap\vidcap.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: branches/team/elbunce/iaxclient/lib/audio_portaudio.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/audio_portaudio.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/audio_portaudio.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -1062,6 +1062,25 @@
/* remove our devices changed callback */
Pa_RemoveDevicesChangedCallback(pa_devicesChangedCallback, d);
+ if( iMixer )
+ {
+ Px_CloseMixer(iMixer);
+ iMixer = NULL;
+ }
+ if ( oMixer )
+ {
+ Px_CloseMixer(oMixer);
+ oMixer = NULL;
+ }
+ if ( d )
+ {
+ if ( d->devices )
+ {
+ free(d->devices);
+ d->devices= NULL;
+ }
+ }
+
return Pa_Terminate();
}
Modified: branches/team/elbunce/iaxclient/lib/codec_theora.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/codec_theora.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/codec_theora.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -111,7 +111,8 @@
free(c);
}
-static int decode(struct iaxc_video_codec *c, int inlen, char *in, int *outlen, char *out)
+static int decode(struct iaxc_video_codec *c, int inlen, const char *in,
+ int *outlen, char *out)
{
struct theora_decoder *d;
ogg_packet op;
Modified: branches/team/elbunce/iaxclient/lib/codec_ulaw.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/codec_ulaw.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/codec_ulaw.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -84,7 +84,9 @@
}
static void destroy ( struct iaxc_audio_codec *c) {
- free(c);
+ if ( c->decstate )
+ free(c->decstate);
+ free(c);
}
Modified: branches/team/elbunce/iaxclient/lib/iaxclient.h
===================================================================
--- branches/team/elbunce/iaxclient/lib/iaxclient.h 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/iaxclient.h 2007-11-01 17:37:41 UTC (rev 1255)
@@ -133,6 +133,8 @@
#define IAXC_EVENT_AUDIO 10 /*!< Indicates an audio event */
#define IAXC_EVENT_VIDEOSTATS 11 /*!< Indicates a video statistics update event */
#define IAXC_EVENT_DEVICES_CHANGED 12 /*!< Indicates a devices changed event. */
+#define IAXC_EVENT_VIDCAP_ERROR 12 /*!< Indicates a video capture error occurred */
+#define IAXC_EVENT_VIDCAP_DEVICE 13 /*!< Indicates a possible video capture device insertion/removal */
#define IAXC_CALL_STATE_FREE 0 /*!< Indicates a call slot is free */
#define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active */
@@ -573,6 +575,21 @@
};
/*!
+ A structure containing information about a DTMF event
+ */
+struct iaxc_ev_dtmf {
+ /*!
+ The call this DTMF event is for.
+ */
+ int callNo;
+
+ /*!
+ The digit represented by this DTMF tone
+ */
+ char digit;
+};
+
+/*!
A structure describing a single IAXClient event.
*/
typedef struct iaxc_event_struct {
@@ -610,6 +627,8 @@
struct iaxc_ev_audio audio;
/*! Contains registration data if type = IAXC_EVENT_REGISTRATION */
struct iaxc_ev_registration reg;
+ /*! Contains DTMF data if type = IAXC_EVENT_DTMF */
+ struct iaxc_ev_dtmf dtmf;
/*! Contains devices changed data if type = IAXC_EVENT_DEVICES_CHANGED */
struct iaxc_ev_devices_changed devschanged;
} ev;
@@ -945,6 +964,26 @@
*/
EXPORT int iaxc_get_netstats(int call, int *rtt, struct iaxc_netstat *local, struct iaxc_netstat *remote);
+/*!
+ A structure containing information about a video capture device.
+*/
+struct iaxc_video_device {
+ /*!
+ The "human readable" name of the device
+ */
+ const char *name;
+
+ /*!
+ unique id of the device
+ */
+ const char *id_string;
+
+ /*!
+ iaxclient id of the device
+ */
+ int id;
+};
+
#define IAXC_AD_INPUT (1<<0) /*!< Device is usable for input*/
#define IAXC_AD_OUTPUT (1<<1) /*!< Device is usable for output */
#define IAXC_AD_RING (1<<2) /*!< Device is usable for ring */
@@ -1136,6 +1175,28 @@
*/
EXPORT int iaxc_set_audio_prefs(unsigned int prefs);
+/*!
+ Get video capture device information.
+ WARNING: the array pointed to by parameter 'devs' below is owned
+ by iaxclient, and may be freed on subsequent calls to
+ this function.
+ \param devs Returns an array of iaxc_video_device structures.
+ The array will only be valid until this function is
+ called again (if the device list changes), or until
+ iaxc is shutdown.
+ \param nDevs Returns the number of devices in the devs array
+ \param devId Returns the id of the currently selected video capture device
+
+ \return -1 on error, 0 if no change to the device list, 1 if it's been updated
+ */
+EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, int *nDevs, int *devId);
+
+/*!
+ Sets the current video capture device
+ \param devId The id of the device to use for video capture
+ */
+EXPORT int iaxc_video_device_set(int devId);
+
/*
* Acceptable range for video rezolution
*/
Modified: branches/team/elbunce/iaxclient/lib/iaxclient_lib.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/iaxclient_lib.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -378,6 +378,15 @@
iaxci_post_event(e);
}
+void iaxci_do_dtmf_callback(int callNo, char digit)
+{
+ iaxc_event e;
+ e.type = IAXC_EVENT_DTMF;
+ e.ev.dtmf.callNo = callNo;
+ e.ev.dtmf.digit = digit;
+ iaxci_post_event(e);
+}
+
static int iaxc_remove_registration_by_id(int id)
{
struct iaxc_registration *curr, *prev;
@@ -1196,6 +1205,10 @@
iaxci_do_state_callback(callNo);
iaxci_usermsg(IAXC_STATUS,"Call %d transfer released", callNo);
break;
+ case IAX_EVENT_DTMF:
+ iaxci_do_dtmf_callback(callNo,e->subclass);
+ iaxci_usermsg(IAXC_STATUS, "DTMF digit %c received", e->subclass);
+ break;
default:
iaxci_usermsg(IAXC_STATUS, "Unknown event: %d for call %d", e->etype, callNo);
break;
Modified: branches/team/elbunce/iaxclient/lib/portmixer/px_win_wmme/px_win_wmme.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/portmixer/px_win_wmme/px_win_wmme.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/portmixer/px_win_wmme/px_win_wmme.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -671,7 +671,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return mmr ;
+ }
//
// find boost control
@@ -701,7 +705,11 @@
}
if ( boost_id == -1 )
+ {
+ free(mixerControl);
+
return MMSYSERR_ERROR ;
+ }
//
// get control details
@@ -724,7 +732,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return mmr ;
+ }
//
// update value
@@ -742,6 +754,8 @@
MIXER_SETCONTROLDETAILSF_VALUE
) ;
+ free(mixerControl);
+
if ( mmr != MMSYSERR_NOERROR )
return mmr ;
@@ -795,7 +809,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return -1 ;
+ }
//
// find boost control
@@ -825,7 +843,11 @@
}
if ( boost_id == -1 )
+ {
+ free(mixerControl);
+
return -1 ;
+ }
//
// get control details
@@ -847,6 +869,8 @@
MIXER_GETCONTROLDETAILSF_VALUE
) ;
+ free(mixerControl);
+
if ( mmr != MMSYSERR_NOERROR )
return -1 ;
Modified: branches/team/elbunce/iaxclient/lib/slice.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/slice.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/slice.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -32,7 +32,7 @@
return 0;
}
-int slice(char *data,
+int slice(const char *data,
unsigned int size,
struct slice_set_t *slice_set,
struct slicer_context *sc
@@ -93,7 +93,8 @@
dsc->frame_complete = 0;
}
-char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc)
+char *
+deslice(const char *in, int inlen, int *outlen, struct deslicer_context *dsc)
{
unsigned char frame_index, slice_index, num_slices, version;
unsigned short source_id;
Modified: branches/team/elbunce/iaxclient/lib/slice.h
===================================================================
--- branches/team/elbunce/iaxclient/lib/slice.h 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/slice.h 2007-11-01 17:37:41 UTC (rev 1255)
@@ -77,7 +77,7 @@
* sc - holds stream information such as source id and frame index
* Returns 0 if completed successfully or a negative value if failure.
*/
-int slice(char *data,
+int slice(const char *data,
unsigned int size,
struct slice_set_t *slice_set,
struct slicer_context *sc
@@ -103,6 +103,7 @@
* Returns a pointer to a buffer containing the completed frame and updates
* outlen with the frame size if successful
*/
-char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc);
+char *
+deslice(const char *in, int inlen, int *outlen, struct deslicer_context *dsc);
-#endif // __SLICE_H__
+#endif
Modified: branches/team/elbunce/iaxclient/lib/video.c
===================================================================
--- branches/team/elbunce/iaxclient/lib/video.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/lib/video.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -31,13 +31,16 @@
#include "codec_theora.h"
#endif
+#if defined(WIN32)
+#define strdup _strdup
+#endif
+
struct video_info
{
vidcap_state * vc;
vidcap_sapi * sapi;
vidcap_src * src;
struct vidcap_sapi_info sapi_info;
- struct vidcap_src_info src_info;
struct vidcap_fmt_info fmt_info;
/* these are the requested (post-scaling) dimensions */
@@ -63,6 +66,15 @@
int prefs;
struct slicer_context * sc;
+
+ /* these two struct arrays are correlated by index */
+ struct vidcap_src_info * vc_src_info;
+ struct iaxc_video_device * devices;
+ MUTEX dev_list_lock;
+
+ int device_count;
+ int selected_device_id;
+ int next_id;
};
struct video_format_info
@@ -492,6 +504,24 @@
*/
}
+static int video_device_notification_callback(vidcap_sapi *sapi,
+ void * user_context)
+{
+ iaxc_event evt;
+
+ if ( sapi != vinfo.sapi )
+ {
+ fprintf(stderr, "ERROR: wrong sapi in device notification\n");
+ return -1;
+ }
+
+ /* notify application that device list has been updated */
+ evt.type = IAXC_EVENT_VIDCAP_DEVICE;
+ iaxci_post_event(evt);
+
+ return 0;
+}
+
static int capture_callback(vidcap_src * src, void * user_data,
struct vidcap_capture_info * cap_info)
{
@@ -517,6 +547,8 @@
const char * source_buf = 0;
int source_buf_size = 0;
+ iaxc_event evt;
+
int i;
if ( cap_info->error_status )
@@ -524,6 +556,9 @@
fprintf(stderr, "vidcap capture error %d\n",
cap_info->error_status);
vinfo.capturing = 0;
+
+ evt.type = IAXC_EVENT_VIDCAP_ERROR;
+ iaxci_post_event(evt);
return -1;
}
@@ -732,30 +767,10 @@
};
static const int fourcc_list_len = sizeof(fourcc_list) / sizeof(int);
- int i;
static const int max_factor = 2;
int scale_factor;
+ int i;
- if ( !vinfo.src )
- {
- /* Acquire the default source */
- if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi, 0)) )
- {
- fprintf(stderr, "failed to acquire video source\n");
- return -1;
- }
-
- if ( vidcap_src_info_get(vinfo.src, &vinfo.src_info) )
- {
- fprintf(stderr, "failed to get video source info\n");
- return -1;
- }
-
- fprintf(stderr, "acquired vidcap source %s (%s)\n",
- vinfo.src_info.description,
- vinfo.src_info.identifier);
- }
-
vinfo.width = vfinfo.width;
vinfo.height = vfinfo.height;
vinfo.fmt_info.fps_numerator = vfinfo.framerate;
@@ -878,6 +893,46 @@
return 0;
}
+static int ensure_acquired(int dev_id)
+{
+ int dev_num;
+
+ if ( !vinfo.src )
+ {
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ )
+ {
+ if ( vinfo.devices[dev_num].id == dev_id )
+ break;
+ }
+
+ if ( dev_num == vinfo.device_count )
+ {
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ fprintf(stderr, "invalid vidcap dev id: %d\n", dev_id);
+ return -1;
+ }
+
+ if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi,
+ &vinfo.vc_src_info[dev_num])) )
+ {
+ vinfo.src = 0;
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ fprintf(stderr, "failed to acquire video source\n");
+ return -1;
+ }
+
+ fprintf(stderr, "acquired vidcap source %s (%s)\n",
+ vinfo.vc_src_info[dev_num].description,
+ vinfo.vc_src_info[dev_num].identifier);
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ }
+
+ return 0;
+}
+
EXPORT int iaxc_set_video_prefs(unsigned int prefs)
{
const unsigned int prefs_mask =
@@ -888,9 +943,14 @@
IAXC_VIDEO_PREF_SEND_DISABLE |
IAXC_VIDEO_PREF_RECV_RGB32 |
IAXC_VIDEO_PREF_CAPTURE_DISABLE;
+ int ret;
if ( prefs & ~prefs_mask )
+ {
+ fprintf(stderr, "ERROR: unexpected video preference: 0x%0x\n",
+ prefs);
return -1;
+ }
vinfo.prefs = prefs;
@@ -913,7 +973,15 @@
{
if ( vidcap_src_capture_stop(vinfo.src) )
fprintf(stderr, "failed vidcap_src_capture_stop\n");
+
vinfo.capturing = 0;
+
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release a video source\n");
+ }
+
+ vinfo.src = 0;
}
MUTEXUNLOCK(&vinfo.camera_lock);
}
@@ -922,17 +990,30 @@
MUTEXLOCK(&vinfo.camera_lock);
if ( !vinfo.capturing )
{
+ if ( vinfo.selected_device_id < 0 )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( ensure_acquired(vinfo.selected_device_id) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
if ( prepare_for_capture() )
{
MUTEXUNLOCK(&vinfo.camera_lock);
return -1;
}
- if ( vidcap_src_capture_start(vinfo.src,
- capture_callback, 0) )
+ if ( (ret = vidcap_src_capture_start(vinfo.src,
+ capture_callback, 0)) )
{
MUTEXUNLOCK(&vinfo.camera_lock);
- fprintf(stderr, "failed to start video capture\n");
+ fprintf(stderr, "failed to start video capture: %d\n",
+ ret);
return -1;
}
@@ -1233,10 +1314,223 @@
return 0;
}
+EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs,
+ int *num_devs, int *id_selected)
+{
+ int new_device_count;
+ int old_device_count;
+ struct vidcap_src_info *new_src_list;
+ struct vidcap_src_info *old_src_list;
+ 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 i, n;
+
+ /* update libvidcap's device list */
+ new_device_count = vidcap_src_list_update(vinfo.sapi);
+ if ( new_device_count != vinfo.device_count )
+ list_changed = 1;
+
+ if ( new_device_count < 0 )
+ {
+ fprintf(stderr, "ERROR: failed getting updated vidcap device list: %d\n",
+ new_device_count);
+ return -1;
+ }
+
+ new_src_list = (struct vidcap_src_info *)malloc(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));
+ if ( !new_iaxc_dev_list )
+ {
+ free(new_src_list);
+ fprintf(stderr, "ERROR: failed source allocation update\n");
+ return -1;
+ }
+
+ /* 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");
+
+ free(new_src_list);
+ free(new_iaxc_dev_list);
+ return -1;
+ }
+
+ /* 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);
+ new_iaxc_dev_list[n].id_string = strdup(new_src_list[n].identifier);
+
+ /* This device may have been here all along.
+ * If it has, re-assign that device id
+ * else assign a new id
+ */
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
+ {
+ new_iaxc_dev_list[n].id = vinfo.devices[i].id;
+
+ if ( vinfo.selected_device_id == new_iaxc_dev_list[n].id )
+ found_selected_device = 1;
+ break;
+ }
+ }
+ if ( i == vinfo.device_count )
+ {
+ new_iaxc_dev_list[n].id = vinfo.next_id++;
+
+ list_changed = 1;
+ }
+ }
+
+ if ( !list_changed )
+ {
+ /* Free new lists. Nothing's really changed */
+ free(new_src_list);
+ for ( i = 0; i < new_device_count; i++ )
+ {
+ free((void *)new_iaxc_dev_list[i].name);
+ free((void *)new_iaxc_dev_list[i].id_string);
+ }
+ free(new_iaxc_dev_list);
+ }
+ else
+ {
+ old_device_count = vinfo.device_count;
+ old_src_list = vinfo.vc_src_info;
+ old_iaxc_dev_list = vinfo.devices;
+
+ /* Update iaxclient's device list info */
+ /* Lock since other iaxclient funcs use these fields */
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ vinfo.device_count = new_device_count;
+ vinfo.vc_src_info = new_src_list;
+ vinfo.devices = new_iaxc_dev_list;
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+
+ /* free old lists */
+ free(old_src_list);
+ for ( i = 0; i < old_device_count; i++ )
+ {
+ free((void *)old_iaxc_dev_list[i].name);
+ free((void *)old_iaxc_dev_list[i].id_string);
+ }
+ free(old_iaxc_dev_list);
+ }
+
+ *devs = vinfo.devices;
+ *num_devs = vinfo.device_count;
+ *id_selected = found_selected_device ? vinfo.selected_device_id : -1;
+
+ return list_changed;
+}
+
+EXPORT int iaxc_video_device_set(int capture_dev_id)
+{
+ int ret = 0;
+ int dev_num = 0;
+
+ MUTEXLOCK(&vinfo.camera_lock);
+
+ if ( capture_dev_id == vinfo.selected_device_id )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return 0;
+ }
+
+ if ( capture_dev_id < 0 )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "invalid video device id ( < 0 )\n");
+ return -1;
+ }
+
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ )
+ {
+ if ( vinfo.devices[dev_num].id == capture_dev_id )
+ break;
+ }
+
+ if ( dev_num == vinfo.device_count )
+ {
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "invalid video device id: %d\n",
+ capture_dev_id);
+ return -1;
+ }
+
+ vinfo.selected_device_id = capture_dev_id;
+
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release video source\n");
+ }
+
+ vinfo.src = 0;
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+
+ if ( vinfo.capturing )
+ {
+ if ( ensure_acquired(capture_dev_id) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( prepare_for_capture() )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( (ret = vidcap_src_capture_start(vinfo.src,
+ capture_callback, 0)) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "failed to restart video capture: %d\n", ret);
+ return -1;
+ }
+ }
+
+ MUTEXUNLOCK(&vinfo.camera_lock);
+
+ return 0;
+}
+
int video_initialize(void)
{
+ int i;
+ const int starting_id = 50;
+
memset(&vinfo, 0, sizeof(vinfo));
+ vinfo.width = vfinfo.width;
+ vinfo.height = vfinfo.height;
+ vinfo.selected_device_id = -1;
+ vinfo.next_id = starting_id;
+
+ MUTEXINIT(&vinfo.camera_lock);
+ MUTEXINIT(&vinfo.dev_list_lock);
+
if ( !(vinfo.vc = vidcap_initialize()) )
{
fprintf(stderr, "ERROR: failed vidcap_initialize\n");
@@ -1259,23 +1553,86 @@
vinfo.sapi_info.description,
vinfo.sapi_info.identifier);
- /* TODO: Maybe we should reevaluate these defaults. Once could
- * make an argument that reasonable users of iaxclient might
- * not want video to be delivered as soon as they iaxc_initialize().
+ vinfo.device_count = vidcap_src_list_update(vinfo.sapi);
+ if ( vinfo.device_count < 0 )
+ {
+ fprintf(stderr,
+ "ERROR: failed updating video capture devices list\n");
+ goto bail;
+ }
+
+ vinfo.vc_src_info = (struct vidcap_src_info *)malloc(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 *
+ sizeof(struct iaxc_video_device));
+ if ( !vinfo.devices )
+ {
+ fprintf(stderr, "ERROR: failed vinfo field allocation\n");
+ free(vinfo.vc_src_info);
+ goto bail;
+ }
+
+ if ( vidcap_src_list_get(vinfo.sapi, vinfo.device_count,
+ vinfo.vc_src_info) )
+ {
+ fprintf(stderr, "ERROR: failed vidcap_src_list_get()\n");
+ free(vinfo.vc_src_info);
+ free(vinfo.devices);
+ goto bail;
+ }
+
+ /* build initial iaxclient video source list */
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ vinfo.devices[i].name = strdup(vinfo.vc_src_info[i].description);
+ vinfo.devices[i].id_string = strdup(vinfo.vc_src_info[i].identifier);
+ /* Let's be clear that the device id is not some
+ * base-zero index. Once plug-n-play is implemented,
+ * these ids may diverge as devices are added
+ * and removed.
+ */
+ vinfo.devices[i].id = vinfo.next_id++;
+ }
+
+ if ( vinfo.device_count )
+ {
+ /* set default source - the first device */
+ iaxc_video_device_set(vinfo.devices[0].id);
+ }
+
+ /* setup device notification callback
+ * for device insertion and removal
*/
+ if ( vidcap_srcs_notify(vinfo.sapi, &video_device_notification_callback, 0) )
+ {
+ 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;
+ IAXC_VIDEO_PREF_RECV_REMOTE_RAW |
+ IAXC_VIDEO_PREF_CAPTURE_DISABLE;
- MUTEXINIT(&vinfo.camera_lock);
+ return 0;
- /* We reset the existing video preferences to yield the side-effect
- * of potentially starting or stopping the video capture.
- */
- iaxc_set_video_prefs(vinfo.prefs);
+late_bail:
+ free(vinfo.vc_src_info);
- return 0;
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ free((void *)vinfo.devices[i].name);
+ free((void *)vinfo.devices[i].id_string);
+ }
+ free(vinfo.devices);
+
bail:
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
@@ -1284,13 +1641,24 @@
int video_destroy(void)
{
+ int i;
+
if ( !vinfo.vc )
return -1;
+ free(vinfo.vc_src_info);
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ free((void *)vinfo.devices[i].name);
+ free((void *)vinfo.devices[i].id_string);
+ }
+ free(vinfo.devices);
+
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
MUTEXDESTROY(&vinfo.camera_lock);
+ MUTEXDESTROY(&vinfo.dev_list_lock);
if ( vinfo.converted_i420_buf )
{
@@ -1326,7 +1694,7 @@
* we are saying that the "camera is working" if there exists
* more than zero cameras.
*/
- return vidcap_src_list_update(vinfo.sapi);
+ return vidcap_src_list_update(vinfo.sapi) > 0;
}
int video_send_stats(struct iaxc_call * call)
Modified: branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c
===================================================================
--- branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/simpleclient/stresstest/stresstest.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -23,7 +23,6 @@
#include <signal.h>
#include "iaxclient.h"
-#include "slice.h"
#include "file.h"
#ifdef WIN32
@@ -57,7 +56,8 @@
static int send_video = 1;
static int send_audio = 1;
static int print_netstats = 0;
-static int timeout = 0;
+static int call_timeout_ms = 0;
+static int connect_timeout_ms = 5000;
static int video_frames_count = 0;
static int audio_frames_count = 0;
@@ -193,7 +193,8 @@
" -a stop sending audio\n"
" -l run file in a loop\n"
" -n dump periodic netstats to log file\n"
- " -t <timeout> terminate after timeout seconds and report status via return code\n"
+ " -t <TIMEOUT> terminate call after TIMEOUT seconds\n"
+ " -c <TIMEOUT> try connecting for TIMEOUT seconds (default 5)\n"
" -L <FILE> log to FILE\n"
"\n"
);
@@ -269,14 +270,14 @@
switch ( argv[i][1] )
{
case 'F': /* set video params */
- {
- formatp = 1 << atoi(argv[++i]);
- framerate = atoi(argv[++i]);
- bitrate = atoi(argv[++i]);
- width = atoi(argv[++i]);
- height = atoi(argv[++i]);
- fragsize = atoi(argv[++i]);
- }
+ if ( i+6 >= argc )
+ usage();
+ formatp = 1 << atoi(argv[++i]);
+ framerate = atoi(argv[++i]);
+ bitrate = atoi(argv[++i]);
+ width = atoi(argv[++i]);
+ height = atoi(argv[++i]);
+ fragsize = atoi(argv[++i]);
break;
case 'o':
if ( i+1 >= argc )
@@ -298,8 +299,13 @@
case 't':
if ( i+1 >= argc )
usage();
- timeout = 1000 * atoi(argv[++i]);
+ call_timeout_ms = 1000 * atoi(argv[++i]);
break;
+ case 'c':
+ if ( i+1 >= argc )
+ usage();
+ connect_timeout_ms = 1000 * atoi(argv[++i]);
+ break;
case 'L':
if ( i+1 >= argc )
usage();
@@ -314,7 +320,7 @@
usage();
}
} else
- dest=argv[i];
+ dest = argv[i];
}
if ( dest == NULL )
@@ -355,11 +361,12 @@
mylog("Failed to make call to '%s'", dest);
// Wait for the call to be established;
- while ( !call_established )
+ while ( !call_established && running )
{
struct timeval now;
gettimeofday(&now, NULL);
- if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
+ if ( connect_timeout_ms > 0 &&
+ msecdiff(&start_time, &now) > connect_timeout_ms )
hangup_and_exit(TEST_NO_CONNECTION);
iaxc_millisleep(5);
}
@@ -394,7 +401,8 @@
// Exit after a positive timeout
gettimeofday(&now, NULL);
- if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
+ if ( call_timeout_ms > 0 &&
+ msecdiff(&start_time, &now) > call_timeout_ms )
running = 0;
}
Modified: branches/team/elbunce/iaxclient/simpleclient/vtestcall/vtestcall.c
===================================================================
--- branches/team/elbunce/iaxclient/simpleclient/vtestcall/vtestcall.c 2007-11-01 15:23:44 UTC (rev 1254)
+++ branches/team/elbunce/iaxclient/simpleclient/vtestcall/vtestcall.c 2007-11-01 17:37:41 UTC (rev 1255)
@@ -238,6 +238,9 @@
e.ev.audio.source == IAXC_SOURCE_REMOTE ? "remote" : "local",
e.ev.audio.encoded ? "encoded" : "raw");
break;
+ case IAXC_EVENT_VIDCAP_ERROR:
+ fprintf(stderr, "\nVIDEO CAPTURE DEVICE ERROR\n");
+ break;
default:
break;
}
@@ -275,12 +278,28 @@
int nDevs, input, output,ring;
int i;
+ int vinput;
+ int nVdevs;
+ struct iaxc_video_device *vDevs;
+
iaxc_audio_devices_get(&devs,&nDevs, &input, &output, &ring);
+ printf("\nThere are %d audio devices:\n", nDevs);
for(i=0;i<nDevs;i++)
{
- fprintf(stderr, "DEVICE ID=%d NAME=%s CAPS=%lx\n", devs[i].devID, devs[i].name, devs[i].capabilities);
+ fprintf(stderr, "AUDIO DEVICE ID = %d NAME = %s CAPS=%lx\n",
+ devs[i].devID, devs[i].name, devs[i].capabilities);
iaxc_audio_devices_set(input,output,ring);
}
+
+ iaxc_video_devices_get(&vDevs, &nVdevs, &vinput);
+ printf("\nThere are %d video capture devices:\n", nVdevs);
+ for ( i = 0; i < nVdevs; i++ )
+ {
+ printf("VIDEO DEVICE ID = %d NAME = %s\n",
+ vDevs[i].id, vDevs[i].name);
+ }
+ printf("Currently selected VIDEO device id: %d\n", vinput);
+
}
void usage()
@@ -363,7 +382,11 @@
exit(-1);
}
- if ( v.size <= 0 ) fprintf(stderr, "WARNING: size %d in callback\n", v.size);
+ if ( v.size <= 0 )
+ {
+ fprintf(stderr, "WARNING: size %d in callback\n", v.size);
+ return 0;
+ }
if ( !remote )
{
@@ -528,12 +551,18 @@
//iaxc_set_audio_prefs(IAXC_AUDIO_PREF_RECV_LOCAL_RAW | IAXC_AUDIO_PREF_RECV_REMOTE_RAW);
fprintf(f, "\n\
- TestCall accept some keyboard input while it's running.\n\
+ vtestcall accepts keyboard input while it's running.\n\
You must hit 'enter' for your keypresses to be recognized,\n\
- although you can type more than one key on a line\n\
+ although you can type more than one key on a line:\n\
\n\
- q: drop the call and hangup.\n\
- 0-9 * or #: dial those DTMF digits.\n");
+ s: switch video capture devices \n\
+ b: bypass video jitter stuff\n\
+ r: reject incoming call\n\
+ d: dial\n\
+ c: set caller id info\n\
+ w: video window toggle\n\
+ 0-9 * or #: dial those DTMF digits\n\
+ q: drop the call and hangup\n");
printf("Starting processing thread...\n");
iaxc_start_processing_thread();
@@ -615,6 +644,39 @@
iaxc_set_callerid(myCIDname,myCIDnumber);
}
break;
+ case SDLK_s:
+ {
+ int input;
+ int ndevs;
+ struct iaxc_video_device *vDevs;
+ int newVideoDevId;
+
+ iaxc_video_devices_get(&vDevs, &ndevs, &input);
+
+ printf("There are %d video capture devices:\n", ndevs);
+ for ( i = 0; i < ndevs; i++ )
+ {
+ printf("VIDEO DEVICE ID = %d NAME = %s\n", vDevs[i].id, vDevs[i].name);
+ }
+ printf("Currently selected device id: %d\n", input);
+
+ printf("Select video capture device: ");
+ fflush(stdin);
+ fscanf(stdin,"%d", &newVideoDevId);
+
+ if ( iaxc_video_device_set(newVideoDevId) )
+ {
+ printf("Error selecting device id %d\n",
+ newVideoDevId);
+ break;
+ }
+
+ /* explicitly set the prefs again in case
+ * previous capture device has failed
+ */
+ iaxc_set_video_prefs( iaxc_get_video_prefs() );
+ }
+ break;
case SDLK_t: /* transmit-only */
printf("transmit mode active\n");
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-11-01 15:23:41
|
Revision: 1254
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1254&view=rev
Author: bcholew
Date: 2007-11-01 08:23:44 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
Document ownership of memory returned by iaxc_video_devices_get(). Properly cleanup vidcap device lists on shutdown.
Modified Paths:
--------------
trunk/lib/iaxclient.h
trunk/lib/video.c
Modified: trunk/lib/iaxclient.h
===================================================================
--- trunk/lib/iaxclient.h 2007-11-01 14:22:18 UTC (rev 1253)
+++ trunk/lib/iaxclient.h 2007-11-01 15:23:44 UTC (rev 1254)
@@ -1134,9 +1134,14 @@
EXPORT int iaxc_set_audio_prefs(unsigned int prefs);
/*!
- Get video capture device information:
+ Get video capture device information.
+ WARNING: the array pointed to by parameter 'devs' below is owned
+ by iaxclient, and may be freed on subsequent calls to
+ this function.
\param devs Returns an array of iaxc_video_device structures.
- The array will will be valid as long as iaxc is initialized.
+ The array will only be valid until this function is
+ called again (if the device list changes), or until
+ iaxc is shutdown.
\param nDevs Returns the number of devices in the devs array
\param devId Returns the id of the currently selected video capture device
Modified: trunk/lib/video.c
===================================================================
--- trunk/lib/video.c 2007-11-01 14:22:18 UTC (rev 1253)
+++ trunk/lib/video.c 2007-11-01 15:23:44 UTC (rev 1254)
@@ -1639,9 +1639,19 @@
int video_destroy(void)
{
+ int i;
+
if ( !vinfo.vc )
return -1;
+ free(vinfo.vc_src_info);
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ free((void *)vinfo.devices[i].name);
+ free((void *)vinfo.devices[i].id_string);
+ }
+ free(vinfo.devices);
+
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-11-01 14:22:14
|
Revision: 1253
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1253&view=rev
Author: sbalea
Date: 2007-11-01 07:22:18 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
Add information about the required speex version
Modified Paths:
--------------
branches/team/mihai/echocan/README
Added Paths:
-----------
branches/team/mihai/echocan/README.speex
Modified: branches/team/mihai/echocan/README
===================================================================
--- branches/team/mihai/echocan/README 2007-11-01 13:49:42 UTC (rev 1252)
+++ branches/team/mihai/echocan/README 2007-11-01 14:22:18 UTC (rev 1253)
@@ -1,3 +1,5 @@
+IMPORTANT: please read README.speex before attempting to build.
+
Iaxclient has changed a lot in the past months making this file inaccurate.
For reference purposes we are still including it with the distribution, but
be aware that a large percentage of the information in here is outdated and
Added: branches/team/mihai/echocan/README.speex
===================================================================
--- branches/team/mihai/echocan/README.speex (rev 0)
+++ branches/team/mihai/echocan/README.speex 2007-11-01 14:22:18 UTC (rev 1253)
@@ -0,0 +1,4 @@
+Echo cancellation features depend on the very latest version of the speex codec.
+To build this version of iaxclient you need one of the following:
+- a patched version of speex-1.2beta2. The patch is included as speex-1.2beta2.patch.
+- the latest development code, available via git from http://git.xiph.org/speex.git
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-11-01 13:49:38
|
Revision: 1252
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1252&view=rev
Author: bcholew
Date: 2007-11-01 06:49:42 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
Ensure video capture device ids start at a fixed number - even if they weren't present at initialization.
Modified Paths:
--------------
trunk/lib/video.c
Modified: trunk/lib/video.c
===================================================================
--- trunk/lib/video.c 2007-10-31 19:01:27 UTC (rev 1251)
+++ trunk/lib/video.c 2007-11-01 13:49:42 UTC (rev 1252)
@@ -1371,19 +1371,14 @@
new_iaxc_dev_list[n].name = strdup(new_src_list[n].description);
new_iaxc_dev_list[n].id_string = strdup(new_src_list[n].identifier);
- /* this device may have been here all along
- * Check if it has, and re-assign that device id
+ /* This device may have been here all along.
+ * If it has, re-assign that device id
* else assign a new id
*/
for ( i = 0; i < vinfo.device_count; i++ )
{
if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
{
- /*fprintf(stderr, "EXISTING DEVICE: %s - (id=%d) '%s'\n",
- new_iaxc_dev_list[n].name,
- vinfo.devices[i].id,
- new_iaxc_dev_list[n].id_string);
- */
new_iaxc_dev_list[n].id = vinfo.devices[i].id;
if ( vinfo.selected_device_id == new_iaxc_dev_list[n].id )
@@ -1394,10 +1389,6 @@
if ( i == vinfo.device_count )
{
new_iaxc_dev_list[n].id = vinfo.next_id++;
- fprintf(stderr, "NEW DEVICE: %s - (id=%d) '%s'\n",
- new_iaxc_dev_list[n].name,
- new_iaxc_dev_list[n].id,
- new_iaxc_dev_list[n].id_string);
list_changed = 1;
}
@@ -1530,12 +1521,14 @@
memset(&vinfo, 0, sizeof(vinfo));
- MUTEXINIT(&vinfo.camera_lock);
- MUTEXINIT(&vinfo.dev_list_lock);
-
vinfo.width = vfinfo.width;
vinfo.height = vfinfo.height;
+ vinfo.selected_device_id = -1;
+ vinfo.next_id = starting_id;
+ MUTEXINIT(&vinfo.camera_lock);
+ MUTEXINIT(&vinfo.dev_list_lock);
+
if ( !(vinfo.vc = vidcap_initialize()) )
{
fprintf(stderr, "ERROR: failed vidcap_initialize\n");
@@ -1558,8 +1551,6 @@
vinfo.sapi_info.description,
vinfo.sapi_info.identifier);
- vinfo.selected_device_id = -1;
-
vinfo.device_count = vidcap_src_list_update(vinfo.sapi);
if ( vinfo.device_count < 0 )
{
@@ -1604,13 +1595,12 @@
* these ids may diverge as devices are added
* and removed.
*/
- vinfo.devices[i].id = i + starting_id;
+ vinfo.devices[i].id = vinfo.next_id++;
}
- vinfo.next_id = vinfo.devices[vinfo.device_count - 1].id + 1;
- /* set default source - the first device */
if ( vinfo.device_count )
{
+ /* set default source - the first device */
iaxc_video_device_set(vinfo.devices[0].id);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-10-31 19:01:28
|
Revision: 1251
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1251&view=rev
Author: sbalea
Date: 2007-10-31 12:01:27 -0700 (Wed, 31 Oct 2007)
Log Message:
-----------
Synchronize with trunk rev 1250
Revision Links:
--------------
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1250&view=rev
Modified Paths:
--------------
branches/team/mihai/echocan/README.VisualStudio
branches/team/mihai/echocan/contrib/tcl/iaxclient.c
branches/team/mihai/echocan/contrib/win/vs2005/iaxclient.sln
branches/team/mihai/echocan/lib/codec_theora.c
branches/team/mihai/echocan/lib/iaxclient.h
branches/team/mihai/echocan/lib/slice.c
branches/team/mihai/echocan/lib/slice.h
branches/team/mihai/echocan/lib/video.c
branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c
branches/team/mihai/echocan/simpleclient/vtestcall/vtestcall.c
Added Paths:
-----------
branches/team/mihai/echocan/contrib/win/vs2005/libvidcap.vcproj
Modified: branches/team/mihai/echocan/README.VisualStudio
===================================================================
--- branches/team/mihai/echocan/README.VisualStudio 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/README.VisualStudio 2007-10-31 19:01:27 UTC (rev 1251)
@@ -28,18 +28,19 @@
http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf
2) Obtain dependencies. At the time of this writing, portaudio-v19,
- libogg 1.1.3, speex 1.2beta1, and libtheora 1.0alpha7 are required.
+ libogg 1.1.3, speex 1.2beta1, libtheora 1.0alpha7, and libvidcap are required.
Source for these dependencies are available here:
http://portaudio.com/archives/pa_snapshot_v19.tar.gz
http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
http://downloads.xiph.org/releases/speex/speex-1.2beta1.tar.gz
http://downloads.xiph.org/releases/theora/libtheora-1.0alpha7.tar.gz
+ http://downloads.sourceforge.net/libvidcap/libvidcap-0.1.tar.gz
In order to build with the vcproj files provided by iaxclient,
these dependent libraries must be moved to be peer directories to
the iaxclient source directory. They also must have the following
- names: libogg, speex, and libtheora. So the final directory
+ names: libogg, speex, libtheora and libvidcap. So the final directory
layout would be as follows:
C:\...\whereever\iaxclient
@@ -47,6 +48,7 @@
C:\...\whereever\libogg
C:\...\whereever\speex
C:\...\whereever\libtheora
+ C:\...\whereever\libvidcap
2) Open the solution file: contrib/win/vs2005/iaxclient.sln
Modified: branches/team/mihai/echocan/contrib/tcl/iaxclient.c
===================================================================
--- branches/team/mihai/echocan/contrib/tcl/iaxclient.c 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/contrib/tcl/iaxclient.c 2007-10-31 19:01:27 UTC (rev 1251)
@@ -600,7 +600,9 @@
}
if (objc == 2) {
- line = iaxc_selected_call();
+ // Problems reported coming from this line.
+ // If including it again you must be very sure of exactly what you do!
+ //line = iaxc_selected_call();
}
if (objc == 3) {
@@ -614,7 +616,9 @@
if (result == TCL_OK) {
iaxc_call(num);
- iaxc_select_call(line);
+ // Problems reported coming from this line.
+ // If including it again you must be very sure of exactly what you do!
+ //iaxc_select_call(line);
}
return result;
}
Modified: branches/team/mihai/echocan/contrib/win/vs2005/iaxclient.sln
===================================================================
--- branches/team/mihai/echocan/contrib/win/vs2005/iaxclient.sln 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/contrib/win/vs2005/iaxclient.sln 2007-10-31 19:01:27 UTC (rev 1251)
@@ -7,14 +7,14 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}"
ProjectSection(ProjectDependencies) = postProject
+ {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A}
+ {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569}
+ {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
+ {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}
+ {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
+ {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8}
+ {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE}
{3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C}
- {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE}
- {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8}
- {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
- {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}
- {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
- {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569}
- {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}"
@@ -34,6 +34,11 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "..\..\..\simpleclient\vtestcall\vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_dll|Win32 = Debug_dll|Win32
@@ -122,6 +127,14 @@
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release_dll|Win32.Build.0 = Release|Win32
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.ActiveCfg = Release|Win32
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.Build.0 = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.ActiveCfg = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.Build.0 = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.Build.0 = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.ActiveCfg = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.Build.0 = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.ActiveCfg = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Copied: branches/team/mihai/echocan/contrib/win/vs2005/libvidcap.vcproj (from rev 1250, trunk/contrib/win/vs2005/libvidcap.vcproj)
===================================================================
--- branches/team/mihai/echocan/contrib/win/vs2005/libvidcap.vcproj (rev 0)
+++ branches/team/mihai/echocan/contrib/win/vs2005/libvidcap.vcproj 2007-10-31 19:01:27 UTC (rev 1251)
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libvidcap"
+ ProjectGUID="{F5166D99-32BB-40D5-BE95-6F97F72C44CE}"
+ RootNamespace="libvidcap"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(OutDir)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include""
+ PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(OutDir)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include""
+ PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_i420.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_rgb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_yuy2.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\hotlist.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi_dshow.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sliding_window.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\vidcap.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\include\vidcap\converters.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\hotlist.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\LocklessQueue.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi_context.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sliding_window.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\include\vidcap\vidcap.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: branches/team/mihai/echocan/lib/codec_theora.c
===================================================================
--- branches/team/mihai/echocan/lib/codec_theora.c 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/lib/codec_theora.c 2007-10-31 19:01:27 UTC (rev 1251)
@@ -111,7 +111,8 @@
free(c);
}
-static int decode(struct iaxc_video_codec *c, int inlen, char *in, int *outlen, char *out)
+static int decode(struct iaxc_video_codec *c, int inlen, const char *in,
+ int *outlen, char *out)
{
struct theora_decoder *d;
ogg_packet op;
Modified: branches/team/mihai/echocan/lib/iaxclient.h
===================================================================
--- branches/team/mihai/echocan/lib/iaxclient.h 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/lib/iaxclient.h 2007-10-31 19:01:27 UTC (rev 1251)
@@ -132,6 +132,8 @@
#define IAXC_EVENT_DTMF 9 /*!< Indicates a DTMF event */
#define IAXC_EVENT_AUDIO 10 /*!< Indicates an audio event */
#define IAXC_EVENT_VIDEOSTATS 11 /*!< Indicates a video statistics update event */
+#define IAXC_EVENT_VIDCAP_ERROR 12 /*!< Indicates a video capture error occurred */
+#define IAXC_EVENT_VIDCAP_DEVICE 13 /*!< Indicates a possible video capture device insertion/removal */
#define IAXC_CALL_STATE_FREE 0 /*!< Indicates a call slot is free */
#define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active */
@@ -920,6 +922,26 @@
*/
EXPORT int iaxc_get_netstats(int call, int *rtt, struct iaxc_netstat *local, struct iaxc_netstat *remote);
+/*!
+ A structure containing information about a video capture device.
+*/
+struct iaxc_video_device {
+ /*!
+ The "human readable" name of the device
+ */
+ const char *name;
+
+ /*!
+ unique id of the device
+ */
+ const char *id_string;
+
+ /*!
+ iaxclient id of the device
+ */
+ int id;
+};
+
#define IAXC_AD_INPUT (1<<0) /*!< Device is usable for input*/
#define IAXC_AD_OUTPUT (1<<1) /*!< Device is usable for output */
#define IAXC_AD_RING (1<<2) /*!< Device is usable for ring */
@@ -1112,6 +1134,23 @@
*/
EXPORT int iaxc_set_audio_prefs(unsigned int prefs);
+/*!
+ Get video capture device information:
+ \param devs Returns an array of iaxc_video_device structures.
+ The array will will be valid as long as iaxc is initialized.
+ \param nDevs Returns the number of devices in the devs array
+ \param devId Returns the id of the currently selected video capture device
+
+ \return -1 on error, 0 if no change to the device list, 1 if it's been updated
+ */
+EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, int *nDevs, int *devId);
+
+/*!
+ Sets the current video capture device
+ \param devId The id of the device to use for video capture
+ */
+EXPORT int iaxc_video_device_set(int devId);
+
/*
* Acceptable range for video rezolution
*/
Modified: branches/team/mihai/echocan/lib/slice.c
===================================================================
--- branches/team/mihai/echocan/lib/slice.c 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/lib/slice.c 2007-10-31 19:01:27 UTC (rev 1251)
@@ -32,7 +32,7 @@
return 0;
}
-int slice(char *data,
+int slice(const char *data,
unsigned int size,
struct slice_set_t *slice_set,
struct slicer_context *sc
@@ -93,7 +93,8 @@
dsc->frame_complete = 0;
}
-char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc)
+char *
+deslice(const char *in, int inlen, int *outlen, struct deslicer_context *dsc)
{
unsigned char frame_index, slice_index, num_slices, version;
unsigned short source_id;
Modified: branches/team/mihai/echocan/lib/slice.h
===================================================================
--- branches/team/mihai/echocan/lib/slice.h 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/lib/slice.h 2007-10-31 19:01:27 UTC (rev 1251)
@@ -77,7 +77,7 @@
* sc - holds stream information such as source id and frame index
* Returns 0 if completed successfully or a negative value if failure.
*/
-int slice(char *data,
+int slice(const char *data,
unsigned int size,
struct slice_set_t *slice_set,
struct slicer_context *sc
@@ -103,6 +103,7 @@
* Returns a pointer to a buffer containing the completed frame and updates
* outlen with the frame size if successful
*/
-char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc);
+char *
+deslice(const char *in, int inlen, int *outlen, struct deslicer_context *dsc);
-#endif // __SLICE_H__
+#endif
Modified: branches/team/mihai/echocan/lib/video.c
===================================================================
--- branches/team/mihai/echocan/lib/video.c 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/lib/video.c 2007-10-31 19:01:27 UTC (rev 1251)
@@ -31,13 +31,16 @@
#include "codec_theora.h"
#endif
+#if defined(WIN32)
+#define strdup _strdup
+#endif
+
struct video_info
{
vidcap_state * vc;
vidcap_sapi * sapi;
vidcap_src * src;
struct vidcap_sapi_info sapi_info;
- struct vidcap_src_info src_info;
struct vidcap_fmt_info fmt_info;
/* these are the requested (post-scaling) dimensions */
@@ -63,6 +66,15 @@
int prefs;
struct slicer_context * sc;
+
+ /* these two struct arrays are correlated by index */
+ struct vidcap_src_info * vc_src_info;
+ struct iaxc_video_device * devices;
+ MUTEX dev_list_lock;
+
+ int device_count;
+ int selected_device_id;
+ int next_id;
};
struct video_format_info
@@ -492,6 +504,24 @@
*/
}
+static int video_device_notification_callback(vidcap_sapi *sapi,
+ void * user_context)
+{
+ iaxc_event evt;
+
+ if ( sapi != vinfo.sapi )
+ {
+ fprintf(stderr, "ERROR: wrong sapi in device notification\n");
+ return -1;
+ }
+
+ /* notify application that device list has been updated */
+ evt.type = IAXC_EVENT_VIDCAP_DEVICE;
+ iaxci_post_event(evt);
+
+ return 0;
+}
+
static int capture_callback(vidcap_src * src, void * user_data,
struct vidcap_capture_info * cap_info)
{
@@ -517,6 +547,8 @@
const char * source_buf = 0;
int source_buf_size = 0;
+ iaxc_event evt;
+
int i;
if ( cap_info->error_status )
@@ -524,6 +556,9 @@
fprintf(stderr, "vidcap capture error %d\n",
cap_info->error_status);
vinfo.capturing = 0;
+
+ evt.type = IAXC_EVENT_VIDCAP_ERROR;
+ iaxci_post_event(evt);
return -1;
}
@@ -732,30 +767,10 @@
};
static const int fourcc_list_len = sizeof(fourcc_list) / sizeof(int);
- int i;
static const int max_factor = 2;
int scale_factor;
+ int i;
- if ( !vinfo.src )
- {
- /* Acquire the default source */
- if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi, 0)) )
- {
- fprintf(stderr, "failed to acquire video source\n");
- return -1;
- }
-
- if ( vidcap_src_info_get(vinfo.src, &vinfo.src_info) )
- {
- fprintf(stderr, "failed to get video source info\n");
- return -1;
- }
-
- fprintf(stderr, "acquired vidcap source %s (%s)\n",
- vinfo.src_info.description,
- vinfo.src_info.identifier);
- }
-
vinfo.width = vfinfo.width;
vinfo.height = vfinfo.height;
vinfo.fmt_info.fps_numerator = vfinfo.framerate;
@@ -878,6 +893,46 @@
return 0;
}
+static int ensure_acquired(int dev_id)
+{
+ int dev_num;
+
+ if ( !vinfo.src )
+ {
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ )
+ {
+ if ( vinfo.devices[dev_num].id == dev_id )
+ break;
+ }
+
+ if ( dev_num == vinfo.device_count )
+ {
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ fprintf(stderr, "invalid vidcap dev id: %d\n", dev_id);
+ return -1;
+ }
+
+ if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi,
+ &vinfo.vc_src_info[dev_num])) )
+ {
+ vinfo.src = 0;
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ fprintf(stderr, "failed to acquire video source\n");
+ return -1;
+ }
+
+ fprintf(stderr, "acquired vidcap source %s (%s)\n",
+ vinfo.vc_src_info[dev_num].description,
+ vinfo.vc_src_info[dev_num].identifier);
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ }
+
+ return 0;
+}
+
EXPORT int iaxc_set_video_prefs(unsigned int prefs)
{
const unsigned int prefs_mask =
@@ -888,9 +943,14 @@
IAXC_VIDEO_PREF_SEND_DISABLE |
IAXC_VIDEO_PREF_RECV_RGB32 |
IAXC_VIDEO_PREF_CAPTURE_DISABLE;
+ int ret;
if ( prefs & ~prefs_mask )
+ {
+ fprintf(stderr, "ERROR: unexpected video preference: 0x%0x\n",
+ prefs);
return -1;
+ }
vinfo.prefs = prefs;
@@ -911,7 +971,15 @@
{
if ( vidcap_src_capture_stop(vinfo.src) )
fprintf(stderr, "failed vidcap_src_capture_stop\n");
+
vinfo.capturing = 0;
+
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release a video source\n");
+ }
+
+ vinfo.src = 0;
}
MUTEXUNLOCK(&vinfo.camera_lock);
}
@@ -920,17 +988,30 @@
MUTEXLOCK(&vinfo.camera_lock);
if ( !vinfo.capturing )
{
+ if ( vinfo.selected_device_id < 0 )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( ensure_acquired(vinfo.selected_device_id) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
if ( prepare_for_capture() )
{
MUTEXUNLOCK(&vinfo.camera_lock);
return -1;
}
- if ( vidcap_src_capture_start(vinfo.src,
- capture_callback, 0) )
+ if ( (ret = vidcap_src_capture_start(vinfo.src,
+ capture_callback, 0)) )
{
MUTEXUNLOCK(&vinfo.camera_lock);
- fprintf(stderr, "failed to start video capture\n");
+ fprintf(stderr, "failed to start video capture: %d\n",
+ ret);
return -1;
}
@@ -1231,10 +1312,230 @@
return 0;
}
+EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs,
+ int *num_devs, int *id_selected)
+{
+ int new_device_count;
+ int old_device_count;
+ struct vidcap_src_info *new_src_list;
+ struct vidcap_src_info *old_src_list;
+ 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 i, n;
+
+ /* update libvidcap's device list */
+ new_device_count = vidcap_src_list_update(vinfo.sapi);
+ if ( new_device_count != vinfo.device_count )
+ list_changed = 1;
+
+ if ( new_device_count < 0 )
+ {
+ fprintf(stderr, "ERROR: failed getting updated vidcap device list: %d\n",
+ new_device_count);
+ return -1;
+ }
+
+ new_src_list = (struct vidcap_src_info *)malloc(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));
+ if ( !new_iaxc_dev_list )
+ {
+ free(new_src_list);
+ fprintf(stderr, "ERROR: failed source allocation update\n");
+ return -1;
+ }
+
+ /* 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");
+
+ free(new_src_list);
+ free(new_iaxc_dev_list);
+ return -1;
+ }
+
+ /* 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);
+ new_iaxc_dev_list[n].id_string = strdup(new_src_list[n].identifier);
+
+ /* this device may have been here all along
+ * Check if it has, and re-assign that device id
+ * else assign a new id
+ */
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
+ {
+ /*fprintf(stderr, "EXISTING DEVICE: %s - (id=%d) '%s'\n",
+ new_iaxc_dev_list[n].name,
+ vinfo.devices[i].id,
+ new_iaxc_dev_list[n].id_string);
+ */
+ new_iaxc_dev_list[n].id = vinfo.devices[i].id;
+
+ if ( vinfo.selected_device_id == new_iaxc_dev_list[n].id )
+ found_selected_device = 1;
+ break;
+ }
+ }
+ if ( i == vinfo.device_count )
+ {
+ new_iaxc_dev_list[n].id = vinfo.next_id++;
+ fprintf(stderr, "NEW DEVICE: %s - (id=%d) '%s'\n",
+ new_iaxc_dev_list[n].name,
+ new_iaxc_dev_list[n].id,
+ new_iaxc_dev_list[n].id_string);
+
+ list_changed = 1;
+ }
+ }
+
+ if ( !list_changed )
+ {
+ /* Free new lists. Nothing's really changed */
+ free(new_src_list);
+ for ( i = 0; i < new_device_count; i++ )
+ {
+ free((void *)new_iaxc_dev_list[i].name);
+ free((void *)new_iaxc_dev_list[i].id_string);
+ }
+ free(new_iaxc_dev_list);
+ }
+ else
+ {
+ old_device_count = vinfo.device_count;
+ old_src_list = vinfo.vc_src_info;
+ old_iaxc_dev_list = vinfo.devices;
+
+ /* Update iaxclient's device list info */
+ /* Lock since other iaxclient funcs use these fields */
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ vinfo.device_count = new_device_count;
+ vinfo.vc_src_info = new_src_list;
+ vinfo.devices = new_iaxc_dev_list;
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+
+ /* free old lists */
+ free(old_src_list);
+ for ( i = 0; i < old_device_count; i++ )
+ {
+ free((void *)old_iaxc_dev_list[i].name);
+ free((void *)old_iaxc_dev_list[i].id_string);
+ }
+ free(old_iaxc_dev_list);
+ }
+
+ *devs = vinfo.devices;
+ *num_devs = vinfo.device_count;
+ *id_selected = found_selected_device ? vinfo.selected_device_id : -1;
+
+ return list_changed;
+}
+
+EXPORT int iaxc_video_device_set(int capture_dev_id)
+{
+ int ret = 0;
+ int dev_num = 0;
+
+ MUTEXLOCK(&vinfo.camera_lock);
+
+ if ( capture_dev_id == vinfo.selected_device_id )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return 0;
+ }
+
+ if ( capture_dev_id < 0 )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "invalid video device id ( < 0 )\n");
+ return -1;
+ }
+
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ )
+ {
+ if ( vinfo.devices[dev_num].id == capture_dev_id )
+ break;
+ }
+
+ if ( dev_num == vinfo.device_count )
+ {
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "invalid video device id: %d\n",
+ capture_dev_id);
+ return -1;
+ }
+
+ vinfo.selected_device_id = capture_dev_id;
+
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release video source\n");
+ }
+
+ vinfo.src = 0;
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+
+ if ( vinfo.capturing )
+ {
+ if ( ensure_acquired(capture_dev_id) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( prepare_for_capture() )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( (ret = vidcap_src_capture_start(vinfo.src,
+ capture_callback, 0)) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "failed to restart video capture: %d\n", ret);
+ return -1;
+ }
+ }
+
+ MUTEXUNLOCK(&vinfo.camera_lock);
+
+ return 0;
+}
+
int video_initialize(void)
{
+ int i;
+ const int starting_id = 50;
+
memset(&vinfo, 0, sizeof(vinfo));
+ MUTEXINIT(&vinfo.camera_lock);
+ MUTEXINIT(&vinfo.dev_list_lock);
+
+ vinfo.width = vfinfo.width;
+ vinfo.height = vfinfo.height;
+
if ( !(vinfo.vc = vidcap_initialize()) )
{
fprintf(stderr, "ERROR: failed vidcap_initialize\n");
@@ -1257,23 +1558,89 @@
vinfo.sapi_info.description,
vinfo.sapi_info.identifier);
- /* TODO: Maybe we should reevaluate these defaults. Once could
- * make an argument that reasonable users of iaxclient might
- * not want video to be delivered as soon as they iaxc_initialize().
+ vinfo.selected_device_id = -1;
+
+ vinfo.device_count = vidcap_src_list_update(vinfo.sapi);
+ if ( vinfo.device_count < 0 )
+ {
+ fprintf(stderr,
+ "ERROR: failed updating video capture devices list\n");
+ goto bail;
+ }
+
+ vinfo.vc_src_info = (struct vidcap_src_info *)malloc(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 *
+ sizeof(struct iaxc_video_device));
+ if ( !vinfo.devices )
+ {
+ fprintf(stderr, "ERROR: failed vinfo field allocation\n");
+ free(vinfo.vc_src_info);
+ goto bail;
+ }
+
+ if ( vidcap_src_list_get(vinfo.sapi, vinfo.device_count,
+ vinfo.vc_src_info) )
+ {
+ fprintf(stderr, "ERROR: failed vidcap_src_list_get()\n");
+ free(vinfo.vc_src_info);
+ free(vinfo.devices);
+ goto bail;
+ }
+
+ /* build initial iaxclient video source list */
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ vinfo.devices[i].name = strdup(vinfo.vc_src_info[i].description);
+ vinfo.devices[i].id_string = strdup(vinfo.vc_src_info[i].identifier);
+ /* Let's be clear that the device id is not some
+ * base-zero index. Once plug-n-play is implemented,
+ * these ids may diverge as devices are added
+ * and removed.
+ */
+ vinfo.devices[i].id = i + starting_id;
+ }
+ vinfo.next_id = vinfo.devices[vinfo.device_count - 1].id + 1;
+
+ /* set default source - the first device */
+ if ( vinfo.device_count )
+ {
+ iaxc_video_device_set(vinfo.devices[0].id);
+ }
+
+ /* setup device notification callback
+ * for device insertion and removal
*/
+ if ( vidcap_srcs_notify(vinfo.sapi, &video_device_notification_callback, 0) )
+ {
+ 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;
+ IAXC_VIDEO_PREF_RECV_REMOTE_RAW |
+ IAXC_VIDEO_PREF_CAPTURE_DISABLE;
- MUTEXINIT(&vinfo.camera_lock);
+ return 0;
- /* We reset the existing video preferences to yield the side-effect
- * of potentially starting or stopping the video capture.
- */
- iaxc_set_video_prefs(vinfo.prefs);
+late_bail:
+ free(vinfo.vc_src_info);
- return 0;
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ free((void *)vinfo.devices[i].name);
+ free((void *)vinfo.devices[i].id_string);
+ }
+ free(vinfo.devices);
+
bail:
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
@@ -1289,6 +1656,7 @@
vinfo.vc = 0;
MUTEXDESTROY(&vinfo.camera_lock);
+ MUTEXDESTROY(&vinfo.dev_list_lock);
if ( vinfo.converted_i420_buf )
{
@@ -1324,7 +1692,7 @@
* we are saying that the "camera is working" if there exists
* more than zero cameras.
*/
- return vidcap_src_list_update(vinfo.sapi);
+ return vidcap_src_list_update(vinfo.sapi) > 0;
}
int video_send_stats(struct iaxc_call * call)
Modified: branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c
===================================================================
--- branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/simpleclient/stresstest/stresstest.c 2007-10-31 19:01:27 UTC (rev 1251)
@@ -23,7 +23,6 @@
#include <signal.h>
#include "iaxclient.h"
-#include "slice.h"
#include "file.h"
#ifdef WIN32
@@ -57,7 +56,8 @@
static int send_video = 1;
static int send_audio = 1;
static int print_netstats = 0;
-static int timeout = 0;
+static int call_timeout_ms = 0;
+static int connect_timeout_ms = 5000;
static int video_frames_count = 0;
static int audio_frames_count = 0;
@@ -193,7 +193,8 @@
" -a stop sending audio\n"
" -l run file in a loop\n"
" -n dump periodic netstats to log file\n"
- " -t <timeout> terminate after timeout seconds and report status via return code\n"
+ " -t <TIMEOUT> terminate call after TIMEOUT seconds\n"
+ " -c <TIMEOUT> try connecting for TIMEOUT seconds (default 5)\n"
" -L <FILE> log to FILE\n"
"\n"
);
@@ -269,14 +270,14 @@
switch ( argv[i][1] )
{
case 'F': /* set video params */
- {
- formatp = 1 << atoi(argv[++i]);
- framerate = atoi(argv[++i]);
- bitrate = atoi(argv[++i]);
- width = atoi(argv[++i]);
- height = atoi(argv[++i]);
- fragsize = atoi(argv[++i]);
- }
+ if ( i+6 >= argc )
+ usage();
+ formatp = 1 << atoi(argv[++i]);
+ framerate = atoi(argv[++i]);
+ bitrate = atoi(argv[++i]);
+ width = atoi(argv[++i]);
+ height = atoi(argv[++i]);
+ fragsize = atoi(argv[++i]);
break;
case 'o':
if ( i+1 >= argc )
@@ -298,8 +299,13 @@
case 't':
if ( i+1 >= argc )
usage();
- timeout = 1000 * atoi(argv[++i]);
+ call_timeout_ms = 1000 * atoi(argv[++i]);
break;
+ case 'c':
+ if ( i+1 >= argc )
+ usage();
+ connect_timeout_ms = 1000 * atoi(argv[++i]);
+ break;
case 'L':
if ( i+1 >= argc )
usage();
@@ -314,7 +320,7 @@
usage();
}
} else
- dest=argv[i];
+ dest = argv[i];
}
if ( dest == NULL )
@@ -355,11 +361,12 @@
mylog("Failed to make call to '%s'", dest);
// Wait for the call to be established;
- while ( !call_established )
+ while ( !call_established && running )
{
struct timeval now;
gettimeofday(&now, NULL);
- if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
+ if ( connect_timeout_ms > 0 &&
+ msecdiff(&start_time, &now) > connect_timeout_ms )
hangup_and_exit(TEST_NO_CONNECTION);
iaxc_millisleep(5);
}
@@ -394,7 +401,8 @@
// Exit after a positive timeout
gettimeofday(&now, NULL);
- if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
+ if ( call_timeout_ms > 0 &&
+ msecdiff(&start_time, &now) > call_timeout_ms )
running = 0;
}
Modified: branches/team/mihai/echocan/simpleclient/vtestcall/vtestcall.c
===================================================================
--- branches/team/mihai/echocan/simpleclient/vtestcall/vtestcall.c 2007-10-31 17:31:21 UTC (rev 1250)
+++ branches/team/mihai/echocan/simpleclient/vtestcall/vtestcall.c 2007-10-31 19:01:27 UTC (rev 1251)
@@ -238,6 +238,9 @@
e.ev.audio.source == IAXC_SOURCE_REMOTE ? "remote" : "local",
e.ev.audio.encoded ? "encoded" : "raw");
break;
+ case IAXC_EVENT_VIDCAP_ERROR:
+ fprintf(stderr, "\nVIDEO CAPTURE DEVICE ERROR\n");
+ break;
default:
break;
}
@@ -275,12 +278,28 @@
int nDevs, input, output,ring;
int i;
+ int vinput;
+ int nVdevs;
+ struct iaxc_video_device *vDevs;
+
iaxc_audio_devices_get(&devs,&nDevs, &input, &output, &ring);
+ printf("\nThere are %d audio devices:\n", nDevs);
for(i=0;i<nDevs;i++)
{
- fprintf(stderr, "DEVICE ID=%d NAME=%s CAPS=%lx\n", devs[i].devID, devs[i].name, devs[i].capabilities);
+ fprintf(stderr, "AUDIO DEVICE ID = %d NAME = %s CAPS=%lx\n",
+ devs[i].devID, devs[i].name, devs[i].capabilities);
iaxc_audio_devices_set(input,output,ring);
}
+
+ iaxc_video_devices_get(&vDevs, &nVdevs, &vinput);
+ printf("\nThere are %d video capture devices:\n", nVdevs);
+ for ( i = 0; i < nVdevs; i++ )
+ {
+ printf("VIDEO DEVICE ID = %d NAME = %s\n",
+ vDevs[i].id, vDevs[i].name);
+ }
+ printf("Currently selected VIDEO device id: %d\n", vinput);
+
}
void usage()
@@ -363,7 +382,11 @@
exit(-1);
}
- if ( v.size <= 0 ) fprintf(stderr, "WARNING: size %d in callback\n", v.size);
+ if ( v.size <= 0 )
+ {
+ fprintf(stderr, "WARNING: size %d in callback\n", v.size);
+ return 0;
+ }
if ( !remote )
{
@@ -532,12 +555,18 @@
//iaxc_set_audio_prefs(IAXC_AUDIO_PREF_RECV_LOCAL_RAW | IAXC_AUDIO_PREF_RECV_REMOTE_RAW);
fprintf(f, "\n\
- TestCall accept some keyboard input while it's running.\n\
+ vtestcall accepts keyboard input while it's running.\n\
You must hit 'enter' for your keypresses to be recognized,\n\
- although you can type more than one key on a line\n\
+ although you can type more than one key on a line:\n\
\n\
- q: drop the call and hangup.\n\
- 0-9 * or #: dial those DTMF digits.\n");
+ s: switch video capture devices \n\
+ b: bypass video jitter stuff\n\
+ r: reject incoming call\n\
+ d: dial\n\
+ c: set caller id info\n\
+ w: video window toggle\n\
+ 0-9 * or #: dial those DTMF digits\n\
+ q: drop the call and hangup\n");
printf("Starting processing thread...\n");
iaxc_start_processing_thread();
@@ -619,6 +648,39 @@
iaxc_set_callerid(myCIDname,myCIDnumber);
}
break;
+ case SDLK_s:
+ {
+ int input;
+ int ndevs;
+ struct iaxc_video_device *vDevs;
+ int newVideoDevId;
+
+ iaxc_video_devices_get(&vDevs, &ndevs, &input);
+
+ printf("There are %d video capture devices:\n", ndevs);
+ for ( i = 0; i < ndevs; i++ )
+ {
+ printf("VIDEO DEVICE ID = %d NAME = %s\n", vDevs[i].id, vDevs[i].name);
+ }
+ printf("Currently selected device id: %d\n", input);
+
+ printf("Select video capture device: ");
+ fflush(stdin);
+ fscanf(stdin,"%d", &newVideoDevId);
+
+ if ( iaxc_video_device_set(newVideoDevId) )
+ {
+ printf("Error selecting device id %d\n",
+ newVideoDevId);
+ break;
+ }
+
+ /* explicitly set the prefs again in case
+ * previous capture device has failed
+ */
+ iaxc_set_video_prefs( iaxc_get_video_prefs() );
+ }
+ break;
case SDLK_t: /* transmit-only */
printf("transmit mode active\n");
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bc...@us...> - 2007-10-31 17:31:25
|
Revision: 1250
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1250&view=rev
Author: bcholew
Date: 2007-10-31 10:31:21 -0700 (Wed, 31 Oct 2007)
Log Message:
-----------
Add video capture device notification feature - for device plug-n-play. Add two new events: IAXC_EVENT_VIDCAP_ERROR (to signify a vidcap device error) and IAXC_EVENT_VIDCAP_DEVICE (to signify a potential change to the vidcap device list). Two new functions: iaxc_video_devices_get() and iaxc_video_devices_set() to retrieve a vidcap device list, and select one for capture. Don't acquire a vidcap device until asked to capture. Release device when capture is stopped. Update vtestcall to take advantage of video device selection.
Modified Paths:
--------------
trunk/README.VisualStudio
trunk/contrib/win/vs2005/iaxclient.sln
trunk/lib/iaxclient.h
trunk/lib/video.c
trunk/simpleclient/vtestcall/vtestcall.c
Added Paths:
-----------
trunk/contrib/win/vs2005/libvidcap.vcproj
Modified: trunk/README.VisualStudio
===================================================================
--- trunk/README.VisualStudio 2007-10-31 13:10:33 UTC (rev 1249)
+++ trunk/README.VisualStudio 2007-10-31 17:31:21 UTC (rev 1250)
@@ -28,18 +28,19 @@
http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf
2) Obtain dependencies. At the time of this writing, portaudio-v19,
- libogg 1.1.3, speex 1.2beta1, and libtheora 1.0alpha7 are required.
+ libogg 1.1.3, speex 1.2beta1, libtheora 1.0alpha7, and libvidcap are required.
Source for these dependencies are available here:
http://portaudio.com/archives/pa_snapshot_v19.tar.gz
http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
http://downloads.xiph.org/releases/speex/speex-1.2beta1.tar.gz
http://downloads.xiph.org/releases/theora/libtheora-1.0alpha7.tar.gz
+ http://downloads.sourceforge.net/libvidcap/libvidcap-0.1.tar.gz
In order to build with the vcproj files provided by iaxclient,
these dependent libraries must be moved to be peer directories to
the iaxclient source directory. They also must have the following
- names: libogg, speex, and libtheora. So the final directory
+ names: libogg, speex, libtheora and libvidcap. So the final directory
layout would be as follows:
C:\...\whereever\iaxclient
@@ -47,6 +48,7 @@
C:\...\whereever\libogg
C:\...\whereever\speex
C:\...\whereever\libtheora
+ C:\...\whereever\libvidcap
2) Open the solution file: contrib/win/vs2005/iaxclient.sln
Modified: trunk/contrib/win/vs2005/iaxclient.sln
===================================================================
--- trunk/contrib/win/vs2005/iaxclient.sln 2007-10-31 13:10:33 UTC (rev 1249)
+++ trunk/contrib/win/vs2005/iaxclient.sln 2007-10-31 17:31:21 UTC (rev 1250)
@@ -7,14 +7,14 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}"
ProjectSection(ProjectDependencies) = postProject
+ {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A}
+ {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569}
+ {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
+ {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}
+ {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
+ {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8}
+ {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE}
{3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C}
- {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE}
- {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8}
- {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
- {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}
- {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
- {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569}
- {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}"
@@ -34,6 +34,11 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "..\..\..\simpleclient\vtestcall\vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_dll|Win32 = Debug_dll|Win32
@@ -122,6 +127,14 @@
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release_dll|Win32.Build.0 = Release|Win32
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.ActiveCfg = Release|Win32
{F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.Build.0 = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.ActiveCfg = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.Build.0 = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.Build.0 = Debug|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.ActiveCfg = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.Build.0 = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.ActiveCfg = Release|Win32
+ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: trunk/contrib/win/vs2005/libvidcap.vcproj
===================================================================
--- trunk/contrib/win/vs2005/libvidcap.vcproj (rev 0)
+++ trunk/contrib/win/vs2005/libvidcap.vcproj 2007-10-31 17:31:21 UTC (rev 1250)
@@ -0,0 +1,361 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libvidcap"
+ ProjectGUID="{F5166D99-32BB-40D5-BE95-6F97F72C44CE}"
+ RootNamespace="libvidcap"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(OutDir)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include""
+ PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)"
+ IntermediateDirectory="$(OutDir)"
+ ConfigurationType="4"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include""
+ PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ CompileAs="1"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_i420.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_rgb.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv_to_yuy2.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\hotlist.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi_dshow.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sliding_window.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\vidcap.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\conv.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\include\vidcap\converters.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\hotlist.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\directshow\LocklessQueue.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sapi_context.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\src\sliding_window.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\libvidcap\include\vidcap\vidcap.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: trunk/lib/iaxclient.h
===================================================================
--- trunk/lib/iaxclient.h 2007-10-31 13:10:33 UTC (rev 1249)
+++ trunk/lib/iaxclient.h 2007-10-31 17:31:21 UTC (rev 1250)
@@ -132,6 +132,8 @@
#define IAXC_EVENT_DTMF 9 /*!< Indicates a DTMF event */
#define IAXC_EVENT_AUDIO 10 /*!< Indicates an audio event */
#define IAXC_EVENT_VIDEOSTATS 11 /*!< Indicates a video statistics update event */
+#define IAXC_EVENT_VIDCAP_ERROR 12 /*!< Indicates a video capture error occurred */
+#define IAXC_EVENT_VIDCAP_DEVICE 13 /*!< Indicates a possible video capture device insertion/removal */
#define IAXC_CALL_STATE_FREE 0 /*!< Indicates a call slot is free */
#define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active */
@@ -920,6 +922,26 @@
*/
EXPORT int iaxc_get_netstats(int call, int *rtt, struct iaxc_netstat *local, struct iaxc_netstat *remote);
+/*!
+ A structure containing information about a video capture device.
+*/
+struct iaxc_video_device {
+ /*!
+ The "human readable" name of the device
+ */
+ const char *name;
+
+ /*!
+ unique id of the device
+ */
+ const char *id_string;
+
+ /*!
+ iaxclient id of the device
+ */
+ int id;
+};
+
#define IAXC_AD_INPUT (1<<0) /*!< Device is usable for input*/
#define IAXC_AD_OUTPUT (1<<1) /*!< Device is usable for output */
#define IAXC_AD_RING (1<<2) /*!< Device is usable for ring */
@@ -1111,6 +1133,23 @@
*/
EXPORT int iaxc_set_audio_prefs(unsigned int prefs);
+/*!
+ Get video capture device information:
+ \param devs Returns an array of iaxc_video_device structures.
+ The array will will be valid as long as iaxc is initialized.
+ \param nDevs Returns the number of devices in the devs array
+ \param devId Returns the id of the currently selected video capture device
+
+ \return -1 on error, 0 if no change to the device list, 1 if it's been updated
+ */
+EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, int *nDevs, int *devId);
+
+/*!
+ Sets the current video capture device
+ \param devId The id of the device to use for video capture
+ */
+EXPORT int iaxc_video_device_set(int devId);
+
/*
* Acceptable range for video rezolution
*/
Modified: trunk/lib/video.c
===================================================================
--- trunk/lib/video.c 2007-10-31 13:10:33 UTC (rev 1249)
+++ trunk/lib/video.c 2007-10-31 17:31:21 UTC (rev 1250)
@@ -31,13 +31,16 @@
#include "codec_theora.h"
#endif
+#if defined(WIN32)
+#define strdup _strdup
+#endif
+
struct video_info
{
vidcap_state * vc;
vidcap_sapi * sapi;
vidcap_src * src;
struct vidcap_sapi_info sapi_info;
- struct vidcap_src_info src_info;
struct vidcap_fmt_info fmt_info;
/* these are the requested (post-scaling) dimensions */
@@ -63,6 +66,15 @@
int prefs;
struct slicer_context * sc;
+
+ /* these two struct arrays are correlated by index */
+ struct vidcap_src_info * vc_src_info;
+ struct iaxc_video_device * devices;
+ MUTEX dev_list_lock;
+
+ int device_count;
+ int selected_device_id;
+ int next_id;
};
struct video_format_info
@@ -492,6 +504,24 @@
*/
}
+static int video_device_notification_callback(vidcap_sapi *sapi,
+ void * user_context)
+{
+ iaxc_event evt;
+
+ if ( sapi != vinfo.sapi )
+ {
+ fprintf(stderr, "ERROR: wrong sapi in device notification\n");
+ return -1;
+ }
+
+ /* notify application that device list has been updated */
+ evt.type = IAXC_EVENT_VIDCAP_DEVICE;
+ iaxci_post_event(evt);
+
+ return 0;
+}
+
static int capture_callback(vidcap_src * src, void * user_data,
struct vidcap_capture_info * cap_info)
{
@@ -517,6 +547,8 @@
const char * source_buf = 0;
int source_buf_size = 0;
+ iaxc_event evt;
+
int i;
if ( cap_info->error_status )
@@ -524,6 +556,9 @@
fprintf(stderr, "vidcap capture error %d\n",
cap_info->error_status);
vinfo.capturing = 0;
+
+ evt.type = IAXC_EVENT_VIDCAP_ERROR;
+ iaxci_post_event(evt);
return -1;
}
@@ -732,30 +767,10 @@
};
static const int fourcc_list_len = sizeof(fourcc_list) / sizeof(int);
- int i;
static const int max_factor = 2;
int scale_factor;
+ int i;
- if ( !vinfo.src )
- {
- /* Acquire the default source */
- if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi, 0)) )
- {
- fprintf(stderr, "failed to acquire video source\n");
- return -1;
- }
-
- if ( vidcap_src_info_get(vinfo.src, &vinfo.src_info) )
- {
- fprintf(stderr, "failed to get video source info\n");
- return -1;
- }
-
- fprintf(stderr, "acquired vidcap source %s (%s)\n",
- vinfo.src_info.description,
- vinfo.src_info.identifier);
- }
-
vinfo.width = vfinfo.width;
vinfo.height = vfinfo.height;
vinfo.fmt_info.fps_numerator = vfinfo.framerate;
@@ -878,6 +893,46 @@
return 0;
}
+static int ensure_acquired(int dev_id)
+{
+ int dev_num;
+
+ if ( !vinfo.src )
+ {
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ )
+ {
+ if ( vinfo.devices[dev_num].id == dev_id )
+ break;
+ }
+
+ if ( dev_num == vinfo.device_count )
+ {
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ fprintf(stderr, "invalid vidcap dev id: %d\n", dev_id);
+ return -1;
+ }
+
+ if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi,
+ &vinfo.vc_src_info[dev_num])) )
+ {
+ vinfo.src = 0;
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ fprintf(stderr, "failed to acquire video source\n");
+ return -1;
+ }
+
+ fprintf(stderr, "acquired vidcap source %s (%s)\n",
+ vinfo.vc_src_info[dev_num].description,
+ vinfo.vc_src_info[dev_num].identifier);
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ }
+
+ return 0;
+}
+
EXPORT int iaxc_set_video_prefs(unsigned int prefs)
{
const unsigned int prefs_mask =
@@ -888,9 +943,14 @@
IAXC_VIDEO_PREF_SEND_DISABLE |
IAXC_VIDEO_PREF_RECV_RGB32 |
IAXC_VIDEO_PREF_CAPTURE_DISABLE;
+ int ret;
if ( prefs & ~prefs_mask )
+ {
+ fprintf(stderr, "ERROR: unexpected video preference: 0x%0x\n",
+ prefs);
return -1;
+ }
vinfo.prefs = prefs;
@@ -911,7 +971,15 @@
{
if ( vidcap_src_capture_stop(vinfo.src) )
fprintf(stderr, "failed vidcap_src_capture_stop\n");
+
vinfo.capturing = 0;
+
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release a video source\n");
+ }
+
+ vinfo.src = 0;
}
MUTEXUNLOCK(&vinfo.camera_lock);
}
@@ -920,17 +988,30 @@
MUTEXLOCK(&vinfo.camera_lock);
if ( !vinfo.capturing )
{
+ if ( vinfo.selected_device_id < 0 )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( ensure_acquired(vinfo.selected_device_id) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
if ( prepare_for_capture() )
{
MUTEXUNLOCK(&vinfo.camera_lock);
return -1;
}
- if ( vidcap_src_capture_start(vinfo.src,
- capture_callback, 0) )
+ if ( (ret = vidcap_src_capture_start(vinfo.src,
+ capture_callback, 0)) )
{
MUTEXUNLOCK(&vinfo.camera_lock);
- fprintf(stderr, "failed to start video capture\n");
+ fprintf(stderr, "failed to start video capture: %d\n",
+ ret);
return -1;
}
@@ -1231,10 +1312,230 @@
return 0;
}
+EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs,
+ int *num_devs, int *id_selected)
+{
+ int new_device_count;
+ int old_device_count;
+ struct vidcap_src_info *new_src_list;
+ struct vidcap_src_info *old_src_list;
+ 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 i, n;
+
+ /* update libvidcap's device list */
+ new_device_count = vidcap_src_list_update(vinfo.sapi);
+ if ( new_device_count != vinfo.device_count )
+ list_changed = 1;
+
+ if ( new_device_count < 0 )
+ {
+ fprintf(stderr, "ERROR: failed getting updated vidcap device list: %d\n",
+ new_device_count);
+ return -1;
+ }
+
+ new_src_list = (struct vidcap_src_info *)malloc(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));
+ if ( !new_iaxc_dev_list )
+ {
+ free(new_src_list);
+ fprintf(stderr, "ERROR: failed source allocation update\n");
+ return -1;
+ }
+
+ /* 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");
+
+ free(new_src_list);
+ free(new_iaxc_dev_list);
+ return -1;
+ }
+
+ /* 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);
+ new_iaxc_dev_list[n].id_string = strdup(new_src_list[n].identifier);
+
+ /* this device may have been here all along
+ * Check if it has, and re-assign that device id
+ * else assign a new id
+ */
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) )
+ {
+ /*fprintf(stderr, "EXISTING DEVICE: %s - (id=%d) '%s'\n",
+ new_iaxc_dev_list[n].name,
+ vinfo.devices[i].id,
+ new_iaxc_dev_list[n].id_string);
+ */
+ new_iaxc_dev_list[n].id = vinfo.devices[i].id;
+
+ if ( vinfo.selected_device_id == new_iaxc_dev_list[n].id )
+ found_selected_device = 1;
+ break;
+ }
+ }
+ if ( i == vinfo.device_count )
+ {
+ new_iaxc_dev_list[n].id = vinfo.next_id++;
+ fprintf(stderr, "NEW DEVICE: %s - (id=%d) '%s'\n",
+ new_iaxc_dev_list[n].name,
+ new_iaxc_dev_list[n].id,
+ new_iaxc_dev_list[n].id_string);
+
+ list_changed = 1;
+ }
+ }
+
+ if ( !list_changed )
+ {
+ /* Free new lists. Nothing's really changed */
+ free(new_src_list);
+ for ( i = 0; i < new_device_count; i++ )
+ {
+ free((void *)new_iaxc_dev_list[i].name);
+ free((void *)new_iaxc_dev_list[i].id_string);
+ }
+ free(new_iaxc_dev_list);
+ }
+ else
+ {
+ old_device_count = vinfo.device_count;
+ old_src_list = vinfo.vc_src_info;
+ old_iaxc_dev_list = vinfo.devices;
+
+ /* Update iaxclient's device list info */
+ /* Lock since other iaxclient funcs use these fields */
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ vinfo.device_count = new_device_count;
+ vinfo.vc_src_info = new_src_list;
+ vinfo.devices = new_iaxc_dev_list;
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+
+ /* free old lists */
+ free(old_src_list);
+ for ( i = 0; i < old_device_count; i++ )
+ {
+ free((void *)old_iaxc_dev_list[i].name);
+ free((void *)old_iaxc_dev_list[i].id_string);
+ }
+ free(old_iaxc_dev_list);
+ }
+
+ *devs = vinfo.devices;
+ *num_devs = vinfo.device_count;
+ *id_selected = found_selected_device ? vinfo.selected_device_id : -1;
+
+ return list_changed;
+}
+
+EXPORT int iaxc_video_device_set(int capture_dev_id)
+{
+ int ret = 0;
+ int dev_num = 0;
+
+ MUTEXLOCK(&vinfo.camera_lock);
+
+ if ( capture_dev_id == vinfo.selected_device_id )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return 0;
+ }
+
+ if ( capture_dev_id < 0 )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "invalid video device id ( < 0 )\n");
+ return -1;
+ }
+
+ MUTEXLOCK(&vinfo.dev_list_lock);
+
+ for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ )
+ {
+ if ( vinfo.devices[dev_num].id == capture_dev_id )
+ break;
+ }
+
+ if ( dev_num == vinfo.device_count )
+ {
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "invalid video device id: %d\n",
+ capture_dev_id);
+ return -1;
+ }
+
+ vinfo.selected_device_id = capture_dev_id;
+
+ if ( vinfo.src && vidcap_src_release(vinfo.src) )
+ {
+ fprintf(stderr, "failed to release video source\n");
+ }
+
+ vinfo.src = 0;
+
+ MUTEXUNLOCK(&vinfo.dev_list_lock);
+
+ if ( vinfo.capturing )
+ {
+ if ( ensure_acquired(capture_dev_id) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( prepare_for_capture() )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ return -1;
+ }
+
+ if ( (ret = vidcap_src_capture_start(vinfo.src,
+ capture_callback, 0)) )
+ {
+ MUTEXUNLOCK(&vinfo.camera_lock);
+ fprintf(stderr, "failed to restart video capture: %d\n", ret);
+ return -1;
+ }
+ }
+
+ MUTEXUNLOCK(&vinfo.camera_lock);
+
+ return 0;
+}
+
int video_initialize(void)
{
+ int i;
+ const int starting_id = 50;
+
memset(&vinfo, 0, sizeof(vinfo));
+ MUTEXINIT(&vinfo.camera_lock);
+ MUTEXINIT(&vinfo.dev_list_lock);
+
+ vinfo.width = vfinfo.width;
+ vinfo.height = vfinfo.height;
+
if ( !(vinfo.vc = vidcap_initialize()) )
{
fprintf(stderr, "ERROR: failed vidcap_initialize\n");
@@ -1257,23 +1558,89 @@
vinfo.sapi_info.description,
vinfo.sapi_info.identifier);
- /* TODO: Maybe we should reevaluate these defaults. Once could
- * make an argument that reasonable users of iaxclient might
- * not want video to be delivered as soon as they iaxc_initialize().
+ vinfo.selected_device_id = -1;
+
+ vinfo.device_count = vidcap_src_list_update(vinfo.sapi);
+ if ( vinfo.device_count < 0 )
+ {
+ fprintf(stderr,
+ "ERROR: failed updating video capture devices list\n");
+ goto bail;
+ }
+
+ vinfo.vc_src_info = (struct vidcap_src_info *)malloc(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 *
+ sizeof(struct iaxc_video_device));
+ if ( !vinfo.devices )
+ {
+ fprintf(stderr, "ERROR: failed vinfo field allocation\n");
+ free(vinfo.vc_src_info);
+ goto bail;
+ }
+
+ if ( vidcap_src_list_get(vinfo.sapi, vinfo.device_count,
+ vinfo.vc_src_info) )
+ {
+ fprintf(stderr, "ERROR: failed vidcap_src_list_get()\n");
+ free(vinfo.vc_src_info);
+ free(vinfo.devices);
+ goto bail;
+ }
+
+ /* build initial iaxclient video source list */
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ vinfo.devices[i].name = strdup(vinfo.vc_src_info[i].description);
+ vinfo.devices[i].id_string = strdup(vinfo.vc_src_info[i].identifier);
+ /* Let's be clear that the device id is not some
+ * base-zero index. Once plug-n-play is implemented,
+ * these ids may diverge as devices are added
+ * and removed.
+ */
+ vinfo.devices[i].id = i + starting_id;
+ }
+ vinfo.next_id = vinfo.devices[vinfo.device_count - 1].id + 1;
+
+ /* set default source - the first device */
+ if ( vinfo.device_count )
+ {
+ iaxc_video_device_set(vinfo.devices[0].id);
+ }
+
+ /* setup device notification callback
+ * for device insertion and removal
*/
+ if ( vidcap_srcs_notify(vinfo.sapi, &video_device_notification_callback, 0) )
+ {
+ 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;
+ IAXC_VIDEO_PREF_RECV_REMOTE_RAW |
+ IAXC_VIDEO_PREF_CAPTURE_DISABLE;
- MUTEXINIT(&vinfo.camera_lock);
+ return 0;
- /* We reset the existing video preferences to yield the side-effect
- * of potentially starting or stopping the video capture.
- */
- iaxc_set_video_prefs(vinfo.prefs);
+late_bail:
+ free(vinfo.vc_src_info);
- return 0;
+ for ( i = 0; i < vinfo.device_count; i++ )
+ {
+ free((void *)vinfo.devices[i].name);
+ free((void *)vinfo.devices[i].id_string);
+ }
+ free(vinfo.devices);
+
bail:
vidcap_destroy(vinfo.vc);
vinfo.vc = 0;
@@ -1289,6 +1656,7 @@
vinfo.vc = 0;
MUTEXDESTROY(&vinfo.camera_lock);
+ MUTEXDESTROY(&vinfo.dev_list_lock);
if ( vinfo.converted_i420_buf )
{
@@ -1324,7 +1692,7 @@
* we are saying that the "camera is working" if there exists
* more than zero cameras.
*/
- return vidcap_src_list_update(vinfo.sapi);
+ return vidcap_src_list_update(vinfo.sapi) > 0;
}
int video_send_stats(struct iaxc_call * call)
Modified: trunk/simpleclient/vtestcall/vtestcall.c
===================================================================
--- trunk/simpleclient/vtestcall/vtestcall.c 2007-10-31 13:10:33 UTC (rev 1249)
+++ trunk/simpleclient/vtestcall/vtestcall.c 2007-10-31 17:31:21 UTC (rev 1250)
@@ -238,6 +238,9 @@
e.ev.audio.source == IAXC_SOURCE_REMOTE ? "remote" : "local",
e.ev.audio.encoded ? "encoded" : "raw");
break;
+ case IAXC_EVENT_VIDCAP_ERROR:
+ fprintf(stderr, "\nVIDEO CAPTURE DEVICE ERROR\n");
+ break;
default:
break;
}
@@ -275,12 +278,28 @@
int nDevs, input, output,ring;
int i;
+ int vinput;
+ int nVdevs;
+ struct iaxc_video_device *vDevs;
+
iaxc_audio_devices_get(&devs,&nDevs, &input, &output, &ring);
+ printf("\nThere are %d audio devices:\n", nDevs);
for(i=0;i<nDevs;i++)
{
- fprintf(stderr, "DEVICE ID=%d NAME=%s CAPS=%lx\n", devs[i].devID, devs[i].name, devs[i].capabilities);
+ fprintf(stderr, "AUDIO DEVICE ID = %d NAME = %s CAPS=%lx\n",
+ devs[i].devID, devs[i].name, devs[i].capabilities);
iaxc_audio_devices_set(input,output,ring);
}
+
+ iaxc_video_devices_get(&vDevs, &nVdevs, &vinput);
+ printf("\nThere are %d video capture devices:\n", nVdevs);
+ for ( i = 0; i < nVdevs; i++ )
+ {
+ printf("VIDEO DEVICE ID = %d NAME = %s\n",
+ vDevs[i].id, vDevs[i].name);
+ }
+ printf("Currently selected VIDEO device id: %d\n", vinput);
+
}
void usage()
@@ -363,7 +382,11 @@
exit(-1);
}
- if ( v.size <= 0 ) fprintf(stderr, "WARNING: size %d in callback\n", v.size);
+ if ( v.size <= 0 )
+ {
+ fprintf(stderr, "WARNING: size %d in callback\n", v.size);
+ return 0;
+ }
if ( !remote )
{
@@ -528,12 +551,18 @@
//iaxc_set_audio_prefs(IAXC_AUDIO_PREF_RECV_LOCAL_RAW | IAXC_AUDIO_PREF_RECV_REMOTE_RAW);
fprintf(f, "\n\
- TestCall accept some keyboard input while it's running.\n\
+ vtestcall accepts keyboard input while it's running.\n\
You must hit 'enter' for your keypresses to be recognized,\n\
- although you can type more than one key on a line\n\
+ although you can type more than one key on a line:\n\
\n\
- q: drop the call and hangup.\n\
- 0-9 * or #: dial those DTMF digits.\n");
+ s: switch video capture devices \n\
+ b: bypass video jitter stuff\n\
+ r: reject incoming call\n\
+ d: dial\n\
+ c: set caller id info\n\
+ w: video window toggle\n\
+ 0-9 * or #: dial those DTMF digits\n\
+ q: drop the call and hangup\n");
printf("Starting processing thread...\n");
iaxc_start_processing_thread();
@@ -615,6 +644,39 @@
iaxc_set_callerid(myCIDname,myCIDnumber);
}
break;
+ case SDLK_s:
+ {
+ int input;
+ int ndevs;
+ struct iaxc_video_device *vDevs;
+ int newVideoDevId;
+
+ iaxc_video_devices_get(&vDevs, &ndevs, &input);
+
+ printf("There are %d video capture devices:\n", ndevs);
+ for ( i = 0; i < ndevs; i++ )
+ {
+ printf("VIDEO DEVICE ID = %d NAME = %s\n", vDevs[i].id, vDevs[i].name);
+ }
+ printf("Currently selected device id: %d\n", input);
+
+ printf("Select video capture device: ");
+ fflush(stdin);
+ fscanf(stdin,"%d", &newVideoDevId);
+
+ if ( iaxc_video_device_set(newVideoDevId) )
+ {
+ printf("Error selecting device id %d\n",
+ newVideoDevId);
+ break;
+ }
+
+ /* explicitly set the prefs again in case
+ * previous capture device has failed
+ */
+ iaxc_set_video_prefs( iaxc_get_video_prefs() );
+ }
+ break;
case SDLK_t: /* transmit-only */
printf("transmit mode active\n");
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2007-10-31 13:10:36
|
Revision: 1249
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1249&view=rev
Author: matben
Date: 2007-10-31 06:10:33 -0700 (Wed, 31 Oct 2007)
Log Message:
-----------
* Problems reported using selected_call() and select_call(). This issue needs better
understanding of the underlying API before switching them on again, if ever.
Modified Paths:
--------------
trunk/contrib/tcl/iaxclient.c
Modified: trunk/contrib/tcl/iaxclient.c
===================================================================
--- trunk/contrib/tcl/iaxclient.c 2007-10-30 21:07:50 UTC (rev 1248)
+++ trunk/contrib/tcl/iaxclient.c 2007-10-31 13:10:33 UTC (rev 1249)
@@ -600,7 +600,9 @@
}
if (objc == 2) {
- line = iaxc_selected_call();
+ // Problems reported coming from this line.
+ // If including it again you must be very sure of exactly what you do!
+ //line = iaxc_selected_call();
}
if (objc == 3) {
@@ -614,7 +616,9 @@
if (result == TCL_OK) {
iaxc_call(num);
- iaxc_select_call(line);
+ // Problems reported coming from this line.
+ // If including it again you must be very sure of exactly what you do!
+ //iaxc_select_call(line);
}
return result;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jpg...@us...> - 2007-10-30 21:08:05
|
Revision: 1248
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1248&view=rev
Author: jpgrayson
Date: 2007-10-30 14:07:50 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Stress test updates.
* remove bogus include
* Add -c command line option for specifying the connection timeout separately from the call duration timeout.
Modified Paths:
--------------
trunk/simpleclient/stresstest/stresstest.c
Modified: trunk/simpleclient/stresstest/stresstest.c
===================================================================
--- trunk/simpleclient/stresstest/stresstest.c 2007-10-30 21:06:10 UTC (rev 1247)
+++ trunk/simpleclient/stresstest/stresstest.c 2007-10-30 21:07:50 UTC (rev 1248)
@@ -23,7 +23,6 @@
#include <signal.h>
#include "iaxclient.h"
-#include "slice.h"
#include "file.h"
#ifdef WIN32
@@ -57,7 +56,8 @@
static int send_video = 1;
static int send_audio = 1;
static int print_netstats = 0;
-static int timeout = 0;
+static int call_timeout_ms = 0;
+static int connect_timeout_ms = 5000;
static int video_frames_count = 0;
static int audio_frames_count = 0;
@@ -193,7 +193,8 @@
" -a stop sending audio\n"
" -l run file in a loop\n"
" -n dump periodic netstats to log file\n"
- " -t <timeout> terminate after timeout seconds and report status via return code\n"
+ " -t <TIMEOUT> terminate call after TIMEOUT seconds\n"
+ " -c <TIMEOUT> try connecting for TIMEOUT seconds (default 5)\n"
" -L <FILE> log to FILE\n"
"\n"
);
@@ -269,14 +270,14 @@
switch ( argv[i][1] )
{
case 'F': /* set video params */
- {
- formatp = 1 << atoi(argv[++i]);
- framerate = atoi(argv[++i]);
- bitrate = atoi(argv[++i]);
- width = atoi(argv[++i]);
- height = atoi(argv[++i]);
- fragsize = atoi(argv[++i]);
- }
+ if ( i+6 >= argc )
+ usage();
+ formatp = 1 << atoi(argv[++i]);
+ framerate = atoi(argv[++i]);
+ bitrate = atoi(argv[++i]);
+ width = atoi(argv[++i]);
+ height = atoi(argv[++i]);
+ fragsize = atoi(argv[++i]);
break;
case 'o':
if ( i+1 >= argc )
@@ -298,8 +299,13 @@
case 't':
if ( i+1 >= argc )
usage();
- timeout = 1000 * atoi(argv[++i]);
+ call_timeout_ms = 1000 * atoi(argv[++i]);
break;
+ case 'c':
+ if ( i+1 >= argc )
+ usage();
+ connect_timeout_ms = 1000 * atoi(argv[++i]);
+ break;
case 'L':
if ( i+1 >= argc )
usage();
@@ -314,7 +320,7 @@
usage();
}
} else
- dest=argv[i];
+ dest = argv[i];
}
if ( dest == NULL )
@@ -355,11 +361,12 @@
mylog("Failed to make call to '%s'", dest);
// Wait for the call to be established;
- while ( !call_established )
+ while ( !call_established && running )
{
struct timeval now;
gettimeofday(&now, NULL);
- if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
+ if ( connect_timeout_ms > 0 &&
+ msecdiff(&start_time, &now) > connect_timeout_ms )
hangup_and_exit(TEST_NO_CONNECTION);
iaxc_millisleep(5);
}
@@ -394,7 +401,8 @@
// Exit after a positive timeout
gettimeofday(&now, NULL);
- if ( timeout > 0 && msecdiff(&start_time, &now) > timeout )
+ if ( call_timeout_ms > 0 &&
+ msecdiff(&start_time, &now) > call_timeout_ms )
running = 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jpg...@us...> - 2007-10-30 21:06:07
|
Revision: 1247
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1247&view=rev
Author: jpgrayson
Date: 2007-10-30 14:06:10 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Fix constness issues.
Modified Paths:
--------------
trunk/lib/codec_theora.c
trunk/lib/slice.c
trunk/lib/slice.h
Modified: trunk/lib/codec_theora.c
===================================================================
--- trunk/lib/codec_theora.c 2007-10-30 20:25:44 UTC (rev 1246)
+++ trunk/lib/codec_theora.c 2007-10-30 21:06:10 UTC (rev 1247)
@@ -111,7 +111,8 @@
free(c);
}
-static int decode(struct iaxc_video_codec *c, int inlen, char *in, int *outlen, char *out)
+static int decode(struct iaxc_video_codec *c, int inlen, const char *in,
+ int *outlen, char *out)
{
struct theora_decoder *d;
ogg_packet op;
Modified: trunk/lib/slice.c
===================================================================
--- trunk/lib/slice.c 2007-10-30 20:25:44 UTC (rev 1246)
+++ trunk/lib/slice.c 2007-10-30 21:06:10 UTC (rev 1247)
@@ -32,7 +32,7 @@
return 0;
}
-int slice(char *data,
+int slice(const char *data,
unsigned int size,
struct slice_set_t *slice_set,
struct slicer_context *sc
@@ -93,7 +93,8 @@
dsc->frame_complete = 0;
}
-char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc)
+char *
+deslice(const char *in, int inlen, int *outlen, struct deslicer_context *dsc)
{
unsigned char frame_index, slice_index, num_slices, version;
unsigned short source_id;
Modified: trunk/lib/slice.h
===================================================================
--- trunk/lib/slice.h 2007-10-30 20:25:44 UTC (rev 1246)
+++ trunk/lib/slice.h 2007-10-30 21:06:10 UTC (rev 1247)
@@ -77,7 +77,7 @@
* sc - holds stream information such as source id and frame index
* Returns 0 if completed successfully or a negative value if failure.
*/
-int slice(char *data,
+int slice(const char *data,
unsigned int size,
struct slice_set_t *slice_set,
struct slicer_context *sc
@@ -103,6 +103,7 @@
* Returns a pointer to a buffer containing the completed frame and updates
* outlen with the frame size if successful
*/
-char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc);
+char *
+deslice(const char *in, int inlen, int *outlen, struct deslicer_context *dsc);
-#endif // __SLICE_H__
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-10-30 20:25:55
|
Revision: 1246
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1246&view=rev
Author: sbalea
Date: 2007-10-30 13:25:44 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Fix iaxclient.h with regards to IAXC_FILTER_DEREVERB
Modified Paths:
--------------
branches/team/mihai/echocan/lib/iaxclient.h
Modified: branches/team/mihai/echocan/lib/iaxclient.h
===================================================================
--- branches/team/mihai/echocan/lib/iaxclient.h 2007-10-30 19:32:00 UTC (rev 1245)
+++ branches/team/mihai/echocan/lib/iaxclient.h 2007-10-30 20:25:44 UTC (rev 1246)
@@ -1025,6 +1025,7 @@
#define IAXC_FILTER_ECHO (1<<2) /*!< Echo cancellation filter */
#define IAXC_FILTER_AAGC (1<<3) /*!< Analog (mixer-based) Automatic Gain Control */
#define IAXC_FILTER_CN (1<<4) /*!< Send Comfort Noise (CN) frames when silence is detected */
+#define IAXC_FILTER_DEREVERB (1<<5) /*!< Reverb reduction filter */
/*!
Returns the set of audio filters being applied.
@@ -1033,7 +1034,6 @@
\see IAXC_FILTER_DENOISE, IAXC_FILTER_AGC, IAXC_FILTER_ECHO, IAXC_FILTER_AAGC,
IAXC_FILTER_CN
*/
-#define IAXC_FILTER_DEREVERB (1<<5)
EXPORT int iaxc_get_filters(void);
/*!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-10-30 19:31:55
|
Revision: 1245
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1245&view=rev
Author: sbalea
Date: 2007-10-30 12:32:00 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Synchronize with trunk rev 1244
Revision Links:
--------------
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1244&view=rev
Modified Paths:
--------------
branches/team/mihai/echocan/contrib/tcl/README.txt
branches/team/mihai/echocan/contrib/tcl/configure
branches/team/mihai/echocan/contrib/tcl/configure.in
branches/team/mihai/echocan/contrib/tcl/iaxclient.c
branches/team/mihai/echocan/lib/audio_portaudio.c
branches/team/mihai/echocan/lib/codec_ulaw.c
branches/team/mihai/echocan/lib/iaxclient.h
branches/team/mihai/echocan/lib/iaxclient_lib.c
branches/team/mihai/echocan/lib/portmixer/px_win_wmme/px_win_wmme.c
Added Paths:
-----------
branches/team/mihai/echocan/contrib/tcl/video.c
Modified: branches/team/mihai/echocan/contrib/tcl/README.txt
===================================================================
--- branches/team/mihai/echocan/contrib/tcl/README.txt 2007-10-30 18:33:01 UTC (rev 1244)
+++ branches/team/mihai/echocan/contrib/tcl/README.txt 2007-10-30 19:32:00 UTC (rev 1245)
@@ -105,7 +105,23 @@
iaxclient::unregister sessionID
+ There are some utilities to play ring tones. First you must initialize
+ and set a ring tone using:
+ iaxclient::toneinit F1 F2 Duration Length Repeat
+ where F1 and F2 are the two tone frequencies in Hertz, Duration
+ in milliseconds of the tone, Length in milliseconds of tone plus
+ silence, Repeat the number of times to play the tone.
+ A typical call can be:
+ iaxclient::toneinit 880 960 16000 48000 10
+
+ iaxclient::ringstart 0
+ start ringing on ring device 0
+
+ iaxclient::ringstop
+ stop ringing
+
+
A tone is any single character from the set 123A456B789C*0#D
A state is a list with any of: free, active, outgoing, ringing, complete,
Modified: branches/team/mihai/echocan/contrib/tcl/configure
===================================================================
--- branches/team/mihai/echocan/contrib/tcl/configure 2007-10-30 18:33:01 UTC (rev 1244)
+++ branches/team/mihai/echocan/contrib/tcl/configure 2007-10-30 19:32:00 UTC (rev 1245)
@@ -1,8 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for iaxclient 0.2.
+# Generated by GNU Autoconf 2.57 for iaxclient 0.2.
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -19,10 +20,9 @@
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
-DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -41,7 +41,7 @@
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -218,17 +218,16 @@
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
- test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
# IFS
@@ -667,7 +666,7 @@
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -707,10 +706,10 @@
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -802,9 +801,9 @@
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -903,46 +902,13 @@
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_srcdir/configure.gnu; then
@@ -952,7 +918,7 @@
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -966,9 +932,10 @@
if $ac_init_version; then
cat <<\_ACEOF
iaxclient configure 0.2
-generated by GNU Autoconf 2.59
+generated by GNU Autoconf 2.57
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -980,7 +947,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by iaxclient $as_me 0.2, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+generated by GNU Autoconf 2.57. Invocation command line was
$ $0 $@
@@ -1057,19 +1024,19 @@
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
+ ac_must_keep_next=false # Got value, back to normal.
else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
@@ -1103,12 +1070,12 @@
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1137,7 +1104,7 @@
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1156,7 +1123,7 @@
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
+ rm -f core core.* *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
@@ -1236,7 +1203,7 @@
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
@@ -1253,13 +1220,13 @@
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -2060,6 +2027,7 @@
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2079,8 +2047,8 @@
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
@@ -2100,23 +2068,23 @@
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
+ ;;
conftest.$ac_ext )
- # This is the source file.
- ;;
+ # This is the source file.
+ ;;
[ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
* )
- break;;
+ break;;
esac
done
else
@@ -2190,8 +2158,8 @@
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
@@ -2216,6 +2184,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2266,6 +2235,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2285,25 +2255,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
@@ -2312,7 +2272,7 @@
ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2328,6 +2288,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2344,25 +2305,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
@@ -2371,7 +2322,7 @@
ac_cv_prog_cc_g=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
@@ -2398,6 +2349,7 @@
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2425,16 +2377,6 @@
va_end (v);
return s;
}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2461,25 +2403,15 @@
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
@@ -2488,7 +2420,7 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext
+rm -f conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -2516,28 +2448,19 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- '' \
+ ''\
+ '#include <stdlib.h>' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -2545,13 +2468,14 @@
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_declaration
#include <stdlib.h>
+$ac_declaration
int
main ()
{
@@ -2562,25 +2486,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -2589,8 +2503,9 @@
continue
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2607,25 +2522,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -2633,7 +2538,7 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -2647,7 +2552,7 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2682,6 +2587,7 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2692,7 +2598,7 @@
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2704,7 +2610,6 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2725,6 +2630,7 @@
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2742,7 +2648,6 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2789,6 +2694,7 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2799,7 +2705,7 @@
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2811,7 +2717,6 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2832,6 +2737,7 @@
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2849,7 +2755,6 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2900,7 +2805,6 @@
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
@@ -2917,7 +2821,6 @@
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -2925,20 +2828,20 @@
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
done
done
;;
@@ -2975,7 +2878,7 @@
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3118,6 +3021,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3138,25 +3042,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
@@ -3165,11 +3059,12 @@
ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3191,6 +3086,7 @@
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3215,6 +3111,7 @@
:
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3226,9 +3123,9 @@
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -3239,7 +3136,7 @@
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -3264,7 +3161,7 @@
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -3289,7 +3186,7 @@
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+ inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -3298,6 +3195,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3309,25 +3207,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -3336,7 +3224,7 @@
eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -3365,6 +3253,7 @@
OLDCC="$CC"
CC="$CC -pipe"
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3381,25 +3270,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
@@ -3411,7 +3290,7 @@
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
#--------------------------------------------------------------------
@@ -3425,6 +3304,7 @@
else
# See if sys/param.h defines the BYTE_ORDER macro.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3446,28 +3326,19 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
# It does; now see whether it defined to BIG_ENDIAN or not.
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3489,25 +3360,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_bigendian=yes
else
@@ -3516,7 +3377,7 @@
ac_cv_c_bigendian=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -3526,6 +3387,7 @@
# try to guess the endianness by grepping values into an object file
ac_cv_c_bigendian=unknown
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3547,25 +3409,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
ac_cv_c_bigendian=yes
@@ -3583,9 +3435,10 @@
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3624,10 +3477,10 @@
( exit $ac_status )
ac_cv_c_bigendian=yes
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
echo "${ECHO_T}$ac_cv_c_bigendian" >&6
@@ -3663,28 +3516,21 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define sin to an innocuous variant, in case <limits.h> declares sin.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define sin innocuous_sin
-
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
-
-#undef sin
-
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -3715,25 +3561,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_sin=yes
else
@@ -3742,8 +3578,7 @@
ac_cv_func_sin=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
echo "${ECHO_T}$ac_cv_func_sin" >&6
@@ -3761,6 +3596,7 @@
ac_check_lib_save_LIBS=$LIBS
LIBS="-lieee $LIBS"
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3778,25 +3614,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ieee_main=yes
else
@@ -3805,8 +3631,7 @@
ac_cv_lib_ieee_main=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
@@ -3829,6 +3654,7 @@
ac_check_lib_save_LIBS=$LIBS
LIBS="-linet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3846,25 +3672,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_inet_main=yes
else
@@ -3873,8 +3689,7 @@
ac_cv_lib_inet_main=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
@@ -3896,6 +3711,7 @@
echo "$as_me:$LINENO: checking net/errno.h usability" >&5
echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3906,25 +3722,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
@@ -3933,7 +3739,7 @@
ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -3941,6 +3747,7 @@
echo "$as_me:$LINENO: checking net/errno.h presence" >&5
echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3958,7 +3765,6 @@
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3978,31 +3784,32 @@
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
{ echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug...@gn.... ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
;;
- no:yes:* )
+ no:yes )
{ echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
-## Report this to the iaxclient lists. ##
+## Report this to bug...@gn.... ##
## ------------------------------------ ##
_ASBOX
) |
@@ -4056,28 +3863,21 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define connect to an innocuous variant, in case <limits.h> declares connect.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define connect innocuous_connect
-
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
-
-#undef connect
-
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4108,25 +3908,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_connect=yes
else
@@ -4135,8 +3925,7 @@
ac_cv_func_connect=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6
@@ -4153,28 +3942,21 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define setsockopt innocuous_setsockopt
-
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char setsockopt (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
-
-#undef setsockopt
-
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4205,25 +3987,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_setsockopt=yes
else
@@ -4232,8 +4004,7 @@
ac_cv_func_setsockopt=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
@@ -4248,6 +4019,7 @@
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4271,25 +4043,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_socket_setsockopt=yes
else
@@ -4298,8 +4060,7 @@
ac_cv_lib_socket_setsockopt=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
@@ -4322,28 +4083,21 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define accept to an innocuous variant, in case <limits.h> declares accept.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define accept innocuous_accept
-
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char accept (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
-
-#undef accept
-
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4374,25 +4128,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_accept=yes
else
@@ -4401,8 +4145,7 @@
ac_cv_func_accept=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
echo "${ECHO_T}$ac_cv_func_accept" >&6
@@ -4419,28 +4162,21 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define gethostbyname innocuous_gethostbyname
-
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
-
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
-
-#undef gethostbyname
-
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4471,25 +4207,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gethostbyname=yes
else
@@ -4498,8 +4224,7 @@
ac_cv_func_gethostbyname=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
@@ -4514,6 +4239,7 @@
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4537,25 +4263,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_nsl_gethostbyname=yes
else
@@ -4564,8 +4280,7 @@
ac_cv_lib_nsl_gethostbyname=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
@@ -4591,6 +4306,7 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4626,25 +4342,15 @@
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+ (eval $ac_link) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
tcl_cv_dirent_h=yes
else
@@ -4653,8 +4359,7 @@
tcl_cv_dirent_h=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
echo "${ECHO_T}$tcl_cv_dirent_h" >&6
@@ -4680,6 +4385,7 @@
echo "$as_me:$LINENO: checking errno.h usability" >&5
echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4690,25 +4396,15 @@
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
@@ -4717,7 +4413,7 @@
ac_header_compiler=no
fi
-rm...
[truncated message content] |
|
From: <sb...@us...> - 2007-10-30 18:32:59
|
Revision: 1244
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1244&view=rev
Author: sbalea
Date: 2007-10-30 11:33:01 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Merge from trunk: fix memory leaks in px_win_wmme.c
Modified Paths:
--------------
branches/2.0/lib/portmixer/px_win_wmme/px_win_wmme.c
Modified: branches/2.0/lib/portmixer/px_win_wmme/px_win_wmme.c
===================================================================
--- branches/2.0/lib/portmixer/px_win_wmme/px_win_wmme.c 2007-10-30 18:32:07 UTC (rev 1243)
+++ branches/2.0/lib/portmixer/px_win_wmme/px_win_wmme.c 2007-10-30 18:33:01 UTC (rev 1244)
@@ -671,7 +671,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return mmr ;
+ }
//
// find boost control
@@ -701,7 +705,11 @@
}
if ( boost_id == -1 )
+ {
+ free(mixerControl);
+
return MMSYSERR_ERROR ;
+ }
//
// get control details
@@ -724,7 +732,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return mmr ;
+ }
//
// update value
@@ -742,6 +754,8 @@
MIXER_SETCONTROLDETAILSF_VALUE
) ;
+ free(mixerControl);
+
if ( mmr != MMSYSERR_NOERROR )
return mmr ;
@@ -795,7 +809,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return -1 ;
+ }
//
// find boost control
@@ -825,7 +843,11 @@
}
if ( boost_id == -1 )
+ {
+ free(mixerControl);
+
return -1 ;
+ }
//
// get control details
@@ -847,6 +869,8 @@
MIXER_GETCONTROLDETAILSF_VALUE
) ;
+ free(mixerControl);
+
if ( mmr != MMSYSERR_NOERROR )
return -1 ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-10-30 18:32:03
|
Revision: 1243
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1243&view=rev
Author: sbalea
Date: 2007-10-30 11:32:07 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Fix memory leaks in px_win_wmme.c. Patch provided by Teri Schoech. Thanks
Modified Paths:
--------------
trunk/lib/portmixer/px_win_wmme/px_win_wmme.c
Modified: trunk/lib/portmixer/px_win_wmme/px_win_wmme.c
===================================================================
--- trunk/lib/portmixer/px_win_wmme/px_win_wmme.c 2007-10-30 18:18:45 UTC (rev 1242)
+++ trunk/lib/portmixer/px_win_wmme/px_win_wmme.c 2007-10-30 18:32:07 UTC (rev 1243)
@@ -671,7 +671,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return mmr ;
+ }
//
// find boost control
@@ -701,7 +705,11 @@
}
if ( boost_id == -1 )
+ {
+ free(mixerControl);
+
return MMSYSERR_ERROR ;
+ }
//
// get control details
@@ -724,7 +732,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return mmr ;
+ }
//
// update value
@@ -742,6 +754,8 @@
MIXER_SETCONTROLDETAILSF_VALUE
) ;
+ free(mixerControl);
+
if ( mmr != MMSYSERR_NOERROR )
return mmr ;
@@ -795,7 +809,11 @@
) ;
if ( mmr != MMSYSERR_NOERROR )
+ {
+ free(mixerControl);
+
return -1 ;
+ }
//
// find boost control
@@ -825,7 +843,11 @@
}
if ( boost_id == -1 )
+ {
+ free(mixerControl);
+
return -1 ;
+ }
//
// get control details
@@ -847,6 +869,8 @@
MIXER_GETCONTROLDETAILSF_VALUE
) ;
+ free(mixerControl);
+
if ( mmr != MMSYSERR_NOERROR )
return -1 ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2007-10-30 18:18:40
|
Revision: 1242
http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1242&view=rev
Author: sbalea
Date: 2007-10-30 11:18:45 -0700 (Tue, 30 Oct 2007)
Log Message:
-----------
Merge from trunk: fix memory leak in PortAudio destroy.
Modified Paths:
--------------
branches/2.0/lib/audio_portaudio.c
Modified: branches/2.0/lib/audio_portaudio.c
===================================================================
--- branches/2.0/lib/audio_portaudio.c 2007-10-30 18:16:53 UTC (rev 1241)
+++ branches/2.0/lib/audio_portaudio.c 2007-10-30 18:18:45 UTC (rev 1242)
@@ -969,6 +969,24 @@
static int pa_destroy(struct iaxc_audio_driver *d)
{
+ if( iMixer )
+ {
+ Px_CloseMixer(iMixer);
+ iMixer = NULL;
+ }
+ if ( oMixer )
+ {
+ Px_CloseMixer(oMixer);
+ oMixer = NULL;
+ }
+ if ( d )
+ {
+ if ( d->devices )
+ {
+ free(d->devices);
+ d->devices= NULL;
+ }
+ }
return Pa_Terminate();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|