From: <jpg...@us...> - 2007-09-03 19:14:06
|
Revision: 1113 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1113&view=rev Author: jpgrayson Date: 2007-09-03 12:14:08 -0700 (Mon, 03 Sep 2007) Log Message: ----------- Apply pkg-config patch. Thanks to Mikael Magnusson! Modified Paths: -------------- trunk/configure.ac trunk/iaxclient.pc.in Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-09-03 19:05:46 UTC (rev 1112) +++ trunk/configure.ac 2007-09-03 19:14:08 UTC (rev 1113) @@ -199,6 +199,7 @@ PKG_CHECK_MODULES(OGG, [ogg >= 1.1.3],has_ogg=yes) if test x$has_ogg = xyes; then AC_DEFINE(USE_OGG, 1, [OGG]) + PKG_REQUIRES="$PKG_REQUIRES ogg" elif test ! x$with_ogg = xauto ; then AC_MSG_ERROR([ libogg is required to build this package! @@ -220,6 +221,7 @@ PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7],has_theora=yes) if test x$has_theora = xyes; then AC_DEFINE(USE_THEORA, 1, [THEORA]) + PKG_REQUIRES="$PKG_REQUIRES theora" elif test ! x$with_theora = xauto ; then AC_MSG_ERROR([ libtheora is required to build this package! @@ -412,6 +414,7 @@ done AC_SUBST(CLIENTS) +AC_SUBST(PKG_REQUIRES) AC_CONFIG_FILES([ Makefile Modified: trunk/iaxclient.pc.in =================================================================== --- trunk/iaxclient.pc.in 2007-09-03 19:05:46 UTC (rev 1112) +++ trunk/iaxclient.pc.in 2007-09-03 19:14:08 UTC (rev 1113) @@ -7,6 +7,7 @@ Description: Inter-Asterisk eXchange Client Library Version: @PACKAGE_VERSION@ Libs: -L${libdir} -liaxclient @PTHREAD_LIBS@ +Libs.private: @GSM_LIBS@ Cflags: -I${includedir} -Requires: portaudio-2.0 speex theora ogg +Requires.private: portaudio-2.0 speex @PKG_REQUIRES@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-09-12 16:55:53
|
Revision: 1122 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1122&view=rev Author: sbalea Date: 2007-09-12 09:55:56 -0700 (Wed, 12 Sep 2007) Log Message: ----------- Video negotiation improvements: - add iaxc_call_ex API, that allows setting of caller ID info and video support on a per-call basis - better handling of audio-only connections - improve handling of the currently selected call not wanting video Patch provided by Erik Bunce Modified Paths: -------------- trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/video.c trunk/simpleclient/vtestcall/vtestcall.c Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-09-12 14:46:09 UTC (rev 1121) +++ trunk/lib/iaxclient.h 2007-09-12 16:55:56 UTC (rev 1122) @@ -290,6 +290,7 @@ EXPORT int iaxc_start_processing_thread(); EXPORT int iaxc_stop_processing_thread(); EXPORT int iaxc_call(const char * num); +EXPORT int iaxc_call_ex(const char* num, const char* callerid_name, const char* callerid_number, int video); EXPORT int iaxc_unregister( int id ); EXPORT int iaxc_register(const char * user, const char * pass, const char * host); EXPORT void iaxc_send_busy_on_incoming_call(int callNo); Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-09-12 14:46:09 UTC (rev 1121) +++ trunk/lib/iaxclient_lib.c 2007-09-12 16:55:56 UTC (rev 1122) @@ -1340,6 +1340,11 @@ EXPORT int iaxc_call(const char * num) { + return iaxc_call_ex(num, NULL, NULL, 1); +} + +EXPORT int iaxc_call_ex(const char *num, const char* callerid_name, const char* callerid_number, int video) +{ int video_format_capability = 0; int video_format_preferred = 0; int callNo = -1; @@ -1391,6 +1396,12 @@ strncpy(calls[callNo].remote, "" , IAXC_EVENT_BUFSIZ); } + if (callerid_number != NULL) + strncpy(calls[callNo].callerid_number, callerid_number, IAXC_EVENT_BUFSIZ); + + if (callerid_name != NULL) + strncpy(calls[callNo].callerid_name, callerid_name, IAXC_EVENT_BUFSIZ); + strncpy(calls[callNo].local , calls[callNo].callerid_name, IAXC_EVENT_BUFSIZ); strncpy(calls[callNo].local_context, "default", IAXC_EVENT_BUFSIZ); @@ -1401,7 +1412,8 @@ calls[callNo].last_ping = calls[callNo].last_activity; #ifdef USE_VIDEO - iaxc_video_format_get_cap(&video_format_preferred, &video_format_capability); + if (video) + iaxc_video_format_get_cap(&video_format_preferred, &video_format_capability); #endif iaxci_usermsg(IAXC_NOTICE, "Originating an %s call", @@ -1665,27 +1677,32 @@ iaxc_video_format_get_cap(&video_format_preferred, &video_format_capability); - /* first, try _their_ preferred format */ - video_format = video_format_capability & - (e->ies.format & IAXC_VIDEO_FORMAT_MASK); + /* first, see if they even want video */ + video_format = (e->ies.format & IAXC_VIDEO_FORMAT_MASK); - if ( !video_format ) + if (video_format) { - /* then, try our preferred format */ - video_format = video_format_preferred & - (e->ies.capability & IAXC_VIDEO_FORMAT_MASK); - } + /* next, try _their_ preferred format */ + video_format &= video_format_capability; - if ( !video_format ) - { - /* finally, see if we have one in common */ - video_format = video_format_capability & - (e->ies.capability & IAXC_VIDEO_FORMAT_MASK); + if ( !video_format ) + { + /* then, try our preferred format */ + video_format = video_format_preferred & + (e->ies.capability & IAXC_VIDEO_FORMAT_MASK); + } - /* now choose amongst these, if we got one */ - if ( video_format ) + if ( !video_format ) { - video_format = iaxc_choose_codec(video_format); + /* finally, see if we have one in common */ + video_format = video_format_capability & + (e->ies.capability & IAXC_VIDEO_FORMAT_MASK); + + /* now choose amongst these, if we got one */ + if ( video_format ) + { + video_format = iaxc_choose_codec(video_format); + } } } Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-09-12 14:46:09 UTC (rev 1121) +++ trunk/lib/video.c 2007-09-12 16:55:56 UTC (rev 1122) @@ -448,8 +448,9 @@ // If we don't need to send encoded video to the network or back // to the main application, just return here. - if ( !(iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED) && - (iaxc_video_prefs & IAXC_VIDEO_PREF_SEND_DISABLE) ) + if ( ( !(iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED) && + (iaxc_video_prefs & IAXC_VIDEO_PREF_SEND_DISABLE) ) || + (format == 0) ) { if ( call->vencoder ) { Modified: trunk/simpleclient/vtestcall/vtestcall.c =================================================================== --- trunk/simpleclient/vtestcall/vtestcall.c 2007-09-12 14:46:09 UTC (rev 1121) +++ trunk/simpleclient/vtestcall/vtestcall.c 2007-09-12 16:55:56 UTC (rev 1122) @@ -597,14 +597,10 @@ fflush(stdin); // TODO: Better control on inserted strings fscanf(stdin,"%s",mydest); - // Force to have a A or A/V call - if (mydest[0]=='A') { - iaxc_video_format_set(0, 0, framerate, bitrate, width, height, fragsize); - } - else { - fprintf(stderr,"format_set a %d,%d,%d,%d,%d,%d,%d\n",formatp, format, framerate, bitrate, width, height, fragsize); - iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); - } + + fprintf(stderr,"format_set a %d,%d,%d,%d,%d,%d,%d\n",formatp, format, framerate, bitrate, width, height, fragsize); + iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); + /* if (iaxc_initialize(Vmode|Amode,MAX_CALLS)) fatal_error("cannot initialize iaxclient!"); @@ -615,7 +611,8 @@ sprintf(caption,"Calling to %s",mydest); my_safe_caption(caption); //iaxc_play_sound(&sound_ringOUT, 1 /* ring device */ ); - iaxc_call(mydest); + // Force to have a A or A/V call + iaxc_call_ex(mydest, NULL, NULL, (mydest[0]!='A')); break; case SDLK_c: { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-09-14 04:30:17
|
Revision: 1137 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1137&view=rev Author: dohpaz Date: 2007-09-13 21:30:21 -0700 (Thu, 13 Sep 2007) Log Message: ----------- Add initial draft of the IAXClient documentation and associated Doxyfile. Modified Paths: -------------- trunk/AUTHORS trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/video.c Added Paths: ----------- trunk/Doxyfile trunk/doc/ trunk/doc/src/ Modified: trunk/AUTHORS =================================================================== --- trunk/AUTHORS 2007-09-13 18:11:41 UTC (rev 1136) +++ trunk/AUTHORS 2007-09-14 04:30:21 UTC (rev 1137) @@ -9,6 +9,7 @@ Steve Underwood <st...@co...> [PLC implementation from spandsp] Jean-Denis Girard <jd....@sy...> [URL Receive implementation] Panfilov Dmitry <di...@bd...> [Basic ALSA-native audio driver] +Erik Bunce <kd...@bu...> [Assorted fixes/tweaks, Documentation] Mihai Balea <mihai at hates dot ms> Bill Welch <welch1820 at gmail dot com> [Project files for several MS development environments] Peter Grayson <jpg...@gm...> Added: trunk/Doxyfile =================================================================== --- trunk/Doxyfile (rev 0) +++ trunk/Doxyfile 2007-09-14 04:30:21 UTC (rev 1137) @@ -0,0 +1,270 @@ +# Doxyfile 1.5.3 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = IAXClient +PROJECT_NUMBER = 2.0 +OUTPUT_DIRECTORY = ./doc +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class " \ + "The $name widget " \ + "The $name file " \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = /Volumes/Doxygen/ +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = doc/src \ + simpleclient/testcall \ + simpleclient/vtestcall \ + lib +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.d \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.idl \ + *.odl \ + *.cs \ + *.php \ + *.php3 \ + *.inc \ + *.m \ + *.mm \ + *.dox \ + *.py +RECURSIVE = NO +EXCLUDE = lib/ringbuffer.c +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = letter +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +MSCGEN_PATH = /Volumes/Doxygen/Doxygen.app/Contents/Resources/ +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = /Volumes/Doxygen/Doxygen.app/Contents/Resources/ +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-09-13 18:11:41 UTC (rev 1136) +++ trunk/lib/iaxclient.h 2007-09-14 04:30:21 UTC (rev 1137) @@ -11,6 +11,7 @@ * Mihai Balea <mihai AT hates DOT ms> * Peter Grayson <jpg...@gm...> * Bill Cholewka <bc...@gm...> + * Erik Bunce <kd...@bu...> * * This program is free software, distributed under the terms of * the GNU Lesser (Library) General Public License. @@ -22,11 +23,18 @@ extern "C" { #endif -/* This is the include file which declared all external API functions to - * IAXCLIENT. It should include all functions and declarations needed - * by IAXCLIENT library users, but not include internal structures, or - * require the inclusion of library internals (or sub-libraries) */ +/*! + \file iaxclient.h + \brief The IAXClient API + + + \note This is the include file which declares all external API functions to + IAXClient. It should include all functions and declarations needed + by IAXClient library users, but not include internal structures, or + require the inclusion of library internals (or sub-libraries) +*/ + #ifdef _MSC_VER typedef int socklen_t; #endif @@ -76,424 +84,1148 @@ /* payload formats : WARNING: must match libiax values!!! */ /* Data formats for capabilities and frames alike */ -#define IAXC_FORMAT_G723_1 (1 << 0) /* G.723.1 compression */ -#define IAXC_FORMAT_GSM (1 << 1) /* GSM compression */ -#define IAXC_FORMAT_ULAW (1 << 2) /* Raw mu-law data (G.711) */ -#define IAXC_FORMAT_ALAW (1 << 3) /* Raw A-law data (G.711) */ -#define IAXC_FORMAT_G726 (1 << 4) /* ADPCM, 32kbps */ -#define IAXC_FORMAT_ADPCM (1 << 5) /* ADPCM IMA */ -#define IAXC_FORMAT_SLINEAR (1 << 6) /* Raw 16-bit Signed Linear (8000 Hz) PCM */ -#define IAXC_FORMAT_LPC10 (1 << 7) /* LPC10, 180 samples/frame */ -#define IAXC_FORMAT_G729A (1 << 8) /* G.729a Audio */ -#define IAXC_FORMAT_SPEEX (1 << 9) /* Speex Audio */ -#define IAXC_FORMAT_ILBC (1 << 10) /* iLBC Audio */ +#define IAXC_FORMAT_G723_1 (1 << 0) /*!< G.723.1 compression */ +#define IAXC_FORMAT_GSM (1 << 1) /*!< GSM compression */ +#define IAXC_FORMAT_ULAW (1 << 2) /*!< Raw mu-law data (G.711) */ +#define IAXC_FORMAT_ALAW (1 << 3) /*!< Raw A-law data (G.711) */ +#define IAXC_FORMAT_G726 (1 << 4) /*!< ADPCM, 32kbps */ +#define IAXC_FORMAT_ADPCM (1 << 5) /*!< ADPCM IMA */ +#define IAXC_FORMAT_SLINEAR (1 << 6) /*!< Raw 16-bit Signed Linear (8000 Hz) PCM */ +#define IAXC_FORMAT_LPC10 (1 << 7) /*!< LPC10, 180 samples/frame */ +#define IAXC_FORMAT_G729A (1 << 8) /*!< G.729a Audio */ +#define IAXC_FORMAT_SPEEX (1 << 9) /*!< Speex Audio */ +#define IAXC_FORMAT_ILBC (1 << 10) /*!< iLBC Audio */ -#define IAXC_FORMAT_MAX_AUDIO (1 << 15) /* Maximum audio format */ -#define IAXC_FORMAT_JPEG (1 << 16) /* JPEG Images */ -#define IAXC_FORMAT_PNG (1 << 17) /* PNG Images */ -#define IAXC_FORMAT_H261 (1 << 18) /* H.261 Video */ -#define IAXC_FORMAT_H263 (1 << 19) /* H.263 Video */ -#define IAXC_FORMAT_H263_PLUS (1 << 20) /* H.263+ Video */ -#define IAXC_FORMAT_H264 (1 << 21) /* H264 Video */ -#define IAXC_FORMAT_MPEG4 (1 << 22) /* MPEG4 Video */ -#define IAXC_FORMAT_THEORA (1 << 24) /* Theora Video */ -#define IAXC_FORMAT_MAX_VIDEO (1 << 24) /* Maximum Video Format */ +#define IAXC_FORMAT_MAX_AUDIO (1 << 15) /*!< Maximum audio format value */ +#define IAXC_FORMAT_JPEG (1 << 16) /*!< JPEG Images */ +#define IAXC_FORMAT_PNG (1 << 17) /*!< PNG Images */ +#define IAXC_FORMAT_H261 (1 << 18) /*!< H.261 Video */ +#define IAXC_FORMAT_H263 (1 << 19) /*!< H.263 Video */ +#define IAXC_FORMAT_H263_PLUS (1 << 20) /*!< H.263+ Video */ +#define IAXC_FORMAT_H264 (1 << 21) /*!< H264 Video */ +#define IAXC_FORMAT_MPEG4 (1 << 22) /*!< MPEG4 Video */ +#define IAXC_FORMAT_THEORA (1 << 24) /*!< Theora Video */ +#define IAXC_FORMAT_MAX_VIDEO (1 << 24) /*!< Maximum Video format value*/ -#define IAXC_EVENT_TEXT 1 -#define IAXC_EVENT_LEVELS 2 -#define IAXC_EVENT_STATE 3 -#define IAXC_EVENT_NETSTAT 4 -#define IAXC_EVENT_URL 5 /* URL push via IAX(2) */ -#define IAXC_EVENT_VIDEO 6 -#define IAXC_EVENT_REGISTRATION 8 -#define IAXC_EVENT_DTMF 9 -#define IAXC_EVENT_AUDIO 10 -#define IAXC_EVENT_VIDEOSTATS 11 +#define IAXC_EVENT_TEXT 1 /*!< Indicates a text event. */ +#define IAXC_EVENT_LEVELS 2 /*!< Indicates a level event. */ +#define IAXC_EVENT_STATE 3 /*!< Indicates a call state change event. */ +#define IAXC_EVENT_NETSTAT 4 /*!< Indicates a network statistics update event. */ +#define IAXC_EVENT_URL 5 /*!< Indicates a URL push via IAX(2). */ +#define IAXC_EVENT_VIDEO 6 /*!< Indicates a video event. */ +#define IAXC_EVENT_REGISTRATION 8 /*!< Indicates a registration event. */ +#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_CALL_STATE_FREE 0 -#define IAXC_CALL_STATE_ACTIVE (1<<1) -#define IAXC_CALL_STATE_OUTGOING (1<<2) -#define IAXC_CALL_STATE_RINGING (1<<3) -#define IAXC_CALL_STATE_COMPLETE (1<<4) -#define IAXC_CALL_STATE_SELECTED (1<<5) -#define IAXC_CALL_STATE_BUSY (1<<6) -#define IAXC_CALL_STATE_TRANSFER (1<<7) +#define IAXC_CALL_STATE_FREE 0 /*!< Indicates a call slot is free. */ +#define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active. */ +#define IAXC_CALL_STATE_OUTGOING (1<<2) /*!< Indicates a call is outgoing. */ +#define IAXC_CALL_STATE_RINGING (1<<3) /*!< Indicates a call is ringing. */ +#define IAXC_CALL_STATE_COMPLETE (1<<4) /*!< Indicates a completed call. */ +#define IAXC_CALL_STATE_SELECTED (1<<5) /*!< Indicates the call is selected. */ +#define IAXC_CALL_STATE_BUSY (1<<6) /*!< Indicates a call is busy. */ +#define IAXC_CALL_STATE_TRANSFER (1<<7) /*!< Indicates the call transfer has been released. */ -#define IAXC_TEXT_TYPE_STATUS 1 -#define IAXC_TEXT_TYPE_NOTICE 2 -#define IAXC_TEXT_TYPE_ERROR 3 -/* FATAL ERROR: User Agent should probably display error, then die. */ -#define IAXC_TEXT_TYPE_FATALERROR 4 -#define IAXC_TEXT_TYPE_IAX 5 +/*! Indicates that text is for an IAXClient status change */ +#define IAXC_TEXT_TYPE_STATUS 1 +/*! Indicates that text is an IAXClient warning message */ +#define IAXC_TEXT_TYPE_NOTICE 2 +/*! Represents that text is for an IAXClient error message */ +#define IAXC_TEXT_TYPE_ERROR 3 +/*! Represents a fatal error has occurred in IAXClient and that the User Agent should probably display error message text, then die. */ +#define IAXC_TEXT_TYPE_FATALERROR 4 +/*! Represents a message sent from the server across the IAX stream*/ +#define IAXC_TEXT_TYPE_IAX 5 /* registration replys, corresponding to IAX_EVENTs*/ -#define IAXC_REGISTRATION_REPLY_ACK 18 /* IAX_EVENT_REGACC */ -#define IAXC_REGISTRATION_REPLY_REJ 30 /* IAX_EVENT_REGREJ */ -#define IAXC_REGISTRATION_REPLY_TIMEOUT 6 /* IAX_EVENT_TIMEOUT */ +#define IAXC_REGISTRATION_REPLY_ACK 18 /*!< Indicates the registration was accepted (See IAX_EVENT_REGACC). */ +#define IAXC_REGISTRATION_REPLY_REJ 30 /*!< Indicates the registration was rejected (See IAX_EVENT_REGREJ). */ +#define IAXC_REGISTRATION_REPLY_TIMEOUT 6 /*!< Indicates the registration timed out (See IAX_EVENT_TIMEOUT). */ -#define IAXC_URL_URL 1 /* URL received */ -#define IAXC_URL_LDCOMPLETE 2 /* URL loading complete */ -#define IAXC_URL_LINKURL 3 /* URL link request */ -#define IAXC_URL_LINKREJECT 4 /* URL link reject */ -#define IAXC_URL_UNLINK 5 /* URL unlink */ +#define IAXC_URL_URL 1 /*!< URL received */ +#define IAXC_URL_LDCOMPLETE 2 /*!< URL loading complete */ +#define IAXC_URL_LINKURL 3 /*!< URL link request */ +#define IAXC_URL_LINKREJECT 4 /*!< URL link reject */ +#define IAXC_URL_UNLINK 5 /*!< URL unlink */ /* The source of the video or audio data triggering the event. */ -#define IAXC_SOURCE_LOCAL 1 -#define IAXC_SOURCE_REMOTE 2 +#define IAXC_SOURCE_LOCAL 1 /*!< Indicates that the event data source is local. */ +#define IAXC_SOURCE_REMOTE 2 /*!< Indicates that the event data source is remote. */ +/*! + The maximum size of a string contained within an event + */ #define IAXC_EVENT_BUFSIZ 256 + +/*! + A structure containing information about an audio level event. +*/ struct iaxc_ev_levels { + /*! + The input level in dB. + */ float input; + + /*! + The output level in dB. + */ float output; }; +/*! + A structure containing information about a text event. +*/ struct iaxc_ev_text { + /*! + The type of text event. + + Valid values are from the IAXC_TEXT_TYPE_{} family of defines. + \see IAXC_TEXT_TYPE_STATUS, IAXC_TEXT_TYPE_NOTICE, IAXC_TEXT_TYPE_ERROR, + IAXC_TEXT_TYPE_FATALERROR, IAXC_TEXT_TYPE_IAX + */ int type; - int callNo; /* call number for IAX text */ + + /*! + The call the text is associated with or -1 if general text. + */ + int callNo; + + /*! + The UTF8 encoded text of the message. + */ char message[IAXC_EVENT_BUFSIZ]; }; +/*! + A structure containing information about a call state change event. +*/ struct iaxc_ev_call_state { + /*! + The call number whose state this is + */ int callNo; + + /*! + The call state represented using the IAXC_CALL_STATE_{} defines. + + \see IAXC_CALL_STATE_FREE, IAXC_CALL_STATE_ACTIVE, IAXC_CALL_STATE_OUTGOING, + IAXC_CALL_STATE_RINGING, IAXC_CALL_STATE_COMPLETE, IAXC_CALL_STATE_SELECTED, + IAXC_CALL_STATE_BUSY, IAXC_CALL_STATE_TRANSFER + */ int state; + + /*! + The audio format of the call. + + \see IAXC_FORMAT_G723_1, IAXC_FORMAT_GSM, IAXC_FORMAT_ULAW, IAXC_FORMAT_ALAW, + IAXC_FORMAT_G726, IAXC_FORMAT_ADPCM, IAXC_FORMAT_SLINEAR, IAXC_FORMAT_LPC10, + IAXC_FORMAT_G729A, IAXC_FORMAT_SPEEX, IAXC_FORMAT_ILBC, IAXC_FORMAT_MAX_AUDIO + */ int format; + + /*! + The audio format of the call. + + \see IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, + IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, + IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO + */ int vformat; + + /*! + The remote number. + */ char remote[IAXC_EVENT_BUFSIZ]; + + /*! + The remote name. + */ char remote_name[IAXC_EVENT_BUFSIZ]; + + /*! + The local number. + */ char local[IAXC_EVENT_BUFSIZ]; + + /*! + The local calling context. + */ char local_context[IAXC_EVENT_BUFSIZ]; }; +/*! + A structure containing information about a set of network statistics. +*/ struct iaxc_netstat { + /*! + The amount of observed jitter. + */ int jitter; + + /*! + The lost frame percentage. + */ int losspct; + + /*! + The number of missing frames. + */ int losscnt; + + /*! + The number of frames received. + */ int packets; + + /*! + The observed delay. + */ int delay; + + /*! + The number of frames dropped. + */ int dropped; + + /*! + The number of frames received out of order. + */ int ooo; }; +/*! + A structure containing information about a network statistics event. +*/ struct iaxc_ev_netstats { + /*! + The call whose statistics these are. + */ int callNo; + + /*! + The Round Trip Time + */ int rtt; + + /*! + The locally observed network statistics. + */ struct iaxc_netstat local; + + /*! + The remotely (peer) observed network statistics. + */ struct iaxc_netstat remote; }; /* - * Video statistics code - */ + A structure containing video statistics data. +*/ struct iaxc_video_stats { - unsigned long received_slices; /* Number of received slices */ - unsigned long acc_recv_size; /* Accumulated size of inbound slices */ - unsigned long sent_slices; /* Number of sent slices */ - unsigned long acc_sent_size; /* Accumulated size of outbound slices */ + unsigned long received_slices; /*!< Number of received slices. */ + unsigned long acc_recv_size; /*!< Accumulated size of inbound slices. */ + unsigned long sent_slices; /*!< Number of sent slices. */ + unsigned long acc_sent_size; /*!< Accumulated size of outbound slices. */ - unsigned long dropped_frames; /* Number of frames dropped by the codec (incomplete frames */ - unsigned long inbound_frames; /* Number of frames decoded by the codec (complete frames) */ - unsigned long outbound_frames; /* Number of frames sent to the encoder */ + unsigned long dropped_frames; /*!< Number of frames dropped by the codec (incomplete frames). */ + unsigned long inbound_frames; /*!< Number of frames decoded by the codec (complete frames). */ + unsigned long outbound_frames; /*!< Number of frames sent to the encoder. */ - float avg_inbound_fps; /* Average fps of inbound complete frames */ - unsigned long avg_inbound_bps; /* Average inbound bitrate */ - float avg_outbound_fps; /* Average fps of outbound frames */ - unsigned long avg_outbound_bps; /* Average outbound bitrate */ + float avg_inbound_fps; /*!< Average fps of inbound complete frames. */ + unsigned long avg_inbound_bps; /*!< Average inbound bitrate. */ + float avg_outbound_fps; /*!< Average fps of outbound frames. */ + unsigned long avg_outbound_bps; /*!< Average outbound bitrate. */ - struct timeval start_time; /* Timestamp of the moment we started measuring */ + struct timeval start_time; /*!< Timestamp of the moment we started measuring. */ }; +/*! + A structure containing information about a video statistics event. +*/ struct iaxc_ev_video_stats { + /*! + The call whose statistics these are. + */ int callNo; + + /*! + The video statistics for the call. + */ struct iaxc_video_stats stats; }; +/*! + A structure containing information about an URL event. +*/ struct iaxc_ev_url { + /*! + The call this is for. + */ int callNo; + + /*! + The type of URL received. See the IAXC_URL_{} defines. + + \see IAXC_URL_URL, IAXC_URL_LINKURL, IAXC_URL_LDCOMPLETE, IAXC_URL_UNLINK, + IAXC_URL_LINKREJECT + */ int type; + + /*! + The received URL. + */ char url[IAXC_EVENT_BUFSIZ]; }; +/*! + A structure containing data for a video event. +*/ struct iaxc_ev_video { + /*! + The call this video data is for. + + Will be -1 for local video. + */ int callNo; + + /*! + Timestamp of the video + */ unsigned int ts; + + /*! + The format of the video data. + + \see IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, + IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, + IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO + */ int format; + + /*! + The width of the video. + */ int width; + + /*! + The height of the video. + */ int height; + + /*! + Is the data encoded. + + 1 for encoded data, 0 for raw. + */ int encoded; + + /*! + The source of the data. + + \see IAXC_SOURCE_LOCAL, IAXC_SOURCE_REMOTE + */ int source; + + /*! + The size of the video data in bytes. + */ int size; + + /*! + The buffer containing the video data. + */ char *data; }; +/*! + A structure containing data for an audio event. +*/ struct iaxc_ev_audio { + /*! + The call this audio data is for. + */ int callNo; + + /*! + Timestamp of the video + */ unsigned int ts; + + /*! + The format of the data. + + \see IAXC_FORMAT_G723_1, IAXC_FORMAT_GSM, IAXC_FORMAT_ULAW, IAXC_FORMAT_ALAW, + IAXC_FORMAT_G726, IAXC_FORMAT_ADPCM, IAXC_FORMAT_SLINEAR, IAXC_FORMAT_LPC10, + IAXC_FORMAT_G729A, IAXC_FORMAT_SPEEX, IAXC_FORMAT_ILBC, IAXC_FORMAT_MAX_AUDIO + */ int format; + + /*! + Is the data encoded. + + 1 for encoded data, 0 for raw. + */ int encoded; + + /*! + The source of the data. + + \see IAXC_SOURCE_LOCAL, IAXC_SOURCE_REMOTE + */ int source; + + /*! + The size of the audio data in bytes. + */ int size; + + /*! + The buffer containing the audio data. + */ unsigned char *data; }; +/*! + A structure containing information about a registration event +*/ struct iaxc_ev_registration { + /*! + Indicates the registration id this event corresponds to. + + \see iaxc_register + */ int id; + + /*! + The registration reply. + + The values are from the IAXC_REGISTRATION_REPLY_{} family of macros. + \see IAX_EVENT_REGACC, IAX_EVENT_REGREJ, IAX_EVENT_TIMEOUT + */ int reply; + + /*! + The number of 'voicemail' messages. + */ int msgcount; }; +/*! + A structure describing a single IAXClient event. +*/ typedef struct iaxc_event_struct { + /*! + Points to the next entry in the event queue + \internal + */ struct iaxc_event_struct *next; - int type; + + /*! + The type uses one of the IAXC_EVENT_{} macros to describe which type of + event is being presented + */ + int type; + + /*! + Contains the data specific to the type of event. + */ union { + /*! Contains level data if type = IAXC_EVENT_LEVELS */ struct iaxc_ev_levels levels; - struct iaxc_ev_text text; - struct iaxc_ev_call_state call; - struct iaxc_ev_netstats netstats; - struct iaxc_ev_video_stats videostats; - struct iaxc_ev_url url; - struct iaxc_ev_video video; - struct iaxc_ev_audio audio; - struct iaxc_ev_registration reg; + /*! Contains text data if type = IAXC_EVENT_TEXT */ + struct iaxc_ev_text text; + /*! Contains call state data if type = IAXC_EVENT_STATE */ + struct iaxc_ev_call_state call; + /*! Contains network statistics if type = IAXC_EVENT_NETSTAT */ + struct iaxc_ev_netstats netstats; + /*! Contains video statistics if type = IAXC_EVENT_VIDEOSTATS */ + struct iaxc_ev_video_stats videostats; + /*! Contains url data if type = IAXC_EVENT_URL */ + struct iaxc_ev_url url; + /*! Contains video data if type = IAXC_EVENT_VIDEO */ + struct iaxc_ev_video video; + /*! Contains audio data if type = IAXC_EVENT_AUDIO */ + struct iaxc_ev_audio audio; + /*! Contains registration data if type = AXC_EVENT_REGISTRATION */ + struct iaxc_ev_registration reg; } ev; } iaxc_event; +/*! + Defines the prototype for event callback handlers + \param e The event structure being passed to the callback + + \return The result of processing the event; > 0 if successfully handled the event, 0 if not handled, < 0 to indicate an error occurred processing the event. +*/ typedef int (*iaxc_event_callback_t)(iaxc_event e); + +/*! + Sets the callback to call with IAXClient events + \param func The callback function to call with events +*/ EXPORT void iaxc_set_event_callback(iaxc_event_callback_t func); -/* Sets iaxclient to post a pointer to a copy of event using o/s specific Post method */ +/*! + Sets iaxclient to post a pointer to a copy of event using o/s specific Post method + \param handle + \param id +*/ EXPORT int iaxc_set_event_callpost(void *handle, int id); -/* frees event delivered via o/s specific Post method */ +/*! + frees event delivered via o/s specific Post method + \param e The event to free +*/ EXPORT void iaxc_free_event(iaxc_event *e); /* Event Accessors */ +/*! + Returns the levels data associated with event \a e. + \param e The event to retrieve the levels from. +*/ EXPORT struct iaxc_ev_levels *iaxc_get_event_levels(iaxc_event *e); + +/*! + Returns the text data associated with event \a e. + \param e The event to retrieve text from. +*/ EXPORT struct iaxc_ev_text *iaxc_get_event_text(iaxc_event *e); + +/*! + Returns the event state data associated with event \a e. + \param e The event to retrieve call state from. +*/ EXPORT struct iaxc_ev_call_state *iaxc_get_event_state(iaxc_event *e); -// Set Preferred UDP Port: -// 0: Use the default port (4569) -// <0: Use a dynamically assigned port -// >0: Try to bind to the specified port -// NOTE: must be called before iaxc_initialize() +/*! + Set Preferred UDP Port: + \param sourceUdpPort The source UDP port to prefer + 0 Use the default port (4569), <0 Uses a dynamically assigned port, and + >0 tries to bind to the specified port + + \note must be called before iaxc_initialize() +*/ EXPORT void iaxc_set_preferred_source_udp_port(int sourceUdpPort); +/*! + Returns the UDP port that has been bound to. + + \return The UDP port bound to; -1 if no port or +*/ EXPORT short iaxc_get_bind_port(); + +/*! + Initializes the IAXClient library + \param num_calls The maximum number of simultaneous calls to handle. + + This initializes the IAXClient +*/ EXPORT int iaxc_initialize(int num_calls); + +/*! + Shutsdown the IAXClient library. + + This should be called by applications utilizing iaxclient before they exit. + It dumps all calls, and releases any audio/video drivers being used. + + \note It is unsafe to call most IAXClient API's after calling this! +*/ EXPORT void iaxc_shutdown(); + +/*! + Sets the formats to be used + \param preferred The single preferred audio format + \param allowed A mask containing all audio formats to allow + + \see IAXC_FORMAT_G723_1, IAXC_FORMAT_GSM, IAXC_FORMAT_ULAW, IAXC_FORMAT_ALAW, + IAXC_FORMAT_G726, IAXC_FORMAT_ADPCM, IAXC_FORMAT_SLINEAR, IAXC_FORMAT_LPC10, + IAXC_FORMAT_G729A, IAXC_FORMAT_SPEEX, IAXC_FORMAT_ILBC, IAXC_FORMAT_MAX_AUDIO +*/ EXPORT void iaxc_set_formats(int preferred, int allowed); + +/*! + Sets the minimum outgoing frame size. + \param samples The minimum number of samples to include in an outgoing frame. +*/ EXPORT void iaxc_set_min_outgoing_framesize(int samples); + +/*! + Sets the caller id \a name and \a number. + \param name The caller id name. + \param number The caller id number. +*/ EXPORT void iaxc_set_callerid(const char * name, const char * number); + +/*! + Starts all the internal processing thread(s). + + \note Should be called after iaxc_initialize, but before any call processing + related functions. +*/ EXPORT int iaxc_start_processing_thread(); + +/*! + Stops all the internal processing thread(s). + + \note Should be called before iaxc_shutdown. +*/ EXPORT int iaxc_stop_processing_thread(); + +/*! + Initiates a call to an end point + \param num The entity to call in the format of [user[:password]]@@peer[:portno][/exten[@@context]] + + \return The call number upon sucess; -1 otherwise. + + \note This is the same as calling iaxc_call_ex(num, NULL, NULL, 1). +*/ EXPORT int iaxc_call(const char * num); + +/*! + Initiates a call to an end point + \param num The entity to call in the format of [user[:password]]@@peer[:portno][/exten[@@context]] + \param callerid_name The local caller id name to use + \param callerid_number The local caller id number to use + \param video 0 indicates no-video. Any non-zero value indicates video is requested + + \return The call number upon sucess; -1 otherwise. +*/ EXPORT int iaxc_call_ex(const char* num, const char* callerid_name, const char* callerid_number, int video); + +/*! + Unregisters IAXClient from a server + \param id The registration number returned by iaxc_register. +*/ EXPORT int iaxc_unregister( int id ); + +/*! + Registers the IAXClient instance with an IAX server + \param user The username to register as + \param pass The password to register with + \param host The address of the host/peer to register with + + \return The registration id number upon success; -1 otherwise. +*/ EXPORT int iaxc_register(const char * user, const char * pass, const char * host); + +/*! + Respond to incoming call \a callNo as busy. +*/ EXPORT void iaxc_send_busy_on_incoming_call(int callNo); + +/*! + Answers the incoming call \a callNo. + \param callNo The number of the call to answer. +*/ EXPORT void iaxc_answer_call(int callNo); + +/*! + Initiate a blind call transfer of \a callNo to \a number. + \param callNo The active call to transfer. + \param number The number to transfer the call to. See draft-guy-iax-03 section 8.4.1 for further details. +*/ EXPORT void iaxc_blind_transfer_call(int callNo, const char * number); + +/*! + Setup a transfer of \a sourceCallNo to \a targetCallNo. + \param sourceCallNo The number of the active call session to transfer. + \param targetCallNo The active call session to be transferred to. + + This is used in performing as the final step in an attended call transfer. +*/ EXPORT void iaxc_setup_call_transfer(int sourceCallNo, int targetCallNo); + +/*! + Hangs up and frees all non-free calls. +*/ EXPORT void iaxc_dump_all_calls(void); + +/*! + Hangs up and frees the currently selected call. +*/ EXPORT void iaxc_dump_call(void); + +/*! + Rejects the currently selected call. + + \note This is pretty much a useless API, since the act of selecting a call + will answer it. +*/ EXPORT void iaxc_reject_call(void); + +/*! + Rejects the incoming call \a callNo. + \param callNo The call number to reject. +*/ EXPORT void iaxc_reject_call_number(int callNo); + +/*! + Sends a DTMF digit to the currently selected call. + \param digit The DTMF digit to send (0-9, A-D, *, #). +*/ EXPORT void iaxc_send_dtmf(char digit); + +/*! + Sends text to the currently selected call. +*/ EXPORT void iaxc_send_text(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 +*/ EXPORT void iaxc_send_url(const char *url, int link); /* link == 1 ? AST_HTML_LINKURL : AST_HTML_URL */ + +/*! + Suspends thread execution for an interval measured in milliseconds + \param ms The number of milliseconds to sleep +*/ EXPORT void iaxc_millisleep(long ms); + +/*! + Sets the silence threshold to \a thr. + \param thr The threshold value in dB. A value of 0.0f effectively mutes audio input. +*/ EXPORT void iaxc_set_silence_threshold(float thr); + +/*! + Sets the audio output to \a mode. + \param mode The audio mode 0 indicates remote audio should be played; non-zero prevents remote audio from being played. +*/ EXPORT void iaxc_set_audio_output(int mode); + +/*! + Sets \a callNo as the currently selected call + \param callNo The call to select or < 0 to indicate no selected call. + + \note Will answer an incoming ringing call as a side effect. Personally I + believe this behavior is undesirable and feel it renders iaxc_reject_call + pretty much useless. +*/ EXPORT int iaxc_select_call(int callNo); + +/*! + Returns the first free call number. +*/ EXPORT int iaxc_first_free_call(); + +/*! + Returns the number of the currently selected call. +*/ EXPORT int iaxc_selected_call(); + +/*! + Causes the audio channel for \a callNo to QUELCH (be squelched). + \param callNo The number of the active, accepted call to quelch. + \param MOH If non-zero Music On Hold should be played on the QUELCH'd call. +*/ EXPORT int iaxc_quelch(int callNo, int MOH); -EXPORT int iaxc_unquelch(int call); + +/*! + Causes the audio channel for \a callNo to be UNQUELCH (unsquelched). +*/ +EXPORT int iaxc_unquelch(int callNo); + +/*! + Returns the current mic boost setting. + + \return 0 if mic boost is disabled; otherwise non-zero. +*/ EXPORT int iaxc_mic_boost_get( void ) ; + +/*! + Sets the mic boost setting. + \param enable If non-zero enable the mic boost; otherwise disable. +*/ EXPORT int iaxc_mic_boost_set( int enable ) ; + +/*! + Returns a copy of IAXClient library version + \param ver A buffer to store the version string in. It MUST be at least + IAXC_EVENT_BUFSIZ bytes in size. + + \return the version string (as stored in \a ver). +*/ EXPORT char* iaxc_version(char *ver); -/* Fine tune jitterbuffer control */ +/*! + Fine tune jitterbuffer control + \param value +*/ EXPORT void iaxc_set_jb_target_extra( long value ); -/* application-defined networking; give substiture sendto and recvfrom functions, - * must be called before iaxc_initialize! */ +/* + Application-defined networking; give substiture sendto and recvfrom + functions, must be called before iaxc_initialize! + \param st + \param rf +*/ EXPORT void iaxc_set_networking(iaxc_sendto_t st, iaxc_recvfrom_t rf) ; -/* wrapper for libiax2 get_netstats */ +/*! + wrapper for libiax2 get_netstats + \param call + \param rtt + \param local + \param remote +*/ EXPORT int iaxc_get_netstats(int call, int *rtt, struct iaxc_netstat *local, struct iaxc_netstat *remote); -#define IAXC_AD_INPUT (1<<0) -#define IAXC_AD_OUTPUT (1<<1) -#define IAXC_AD_RING (1<<2) -#define IAXC_AD_INPUT_DEFAULT (1<<3) -#define IAXC_AD_OUTPUT_DEFAULT (1<<4) -#define IAXC_AD_RING_DEFAULT (1<<5) +#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 */ +#define IAXC_AD_INPUT_DEFAULT (1<<3) /*!< Indicates the default input device */ +#define IAXC_AD_OUTPUT_DEFAULT (1<<4) /*!< Indicates the default output device */ +#define IAXC_AD_RING_DEFAULT (1<<5) /*!< Indicates the default ring device */ +/*! + A structure containing information about an audio device. +*/ struct iaxc_audio_device { - const char * name; /* name of the device */ - long capabilities; /* flags, defined above */ - int devID; /* driver-specific ID */ + /*! + The "human readable" name of the device + */ + const char * name; + + /*! + Capability flags, defined using the IAXC_AD_{} macros. + */ + long capabilities; + + /*! + The device driver specific ID. + */ + int devID; }; -/* Get audio device information: - * **devs: a pointer to an array of device structures, as declared above. function - * will give you a pointer to the proper array, which will be valid as long as iaxc is - * initialized. - * - * *nDevs: a pointer to an int, to which the count of devices in the array devs will be - * written - * - * *input, *output, *ring: the currently selected devices for input, output, ring will - * be written to the int pointed to by these pointers. +/*! Get audio device information: + \param devs Returns an array of iaxc_audio_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 input Returns the currently selected input device + \param output Returns the currently selected output device + \param ring Returns the currently selected ring device */ EXPORT int iaxc_audio_devices_get(struct iaxc_audio_device **devs, int *nDevs, int *input, int *output, int *ring); + +/*! + Sets the current audio devices + \param input The device to use for audio input + \param output The device to use for audio output + \param ring The device to use to present ring sounds + */ EXPORT int iaxc_audio_devices_set(int input, int output, int ring); +/*! + Get the audio device input level. + + \return the input level in the range of 0.0f minimum to 1.0f maximum. + */ EXPORT float iaxc_input_level_get(); + +/*! + Get the audio device output level. + + \return the input level in the range of 0.0f minimum to 1.0f maximum. + */ EXPORT float iaxc_output_level_get(); + +/*! + Sets the audio input level to \a level. + \param level The level in the range from 0.0f (min) to 1.0f (max). +*/ EXPORT int iaxc_input_level_set(float level); + +/*! + Sets the audio output level to \a level. + \param level The level in the range from 0.0f (min) to 1.0f (max). + */ EXPORT int iaxc_output_level_set(float level); - +/*! + A structure describing a sound to IAXClient +*/ struct iaxc_sound { - short *data; /* sound data */ - long len; /* length of sample */ - int malloced; /* should the library free() the data after it is played? */ - int channel; /* 0 for outputSelected, 1 for ringSelected */ - int repeat; /* number of times to repeat (-1 = infinite) */ - long pos; /* internal use: current play position */ - int id; /* internal use: sound ID */ - struct iaxc_sound *next; /* internal use: next in list */ + short *data; /*!< Sound sample data in 8KHz 16-bit signed format. */ + long len; /*!< Length of sample in frames. */ + int malloced; /*!< Should the library free() the data after it is played? */ + int channel; /*!< The channel used: 0 for output, 1 for ring. */ + int repeat; /*!< Number of times to repeat (-1 = infinite). */ + long pos; /*!< \internal use: current play position. */ + int id; /*!< \internal use: sound ID. */ + struct iaxc_sound *next; /*!< \internal use: next in list. */ }; -/* play a sound. sound = an iaxc_sound structure, ring: 0: play through output device; 1: play through "ring" device */ +/* + Play a sound. + \param sound An iaxc_sound structure. + \param ring 0 to play through output device or 1 to play through the "ring" device. + + \return The id number of the sound being played +*/ EXPORT int iaxc_play_sound(struct iaxc_sound *sound, int ring); -/* stop sound with ID "id" */ +/*! + Stop sound \a id from being played. + \param id The id of a sound to stop as returned from iaxc_play_sound. +*/ EXPORT int iaxc_stop_sound(int id); +#define IAXC_FILTER_DENOISE (1<<0) /*!< Noise reduction filter */ +#define IAXC_FILTER_AGC (1<<1) /*!< Automatic Gain Control */ +#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_DENOISE (1<<0) -#define IAXC_FILTER_AGC (1<<1) -#define IAXC_FILTER_ECHO (1<<2) -#define IAXC_FILTER_AAGC (1<<3) /* Analog (mixer-based) AGC */ -#define IAXC_FILTER_CN (1<<4) /* Send CN frames when silence detected */ +/*! + Returns the set of audio filters being applied. + + The IAXC_FILTER_{} defines are used to specify the filters. + \see IAXC_FILTER_DENOISE, IAXC_FILTER_AGC, IAXC_FILTER_ECHO, IAXC_FILTER_AAGC, + IAXC_FILTER_CN + */ EXPORT int iaxc_get_filters(void); + +/*! + Sets the current audio filters to apply. + \param filters The combination of all the audio filters to use (IAXC_FILTER_{} defines). + + The IAXC_FILTER_{} defines are used to specify the filters. + \see IAXC_FILTER_DENOISE, IAXC_FILTER_AGC, IAXC_FILTER_ECHO, IAXC_FILTER_AAGC, + IAXC_FILTER_CN + */ EXPORT void iaxc_set_filters(int filters); -EXPORT int iaxc_set_files(FILE *input, FILE *output); -/* speex specific codec settings */ -/* a good choice is (1,-1,-1,0,8000,3): 8kbps ABR */ -/* Decode options: - * decode_enhance: 1/0 perceptual enhancement for decoder - * quality: Generally, set either quality (0-9) or bitrate. - * -1 for "default" - * bitrate: in kbps. Applies to CBR only; -1 for default. - * (overrides "quality" for CBR mode) - * vbr: Variable bitrate mode: 0/1 - * abr mode/rate: 0 for not ABR, bitrate for ABR mode - * complexity: algorithmic complexity. Think -N for gzip. - * Higher numbers take more CPU for better quality. 3 is - * default and good choice. +/*! + Sets speex specific codec settings + \param decode_enhance 1/0 perceptual enhancement for decoder + \param quality: Generally, set either quality (0-9) or bitrate. -1 for "default" + \param bitrate in kbps. Applies to CBR only; -1 for default. + (overrides "quality" for CBR mode) + \param vbr Variable bitrate mode: 0/1 + \param abr mode/rate: 0 for not ABR, bitrate for ABR mode + \param complexity Algorithmic complexity. Think -N for gzip. + Higher numbers take more CPU for better quality. 3 is + default and good choice. + + A good choice is (1,-1,-1,0,8000,3): 8kbps ABR */ EXPORT void iaxc_set_speex_settings(int decode_enhance, float quality, int bitrate, int vbr, int abr, int complexity); /* - * Functions and flags for setting and getting audio callback preferences - * The application can request to receive local/remote, raw/encoded audio - * through the callback mechanism. Please note that changing callback - * settings will overwrite all previous settings. - */ -#define IAXC_AUDIO_PREF_RECV_LOCAL_RAW (1 << 0) -#define IAXC_AUDIO_PREF_RECV_LOCAL_ENCODED (1 << 1) -#define IAXC_AUDIO_PREF_RECV_REMOTE_RAW (1 << 2) -#define IAXC_AUDIO_PREF_RECV_REMOTE_ENCODED (1 << 3) -#define IAXC_AUDIO_PREF_SEND_DISABLE (1 << 4) + Functions and flags for setting and getting audio callback preferences + The application can request to receive local/remote, raw/encoded audio + through the callback mechanism. Please note that changing callback + settings will overwrite all previous settings. +*/ +/*! + Indicates the preference that local audio should be passed to the registered callback in a raw 8KHz 16-bit signed format. +*/ +#define IAXC_AUDIO_PREF_RECV_LOCAL_RAW (1 << 0) -/* Get and set various audio delivery preferences. - * Returns 0 on success and -1 on error. +/*! + Indicates the preference that local audio should be passed to the registered callback in the current encoded format. +*/ +#define IAXC_AUDIO_PREF_RECV_LOCAL_ENCODED (1 << 1) + +/*! + Indicates the preference that remote audio should be passed to the registered callback in a raw 8KHz 16-bit signed format. +*/ +#define IAXC_AUDIO_PREF_RECV_REMOTE_RAW (1 << 2) + +/*! + Indicates the preference that remote audio should be passed to the registered callback in the current encoded format. +*/ +#define IAXC_AUDIO_PREF_RECV_REMOTE_ENCODED (1 << 3) + +/*! + Indicates the preference that sending of audio should be disabled. +*/ +#define IAXC_AUDIO_PREF_SEND_DISABLE (1 << 4) + +/* + Returns the various audio delivery preferences. + + The preferences are represented using the AIXC_AUDIO_PREF_{} family of defines. +*/ +EXPORT unsigned int iaxc_get_audio_prefs(void); + +/*! + Set the various audio delivery preferences + \param prefs The desired preferences to use. They are represented using the AIXC_AUDIO_PREF_{} family of defines. + + \return 0 on success and -1 on error. + + \see IAXC_AUDIO_PREF_RECV_LOCAL_RAW, IAXC_AUDIO_PREF_RECV_LOCAL_ENCODED, + IAXC_AUDIO_PREF_RECV_REMOTE_RAW, IAXC_AUDIO_PREF_RECV_REMOTE_ENCODED, + IAXC_AUDIO_PREF_SEND_DISABLE */ -EXPORT unsigned int iaxc_get_audio_prefs(void); EXPORT int iaxc_set_audio_prefs(unsigned int prefs); /* * Acceptable range for video rezolution */ -#define IAXC_VIDEO_MAX_WIDTH 704 -#define IAXC_VIDEO_MAX_HEIGHT 576 -#define IAXC_VIDEO_MIN_WIDTH 80 -#define IAXC_VIDEO_MIN_HEIGHT 60 +#define IAXC_VIDEO_MAX_WIDTH 704 /*!< Maximum video width */ +#define IAXC_VIDEO_MAX_HEIGHT 576 /*!< Maximum video height */ +#define IAXC_VIDEO_MIN_WIDTH 80 /*!< Minimum video width */ +#define IAXC_VIDEO_MIN_HEIGHT 60 /*!< Minimum video height */ /* - * Video callback preferences - * The client application can obtain any combination of - * remote/local, encoded/raw video through the event callback - * mechanism - * Use these flags to specify what kind of video do you want to receive + Video callback preferences + The client application can obtain any combination of + remote/local, encoded/raw video through the event callback + mechanism + Use these flags to specify what kind of video do you want to receive */ -#define IAXC_VIDEO_PREF_RECV_LOCAL_RAW (1 << 0) -#define IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED (1 << 1) -#define IAXC_VIDEO_PREF_RECV_REMOTE_RAW (1 << 2) -#define IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED (1 << 3) -#define IAXC_VIDEO_PREF_SEND_DISABLE (1 << 4) -/* - * Use this flag to specify that you want raw video in RGB32 format - * RGB32: FFRRGGBB aligned 4 bytes per pixel - * When this flag is set, iaxclient will convert YUV420 raw video into - * RGB32 before passing it to the main app. +/*! + Indicates the preference that local video should be passed to the registered callback in a raw format (typically YUV420). +*/ +#define IAXC_VIDEO_PREF_RECV_LOCAL_RAW (1 << 0) + +/*! + Indicates the preference that local video should be passed to the registered callback in the current encoded format. +*/ +#define IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED (1 << 1) + +/*! + Indicates the preference that remote video should be passed to the registered callback in a raw format (typically YUV420). +*/ +#define IAXC_VIDEO_PREF_RECV_REMOTE_RAW (1 << 2) + +/*! + Indicates the preference that remote video should be passed to the registered callback in the current encoded format. +*/ +#define IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED (1 << 3) + +/*! + Indicates the preference that sending of video should be disabled. +*/ +#define IAXC_VIDEO_PREF_SEND_DISABLE (1 << 4) + +/*! + This flag specifies that you want raw video in RGB32 format + + RGB32: FFRRGGBB aligned 4 bytes per pixel + When this flag is set, iaxclient will convert YUV420 raw video into + RGB32 before passing it to the main app. */ #define IAXC_VIDEO_PREF_RECV_RGB32 (1 << 5) -/* - * Use this flag to disable/enable camera hardware +/*! + Use this flag to disable/enable camera hardware */ #define IAXC_VIDEO_PREF_CAPTURE_DISABLE (1 << 6) -/* - * Set video preferences. - * - * Please note that this overwrites all previous preferences. In other - * words, a read-modify-write must be done to change a single preference. - */ +/*! + Returns the current video preferences. + The preferences are represented using the AIXC_VIDEO_PREF_{} family of macros. + + \see IAXC_VIDEO_PREF_RECV_LOCAL_RAW, IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED, + IAXC_VIDEO_PREF_RECV_REMOTE_RAW, IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED, + IAXC_VIDEO_PREF_SEND_DISABLE, IAXC_VIDEO_PREF_RECV_RGB32, + IAXC_VIDEO_PREF_CAPTURE_DISABLE +*/ EXPORT unsigned int iaxc_get_video_prefs(void); + +/*! + Sets the current video preferences. + \param prefs The desired preferences to use. They are represented using the IAXC_VIDEO_PREF_{} family of defines. + + Please note that this overwrites all previous preferences. In other + words, a read-modify-write must be done to change a single preference. + + \return 0 on success and -1 on error. + + \see IAXC_VIDEO_PREF_RECV_LOCAL_RAW, IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED, + IAXC_VIDEO_PREF_RECV_REMOTE_RAW, IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED, + IAXC_VIDEO_PREF_SEND_DISABLE, IAXC_VIDEO_PREF_RECV_RGB32, + IAXC_VIDEO_PREF_CAPTURE_DISABLE + */ EXPORT int iaxc_set_video_prefs(unsigned int prefs); -EXPORT int listVidCapDevices(char *buff, int buffSize); +/*! + Returns the video format settings + \param preferred Receives the single preferred video format + \param allowed Receives the mask of the allowed video formats -/* - * Video format settings - */ + \see IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, + IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, + IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO +*/ EXPORT void iaxc_video_format_get_cap(int *preferred, int *allowed); + +/*! + Sets the video format capabilities + \param preferred The single preferred video format + \param allowed The mask of the allowed video formats + + \see IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, + IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, + IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO +*/ EXPORT void iaxc_video_format_set_cap(int preferred, int allowed); -/* set allowed/preferred video encodings */ +/*! + Sets the allowed/preferred video formats + \param preferred The single preferred video format + \param allowed The mask of the allowed video formats + \param framerate The video frame rate in fps. + \param bitrate The video bitrate in bps. + \param width The width of the video. + \param height The height of the video. + \param fs The video fragment size. + + \see IAXC_FORMAT_JPEG, IAXC_FORMAT_PNG, IAXC_FORMAT_H261, IAXC_FORMAT_H263, + IAXC_FORMAT_H263_PLUS, IAXC_FORMAT_H264, IAXC_FORMAT_MPEG4, + IAXC_FORMAT_THEORA, IAXC_FORMAT_MAX_VIDEO +*/ EXPORT void iaxc_video_format_set(int preferred, int allowed, int framerate, int bitrate, int width, int height, int fs); /* - * Change video params for the current call on the fly - * This will destroy the existing encoder and create a new one - * use negative values for parameters that should not change - */ + Change video params for the current call on the fly + This will destroy the existing encoder and create a new one + use negative values for parameters that should not change + \param framerate The video frame rate in fps. + \param bitrate The video bitrate in bps. + \param width The width of the video. + \param height The height of the video. + \param fs The video fragment size. +*/ EXPORT void iaxc_video_params_change(int framerate, int bitrate, int width, int height, int fs); /* Set holding frame to be used in some kind of video calls */ EXPORT int iaxc_set_holding_frame(char *); -/* Helper function to control use of jitter buffer for video events */ -/* TODO: make this a video pref, perhaps? */ +/*! + Helper function to control use of jitter buffer for video events + + \todo make this a video pref, perhaps? +*/ + EXPORT int iaxc_video_bypass_jitter(int); /* - * Check if the default camera is working + Returns 1 if the default camera is working; 0 otherwise */ EXPORT int iaxc_is_camera_working(); +/*! + Converts a YUV420 image to RGB32 + \param width The width of the image + \param height The height of the image + \param src The buffer containing the source image + \param dest The buffer to write the converted image to. The buffer should be \a width * height * 4 bytes in size. + + Converts the image based on the forumulas found at + http://en.wikipedia.org/wiki/YUV +*/ EXPORT void iaxc_YUV420_to_RGB32(int width, int height, char *src, char *dest); #ifdef __cplusplus Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-09-13 18:11:41 UTC (rev 1136) +++ trunk/lib/iaxclient_lib.c 2007-09-14 04:30:21 UTC (rev 1137) @@ -940,14 +940,16 @@ audio_driver.stop(&audio_driver); - /* Q: Why do we continuously send IAXC_EVENT_LEVELS events - * when there is no selected call? - * - * A: So that certain users of iaxclient do not have to - * reset their vu meters when a call ends -- they can just - * count on getting level callbacks. This is a bit of a hack - * so any applications relying on this behavior should maybe - * be changed. + /*! + \deprecated + Q: Why do we continuously send IAXC_EVENT_LEVELS events + when there is no selected call? + + A: So that certain users of iaxclient do not have to + reset their vu meters when a call ends -- they can just + count on getting level callbacks. This is a bit of a hack + so any applications relying on this behavior should maybe + be changed. */ if ( i++ % 50 == 0 ) iaxci_do_levels_callback(-99,-99); Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-09-13 18:11:41 UTC (rev 1136) +++ trunk/lib/video.c 2007-09-14 04:30:21 UTC (rev 1137) @@ -363,6 +363,8 @@ * - source - either IAXC_SOURCE_LOCAL or IAXC_SOURCE_REMOTE * - encoded - true if data is encoded * - rgb32 - if true, convert data to RGB32 before showing + + \todo For encoded data, set the event format to the calls video format. For raw data, set the format to 0. */ void show_video_frame(char *videobuf, int size, int cn, int source, int encoded, unsigned int ts, int rgb32) @@ -512,7 +514,7 @@ for ( i = 0; i < slice_set.num_slices; i++ ) { //Pass the encoded frame to the main app - // TODO: fix the call number + // \todo Fix the call number if ( iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED ) { show_video_frame(slice_set.data[i], slice_set.size[i], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-09-14 18:12:04
|
Revision: 1138 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1138&view=rev Author: dohpaz Date: 2007-09-14 11:12:06 -0700 (Fri, 14 Sep 2007) Log Message: ----------- Added mainpage and license page to the documentation. Add missing function documentation, and improve formatting. NOTE: Requires doxygen 1.5.3 or higher to generate documentation. Modified Paths: -------------- trunk/Doxyfile trunk/lib/iaxclient.h Added Paths: ----------- trunk/doc/src/license.dox trunk/doc/src/mainpage.dox Modified: trunk/Doxyfile =================================================================== --- trunk/Doxyfile 2007-09-14 04:30:21 UTC (rev 1137) +++ trunk/Doxyfile 2007-09-14 18:12:06 UTC (rev 1138) @@ -11,9 +11,9 @@ OUTPUT_LANGUAGE = English BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class " \ - "The $name widget " \ - "The $name file " \ +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ is \ provides \ specifies \ @@ -24,8 +24,8 @@ the ALWAYS_DETAILED_SEC = NO INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /Volumes/Doxygen/ +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO @@ -80,7 +80,7 @@ WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text " +WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files @@ -90,39 +90,16 @@ simpleclient/vtestcall \ lib INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ +FILE_PATTERNS = *.h \ + *.c \ *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py + *.dox RECURSIVE = NO EXCLUDE = lib/ringbuffer.c EXCLUDE_SYMLINKS = NO EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = -EXAMPLE_PATH = +EXAMPLE_PATH = . ./doc/src EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO IMAGE_PATH = @@ -132,18 +109,18 @@ #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES INLINE_SOURCES = NO STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = NO REFERENCES_RELATION = NO REFERENCES_LINK_SOURCE = YES USE_HTAGS = NO -VERBATIM_HEADERS = NO +VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- @@ -157,7 +134,7 @@ HTML_STYLESHEET = HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO +HTML_DYNAMIC_SECTIONS = YES CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO @@ -221,12 +198,13 @@ # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES INCLUDE_PATH = INCLUDE_FILE_PATTERNS = -PREDEFINED = +PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ + EXPORT="" EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- @@ -241,7 +219,7 @@ # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS = NO -MSCGEN_PATH = /Volumes/Doxygen/Doxygen.app/Contents/Resources/ +MSCGEN_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = NO CLASS_GRAPH = YES @@ -256,7 +234,7 @@ GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png -DOT_PATH = /Volumes/Doxygen/Doxygen.app/Contents/Resources/ +DOT_PATH = DOTFILE_DIRS = DOT_GRAPH_MAX_NODES = 50 MAX_DOT_GRAPH_DEPTH = 1000 Added: trunk/doc/src/license.dox =================================================================== --- trunk/doc/src/license.dox (rev 0) +++ trunk/doc/src/license.dox 2007-09-14 18:12:06 UTC (rev 1138) @@ -0,0 +1,14 @@ +/*! \page License + + The IAXClient is licensed under the GNU Lesser General Public License + + Copyrights: + - Copyright © 2003-2006, Horizon Wimba, Inc. + - Copyright © 2007, Wimba, Inc. + + IAXClient Contributors: + \verbinclude AUTHORS + + License: + \verbinclude COPYING.LIB +*/ Property changes on: trunk/doc/src/license.dox ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + author id date revision Name: svn:eol-style + native Added: trunk/doc/src/mainpage.dox =================================================================== --- trunk/doc/src/mainpage.dox (rev 0) +++ trunk/doc/src/mainpage.dox 2007-09-14 18:12:06 UTC (rev 1138) @@ -0,0 +1,25 @@ +/*! \mainpage + +<A href="http://iaxclient.sourceforge.net/">IAXClient</A> is an Open Source library to implement the IAX protocol used by +<A href="http://www.asterisk.org/">The Asterisk Software PBX</A>. +It is licensed under the the LGPL \ref License.<BR> + +Although asterisk supports other VOIP protocols (including SIP, and with patches, H.323), IAX's simple, lightweight nature gives it several advantages, particularly in that it can operate easily through NAT and packet firewalls, and it is easily extensible and simple to understand. + +See the <A href="http://iaxclient.sourceforge.net/">IAXClient</A> website for futher +information at <A href="http://iaxclient.sf.net">http://iaxclient.sf.net</A> + +Things you may be interested include: +<UL> +<LI>The IAXClient API, as documented in iaxclient.h</LI> +<LI><a href="http://iaxclient.sourceforge.net/devinfo.html">Some developer information</A></LI> +<LI><a href="http://sourceforge.net/projects/iaxclient/">SourceForge +Development Site</A></LI> +<LI><a href="http://lists.sourceforge.net/lists/listinfo/iaxclient-devel">Subscribe to the mailing list</A> iax...@li...!</LI> +<LI><a href="http://iaxclient.sourceforge.net/IAXClientFAQ.html">FAQ</A></LI> +<LI>You can also catch some of the developers online at the <A href="http://www.freenode.net">freenode</A> IRC channels +<A href="irc://irc.freenode.net/iaxclient">\#iaxclient</A> or <A href="irc://irc.freenode.net/asterisk">\#asterisk</A></LI> +</UL> + +*/ + Property changes on: trunk/doc/src/mainpage.dox ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + author id date revision Name: svn:eol-style + native Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-09-14 04:30:21 UTC (rev 1137) +++ trunk/lib/iaxclient.h 2007-09-14 18:12:06 UTC (rev 1138) @@ -35,6 +35,7 @@ require the inclusion of library internals (or sub-libraries) */ +#ifndef DOXYGEN_SHOULD_SKIP_THIS #ifdef _MSC_VER typedef int socklen_t; #endif @@ -59,6 +60,7 @@ #else # define EXPORT #endif +#endif /* DOXYGEN_SHOULD_SKIP_THIS */ #if defined(WIN32) || defined(_WIN32_WCE) #if defined(_MSC_VER) @@ -73,13 +75,26 @@ struct sockaddr *, int *); #endif #else + /*! + Defines the portotype for an application provided sendto implementation. + */ typedef int (*iaxc_sendto_t)(int, const void *, size_t, int, const struct sockaddr *, socklen_t); + /*! + Defines the portotype for an application provided recvfrom implementation. + */ typedef int (*iaxc_recvfrom_t)(int, void *, size_t, int, struct sockaddr *, socklen_t *); #endif +/*! + Mask containing all potentially valid audio formats +*/ #define IAXC_AUDIO_FORMAT_MASK ((1<<16)-1) + +/*! + Mask containing all potentially valid video formats +*/ #define IAXC_VIDEO_FORMAT_MASK (((1<<25)-1) & ~IAXC_AUDIO_FORMAT_MASK) /* payload formats : WARNING: must match libiax values!!! */ @@ -107,25 +122,25 @@ #define IAXC_FORMAT_THEORA (1 << 24) /*!< Theora Video */ #define IAXC_FORMAT_MAX_VIDEO (1 << 24) /*!< Maximum Video format value*/ -#define IAXC_EVENT_TEXT 1 /*!< Indicates a text event. */ -#define IAXC_EVENT_LEVELS 2 /*!< Indicates a level event. */ -#define IAXC_EVENT_STATE 3 /*!< Indicates a call state change event. */ -#define IAXC_EVENT_NETSTAT 4 /*!< Indicates a network statistics update event. */ -#define IAXC_EVENT_URL 5 /*!< Indicates a URL push via IAX(2). */ -#define IAXC_EVENT_VIDEO 6 /*!< Indicates a video event. */ -#define IAXC_EVENT_REGISTRATION 8 /*!< Indicates a registration event. */ -#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_TEXT 1 /*!< Indicates a text event */ +#define IAXC_EVENT_LEVELS 2 /*!< Indicates a level event */ +#define IAXC_EVENT_STATE 3 /*!< Indicates a call state change event */ +#define IAXC_EVENT_NETSTAT 4 /*!< Indicates a network statistics update event */ +#define IAXC_EVENT_URL 5 /*!< Indicates a URL push via IAX(2) */ +#define IAXC_EVENT_VIDEO 6 /*!< Indicates a video event */ +#define IAXC_EVENT_REGISTRATION 8 /*!< Indicates a registration event */ +#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_CALL_STATE_FREE 0 /*!< Indicates a call slot is free. */ -#define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active. */ -#define IAXC_CALL_STATE_OUTGOING (1<<2) /*!< Indicates a call is outgoing. */ -#define IAXC_CALL_STATE_RINGING (1<<3) /*!< Indicates a call is ringing. */ -#define IAXC_CALL_STATE_COMPLETE (1<<4) /*!< Indicates a completed call. */ -#define IAXC_CALL_STATE_SELECTED (1<<5) /*!< Indicates the call is selected. */ -#define IAXC_CALL_STATE_BUSY (1<<6) /*!< Indicates a call is busy. */ -#define IAXC_CALL_STATE_TRANSFER (1<<7) /*!< Indicates the call transfer has been released. */ +#define IAXC_CALL_STATE_FREE 0 /*!< Indicates a call slot is free */ +#define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active */ +#define IAXC_CALL_STATE_OUTGOING (1<<2) /*!< Indicates a call is outgoing */ +#define IAXC_CALL_STATE_RINGING (1<<3) /*!< Indicates a call is ringing */ +#define IAXC_CALL_STATE_COMPLETE (1<<4) /*!< Indicates a completed call */ +#define IAXC_CALL_STATE_SELECTED (1<<5) /*!< Indicates the call is selected */ +#define IAXC_CALL_STATE_BUSY (1<<6) /*!< Indicates a call is busy */ +#define IAXC_CALL_STATE_TRANSFER (1<<7) /*!< Indicates the call transfer has been released */ /*! Indicates that text is for an IAXClient status change */ #define IAXC_TEXT_TYPE_STATUS 1 @@ -133,15 +148,19 @@ #define IAXC_TEXT_TYPE_NOTICE 2 /*! Represents that text is for an IAXClient error message */ #define IAXC_TEXT_TYPE_ERROR 3 -/*! Represents a fatal error has occurred in IAXClient and that the User Agent should probably display error message text, then die. */ +/*! + Represents that text is for an IAXClient fatal error message. + + The User Agent should probably display error message text, then die +*/ #define IAXC_TEXT_TYPE_FATALERROR 4 /*! Represents a message sent from the server across the IAX stream*/ #define IAXC_TEXT_TYPE_IAX 5 /* registration replys, corresponding to IAX_EVENTs*/ -#define IAXC_REGISTRATION_REPLY_ACK 18 /*!< Indicates the registration was accepted (See IAX_EVENT_REGACC). */ -#define IAXC_REGISTRATION_REPLY_REJ 30 /*!< Indicates the registration was rejected (See IAX_EVENT_REGREJ). */ -#define IAXC_REGISTRATION_REPLY_TIMEOUT 6 /*!< Indicates the registration timed out (See IAX_EVENT_TIMEOUT). */ +#define IAXC_REGISTRATION_REPLY_ACK 18 /*!< Indicates the registration was accepted (See IAX_EVENT_REGACC) */ +#define IAXC_REGISTRATION_REPLY_REJ 30 /*!< Indicates the registration was rejected (See IAX_EVENT_REGREJ) */ +#define IAXC_REGISTRATION_REPLY_TIMEOUT 6 /*!< Indicates the registration timed out (See IAX_EVENT_TIMEOUT) */ #define IAXC_URL_URL 1 /*!< URL received */ #define IAXC_URL_LDCOMPLETE 2 /*!< URL loading complete */ @@ -150,8 +169,8 @@ #define IAXC_URL_UNLINK 5 /*!< URL unlink */ /* The source of the video or audio data triggering the event. */ -#define IAXC_SOURCE_LOCAL 1 /*!< Indicates that the event data source is local. */ -#define IAXC_SOURCE_REMOTE 2 /*!< Indicates that the event data source is remote. */ +#define IAXC_SOURCE_LOCAL 1 /*!< Indicates that the event data source is local */ +#define IAXC_SOURCE_REMOTE 2 /*!< Indicates that the event data source is remote */ /*! The maximum size of a string contained within an event @@ -319,7 +338,7 @@ struct iaxc_netstat remote; }; -/* +/*! A structure containing video statistics data. */ struct iaxc_video_stats @@ -859,11 +878,13 @@ */ EXPORT void iaxc_set_jb_target_extra( long value ); -/* - Application-defined networking; give substiture sendto and recvfrom - functions, must be called before iaxc_initialize! - \param st - \param rf +/*! + Application-defined networking; give substitute sendto and recvfrom + functions. + \param st The send function to use. + \param rf The receive function to use. + + \note Must be called before iaxc_initialize! */ EXPORT void iaxc_set_networking(iaxc_sendto_t st, iaxc_recvfrom_t rf) ; @@ -961,7 +982,7 @@ struct iaxc_sound *next; /*!< \internal use: next in list. */ }; -/* +/*! Play a sound. \param sound An iaxc_sound structure. \param ring 0 to play through output device or 1 to play through the "ring" device. @@ -1048,7 +1069,7 @@ */ #define IAXC_AUDIO_PREF_SEND_DISABLE (1 << 4) -/* +/*! Returns the various audio delivery preferences. The preferences are represented using the AIXC_AUDIO_PREF_{} family of defines. @@ -1188,7 +1209,7 @@ */ EXPORT void iaxc_video_format_set(int preferred, int allowed, int framerate, int bitrate, int width, int height, int fs); -/* +/*! Change video params for the current call on the fly This will destroy the existing encoder and create a new one use negative values for parameters that should not change @@ -1200,7 +1221,7 @@ */ EXPORT void iaxc_video_params_change(int framerate, int bitrate, int width, int height, int fs); -/* Set holding frame to be used in some kind of video calls */ +/*! Set holding frame to be used in some kind of video calls */ EXPORT int iaxc_set_holding_frame(char *); /*! @@ -1211,7 +1232,7 @@ EXPORT int iaxc_video_bypass_jitter(int); -/* +/*! Returns 1 if the default camera is working; 0 otherwise */ EXPORT int iaxc_is_camera_working(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-03 18:56:48
|
Revision: 1173 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1173&view=rev Author: jpgrayson Date: 2007-10-03 11:56:52 -0700 (Wed, 03 Oct 2007) Log Message: ----------- Move the vcproj file for testcall to the standard spot for such things. Modify testcall.vcproj to build and link correctly with iaxclient. Modified Paths: -------------- trunk/contrib/win/vs2005/iaxclient.sln Added Paths: ----------- trunk/contrib/win/vs2005/testcall.vcproj Removed Paths: ------------- trunk/simpleclient/testcall/testcall.vcproj Modified: trunk/contrib/win/vs2005/iaxclient.sln =================================================================== --- trunk/contrib/win/vs2005/iaxclient.sln 2007-10-03 18:05:48 UTC (rev 1172) +++ trunk/contrib/win/vs2005/iaxclient.sln 2007-10-03 18:56:52 UTC (rev 1173) @@ -9,14 +9,14 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}" ProjectSection(ProjectDependencies) = postProject + {3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C} + {BE15A94D-3766-4693-ABA8-5FBAACBBCC08} = {BE15A94D-3766-4693-ABA8-5FBAACBBCC08} + {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} - {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} - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08} = {BE15A94D-3766-4693-ABA8-5FBAACBBCC08} - {3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}" @@ -29,6 +29,11 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora", "libtheora.vcproj", "{E2C6AD95-7A61-41FE-8754-A4623C891BF8}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testcall", "testcall.vcproj", "{6F5AEE93-BA87-465B-BC75-C41C434FC4E4}" + 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 @@ -109,6 +114,14 @@ {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release_dll|Win32.Build.0 = Release|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release|Win32.ActiveCfg = Release|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release|Win32.Build.0 = Release|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Debug_dll|Win32.Build.0 = Debug|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Debug|Win32.ActiveCfg = Debug|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Debug|Win32.Build.0 = Debug|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release_dll|Win32.ActiveCfg = Release|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release_dll|Win32.Build.0 = Release|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release|Win32.ActiveCfg = Release|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Copied: trunk/contrib/win/vs2005/testcall.vcproj (from rev 1172, trunk/simpleclient/testcall/testcall.vcproj) =================================================================== --- trunk/contrib/win/vs2005/testcall.vcproj (rev 0) +++ trunk/contrib/win/vs2005/testcall.vcproj 2007-10-03 18:56:52 UTC (rev 1173) @@ -0,0 +1,206 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="testcall" + ProjectGUID="{6F5AEE93-BA87-465B-BC75-C41C434FC4E4}" + RootNamespace="testcall" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\lib" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="libiaxclient.lib ws2_32.lib" + LinkIncremental="2" + AdditionalLibraryDirectories="$(SolutionDir)$(ConfigurationName)\libiaxclient" + IgnoreDefaultLibraryNames="libcmtd.lib" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\..\..\lib" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + IgnoreImportLibrary="false" + AdditionalDependencies="libiaxclient.lib ws2_32.lib" + LinkIncremental="1" + AdditionalLibraryDirectories="$(SolutionDir)$(ConfigurationName)\libiaxclient" + IgnoreDefaultLibraryNames="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </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="..\..\..\simpleclient\testcall\testcall.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + </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> Deleted: trunk/simpleclient/testcall/testcall.vcproj =================================================================== --- trunk/simpleclient/testcall/testcall.vcproj 2007-10-03 18:05:48 UTC (rev 1172) +++ trunk/simpleclient/testcall/testcall.vcproj 2007-10-03 18:56:52 UTC (rev 1173) @@ -1,207 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="testcall" - ProjectGUID="{6F5AEE93-BA87-465B-BC75-C41C434FC4E4}" - RootNamespace="testcall" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CONSOLE;WITH_THREAD;_USE_MATH_DEFINES;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="dsound.lib iaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib videolib.lib libiax2.lib gsm.lib portaudio.lib libspeex.lib strmiids.lib portmixerd.lib" - OutputFile="$(OutDir)\..\..\simpleclient\testcall\Debug\$(ProjectName).exe" - LinkIncremental="2" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\lib\Debug;"$(SDL_DIR)\lib";"$(PSDK_DIR)\lib";..\..\lib\portmixer\winproj" - IgnoreDefaultLibraryNames="libcmtd.lib" - GenerateDebugInformation="true" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - CharacterSet="1" - WholeProgramOptimization="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CONSOLE;WITH_THREAD;_USE_MATH_DEFINES;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - IgnoreImportLibrary="false" - AdditionalDependencies="dsound.lib iaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib videolib.lib libiax2.lib gsm.lib portaudio.lib libspeex.lib strmiids.lib portmixer.lib" - LinkIncremental="1" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\lib\Release;"$(SDL_DIR)\lib";"$(PSDK_DIR)\lib";..\..\lib\portmixer\winproj" - IgnoreDefaultLibraryNames="msvcrtd.lib;msvcrt.lib;libcmtd.lib" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </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="..\..\simpleclient\testcall\testcall.c" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-10-16 23:32:28
|
Revision: 1200 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1200&view=rev Author: jpgrayson Date: 2007-10-16 16:32:32 -0700 (Tue, 16 Oct 2007) Log Message: ----------- Remove crusty .cvsignore files and relevant references to them. Modified Paths: -------------- trunk/simpleclient/testcall/Makefile.am Removed Paths: ------------- trunk/lib/libiax2/.cvsignore trunk/lib/libiax2/src/.cvsignore trunk/simpleclient/testcall/.cvsignore Deleted: trunk/lib/libiax2/.cvsignore =================================================================== --- trunk/lib/libiax2/.cvsignore 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/lib/libiax2/.cvsignore 2007-10-16 23:32:32 UTC (rev 1200) @@ -1,21 +0,0 @@ -libtool -config.status -config.guess -config.sub -ltconfig -ltmain.sh -install-sh -mkinstalldirs -missing -aclocal.m4 -configure -config.h.in -stamp-h.in -Makefile.in -config.log -config.cache -Makefile -stamp-h -libtool -iax.spec -iax-config Deleted: trunk/lib/libiax2/src/.cvsignore =================================================================== --- trunk/lib/libiax2/src/.cvsignore 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/lib/libiax2/src/.cvsignore 2007-10-16 23:32:32 UTC (rev 1200) @@ -1,8 +0,0 @@ -Makefile.in -Makefile -.deps -.libs -iax.lo -md5.lo -libiax.la - Deleted: trunk/simpleclient/testcall/.cvsignore =================================================================== --- trunk/simpleclient/testcall/.cvsignore 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/simpleclient/testcall/.cvsignore 2007-10-16 23:32:32 UTC (rev 1200) @@ -1,2 +0,0 @@ -testcall -testcall.exe Modified: trunk/simpleclient/testcall/Makefile.am =================================================================== --- trunk/simpleclient/testcall/Makefile.am 2007-10-16 14:45:13 UTC (rev 1199) +++ trunk/simpleclient/testcall/Makefile.am 2007-10-16 23:32:32 UTC (rev 1200) @@ -8,5 +8,5 @@ AM_CPPFLAGS += -DPOSIXSLEEP endif -EXTRA_DIST = .cvsignore testcall-jb.c testcall.vcproj +EXTRA_DIST = testcall-jb.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2007-10-18 22:07:56
|
Revision: 1217 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1217&view=rev Author: bcholew Date: 2007-10-18 15:08:00 -0700 (Thu, 18 Oct 2007) Log Message: ----------- Replace videoLib with libvidcap for video capture. Thanks to Pete Grayson for this. Libvidcap can be found at http://sourceforge.net/projects/libvidcap. Modified Paths: -------------- trunk/contrib/win/vs2005/iaxclient.sln trunk/contrib/win/vs2005/libiaxclient.vcproj trunk/lib/audio_encode.c trunk/lib/audio_encode.h trunk/lib/codec_theora.c trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/iaxclient_lib.h trunk/lib/video.c trunk/lib/video.h trunk/simpleclient/vtestcall/vtestcall.c trunk/simpleclient/vtestcall/vtestcall.vcproj Removed Paths: ------------- trunk/lib/videoLib/ Modified: trunk/contrib/win/vs2005/iaxclient.sln =================================================================== --- trunk/contrib/win/vs2005/iaxclient.sln 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/contrib/win/vs2005/iaxclient.sln 2007-10-18 22:08:00 UTC (rev 1217) @@ -1,8 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvideolib", "libvideolib.vcproj", "{BE15A94D-3766-4693-ABA8-5FBAACBBCC08}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libportmixer", "libportmixer.vcproj", "{3A76129B-55AB-4D54-BAA7-08F63ED52569}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libportaudio", "libportaudio.vcproj", "{3B023516-2C69-4CCB-9302-239991B6EC2C}" @@ -10,13 +8,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}" ProjectSection(ProjectDependencies) = postProject {3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C} - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08} = {BE15A94D-3766-4693-ABA8-5FBAACBBCC08} + {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} - {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} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}" @@ -34,6 +32,8 @@ {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_dll|Win32 = Debug_dll|Win32 @@ -42,14 +42,6 @@ Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Debug_dll|Win32.ActiveCfg = Debug|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Debug_dll|Win32.Build.0 = Debug|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Debug|Win32.ActiveCfg = Debug|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Debug|Win32.Build.0 = Debug|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Release_dll|Win32.ActiveCfg = Release|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Release_dll|Win32.Build.0 = Release|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Release|Win32.ActiveCfg = Release|Win32 - {BE15A94D-3766-4693-ABA8-5FBAACBBCC08}.Release|Win32.Build.0 = Release|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug_dll|Win32.Build.0 = Debug|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -122,6 +114,14 @@ {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release_dll|Win32.Build.0 = Release|Win32 {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release|Win32.ActiveCfg = Release|Win32 {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release|Win32.Build.0 = Release|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Debug_dll|Win32.Build.0 = Debug|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Debug|Win32.Build.0 = Debug|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release_dll|Win32.ActiveCfg = Release|Win32 + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/contrib/win/vs2005/libiaxclient.vcproj =================================================================== --- trunk/contrib/win/vs2005/libiaxclient.vcproj 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/contrib/win/vs2005/libiaxclient.vcproj 2007-10-18 22:08:00 UTC (rev 1217) @@ -39,8 +39,8 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;SPEEX_EC=1;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA" + AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -59,8 +59,8 @@ /> <Tool Name="VCLibrarianTool" - AdditionalDependencies="libiax2.lib libvideolib.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib" - AdditionalLibraryDirectories=""$(SolutionDir)$(ConfigurationName)\libiax2";"$(SolutionDir)$(ConfigurationName)\libvideolib";"$(SolutionDir)$(ConfigurationName)\libportaudio";"$(SolutionDir)$(ConfigurationName)\libportmixer";"$(SolutionDir)$(ConfigurationName)\libogg";"$(SolutionDir)$(ConfigurationName)\libtheora";"$(SolutionDir)$(ConfigurationName)\libspeex";"$(SolutionDir)$(ConfigurationName)\libgsm"" + AdditionalDependencies="libiax2.lib libvidcap.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib" + AdditionalLibraryDirectories=""$(SolutionDir)$(ConfigurationName)\libiax2";"$(SolutionDir)$(ConfigurationName)\libvidcap";"$(SolutionDir)$(ConfigurationName)\libportaudio";"$(SolutionDir)$(ConfigurationName)\libportmixer";"$(SolutionDir)$(ConfigurationName)\libogg";"$(SolutionDir)$(ConfigurationName)\libtheora";"$(SolutionDir)$(ConfigurationName)\libspeex";"$(SolutionDir)$(ConfigurationName)\libgsm"" /> <Tool Name="VCALinkTool" @@ -103,8 +103,8 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;SPEEX_EC=1;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA" + AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA" RuntimeLibrary="2" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -122,8 +122,8 @@ /> <Tool Name="VCLibrarianTool" - AdditionalDependencies="libiax2.lib libvideolib.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib" - AdditionalLibraryDirectories=""$(SolutionDir)$(ConfigurationName)\libiax2";"$(SolutionDir)$(ConfigurationName)\libvideolib";"$(SolutionDir)$(ConfigurationName)\libportaudio";"$(SolutionDir)$(ConfigurationName)\libportmixer";"$(SolutionDir)$(ConfigurationName)\libogg";"$(SolutionDir)$(ConfigurationName)\libtheora";"$(SolutionDir)$(ConfigurationName)\libspeex";"$(SolutionDir)$(ConfigurationName)\libgsm"" + AdditionalDependencies="libiax2.lib libvidcap.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib" + AdditionalLibraryDirectories=""$(SolutionDir)$(ConfigurationName)\libiax2";"$(SolutionDir)$(ConfigurationName)\libvidcap";"$(SolutionDir)$(ConfigurationName)\libportaudio";"$(SolutionDir)$(ConfigurationName)\libportmixer";"$(SolutionDir)$(ConfigurationName)\libogg";"$(SolutionDir)$(ConfigurationName)\libtheora";"$(SolutionDir)$(ConfigurationName)\libspeex";"$(SolutionDir)$(ConfigurationName)\libgsm"" /> <Tool Name="VCALinkTool" @@ -166,8 +166,8 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;SPEEX_EC=1;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500" + AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500" RuntimeLibrary="2" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -185,8 +185,8 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="libiax2.lib libvideolib.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib ws2_32.lib" - AdditionalLibraryDirectories=""$(SolutionDir)Release\libiax2";"$(SolutionDir)Release\libvideolib";"$(SolutionDir)Release\libportaudio";"$(SolutionDir)Release\libportmixer";"$(SolutionDir)Release\libogg";"$(SolutionDir)Release\libtheora";"$(SolutionDir)Release\libspeex";"$(SolutionDir)Release\libgsm"" + AdditionalDependencies="libiax2.lib libvidcap.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib ws2_32.lib" + AdditionalLibraryDirectories=""$(SolutionDir)Release\libiax2";"$(SolutionDir)Release\libvidcap";"$(SolutionDir)Release\libportaudio";"$(SolutionDir)Release\libportmixer";"$(SolutionDir)Release\libogg";"$(SolutionDir)Release\libtheora";"$(SolutionDir)Release\libspeex";"$(SolutionDir)Release\libgsm"" /> <Tool Name="VCALinkTool" @@ -238,8 +238,8 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;SPEEX_EC=1;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500" + AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -258,8 +258,8 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="libiax2.lib libvideolib.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib ws2_32.lib" - AdditionalLibraryDirectories=""$(SolutionDir)Debug\libiax2";"$(SolutionDir)Debug\libvideolib";"$(SolutionDir)Debug\libportaudio";"$(SolutionDir)Debug\libportmixer";"$(SolutionDir)Debug\libogg";"$(SolutionDir)Debug\libtheora";"$(SolutionDir)Debug\libspeex";"$(SolutionDir)Debug\libgsm"" + AdditionalDependencies="libiax2.lib libvidcap.lib libportmixer.lib libportaudio.lib libgsm.lib libogg.lib libspeex.lib libtheora.lib comsuppw.lib strmiids.lib wininet.lib ws2_32.lib" + AdditionalLibraryDirectories=""$(SolutionDir)Debug\libiax2";"$(SolutionDir)Debug\libvidcap";"$(SolutionDir)Debug\libportaudio";"$(SolutionDir)Debug\libportmixer";"$(SolutionDir)Debug\libogg";"$(SolutionDir)Debug\libtheora";"$(SolutionDir)Debug\libspeex";"$(SolutionDir)Debug\libgsm"" /> <Tool Name="VCALinkTool" @@ -390,6 +390,10 @@ > </File> <File + RelativePath="..\..\..\lib\audio_encode.h" + > + </File> + <File RelativePath="..\..\..\lib\audio_portaudio.h" > </File> Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/audio_encode.c 2007-10-18 22:08:00 UTC (rev 1217) @@ -14,6 +14,7 @@ * the GNU Lesser (Library) General Public License. */ +#include "audio_encode.h" #include "iaxclient_lib.h" #include "iax-client.h" #ifdef CODEC_GSM @@ -25,10 +26,10 @@ #include <speex/speex_preprocess.h> #ifdef CODEC_ILBC - #include "codec_ilbc.h" +#include "codec_ilbc.h" #endif -float iaxci_silence_threshold = -99.0f; +float iaxci_silence_threshold = AUDIO_ENCODE_SILENCE_DB; static float input_level = 0.0f; static float output_level = 0.0f; @@ -58,9 +59,9 @@ /* avoid calling log10() on zero which yields inf or * negative numbers which yield nan */ if ( vol <= 0.0f ) - return -99.9f; + return AUDIO_ENCODE_SILENCE_DB; else - return log10f(vol) * 20; + return log10f(vol) * 20.0f; } static int do_level_callback() @@ -79,11 +80,11 @@ /* if input has not been processed in the last second, set to silent */ input_db = iaxci_usecdiff(&now, &timeLastInput) < 1000000 ? - vol_to_db(input_level) : -99.9f; + vol_to_db(input_level) : AUDIO_ENCODE_SILENCE_DB; /* if output has not been processed in the last second, set to silent */ output_db = iaxci_usecdiff(&now, &timeLastOutput) < 1000000 ? - vol_to_db(output_level) : -99.9f; + vol_to_db(output_level) : AUDIO_ENCODE_SILENCE_DB; iaxci_do_levels_callback(input_db, output_db); @@ -95,7 +96,7 @@ int i; float f; - if(!st) + if ( !st ) return; i = 1; /* always make VAD decision */ Modified: trunk/lib/audio_encode.h =================================================================== --- trunk/lib/audio_encode.h 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/audio_encode.h 2007-10-18 22:08:00 UTC (rev 1217) @@ -15,6 +15,11 @@ #ifndef _AUDIO_ENCODE_H #define _AUDIO_ENCODE_H +/* Minimum dB possible in the iaxclient world. This level + * is intended to represent silence. + */ +#define AUDIO_ENCODE_SILENCE_DB -99.0f + struct iaxc_call; struct iax_event; Modified: trunk/lib/codec_theora.c =================================================================== --- trunk/lib/codec_theora.c 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/codec_theora.c 2007-10-18 22:08:00 UTC (rev 1217) @@ -227,8 +227,8 @@ memset(dst + pw * h, value, (ph - h) * pw); } -static int encode(struct iaxc_video_codec *c, int inlen, char *in, - struct slice_set_t *slice_set) +static int encode(struct iaxc_video_codec * c, int inlen, const char * in, + struct slice_set_t * slice_set) { struct theora_encoder *e; ogg_packet op; Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/iaxclient.h 2007-10-18 22:08:00 UTC (rev 1217) @@ -1253,9 +1253,8 @@ Converts the image based on the forumulas found at http://en.wikipedia.org/wiki/YUV */ -EXPORT void iaxc_YUV420_to_RGB32(int width, int height, char *src, char *dest); +EXPORT void iaxc_YUV420_to_RGB32(int width, int height, const char *src, char *dest); - /* * Test mode functionality * In test mode, iaxclient will do the following: Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/iaxclient_lib.c 2007-10-18 22:08:00 UTC (rev 1217) @@ -119,21 +119,12 @@ static THREAD main_proc_thread; -#ifdef USE_VIDEO -static THREAD video_proc_thread; -#endif #if defined(WIN32) || defined(_WIN32_WCE) static THREADID main_proc_thread_id; -#ifdef USE_VIDEO -static THREADID video_proc_thread_id; #endif -#endif /* 0 running, 1 should quit, -1 not running */ static int main_proc_thread_flag = -1; -#ifdef USE_VIDEO -static int video_proc_thread_flag = -1; -#endif static iaxc_event_callback_t iaxc_event_callback = NULL; @@ -640,10 +631,8 @@ } #ifdef USE_VIDEO if ( video_initialize() ) - { iaxci_usermsg(IAXC_ERROR, "iaxc_initialize: cannot initialize video!\n"); - } #endif /* Default audio format capabilities */ @@ -781,32 +770,6 @@ return ret; } -#ifdef USE_VIDEO -static THREADFUNCDECL(video_proc_thread_func) -{ - struct iaxc_call *call; - - while ( !video_proc_thread_flag ) - { - if ( selected_call >= 0 ) - call = &calls[selected_call]; - else - call = NULL; - - if ( !test_mode ) - video_send_video(call, selected_call); - video_send_stats(call); - - // Tight spinloops are bad, mmmkay? - iaxc_millisleep(LOOP_SLEEP); - } - - video_proc_thread_flag = -1; - - return 0; -} -#endif - EXPORT int iaxc_start_processing_thread() { main_proc_thread_flag = 0; @@ -815,14 +778,6 @@ main_proc_thread_id) == THREADCREATE_ERROR) return -1; -#ifdef USE_VIDEO - video_proc_thread_flag = 0; - - if ( THREADCREATE(video_proc_thread_func, NULL, video_proc_thread, - video_proc_thread_id) == THREADCREATE_ERROR) - return -1; -#endif - return 0; } @@ -834,14 +789,6 @@ THREADJOIN(main_proc_thread); } -#ifdef USE_VIDEO - if ( video_proc_thread_flag >= 0 ) - { - video_proc_thread_flag = 1; - THREADJOIN(video_proc_thread); - } -#endif - return 0; } @@ -930,7 +877,8 @@ be changed. */ if ( i++ % 50 == 0 ) - iaxci_do_levels_callback(-99,-99); + iaxci_do_levels_callback(AUDIO_ENCODE_SILENCE_DB, + AUDIO_ENCODE_SILENCE_DB); } return 0; @@ -1209,11 +1157,7 @@ break; #ifdef USE_VIDEO case IAX_EVENT_VIDEO: - // Mihai: why do we need to lower priority here? - // TODO: investigate - //iaxci_prioboostend(); handle_video_event(e, callNo); - //iaxci_prioboostbegin(); break; #endif case IAX_EVENT_TEXT: Modified: trunk/lib/iaxclient_lib.h =================================================================== --- trunk/lib/iaxclient_lib.h 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/iaxclient_lib.h 2007-10-18 22:08:00 UTC (rev 1217) @@ -191,9 +191,11 @@ void *encstate; void *decstate; struct iaxc_video_stats video_stats; - int (*encode) ( struct iaxc_video_codec *codec, int inlen, char *in, struct slice_set_t *out ); - int (*decode) ( struct iaxc_video_codec *codec, int inlen, char *in, int *outlen, char *out ); - void (*destroy) ( struct iaxc_video_codec *codec); + int (*encode)(struct iaxc_video_codec * codec, int inlen, + const char * in, struct slice_set_t * out); + int (*decode)(struct iaxc_video_codec * codec, int inlen, + const char * in, int * outlen, char * out); + void (*destroy)(struct iaxc_video_codec * codec); }; Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-10-18 18:18:07 UTC (rev 1216) +++ trunk/lib/video.c 2007-10-18 22:08:00 UTC (rev 1217) @@ -17,10 +17,12 @@ #include <assert.h> #include <stdlib.h> +#include <vidcap/vidcap.h> +#include <vidcap/converters.h> + #include "video.h" #include "slice.h" #include "iaxclient_lib.h" -#include "videoLib/video_grab.h" #include "iax-client.h" #ifdef USE_FFMPEG #include "codec_ffmpeg.h" @@ -29,269 +31,91 @@ #include "codec_theora.h" #endif -#define VIDEO_BUFSIZ (1<<19) +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; -extern int selected_call; -extern int test_mode; -extern struct iaxc_call * calls; + /* these are the requested (post-scaling) dimensions */ + int width; + int height; -static int iaxc_video_width = 320; -static int iaxc_video_height = 240; -static int iaxc_video_framerate = 10; //15; -static int iaxc_video_bitrate = 150000; -static int iaxc_video_fragsize = 1500; -static int iaxc_video_format_preferred = 0; -static int iaxc_video_format_allowed = 0; -static struct iaxc_video_driver video_driver; + MUTEX camera_lock; + int capturing; -static struct slice_set_t slice_set; + char * converted_i420_buf; + int converted_i420_buf_size; + int (*convert_to_i420)(int, int, const char *, char *); -/* Set the default so that the local and remote raw video is - * sent to the client application and encoded video is sent out. - */ -static int iaxc_video_prefs = IAXC_VIDEO_PREF_RECV_LOCAL_RAW | - IAXC_VIDEO_PREF_RECV_REMOTE_RAW; + char * converted_rgb_buf; + int converted_rgb_buf_size; + int (*convert_to_rgb32)(int, int, const char *, char *); -#if 0 -/* debug: check a yuv420p buffer to ensure it's within the CCIR range */ -static int check_ccir_yuv(char *data) { - int i; - unsigned char pix; - int err = 0; + char * scaled_buf; + int scaled_buf_size; + void (*scale_image)(const unsigned char *, int, int, + unsigned char *, int, int); - for(i=0;i<iaxc_video_width * iaxc_video_height; i++) { - pix = *data++; - if( (pix < 16) || pix > 235) { - fprintf(stderr, "check_ccir_yuv: Y pixel[%d] out of range: %d\n", i, pix); - err++; - } - } - for(i=0;i< iaxc_video_width * iaxc_video_height / 2; i++) { - pix = *data++; - if( (pix < 16) || pix > 239) { - fprintf(stderr, "check_ccir_yuv: U/V pixel[%d] out of range: %d\n", i, pix); - err++; - } - } - return err; -} -#endif + int prefs; -EXPORT unsigned int iaxc_get_video_prefs(void) -{ - return iaxc_video_prefs; -} + struct slicer_context * sc; +}; -EXPORT int iaxc_set_video_prefs(unsigned int prefs) +struct video_format_info { - const unsigned int prefs_mask = - IAXC_VIDEO_PREF_RECV_LOCAL_RAW | - IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED | - IAXC_VIDEO_PREF_RECV_REMOTE_RAW | - IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED | - IAXC_VIDEO_PREF_SEND_DISABLE | - IAXC_VIDEO_PREF_RECV_RGB32 | - IAXC_VIDEO_PREF_CAPTURE_DISABLE; + int width; + int height; + int framerate; + int bitrate; + int fragsize; - if ( prefs & ~prefs_mask ) - return -1; + /* Note that here format really means codec (thoera, h264, etc) */ + int format_preferred; + int format_allowed; +}; - iaxc_video_prefs = prefs; - - if ( test_mode ) - return 0; - - /* Not sending any video and not needing any form of - * local video implies that we do not need to capture - * video. - */ - if ( prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE || - ((prefs & IAXC_VIDEO_PREF_SEND_DISABLE) && - !(prefs & IAXC_VIDEO_PREF_RECV_LOCAL_RAW) && - !(prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED)) ) - { - /* Note that in both the start and stop cases, we - * rely on the start/stop function to be idempotent. - */ - if (video_driver.stop) - video_driver.stop(&video_driver); - } - else - { - if ( video_driver.start ) - { - video_driver.start(&video_driver); +static struct video_info vinfo; - // Driver may fail to start - if ( !video_driver.is_camera_working(&video_driver) ) - return -1; - } - } - - return 0; -} - -EXPORT void iaxc_video_format_set_cap(int preferred, int allowed) +/* TODO: This vfinfo instance is ... funny. The current semantic of + * iaxc_video_format_set() requires it to be called _prior_ to + * iaxc_initialize() which of course is where video initialize is called. + * This means that no code in this video.c module is called prior to + * iaxc_video_format_set(). This is silly, wrong, and bad. + * + * What would be better would be if iaxc_video_format_set() was called + * by clients _after_ iaxc_initialize(). The TODO here is to do the + * analysis and restructure things so that iaxc_video_format_set() and + * probably several other iaxc_*() calls do not happen until after + * iaxc_initialize(). + * + * Once that happens, these members of video_format_info can be rolled + * back into video_info and we can initialize the members in + * video_initialize(). + */ +static struct video_format_info vfinfo = { - iaxc_video_format_preferred = preferred; - iaxc_video_format_allowed = allowed; -} + 320, /* width */ + 240, /* height */ + 15, /* fps */ + 150000, /* bitrate */ + 1500, /* fragsize */ + 0, /* format preferred */ + 0, /* format allowed */ +}; -EXPORT void iaxc_video_format_get_cap(int *preferred, int *allowed) -{ - *preferred = iaxc_video_format_preferred; - *allowed = iaxc_video_format_allowed; -} +extern int selected_call; +extern int test_mode; +extern struct iaxc_call * calls; -EXPORT void iaxc_video_format_set(int preferred, int allowed, int framerate, - int bitrate, int width, int height, int fs) +EXPORT unsigned int iaxc_get_video_prefs(void) { - int real_pref = 0; - int real_allowed = 0; -#ifdef USE_FFMPEG - int tmp_allowed; - int i; -#endif - - // Make sure resolution is in range - if ( width < IAXC_VIDEO_MIN_WIDTH ) - width = IAXC_VIDEO_MIN_WIDTH; - else if ( width > IAXC_VIDEO_MAX_WIDTH ) - width = IAXC_VIDEO_MAX_WIDTH; - - if ( height < IAXC_VIDEO_MIN_HEIGHT ) - height = IAXC_VIDEO_MIN_HEIGHT; - else if ( height > IAXC_VIDEO_MAX_HEIGHT ) - height = IAXC_VIDEO_MAX_HEIGHT; - - iaxc_video_framerate = framerate; - iaxc_video_bitrate = bitrate; - iaxc_video_width = width; - iaxc_video_height = height; - iaxc_video_fragsize = fs; - - iaxc_video_format_allowed = 0; - iaxc_video_format_preferred = 0; - - if ( preferred && (preferred & ~IAXC_VIDEO_FORMAT_MASK) ) - { - fprintf(stderr, "ERROR: Preferred video format invalid.\n"); - preferred = 0; - } - - /* This check: - * 1. Check if preferred is a supported and compiled in codec. If - * not, switch to the default preferred format. - * 2. Check if allowed contains a list of all supported and compiled - * in codec. If there are some unavailable codec, remove it from - * this list. - */ - - if ( preferred & IAXC_FORMAT_THEORA ) - real_pref = IAXC_FORMAT_THEORA; - -#ifdef USE_FFMPEG - if ( codec_video_ffmpeg_check_codec(preferred) ) - real_pref = preferred; -#endif - - if ( !real_pref ) - { - // If preferred codec is not available switch to the - // supported default codec. - fprintf(stderr, "Preferred codec (0x%08x) is not available. Switching to default", preferred); - real_pref = IAXC_FORMAT_THEORA; - } - - /* Check on allowed codecs availability */ - - if ( allowed & IAXC_FORMAT_THEORA ) - real_allowed |= IAXC_FORMAT_THEORA; - -#ifdef USE_FFMPEG - /* TODO: This codec_video_ffmpeg_check_codec stuff is bogus. We - * need a standard interface in our codec wrappers that allows us to - * (1) test if a selected codec is valid and/or (2) return the set of - * available valid codecs. With that, we should be able to come up - * with a more elegant algorithm here for determining the video codec. - */ - for ( i = 0; i <= 24; i++) - { - tmp_allowed = 1 << i; - if ( (allowed & tmp_allowed) && - codec_video_ffmpeg_check_codec(tmp_allowed) ) - real_allowed |= tmp_allowed; - } -#endif - - if ( !real_pref ) - { - fprintf(stderr, "Audio-only client!\n"); - } else - { - iaxc_video_format_preferred = real_pref; - - /* - * When a client use a 'preferred' format, it can force to - * use allowed formats using a non-zero value for 'allowed' - * parameter. If it is left 0, the client will use all - * capabilities set by default in this code. - */ - if ( real_allowed ) - { - iaxc_video_format_allowed = real_allowed; - } else - { -#ifdef USE_FFMPEG - iaxc_video_format_allowed |= IAXC_FORMAT_H263_PLUS - | IAXC_FORMAT_H263 - | IAXC_FORMAT_MPEG4 - | IAXC_FORMAT_H264; -#endif - iaxc_video_format_allowed |= IAXC_FORMAT_THEORA; - } - } + return vinfo.prefs; } -void iaxc_video_params_change(int framerate, int bitrate, int width, - int height, int fs) -{ - struct iaxc_call *call; - - /* set default video params */ - if ( framerate > 0 ) - iaxc_video_framerate = framerate; - if ( bitrate > 0 ) - iaxc_video_bitrate = bitrate; - if ( width > 0 ) - iaxc_video_width = width; - if ( height > 0 ) - iaxc_video_height = height; - if ( fs > 0 ) - iaxc_video_fragsize = fs; - - if ( selected_call < 0 ) - return; - - call = &calls[selected_call]; - - if ( !call || !call->vencoder ) - return; - - call->vencoder->params_changed = 1; - - if ( framerate > 0 ) - call->vencoder->framerate = framerate; - if ( bitrate > 0 ) - call->vencoder->bitrate = bitrate; - if ( width > 0 ) - call->vencoder->width = width; - if ( height > 0 ) - call->vencoder->height = height; - if ( fs > 0 ) - call->vencoder->fragsize = fs; -} - static void reset_codec_stats(struct iaxc_video_codec *vcodec) { if ( !vcodec ) @@ -301,7 +125,7 @@ gettimeofday(&vcodec->video_stats.start_time, 0); } -static void reset_video_stats(struct iaxc_call *call) +static void reset_video_stats(struct iaxc_call * call) { if ( !call ) return; @@ -348,6 +172,34 @@ return 0; } +static int maybe_send_stats(struct iaxc_call * call) +{ + const long video_stats_interval = 1000; /* milliseconds */ + static struct timeval video_stats_start = {0, 0}; + iaxc_event e; + struct timeval now; + + if ( !call ) + return -1; + + if ( video_stats_start.tv_sec == 0 && video_stats_start.tv_usec == 0 ) + gettimeofday(&video_stats_start, 0); + + gettimeofday(&now, 0); + + if ( iaxci_msecdiff(&now, &video_stats_start) > video_stats_interval ) + { + get_stats(call, &e.ev.videostats.stats, 1); + e.type = IAXC_EVENT_VIDEOSTATS; + e.ev.videostats.callNo = selected_call; + iaxci_post_event(e); + + video_stats_start = now; + } + + return 0; +} + /* TODO: The encode parameter to this function is unused within this * function. However, clients of this function still use this parameter. * What ends up happening is we instantiate the codec encoder/decoder @@ -381,22 +233,22 @@ case IAXC_FORMAT_H264: #ifdef USE_FFMPEG vcodec = codec_video_ffmpeg_new(format, - iaxc_video_width, - iaxc_video_height, - iaxc_video_framerate, - iaxc_video_bitrate, - iaxc_video_fragsize); + vfinfo.width, + vfinfo.height, + vfinfo.framerate, + vfinfo.bitrate, + vfinfo.fragsize); #endif break; case IAXC_FORMAT_THEORA: #ifdef USE_THEORA vcodec = codec_video_theora_new(format, - iaxc_video_width, - iaxc_video_height, - iaxc_video_framerate, - iaxc_video_bitrate, - iaxc_video_fragsize); + vfinfo.width, + vfinfo.height, + vfinfo.framerate, + vfinfo.bitrate, + vfinfo.fragsize); #endif break; } @@ -407,208 +259,874 @@ } /* - * show_video_frame - returns video data to the main application - * using the callback mechanism - * This function creates a dynamic copy of the video data. The memory is freed + * Returns video data to the main application using the callback mechanism. + * This function creates a dynamic copy of the video data. The memory is freed * in iaxci_post_event. This is because the event we post may be queued and the * frame data must live until after it is dequeued. - * Parameters: - videobuf: buffer containing raw or encoded video data - * - size - size of video data block - * - cn - call number - * - source - either IAXC_SOURCE_LOCAL or IAXC_SOURCE_REMOTE - * - encoded - true if data is encoded - * - rgb32 - if true, convert data to RGB32 before showing + \todo For encoded data, set the event format to the calls video format. + For raw data, set the format to 0. + \todo For encoded data, set the event format to the calls video format. For raw data, set the format to 0. */ -void show_video_frame(char *videobuf, int size, int cn, int source, int encoded, - unsigned int ts, int rgb32) +int show_video_frame(const char * in_buf, int in_buf_size, + int call_number, int source, int encoded, + unsigned int timestamp_ms) { iaxc_event e; - char * buffer; + char * buf = malloc(in_buf_size); + assert(buf); + assert(source == IAXC_SOURCE_REMOTE || source == IAXC_SOURCE_LOCAL); + + memcpy(buf, in_buf, in_buf_size); + e.type = IAXC_EVENT_VIDEO; - e.ev.video.ts = ts; + e.ev.video.ts = timestamp_ms; + e.ev.video.data = buf; + e.ev.video.size = in_buf_size; + e.ev.video.format = vfinfo.format_preferred; + e.ev.video.width = vinfo.width; + e.ev.video.height = vinfo.height; + e.ev.video.callNo = call_number; + e.ev.video.encoded = encoded; + e.ev.video.source = source; - if ( size <= 0 ) - fprintf(stderr, "WARNING: size %d in show_video_frame\n", size); + iaxci_post_event(e); - if ( !encoded && rgb32 ) + return 0; +} + +// Resize the buffer to 25% (half resolution on both w and h ) +// No checks are made to ensure that the source dimensions are even numbers +static void quarter_rgb32(const unsigned char *src, int src_w, int src_h, + unsigned char *dst) +{ + int i; + const unsigned char * src_even = src; + const unsigned char * src_odd = src + src_w * 4; + + for ( i = 0 ; i < src_h / 2 ; i++ ) { - e.ev.video.size = iaxc_video_height * iaxc_video_width * 4; - buffer = (char *)malloc(e.ev.video.size); - assert(buffer); - e.ev.video.data = buffer; - iaxc_YUV420_to_RGB32(iaxc_video_width, iaxc_video_height, - videobuf, buffer); - } else + int j; + for ( j = 0 ; j < src_w / 2 ; j++ ) + { + short r, g, b; + b = *src_even++; + g = *src_even++; + r = *src_even++; + ++src_even; + + b += *src_even++; + g += *src_even++; + r += *src_even++; + ++src_even; + + b += *src_odd++; + g += *src_odd++; + r += *src_odd++; + ++src_odd; + + b += *src_odd++; + g += *src_odd++; + r += *src_odd++; + ++src_odd; + + *dst++ = (unsigned char)(b >> 2); + *dst++ = (unsigned char)(g >> 2); + *dst++ = (unsigned char)(r >> 2); + *dst++ = (unsigned char)0xff; + } + src_even = src_odd; + src_odd += src_w * 4; + } +} + +// Resize the buffer to 25% (half resolution on both w and h ) +// No checks are made to ensure that the source dimensions are even numbers +static void quarter_yuy2(const unsigned char *src, int src_w, int src_h, + unsigned char *dst) +{ + int i; + const unsigned char * src_even = src; + const unsigned char * src_odd = src + src_w * 2; + + for ( i = 0 ; i < src_h / 2 ; i++ ) { - buffer = (char *)malloc(size); - assert(buffer); - memcpy(buffer, videobuf, size); - e.ev.video.data = buffer; - e.ev.video.size = size; + int j; + for ( j = 0 ; j < src_w / 4 ; j++ ) + { + short y1, u, y2, v; + y1 = *src_even++; + u = *src_even++; + y1 += *src_even++; + v = *src_even++; + + y1 += *src_odd++; + u += *src_odd++; + y1 += *src_odd++; + v += *src_odd++; + + y2 = *src_even++; + u += *src_even++; + y2 += *src_even++; + v += *src_even++; + + y2 += *src_odd++; + u += *src_odd++; + y2 += *src_odd++; + v += *src_odd++; + + *dst++ = (unsigned char)(y1 >> 2); + *dst++ = (unsigned char)(u >> 2); + *dst++ = (unsigned char)(y2 >> 2); + *dst++ = (unsigned char)(v >> 2); + } + src_even = src_odd; + src_odd += src_w * 2; } +} - e.ev.video.format = iaxc_video_format_preferred; - e.ev.video.width = iaxc_video_width; - e.ev.video.height = iaxc_video_height; - e.ev.video.callNo = cn; - e.ev.video.encoded = encoded; - assert(source == IAXC_SOURCE_REMOTE || source == IAXC_SOURCE_LOCAL); - e.ev.video.source = source; +// Resize the channel to 25% (half resolution on both w and h ) +// No checks are made to ensure that the source dimensions are even numbers +static void quarter_channel(const unsigned char *src, int src_w, int src_h, + unsigned char *dst) +{ + int i; + const unsigned char * evenl = src; + const unsigned char * oddl = src + src_w; - iaxci_post_event(e); + for ( i = 0 ; i < src_h / 2 ; i++ ) + { + int j; + for ( j = 0 ; j < src_w / 2 ; j++ ) + { + int s = *(evenl++); + s += *(evenl++); + s += *(oddl++); + s += *(oddl++); + *(dst++) = (unsigned char)(s >> 2); + } + evenl = oddl; + oddl += src_w; + } } -/* try to get the next frame, encode and send */ -int video_send_video(struct iaxc_call *call, int sel_call) +// Resize an I420 image by resizing each of the three channels. +// Destination buffer must be sufficiently large to accommodate +// the resulting image +static void resize_i420(const unsigned char *src, int src_w, int src_h, + unsigned char *dst, int dst_w, int dst_h) { - int format; - int i = 0; - const int inlen = iaxc_video_width * iaxc_video_height * 6 / 4; - char * videobuf; + const unsigned char *src_u = src + src_w * src_h; + const unsigned char *src_v = src_u + src_w * src_h / 4; + unsigned char *dst_u = dst + dst_w * dst_h; + unsigned char *dst_v = dst_u + dst_w * dst_h / 4; + + // Resize each channel separately + if ( dst_w * 2 == src_w && dst_h * 2 == src_h ) + { + quarter_channel(src, src_w, src_h, dst); + quarter_channel(src_u, src_w / 2, src_h / 2, dst_u); + quarter_channel(src_v, src_w / 2, src_h / 2, dst_v); + } +/* + else if ( dst_w * 4 == src_w && dst_h * 4 == src_h ) + { + double_quarter_channel(src, src_w, src_h, dst); + double_quarter_channel(src_u, src_w / 2, src_h / 2, dst_u); + double_quarter_channel(src_v, src_w / 2, src_h / 2, dst_v); + } + else + { + resize_channel(src, src_w, src_h, dst, dst_w, dst_h); + resize_channel(src_u, src_w / 2, src_h / 2, + dst_u, dst_w / 2, dst_h / 2); + resize_channel(src_v, src_w / 2, src_h / 2, + dst_v, dst_w / 2, dst_h / 2); + } +*/ +} + +// Resize an rgb32 image +// Destination buffer must be sufficiently large to accommodate +// the resulting image +static void resize_rgb32(const unsigned char *src, int src_w, int src_h, + unsigned char *dst, int dst_w, int dst_h) +{ + if ( dst_w * 2 == src_w && dst_h * 2 == src_h ) + { + quarter_rgb32(src, src_w, src_h, dst); + } +/* + else if ( dst_w * 4 == src_w && dst_h * 4 == src_h ) + { + double_quarter_rgb32(src, src_w, src_h, dst); + } + else + { + resize_rgb32_buffer(src, src_w, src_h, dst, dst_w, dst_h); + } +*/ +} + +// Resize a yuy2 image. +// Destination buffer must be sufficiently large to accommodate +// the resulting image +static void resize_yuy2(const unsigned char *src, int src_w, int src_h, + unsigned char *dst, int dst_w, int dst_h) +{ + if ( dst_w * 2 == src_w && dst_h * 2 == src_h ) + { + quarter_yuy2(src, src_w, src_h, dst); + } +/* + else if ( dst_w * 4 == src_w && dst_h * 4 == src_h ) + { + double_quarter_yuy2(src, src_w, src_h, dst); + } + else + { + resize_yuy2_buffer(src, src_w, src_h, dst, dst_w, dst_h); + } +*/ +} + +static int capture_callback(vidcap_src * src, void * user_data, + struct vidcap_capture_info * cap_info) +{ + static struct slice_set_t slice_set; + + /* The prefs may change inbetween capture callbacks, so we cannot + * precompute any of this prior to starting capture. + */ + const int send_encoded = !(vinfo.prefs & IAXC_VIDEO_PREF_SEND_DISABLE); + const int recv_local_enc = vinfo.prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED; + const int recv_local_raw = vinfo.prefs & IAXC_VIDEO_PREF_RECV_LOCAL_RAW; + const int need_encode = send_encoded || recv_local_enc; + const int local_rgb = vinfo.prefs & IAXC_VIDEO_PREF_RECV_RGB32; + + struct iaxc_call * call; struct timeval now; - long time; + long time_delta; - video_driver.input(&video_driver, &videobuf); + const char * rgb_buf = 0; + int rgb_buf_size = 0; + const char * i420_buf = 0; + int i420_buf_size = 0; + const char * source_buf = 0; + int source_buf_size = 0; - /* It is okay if we do not get any video; video capture may be - * disabled. - */ - if ( !videobuf || (iaxc_video_prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE) ) + int i; + + if ( cap_info->error_status ) + { + fprintf(stderr, "vidcap capture error %d\n", + cap_info->error_status); + vinfo.capturing = 0; + return -1; + } + + if ( vinfo.prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE ) return 0; - // Send the raw frame to the main app, if necessary - if ( iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_LOCAL_RAW ) + if ( vinfo.width != vinfo.fmt_info.width ) { - show_video_frame(videobuf, inlen, -1, IAXC_SOURCE_LOCAL, 0, 0, - iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_RGB32); + vinfo.scale_image((const unsigned char *)cap_info->video_data, + vinfo.fmt_info.width, + vinfo.fmt_info.height, + (unsigned char *)vinfo.scaled_buf, + vinfo.width, + vinfo.height); + + source_buf = vinfo.scaled_buf; + source_buf_size = vinfo.scaled_buf_size; } + else + { + source_buf = cap_info->video_data; + source_buf_size = cap_info->video_data_size; + } - if ( sel_call < 0 || !call || - !(call->state & (IAXC_CALL_STATE_COMPLETE | - IAXC_CALL_STATE_OUTGOING)) ) + if ( vinfo.convert_to_rgb32 && recv_local_raw && local_rgb ) { - return -1; + vinfo.convert_to_rgb32( + vinfo.width, + vinfo.height, + source_buf, + vinfo.converted_rgb_buf); + + rgb_buf = vinfo.converted_rgb_buf; + rgb_buf_size = vinfo.converted_rgb_buf_size; } + else + { + rgb_buf = source_buf; + rgb_buf_size = source_buf_size; + } - // use the calls format, not random preference - format = call->vformat; + if ( vinfo.convert_to_i420 && (need_encode || + (recv_local_raw && !local_rgb)) ) + { + vinfo.convert_to_i420( + vinfo.width, + vinfo.height, + source_buf, + vinfo.converted_i420_buf); - if ( format == 0 ) + i420_buf = vinfo.converted_i420_buf; + i420_buf_size = vinfo.converted_i420_buf_size; + } + else { -// fprintf(stderr, "video_send_video: Format is zero (should't happen)!\n"); + i420_buf = source_buf; + i420_buf_size = source_buf_size; + } + + if ( recv_local_raw ) + { + show_video_frame(local_rgb ? rgb_buf : i420_buf, + local_rgb ? rgb_buf_size : i420_buf_size, + -1, /* local call number */ + IAXC_SOURCE_LOCAL, + 0, /* not encoded */ + 0); /* timestamp (ms) */ + } + + if ( selected_call < 0 ) + return 0; + + call = &calls[selected_call]; + + if ( !call || !(call->state & (IAXC_CALL_STATE_COMPLETE | + IAXC_CALL_STATE_OUTGOING)) ) + { + return 0; + } + + if ( call->vformat == 0 ) + { + fprintf(stderr, "video format not set for call %d\n", + selected_call); return -1; } - // If we don't need to send encoded video to the network or back - // to the main application, just return here. - if ( ( !(iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED) && - (iaxc_video_prefs & IAXC_VIDEO_PREF_SEND_DISABLE) ) || - (format == 0) ) + if ( !need_encode ) { + /* Since we are neither sending out encoded video on the + * network nor to the application, we no longer need the + * codec instance. + */ if ( call->vencoder ) { - // We don't need to encode video so just destroy the encoder - fprintf(stderr, "Destroying codec %s\n", call->vencoder->name); + fprintf(stderr, "destroying codec %s\n", + call->vencoder->name); call->vencoder->destroy(call->vencoder); - call->vencoder = NULL; + call->vencoder = 0; } + return 0; - }else + } + else { - /* destroy vencoder if it is incorrect type */ if ( call->vencoder && - (call->vencoder->format != format || call->vencoder->params_changed) - ) + (call->vencoder->format != call->vformat || + call->vencoder->params_changed) ) { call->vencoder->destroy(call->vencoder); - call->vencoder = NULL; + call->vencoder = 0; } - /* create encoder if necessary */ if ( !call->vencoder ) { - call->vencoder = create_codec(format, 1); - fprintf(stderr,"**** Created encoder codec %s\n",call->vencoder->name); - } + if ( !(call->vencoder = create_codec(call->vformat, 1)) ) + { + fprintf(stderr, "ERROR: failed to create codec " + "for format 0x%08x\n", + call->vformat); + return -1; + } - if ( !call->vencoder ) - { - fprintf(stderr, - "ERROR: Video codec could not be created: 0x%08x\n", - format); - return -1; + fprintf(stderr, "created encoder codec %s\n", + call->vencoder->name); } - // encode the frame - if ( call->vencoder->encode(call->vencoder, inlen, videobuf, + if ( call->vencoder->encode(call->vencoder, + i420_buf_size, i420_buf, &slice_set) ) { - fprintf(stderr, "video_send_video: encode failed\n"); + fprintf(stderr, "failed to encode captured video\n"); return -1; } } - // Statistics + /* Gather statistics */ + call->vencoder->video_stats.outbound_frames++; + gettimeofday(&now, 0); - call->vencoder->video_stats.outbound_frames++; - time = iaxci_msecdiff(&now, &call->vencoder->video_stats.start_time); - if ( time > 0 ) + time_delta = + iaxci_msecdiff(&now, &call->vencoder->video_stats.start_time); + + if ( time_delta > 0 ) call->vencoder->video_stats.avg_outbound_fps = (float)call->vencoder->video_stats.outbound_frames * - 1000 / time; + 1000.0f / (float)time_delta; - // send the frame! - if ( !call->session ) + { + fprintf(stderr, "not sending video to sessionless call\n"); return -1; + } - for ( i = 0; i < slice_set.num_slices; i++ ) + for ( i = 0; i < slice_set.num_slices; ++i ) { //Pass the encoded frame to the main app // \todo Fix the call number - if ( iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED ) + if ( vinfo.prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED ) { - show_video_frame(slice_set.data[i], slice_set.size[i], - -1, IAXC_SOURCE_LOCAL, 1, 0, 0); + show_video_frame(slice_set.data[i], + slice_set.size[i], + -1, /* local call number */ + IAXC_SOURCE_LOCAL, + 1, /* encoded */ + 0); /* timestamp */ } - if ( !(iaxc_video_prefs & IAXC_VIDEO_PREF_SEND_DISABLE) ) + if ( !(vinfo.prefs & IAXC_VIDEO_PREF_SEND_DISABLE) ) { - if ( iax_send_video_trunk(call->session, format, + if ( iax_send_video_trunk(call->session, call->vformat, slice_set.data[i], slice_set.size[i], - 0, i) == -1 ) + 0, /* not fullframe */ + i) == -1) { - fprintf(stderr, "Failed to send a slice, call %d, size %d\n", - sel_call, slice_set.size[i]); + fprintf(stderr, "failed sending slice call %d " + "size %d\n", selected_call, + slice_set.size[i]); return -1; } - // Statistics + /* More statistics */ call->vencoder->video_stats.sent_slices++; call->vencoder->video_stats.acc_sent_size += slice_set.size[i]; - if ( time > 0 ) + if ( time_delta > 0 ) call->vencoder->video_stats.avg_outbound_bps = call->vencoder->video_stats.acc_sent_size * - 8000 / time; + 8000 / time_delta; } } + maybe_send_stats(call); + return 0; } +static int prepare_for_capture() +{ + static const int fourcc_list[] = + { + VIDCAP_FOURCC_I420, + VIDCAP_FOURCC_YUY2, + VIDCAP_FOURCC_RGB32 + }; + + static const int fourcc_list_len = sizeof(fourcc_list) / sizeof(int); + int i; + static const int max_factor = 2; + int scale_factor; + + 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; + vinfo.fmt_info.fps_denominator = 1; + + for ( scale_factor = 1; scale_factor <= max_factor; scale_factor *= 2 ) + { + vinfo.fmt_info.width = vfinfo.width * scale_factor; + vinfo.fmt_info.height = vfinfo.height * scale_factor; + + for ( i = 0; i < fourcc_list_len; ++i ) + { + vinfo.fmt_info.fourcc = fourcc_list[i]; + + if ( !vidcap_format_bind(vinfo.src, &vinfo.fmt_info) ) + break; + } + + if ( i != fourcc_list_len ) + break; + } + + if ( i == fourcc_list_len ) + { + fprintf(stderr, "failed to bind format %dx%d %f fps\n", + vinfo.fmt_info.width, + vinfo.fmt_info.height, + (float)vinfo.fmt_info.fps_numerator / + (float)vinfo.fmt_info.fps_denominator); + return -1; + } + + /* Prepare various conversion buffers */ + + if ( vinfo.converted_i420_buf ) + { + free(vinfo.converted_i420_buf); + vinfo.converted_i420_buf = 0; + } + + if ( vinfo.converted_rgb_buf ) + { + free(vinfo.converted_rgb_buf); + vinfo.converted_rgb_buf = 0; + } + + vinfo.converted_i420_buf_size = + vinfo.width * vinfo.height * 3 / 2; + + vinfo.converted_rgb_buf_size = + vinfo.width * vinfo.height * 4; + + if ( vinfo.fmt_info.fourcc != VIDCAP_FOURCC_RGB32 ) + vinfo.converted_rgb_buf = malloc(vinfo.converted_rgb_buf_size); + + if ( vinfo.fmt_info.fourcc != VIDCAP_FOURCC_I420 ) + vinfo.converted_i420_buf = malloc(vinfo.converted_i420_buf_size); + + switch ( vinfo.fmt_info.fourcc ) + { + case VIDCAP_FOURCC_RGB32: + vinfo.convert_to_i420 = vidcap_rgb32_to_i420; + vinfo.convert_to_rgb32 = 0; + vinfo.scale_image = 0; + vinfo.scaled_buf = 0; + if ( vinfo.width != vinfo.fmt_info.width ) + { + vinfo.scale_image = resize_rgb32; + vinfo.scaled_buf_size = vinfo.converted_rgb_buf_size; + vinfo.scaled_buf = malloc(vinfo.scaled_buf_size); + fprintf(stderr, "scaling rgb32 images by 1/%d\n", + scale_factor); + } + if ( !vinfo.converted_i420_buf ) + return -1; + break; + case VIDCAP_FOURCC_I420: + vinfo.convert_to_i420 = 0; + vinfo.convert_to_rgb32 = vidcap_i420_to_rgb32; + vinfo.scale_image = 0; + vinfo.scaled_buf = 0; + if ( vinfo.width != vinfo.fmt_info.width ) + { + vinfo.scale_image = resize_i420; + vinfo.scaled_buf_size = vinfo.converted_i420_buf_size; + vinfo.scaled_buf = malloc(vinfo.scaled_buf_size); + fprintf(stderr, "scaling i420 images by 1/%d\n", + scale_factor); + } + if ( !vinfo.converted_rgb_buf ) + return -1; + break; + case VIDCAP_FOURCC_YUY2: + vinfo.convert_to_i420 = vidcap_yuy2_to_i420; + vinfo.convert_to_rgb32 = vidcap_yuy2_to_rgb32; + vinfo.scale_image = 0; + vinfo.scaled_buf = 0; + if ( vinfo.width != vinfo.fmt_info.width ) + { + vinfo.scale_image = resize_yuy2; + vinfo.scaled_buf_size = vinfo.width * + vinfo.height * 2; + vinfo.scaled_buf = malloc(vinfo.scaled_buf_size); + fprintf(stderr, "scaling yuy2 images by 1/%d\n", + scale_factor); + } + if ( !vinfo.converted_rgb_buf || !vinfo.converted_i420_buf ) + return -1; + break; + default: + fprintf(stderr, "do not know how to deal with vidcap " + "fourcc '%s'\n", + vidcap_fourcc_string_get(vinfo.fmt_info.fourcc)); + return -1; + } + + if ( vinfo.scale_image && !vinfo.scaled_buf ) + return -1; + + return 0; +} + +EXPORT int iaxc_set_video_prefs(unsigned int prefs) +{ + const unsigned int prefs_mask = + IAXC_VIDEO_PREF_RECV_LOCAL_RAW | + IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED | + IAXC_VIDEO_PREF_RECV_REMOTE_RAW | + IAXC_VIDEO_PREF_RECV_REMOTE_ENCODED | + IAXC_VIDEO_PREF_SEND_DISABLE | + IAXC_VIDEO_PREF_RECV_RGB32 | + IAXC_VIDEO_PREF_CAPTURE_DISABLE; + + if ( prefs & ~prefs_mask ) + return -1; + + vinfo.prefs = prefs; + + if ( test_mode ) + return 0; + + /* Not sending any video and not needing any form of + * local video implies that we do not need to capture + * video. + */ + if ( prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE || + ((prefs & IAXC_VIDEO_PREF_SEND_DISABLE) && + !(prefs & IAXC_VIDEO_PREF_RECV_LOCAL_RAW) && + !(prefs & IAXC_VIDEO_PREF_RECV_LOCAL_ENCODED)) ) + { + MUTEXLOCK(&vinfo.camera_lock); + if ( vinfo.capturing ) + { + if ( vidcap_src_capture_stop(vinfo.src) ) + fprintf(stderr, "failed vidcap_src_capture_stop\n"); + vinfo.capturing = 0; + } + MUTEXUNLOCK(&vinfo.camera_lock); + } + else + { + MUTEXLOCK(&vinfo.camera_lock); + if ( !vinfo.capturing ) + { + if ( prepare_for_capture() ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + return -1; + } + + if ( vidcap_src_capture_start(vinfo.src, + capture_callback, 0) ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + fprintf(stderr, "failed to start video capture\n"); + return -1; + } + + vinfo.capturing = 1; + } + MUTEXUNLOCK(&vinfo.camera_lock); + } + + return 0; +} + +EXPORT void iaxc_video_format_set_cap(int preferred, int allowed) +{ + vfinfo.format_preferred = preferred; + vfinfo.format_allowed = allowed; +} + +EXPORT void iaxc_video_format_get_cap(int *preferred, int *allowed) +{ + *preferred = vfinfo.format_preferred; + *allowed = vfinfo.format_allowed; +} + +EXPORT void iaxc_video_format_set(int preferred, int allowed, int framerate, + int bitrate, int width, int height, int fs) +{ + int real_pref = 0; + int real_allowed = 0; +#ifdef USE_FFMPEG + int tmp_allowed; + int i; +#endif + + // Make sure resolution is in range + if ( width < IAXC_VIDEO_MIN_WIDTH ) + width = IAXC_VIDEO_MIN_WIDTH; + else if ( width > IAXC_VIDEO_MAX_WIDTH ) + width = IAXC_VIDEO_MAX_WIDTH; + + if ( height < IAXC_VIDEO_MIN_HEIGHT ) + height = IAXC_VIDEO_MIN_HEIGHT; + else if ( height > IAXC_VIDEO_MAX_HEIGHT ) + height = IAXC_VIDEO_MAX_HEIGHT; + + vfinfo.framerate = framerate; + vfinfo.bitrate = bitrate; + vfinfo.width = width; + vfinfo.height = height; + vfinfo.fragsize = fs; + + vfinfo.format_allowed = 0; + vfinfo.format_preferred = 0; + + if ( preferred && (preferred & ~IAXC_VIDEO_FORMAT_MASK) ) + { + fprintf(stderr, "ERROR: Preferred video format invalid.\n"); + preferred = 0; + } + + /* This check: + * 1. Check if preferred is a supported and compiled in codec. If + * not, switch to the default preferred format. + * 2. Check if allowed contains a list of all supported and compiled + * in codec. If there are some unavailable codec, remove it from + * this list. + */ + + if ( preferred & IAXC_FORMAT_THEORA ) + real_pref = IAXC_FORMAT_THEORA; + +#ifdef USE_FFMPEG + if ( codec_video_ffmpeg_check_codec(preferred) ) + real_pref = preferred; +#endif + + if ( !real_pref ) + { + /* If preferred codec is not available switch to the + * supported default codec. + */ + fprintf(stderr, "Preferred codec (0x%08x) is not available. " + "Switching to default\n", preferred); + real_pref = IAXC_FORMAT_THEORA; + } + + /* Check on allowed codecs availability */ + + if ( allowed & IAXC_FORMAT_THEORA ) + real_allowed |= IAXC_FORMAT_THEORA; + +#ifdef USE_FFMPEG + /* TODO: This codec_video_ffmpeg_check_codec stuff is bogus. We + * need a standard interface in our codec wrappers that allows us to + * (1) test if a selected codec is valid and/or (2) return the set of + * available valid codecs. With that, we should be able to come up + * with a more elegant algorithm here for determining the video codec. + */ + for ( i = 0; i <= 24; i++) + { + tmp_allowed = 1 << i; + if ( (allowed & tmp_allowed) && + codec_video_ffmpeg_check_codec(tmp_allowed) ) + real_allowed |= tmp_allowed; + } +#endif + + if ( !real_pref ) + { + fprintf(stderr, "Audio-only client!\n"); + } else + { + vfinfo.format_preferred = real_pref; + + /* + * When a client use a 'preferred' format, it can force to + * use allowed formats using a non-zero value for 'allowed' + * parameter. If it is left 0, the client will use all + * capabilities set by default in this code. + */ + if ( real_allowed ) + { + vfinfo.format_allowed = real_allowed; + } + else + { +#ifdef USE_FFMPEG + vfinfo.format_allowed |= IAXC_FORMAT_H263_PLUS + | IAXC_FORMAT_H263 + | IAXC_FORMAT_MPEG4 + | IAXC_FORMAT_H264; +#endif + vfinfo.format_allowed |= IAXC_FORMAT_THEORA; + } + } +} + +void iaxc_video_params_change(int framerate, int bitrate, int width, + int height, int fs) +{ + struct iaxc_call *call; + + /* set default video params */ + if ( framerate > 0 ) + vfinfo.framerate = framerate; + if ( bitrate > 0 ) + vfinfo.bitrate = bitrate; + if ( width > 0 ) + vfinfo.width = width; + if ( height > 0 ) + vfinfo.height = height; + if ( fs > 0 ) + vfinfo.fragsize = fs; + + if ( selected_call < 0 ) + return; + + call = &calls[selected_call]; + + if ( !call || !call->vencoder ) + return; + + call->vencoder->params_changed = 1; + + if ( framerate > 0 ) + call->vencoder->framerate = framerate; + if ( bitrate > 0 ) + call->vencoder->bitrate = bitrate; + if ( width > 0 ) + call->vencoder->width = width; + if ( height > 0 ) + call->vencoder->height = height; + if ( fs > 0 ) + call->vencoder->fragsize = fs; +} + /* process an incoming video frame */ int video_recv_video(struct iaxc_call *call, int sel_call, void *encoded_video, int encoded_video_len, unsigned int ts, int format) { - static char videobuf[VIDEO_BUFSIZ]; - int outsize = VIDEO_BUFSIZ; - int ret_dec; + enum + { + max_pixels = IAXC_VIDEO_MAX_WIDTH * IAXC_VIDEO_MAX_HEIGHT, + max_yuv_buf_size = max_pixels * 3 / 2, + max_rgb_buf_size = max_pixels * 4 + }; + + static char yuv_buf[max_yuv_buf_size]; + static char rgb_buf[max_rgb_buf_size]; + + const int pixels = vfinfo.width * vfinfo.height; + const int yuv_size = pixels * 3 / 2; + const int rgb_size = pixels * 4; + ... [truncated message content] |
From: <bc...@us...> - 2007-10-22 16:28:18
|
Revision: 1221 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1221&view=rev Author: bcholew Date: 2007-10-22 09:28:22 -0700 (Mon, 22 Oct 2007) Log Message: ----------- Oops. Add missing configuration changes for libvidcap integration. Modified Paths: -------------- trunk/configure.ac trunk/lib/Makefile.am trunk/simpleclient/stresstest/Makefile.am Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-10-22 02:36:41 UTC (rev 1220) +++ trunk/configure.ac 2007-10-22 16:28:22 UTC (rev 1221) @@ -135,13 +135,17 @@ [Theora support])],, with_theora="auto") +AC_ARG_WITH(vidcap, + [AS_HELP_STRING([--without-vidcap], + [libvidcap support])],, + with_vidcap="auto") + AC_ARG_WITH(ffmpeg, [AS_HELP_STRING([--with-ffmpeg], [FFmpeg support])], FFMPEG="${with_ffmpeg}", with_ffmpeg="no") - if test ! "x$enable_clients" = "xauto"; then for client in ${enable_clients}; do case "$client" in @@ -239,6 +243,22 @@ fi AM_CONDITIONAL(THEORA, test x$has_theora = xyes) +has_vidcap=no +if test ! x$with_vidcap = xno; then + PKG_CHECK_MODULES(VIDCAP, [vidcap >= 0.1],has_vidcap=yes) + if test x$has_vidcap = xyes; then + AC_DEFINE(USE_VIDCAP, 1, [VIDCAP]) + PKG_REQUIRES="$PKG_REQUIRES vidcap" + elif test ! x$with_vidcap = xauto ; then + AC_MSG_ERROR([ + libvidcap is required to build this package! + please see http://libvidcap.sourceforge.net/ for how to + obtain a copy. + ]) + fi +fi +AM_CONDITIONAL(VIDCAP, test x$has_vidcap = xyes) + has_ffmpeg=no if test ! x$with_ffmpeg = xno; then PKG_CHECK_MODULES(FFMPEG, [libavcodec >= 51.40.3],has_ffmpeg=yes) Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-10-22 02:36:41 UTC (rev 1220) +++ trunk/lib/Makefile.am 2007-10-22 16:28:22 UTC (rev 1221) @@ -40,32 +40,24 @@ if WIN32 SRCS += $(SRCS_WIN32) libiaxclient_la_LIBADD += -lwinmm -lwsock32 +endif -if VIDEO -SRCS += $(SRCS_WIN32_VIDEO) -AM_CPPFLAGS += -I$(srcdir)/videoLib -endif VIDEO -endif WIN32 - if LINUX SRCS += $(SRCS_LINUX) - -if VIDEO -SRCS += $(SRCS_LINUX_VIDEO) endif -endif LINUX if MACOSX SRCS += $(SRCS_MACOSX) AM_LDFLAGS += -framework QuickTime -if VIDEO -SRCS += $(SRCS_MACOSX_VIDEO) endif -endif MACOSX if VIDEO SRCS += $(SRCS_VIDEO) +if VIDCAP +libiaxclient_la_LIBADD += $(VIDCAP_LIBS) +AM_CFLAGS += $(VIDCAP_CFLAGS) endif +endif if USE_LOCAL_GSM SRCS += $(SRCS_LIBGSM) @@ -153,9 +145,7 @@ SRCS_VIDEO= \ video.c \ - video.h \ - videoLib/video_grab.c \ - videoLib/video_grab.h + video.h SRCS_ILBC= \ iLBC/anaFilter.c \ @@ -186,30 +176,14 @@ winfuncs.c \ portmixer/px_win_wmme/px_win_wmme.c -SRCS_WIN32_VIDEO= \ - videoLib/win32/wingrab.cpp - SRCS_LINUX= \ portmixer/px_unix_oss/px_unix_oss.c \ unixfuncs.c -SRCS_LINUX_VIDEO= \ - videoLib/linux/libfg/capture.c \ - videoLib/linux/libfg/capture.h \ - videoLib/linux/libfg/frame.c \ - videoLib/linux/libfg/frame.h \ - videoLib/linux/libfg/libfg.h \ - videoLib/linux/linuxgrab.c - SRCS_MACOSX= \ portmixer/px_mac_core/px_mac_core.c \ unixfuncs.c -SRCS_MACOSX_VIDEO= \ - videoLib/macosx/macgrab.c \ - videoLib/macosx/vdigGrab.c \ - videoLib/macosx/vdigGrab.h - SRCS_IAX2= \ libiax2/src/md5.c \ libiax2/src/iax.c \ Modified: trunk/simpleclient/stresstest/Makefile.am =================================================================== --- trunk/simpleclient/stresstest/Makefile.am 2007-10-22 02:36:41 UTC (rev 1220) +++ trunk/simpleclient/stresstest/Makefile.am 2007-10-22 16:28:22 UTC (rev 1221) @@ -10,6 +10,7 @@ -framework AudioUnit \ -framework Carbon \ -framework CoreAudio \ + -framework QuartzCore \ -framework QuickTime endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-11-28 20:17:36
|
Revision: 1291 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1291&view=rev Author: jpgrayson Date: 2007-11-28 12:17:42 -0800 (Wed, 28 Nov 2007) Log Message: ----------- Remove svn:executable property from non-executable files. Property Changed: ---------------- trunk/contrib/win/vs2005/testcall.vcproj trunk/simpleclient/iaxcomm/QUICKSTART trunk/simpleclient/iaxcomm/iaxcomm.htb trunk/simpleclient/iaxcomm/rc/bitmaps/KP0.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP1.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP2.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP3.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP4.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP5.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP6.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP7.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP8.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KP9.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KPPOUND.bmp trunk/simpleclient/iaxcomm/rc/bitmaps/KPSTAR.bmp Property changes on: trunk/contrib/win/vs2005/testcall.vcproj ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/QUICKSTART ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/iaxcomm.htb ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP0.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP1.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP2.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP3.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP4.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP5.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP6.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP7.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP8.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KP9.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KPPOUND.bmp ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/simpleclient/iaxcomm/rc/bitmaps/KPSTAR.bmp ___________________________________________________________________ Name: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-12-20 05:16:34
|
Revision: 1320 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1320&view=rev Author: dohpaz Date: 2007-12-19 21:16:37 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Merge assorted changesets from /branches/team/elbunce: 1234 Add --enable-debug-iax option to enable libiax2 DEBUG_SUPPORT. Make ALL code enabled by DEBUG_SUPPORT in libiax2 pay attention to the current debug setting. Added an iaxclient public API iaxc_debug_iax_set to control the IAX protocol debugging state. 1277 Remove meaningless message. 1285 Add iax_seed_random() and iax_random() that will use the best random number generation I can find on a particular platform. Fall back to rand() in desperation. Lower 12 bits of rand() are not very random on many platforms, one should NEVER do a straight modulus of it's return value. Add myself to contributors for various files I've contributed to. 1298 Use consistant registration timeout. 1302 Add iaxc_register_ex() API to support passing a registration refresh time. 1304 Start register refresh up to 3 seconds before expiration, allow time for resend. 1318 Merge up to trunk of r1317. (Mostly resolving merge conflicts). 1319 Better conditionalize some debug output. Modified Paths: -------------- trunk/AUTHORS trunk/Doxyfile trunk/configure.ac trunk/doc/src/mainpage.dox trunk/lib/Makefile.am trunk/lib/audio_encode.c trunk/lib/audio_portaudio.c trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/libiax2/src/iax-client.h trunk/lib/libiax2/src/iax.c trunk/lib/video.c Modified: trunk/AUTHORS =================================================================== --- trunk/AUTHORS 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/AUTHORS 2007-12-20 05:16:37 UTC (rev 1320) @@ -9,7 +9,7 @@ Steve Underwood <st...@co...> [PLC implementation from spandsp] Jean-Denis Girard <jd....@sy...> [URL Receive implementation] Panfilov Dmitry <di...@bd...> [Basic ALSA-native audio driver] -Erik Bunce <kd...@bu...> [Assorted fixes/tweaks, Documentation] +Erik Bunce <kd...@bu...> [Assorted fixes/tweaks/features, Documentation] Mihai Balea <mihai at hates dot ms> Bill Welch <welch1820 at gmail dot com> [Project files for several MS development environments] Peter Grayson <jpg...@gm...> Modified: trunk/Doxyfile =================================================================== --- trunk/Doxyfile 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/Doxyfile 2007-12-20 05:16:37 UTC (rev 1320) @@ -200,7 +200,7 @@ ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES -SEARCH_INCLUDES = YES +SEARCH_INCLUDES = NO INCLUDE_PATH = INCLUDE_FILE_PATTERNS = PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/configure.ac 2007-12-20 05:16:37 UTC (rev 1320) @@ -46,6 +46,7 @@ AC_TYPE_SIZE_T AC_CHECK_FUNCS([vsnprintf _vsnprintf]) +AC_CHECK_FUNCS([srandomdev srandom srand48 random lrand48]) ACX_PTHREAD @@ -75,6 +76,12 @@ [Don't use local iax library])],, [enable_local_iax="yes"]) +AC_ARG_ENABLE(debug-iax, + [AS_HELP_STRING([--enable-debug-iax], + [Enable debug support in local iax library])], + enable_debug_iax2=$enableval, + enable_debug_iax2="no") + AC_ARG_ENABLE(speex_preprocess, [AS_HELP_STRING([--disable-speex-preprocess], [Turn off speex preprocessing])],, @@ -378,6 +385,7 @@ AM_CONDITIONAL(USE_CODEC_GSM, test x$has_gsm = xyes && test ! x$with_gsm = xno) AM_CONDITIONAL(USE_LOCAL_GSM, test x$enable_local_gsm = xyes) AM_CONDITIONAL(USE_LOCAL_IAX2, test x$enable_local_iax2 = xyes) +AM_CONDITIONAL(USE_DEBUG_IAX2, test x$enable_debug_iax2 = xyes) AM_CONDITIONAL(USE_LOCAL_ILBC, test x$enable_local_ilbc = xyes) AM_CONDITIONAL(LINUX, test x$OSTYPE = xLINUX) AM_CONDITIONAL(WIN32, test x$OSTYPE = xWIN32) Modified: trunk/doc/src/mainpage.dox =================================================================== --- trunk/doc/src/mainpage.dox 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/doc/src/mainpage.dox 2007-12-20 05:16:37 UTC (rev 1320) @@ -1,8 +1,7 @@ /*! \mainpage <A href="http://iaxclient.sourceforge.net/">IAXClient</A> is an Open Source library to implement the IAX protocol used by -<A href="http://www.asterisk.org/">The Asterisk Software PBX</A>. -It is licensed under the the LGPL \ref License.<BR> +<A href="http://www.asterisk.org/">The Asterisk Software PBX</A> and is licensed under the the LGPL \ref License.<BR> Although asterisk supports other VOIP protocols (including SIP, and with patches, H.323), IAX's simple, lightweight nature gives it several advantages, particularly in that it can operate easily through NAT and packet firewalls, and it is easily extensible and simple to understand. Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/Makefile.am 2007-12-20 05:16:37 UTC (rev 1320) @@ -65,7 +65,9 @@ if USE_LOCAL_IAX2 SRCS += $(SRCS_IAX2) -# AM_CFLAGS += -DDEBUG_SUPPORT +if USE_DEBUG_IAX2 +AM_CFLAGS += -DDEBUG_SUPPORT +endif USE_DEBUG_IAX2 endif USE_LOCAL_IAX2 if USE_LOCAL_ILBC Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/audio_encode.c 2007-12-20 05:16:37 UTC (rev 1320) @@ -327,7 +327,7 @@ if(iax_send_voice(call->session,format, outbuf, sizeof(outbuf) - outsize, samples-insize) == -1) { - puts("Failed to send voice!"); + fprintf(stderr, "Failed to send voice! %s\n", iax_errstr); return -1; } Modified: trunk/lib/audio_portaudio.c =================================================================== --- trunk/lib/audio_portaudio.c 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/audio_portaudio.c 2007-12-20 05:16:37 UTC (rev 1320) @@ -9,6 +9,7 @@ * Steve Kann <st...@st...> * Michael Van Donselaar <mv...@va...> * Shawn Lawrence <sha...@te...> + * Erik Bunce <kd...@bu...> * * This program is free software, distributed under the terms of * the GNU Lesser (Library) General Public License. Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/iaxclient.h 2007-12-20 05:16:37 UTC (rev 1320) @@ -751,6 +751,17 @@ EXPORT int iaxc_register(const char * user, const char * pass, const char * host); /*! + Registers the IAXClient instance with an IAX server + \param user The username to register as + \param pass The password to register with + \param host The address of the host/peer to register with + \param refresh The registration refresh period + + \return The registration id number upon success; -1 otherwise. +*/ +EXPORT int iaxc_register_ex(const char * user, const char * pass, const char * host, int refresh); + +/*! Respond to incoming call \a callNo as busy. */ EXPORT void iaxc_send_busy_on_incoming_call(int callNo); @@ -1357,6 +1368,12 @@ */ EXPORT int iaxc_push_video(void *data, unsigned int size, int fragment); +/*! + Sets the IAX debug set to \a enable. + \param enable If non-zero enable iax protocol debugging +*/ +EXPORT int iaxc_debug_iax_set(int enable); + #ifdef __cplusplus } #endif Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/iaxclient_lib.c 2007-12-20 05:16:37 UTC (rev 1320) @@ -13,6 +13,7 @@ * Mihai Balea <mihai AT hates DOT ms> * Peter Grayson <jpg...@gm...> * Bill Cholewka <bc...@gm...> + * Erik Bunce <kd...@bu...> * * This program is free software, distributed under the terms of * the GNU Lesser (Library) General Public License. @@ -744,9 +745,9 @@ for ( cur = registrations; cur != NULL; cur = cur->next ) { - // If there is less than one second before the registration is about + // If there is less than three seconds before the registration is about // to expire, renew it. - if ( iaxci_usecdiff(&now, &cur->last) > cur->refresh - 1 * 1000 *1000 ) + if ( iaxci_usecdiff(&now, &cur->last) > (cur->refresh - 3) * 1000 *1000 ) { if ( cur->session != NULL ) { @@ -758,7 +759,7 @@ iaxci_usermsg(IAXC_ERROR, "Can't make new registration session"); return; } - iax_register(cur->session, cur->host, cur->user, cur->pass, 60); + iax_register(cur->session, cur->host, cur->user, cur->pass, cur->refresh); cur->last = now; } } @@ -1240,6 +1241,11 @@ EXPORT int iaxc_register(const char * user, const char * pass, const char * host) { + iaxc_register_ex(user, pass, host, 60); +} + +EXPORT int iaxc_register_ex(const char * user, const char * pass, const char * host, int refresh) +{ struct iaxc_registration *newreg; newreg = (struct iaxc_registration *)malloc(sizeof (struct iaxc_registration)); @@ -1259,14 +1265,14 @@ } gettimeofday(&newreg->last,NULL); - newreg->refresh = 60*1000*1000; /* 60 seconds, in usecs */ + newreg->refresh = refresh; strncpy(newreg->host, host, 256); strncpy(newreg->user, user, 256); strncpy(newreg->pass, pass, 256); - /* send out the initial registration timeout 300 seconds */ - iax_register(newreg->session, host, user, pass, 300); + /* send out the initial registration with refresh seconds */ + iax_register(newreg->session, host, user, pass, refresh); /* add it to the list; */ newreg->id = ++next_registration_id; @@ -1961,3 +1967,13 @@ return 0; } +int iaxc_debug_iax_set(int enable) +{ +#ifdef DEBUG_SUPPORT + if (enable) + iax_enable_debug(); + else + iax_disable_debug(); +#endif +} + Modified: trunk/lib/libiax2/src/iax-client.h =================================================================== --- trunk/lib/libiax2/src/iax-client.h 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/libiax2/src/iax-client.h 2007-12-20 05:16:37 UTC (rev 1320) @@ -245,6 +245,10 @@ /* Fine tune jitterbuffer */ extern void iax_set_jb_target_extra( long value ); +/* Portable 'decent' random number generation */ +void iax_seed_random(); +int iax_random(); + #if defined(__cplusplus) } #endif Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/libiax2/src/iax.c 2007-12-20 05:16:37 UTC (rev 1320) @@ -276,7 +276,30 @@ s->sendto = ptr; } +void iax_seed_random() +{ +#if defined(HAVE_SRANDOMDEV) + srandomdev(); +#elif defined(HAVE_SRANDOM) + srandom((unsigned int)time(0)); +#elif define(HAVE_SRAND48) + srand48((long int)time(0)); +#else + srand((unsigned int)time(0)); +#endif +} +int iax_random() +{ +#if defined(HAVE_RANDOM) + return (int)random(); +#elif defined(HAVE_LRAND48) + return (int)lrand48(); +#else + return rand(); +#endif +} + /* This is a little strange, but to debug you call DEBU(G "Hello World!\n"); */ #if defined(WIN32) || defined(_WIN32_WCE) #define G __FILE__, __LINE__, @@ -286,7 +309,7 @@ #define DEBU __debug #if defined(WIN32) || defined(_WIN32_WCE) -static int __debug(char *file, int lineno, char *fmt, ...) +static int __debug(const char *file, int lineno, const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -298,7 +321,7 @@ return 0; } #else -static int __debug(char *file, int lineno, char *func, char *fmt, ...) +static int __debug(const char *file, int lineno, const char *func, const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -341,15 +364,12 @@ static struct iax_sched *schedq = NULL; static struct iax_session *sessions = NULL; static int callnums = 1; -static int transfer_id = 1; /* for attended transfer */ - unsigned int iax_session_get_capability(struct iax_session *s) { return s->capability; } - static int inaddrcmp(struct sockaddr_in *sin1, struct sockaddr_in *sin2) { return (sin1->sin_addr.s_addr != sin2->sin_addr.s_addr) || (sin1->sin_port != sin2->sin_port); @@ -831,10 +851,9 @@ if (ntohs(h->scallno) & IAX_FLAG_FULL) iax_showframe(f, NULL, 0, f->transfer ? - &(f->session->transfer) : - &(f->session->peeraddr), - f->datalen - - sizeof(struct ast_iax2_full_hdr)); + &(f->session->transfer) : + &(f->session->peeraddr), + f->datalen - sizeof(struct ast_iax2_full_hdr)); } #endif /* Send the frame raw */ @@ -1005,9 +1024,8 @@ DEBU(G "Started on port %d\n", portno); } - srand((unsigned int)time(0)); - callnums = rand() % 32767 + 1; - transfer_id = rand() % 32767 + 1; + iax_seed_random(); + callnums = 1 + (int)(32767.0 * (iax_random() / (RAND_MAX + 1.0))); return portno; } @@ -1400,8 +1418,11 @@ struct iax_session *s1 = new_session; memset(&ied0, 0, sizeof(ied0)); + memset(&ied1, 0, sizeof(ied1)); + int transfer_id = 1 + (int)(32767.0 * (iax_random() / (RAND_MAX + 1.0))); + /* reversed setup */ iax_ie_append_addr(&ied0, IAX_IE_APPARENT_ADDR, &s1->peeraddr); iax_ie_append_short(&ied0, IAX_IE_CALLNO, s1->peercallno); @@ -1425,12 +1446,14 @@ s0->transferpeer = s1->callno; s1->transferpeer = s0->callno; +#ifdef DEBUG_SUPPORT + if (debug) { + DEBU(G "iax_setup_transfer(%d, %d) transfer_id=%d\n", s0->callno, s1->callno, transfer_id); + DEBU(G "\torg: callno=%d peercallno=%d peeraddr=%s peerport=%d\n", s0->callno, s0->peercallno, inet_ntoa(s0->peeraddr.sin_addr), ntohs(s0->peeraddr.sin_port)); + DEBU(G "\tnew: callno=%d peercallno=%d peeraddr=%s peerport=%d\n", s1->callno, s1->peercallno, inet_ntoa(s1->peeraddr.sin_addr), ntohs(s1->peeraddr.sin_port)); + } +#endif - transfer_id++; - - if (transfer_id > 32767) - transfer_id = 1; - res = send_command(s0, AST_FRAME_IAX, IAX_COMMAND_TXREQ, 0, ied0.buf, ied0.pos, -1); if (res < 0) { return -1; Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-12-19 20:01:18 UTC (rev 1319) +++ trunk/lib/video.c 2007-12-20 05:16:37 UTC (rev 1320) @@ -9,6 +9,7 @@ * Steve Kann <st...@st...> * Mihai Balea <mihai AT hates DOT ms> * Peter Grayson <jpg...@gm...> + * Erik Bunce <kd...@bu...> * * This program is free software, distributed under the terms of * the GNU Lesser (Library) General Public License. @@ -675,8 +676,6 @@ if ( call->vformat == 0 ) { - fprintf(stderr, "video format not set for call %d\n", - selected_call); goto callback_failed; } @@ -1830,8 +1829,8 @@ ) == -1 ) { - fprintf(stderr, "Failed to send a slice, call %d, size %d\n", - selected_call, slice_set.size[i]); + fprintf(stderr, "Failed to send a slice, call %d, size %d: %s\n", + selected_call, slice_set.size[i], iax_errstr); return -1; } @@ -1842,8 +1841,8 @@ size, 0, 0) == -1 ) { fprintf(stderr, "iaxc_push_video: failed to send " - "video frame of size %d on call %d\n", - size, selected_call); + "video frame of size %d on call %d: %s\n", + size, selected_call, iax_errstr); return -1; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2008-01-24 19:09:56
|
Revision: 1332 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1332&view=rev Author: bcholew Date: 2008-01-24 11:10:01 -0800 (Thu, 24 Jan 2008) Log Message: ----------- Turn off SPEEX_EC flag. It doesn't work. Fix to allow SPEEX_EC to be undefined. Modified Paths: -------------- trunk/contrib/win/vs2005/libiaxclient.vcproj trunk/lib/audio_portaudio.c Modified: trunk/contrib/win/vs2005/libiaxclient.vcproj =================================================================== --- trunk/contrib/win/vs2005/libiaxclient.vcproj 2008-01-14 19:04:03 UTC (rev 1331) +++ trunk/contrib/win/vs2005/libiaxclient.vcproj 2008-01-24 19:10:01 UTC (rev 1332) @@ -40,7 +40,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" @@ -104,7 +104,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" RuntimeLibrary="2" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -167,7 +167,7 @@ <Tool Name="VCCLCompilerTool" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" RuntimeLibrary="2" WarningLevel="3" Detect64BitPortabilityProblems="true" @@ -239,7 +239,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\..\libogg\include;..\..\..\..\libtheora\include;..\..\..\lib\portmixer\px_common;..\..\..\..\libvidcap\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;SPEEX_EC=1;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PA_NO_DS;PA_NO_ASIO;BUILDING_DLL;LIBIAX;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" BasicRuntimeChecks="3" RuntimeLibrary="3" WarningLevel="3" Modified: trunk/lib/audio_portaudio.c =================================================================== --- trunk/lib/audio_portaudio.c 2008-01-14 19:04:03 UTC (rev 1331) +++ trunk/lib/audio_portaudio.c 2008-01-24 19:10:01 UTC (rev 1332) @@ -390,33 +390,33 @@ * it's turned back on. */ if ( !(iaxc_get_filters() & IAXC_FILTER_ECHO) ) { +#if defined(SPEEX_EC) if ( ec ) { #if defined(USE_MEC2) || defined(SPAN_EC) echo_can_free(ec); ec = NULL; #endif -#if defined(SPEEX_EC) speex_echo_state_destroy(ec); ec = NULL; + } #endif - } return; } /* we want echo cancellation */ +#if defined(SPEEX_EC) if ( !ec ) { rb_InitializeRingBuffer(&ecOutRing, EC_RING_SZ, &outRingBuf); #if defined(USE_MEC2) || defined(SPAN_EC) ec = echo_can_create(ECHO_TAIL, 0); #endif -#if defined(SPEEX_EC) ec = speex_echo_state_init(SAMPLES_PER_FRAME, ECHO_TAIL); + } #endif - } /* fill ecOutRing */ rb_WriteRingBuffer(&ecOutRing, outputBuffer, n * 2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-02-29 17:16:51
|
Revision: 1357 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1357&view=rev Author: jpgrayson Date: 2008-02-29 09:16:50 -0800 (Fri, 29 Feb 2008) Log Message: ----------- Remove all references to deprecated and meaningless SPEEX_PREPROCESS. Modified Paths: -------------- trunk/configure.ac trunk/contrib/macosx/Prefixes.h trunk/contrib/tcl/Prefixes.h trunk/contrib/win/vs2003/iaxclient_dll.vcproj trunk/contrib/win/vs2003/iaxclient_lib.vcproj trunk/simpleclient/vtestcall/vtestcall.vcproj Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-02-26 19:43:03 UTC (rev 1356) +++ trunk/configure.ac 2008-02-29 17:16:50 UTC (rev 1357) @@ -83,11 +83,6 @@ enable_debug_iax2=$enableval, enable_debug_iax2="no") -AC_ARG_ENABLE(speex_preprocess, - [AS_HELP_STRING([--disable-speex-preprocess], - [Turn off speex preprocessing])],, - [enable_speex_preprocess="yes"]) - AC_ARG_WITH(echo-can, [AS_HELP_STRING([--with-echo-can], [use echo can (span, speex or mec2) [default=speex]])], @@ -364,10 +359,6 @@ CXXFLAGS="$save_CXXFLAGS" dnl End wx xrc check -if test x$enable_speex_preprocess = xyes; then - AC_DEFINE(SPEEX_PREPROCESS, 1, [Speex preprocess]) -fi - AM_CONDITIONAL(SPAN_EC, test x$use_echo_can = xspan) if test x$use_echo_can = xspan; then AC_DEFINE(SPAN_EC, 1, [Span echo can]) Modified: trunk/contrib/macosx/Prefixes.h =================================================================== --- trunk/contrib/macosx/Prefixes.h 2008-02-26 19:43:03 UTC (rev 1356) +++ trunk/contrib/macosx/Prefixes.h 2008-02-29 17:16:50 UTC (rev 1357) @@ -3,7 +3,6 @@ #define LIBIAX //#define CODEC_ILBC 0 -#define SPEEX_PREPROCESS 1 //#define SPAN_EC 0 #define SPEEX_EC 1 //#define MEC2_EC 0 Modified: trunk/contrib/tcl/Prefixes.h =================================================================== --- trunk/contrib/tcl/Prefixes.h 2008-02-26 19:43:03 UTC (rev 1356) +++ trunk/contrib/tcl/Prefixes.h 2008-02-29 17:16:50 UTC (rev 1357) @@ -5,7 +5,6 @@ //#define CODEC_ILBC 0 -#define SPEEX_PREPROCESS 1 //#define SPAN_EC 0 #define SPEEX_EC 1 //#define MEC2_EC 0 Modified: trunk/contrib/win/vs2003/iaxclient_dll.vcproj =================================================================== --- trunk/contrib/win/vs2003/iaxclient_dll.vcproj 2008-02-26 19:43:03 UTC (rev 1356) +++ trunk/contrib/win/vs2003/iaxclient_dll.vcproj 2008-02-29 17:16:50 UTC (rev 1357) @@ -22,7 +22,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..,..\..\gsm\inc,..\..\portaudio\include,..\..\portaudio\src\common,..\..\portaudio\pablio,..\..\portmixer\px_common,..\..\libspeex\include,..\..\libiax2\src,..\..\wince" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_WINDLL;_USRDLL;BUILDING_DLL;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;_CRT_SECURE_NO_DEPRECATE;inline=__inline;strncasecmp=_strnicmp;vsnprintf=_vsnprintf" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_WINDLL;_USRDLL;BUILDING_DLL;PA_NO_DS;PA_NO_ASIO;NEWJB;LIBIAX;SPEEX_EC=1;_CRT_SECURE_NO_DEPRECATE;inline=__inline;strncasecmp=_strnicmp;vsnprintf=_vsnprintf" MinimalRebuild="FALSE" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -99,7 +99,7 @@ FavorSizeOrSpeed="2" OmitFramePointers="TRUE" AdditionalIncludeDirectories="..\..,..\..\gsm\inc,..\..\portaudio\include,..\..\portaudio\src\common,..\..\portaudio\pablio,..\..\portmixer\px_common,..\..\libspeex\include,..\..\libiax2\src,..\..\wince" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_WINDLL;_USRDLL;BUILDING_DLL;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_WINDLL;_USRDLL;BUILDING_DLL;PA_NO_DS;PA_NO_ASIO;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" StringPooling="TRUE" RuntimeLibrary="2" RuntimeTypeInfo="FALSE" Modified: trunk/contrib/win/vs2003/iaxclient_lib.vcproj =================================================================== --- trunk/contrib/win/vs2003/iaxclient_lib.vcproj 2008-02-26 19:43:03 UTC (rev 1356) +++ trunk/contrib/win/vs2003/iaxclient_lib.vcproj 2008-02-29 17:16:50 UTC (rev 1357) @@ -21,7 +21,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..,..\..\gsm\inc,..\..\portaudio\include,..\..\portaudio\src\common,..\..\portaudio\pablio,..\..\portmixer\px_common,..\..\libspeex\include,..\..\libiax2\src,..\..\wince" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;PA_NO_DS;PA_NO_ASIO;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" MinimalRebuild="FALSE" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -81,7 +81,7 @@ FavorSizeOrSpeed="2" OmitFramePointers="TRUE" AdditionalIncludeDirectories="..\..,..\..\gsm\inc,..\..\portaudio\include,..\..\portaudio\src\common,..\..\portaudio\pablio,..\..\portmixer\px_common,..\..\libspeex\include,..\..\libiax2\src,..\..\wince" - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_LIB;PA_NO_DS;PA_NO_ASIO;SPEEX_PREPROCESS=1;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_LIB;PA_NO_DS;PA_NO_ASIO;NEWJB;LIBIAX;SPEEX_EC=1;inline=__inline;strncasecmp=strnicmp;vsnprintf=_vsnprintf" StringPooling="TRUE" RuntimeLibrary="2" RuntimeTypeInfo="FALSE" Modified: trunk/simpleclient/vtestcall/vtestcall.vcproj =================================================================== --- trunk/simpleclient/vtestcall/vtestcall.vcproj 2008-02-26 19:43:03 UTC (rev 1356) +++ trunk/simpleclient/vtestcall/vtestcall.vcproj 2008-02-29 17:16:50 UTC (rev 1357) @@ -43,7 +43,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" MinimalRebuild="false" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -130,7 +130,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\lib\portaudio\pa_common;..\..\lib\speex\libspeex;".. \..\lib\portaudio\pablio";..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;SPEEX_PREPROCESS=1;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS;WITH_THREAD;_USE_MATH_DEFINES;IAXC_VIDEO;IAXC_IAX2;LIBIAX;PORTAUDIO_DIRECTX;USE_WIN_AUDIO=1;HIRES_TIME;NEWJB;PA_USE_TIMER_CALLBACK=1" MinimalRebuild="false" BasicRuntimeChecks="0" RuntimeLibrary="2" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-04-24 18:57:59
|
Revision: 1427 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1427&view=rev Author: jpgrayson Date: 2008-04-24 11:58:00 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Rename PKG_REQUIRES to PACKAGE_REQUIRES. This fixes a build problem that shows up on SuSE Linux Enterprise Desktop 10 SP1 because variable names beginning "PKG_" are forbidden. Thanks to Matt Crane for the fix! Modified Paths: -------------- trunk/configure.ac trunk/iaxclient.pc.in Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-04-24 18:49:01 UTC (rev 1426) +++ trunk/configure.ac 2008-04-24 18:58:00 UTC (rev 1427) @@ -205,12 +205,14 @@ AM_PATH_GSM(has_gsm=yes, has_gsm=no) fi +PACKAGE_REQUIRES="" + if test x$enable_video = xyes; then if test x$with_ogg != xno; then if test x$has_ogg = xyes; then AC_DEFINE(USE_OGG, 1, [OGG]) - PKG_REQUIRES="$PKG_REQUIRES ogg" + PACKAGE_REQUIRES="$PACKAGE_REQUIRES ogg" elif test x$with_ogg != xauto ; then AC_MSG_ERROR([ libogg is required to build this package! @@ -223,7 +225,7 @@ if test x$with_theora != xno; then if test x$has_theora = xyes; then AC_DEFINE(USE_THEORA, 1, [THEORA]) - PKG_REQUIRES="$PKG_REQUIRES theora" + PACKAGE_REQUIRES="$PACKAGE_REQUIRES theora" elif test x$with_theora != xauto ; then AC_MSG_ERROR([ libtheora is required to build this package! @@ -235,7 +237,7 @@ if test x$has_vidcap = xyes; then AC_DEFINE(USE_VIDCAP, 1, [VIDCAP]) - PKG_REQUIRES="$PKG_REQUIRES vidcap" + PACKAGE_REQUIRES="$PACKAGE_REQUIRES vidcap" else AC_MSG_ERROR([ libvidcap is required to build this package! @@ -247,7 +249,7 @@ if test x$with_ffmpeg != xno; then if test x$has_ffmpeg = xyes; then AC_DEFINE(USE_FFMPEG, 1, [FFMPEG]) - PKG_REQUIRES="$PKG_REQUIRES ffmpeg" + PACKAGE_REQUIRES="$PACKAGE_REQUIRES ffmpeg" elif test x$with_ffmpeg != xauto ; then AC_MSG_ERROR([ FFmpeg is required to build this package! @@ -461,7 +463,7 @@ done AC_SUBST(CLIENTS) -AC_SUBST(PKG_REQUIRES) +AC_SUBST(PACKAGE_REQUIRES) AC_CONFIG_FILES([ Makefile Modified: trunk/iaxclient.pc.in =================================================================== --- trunk/iaxclient.pc.in 2008-04-24 18:49:01 UTC (rev 1426) +++ trunk/iaxclient.pc.in 2008-04-24 18:58:00 UTC (rev 1427) @@ -9,5 +9,5 @@ Libs: -L${libdir} -liaxclient @PTHREAD_LIBS@ Libs.private: @GSM_LIBS@ Cflags: -I${includedir} -Requires.private: portaudio-2.0 speex @PKG_REQUIRES@ +Requires.private: portaudio-2.0 speex @PACKAGE_REQUIRES@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |