From: <sb...@us...> - 2007-05-07 20:11:08
|
Revision: 964 http://svn.sourceforge.net/iaxclient/?rev=964&view=rev Author: sbalea Date: 2007-05-07 13:11:10 -0700 (Mon, 07 May 2007) Log Message: ----------- Move all the content of iaxclient/ une directory up. It simplifies things, since app_conference is no longer part of this repository. Added Paths: ----------- trunk/COPYING.LIB trunk/README trunk/README.1st trunk/README.VisualStudio trunk/contrib/ trunk/lib/ trunk/simpleclient/ Removed Paths: ------------- trunk/iaxclient/COPYING.LIB trunk/iaxclient/README trunk/iaxclient/README.1st trunk/iaxclient/README.VisualStudio trunk/iaxclient/contrib/ trunk/iaxclient/lib/ trunk/iaxclient/simpleclient/ Copied: trunk/COPYING.LIB (from rev 963, trunk/iaxclient/COPYING.LIB) =================================================================== --- trunk/COPYING.LIB (rev 0) +++ trunk/COPYING.LIB 2007-05-07 20:11:10 UTC (rev 964) @@ -0,0 +1,515 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + <one line to give the library's name and a brief idea of what it +does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + Copied: trunk/README (from rev 963, trunk/iaxclient/README) =================================================================== --- trunk/README (rev 0) +++ trunk/README 2007-05-07 20:11:10 UTC (rev 964) @@ -0,0 +1,259 @@ +======================================================================= +INTRODUCTION + +This is iaxclient, a portable IAX/IAX2 protocol telephony client library. + +The library itself is in the directory "lib", located in the same +directory as this README file. + +The library is designed to build for multiple platforms, and currently +supports Linux, MacOSX, Solaris, and Win32 platforms. It is designed to handle +the "backend" of IAX telephony operations, including call handling, +network protocols, audio encoding/decoding, and audio capture/playback. +In it's future, it may be extended to also handle video encode, decode, +capture and playback. + +There are also sample clients, which use the library, included here. + +Currently, these are all stored under the "simpleclient" directory, and +there are three of them: + +simpleclient/testcall: A simple command-line oriented test program, + useful for testing and debugging. It supports + all of the same platforms as the library itself. + +simpleclient/wx: A wxWindows (see wxwindows.org) based GUI + client. This client also supports all of the + same platforms as the library itself. + +simpleclient/WinIAX: A MSVC/Win32 client. This only works with + Win32, obviously, and was contributed by + Faizan "Tili" Naqvi <fa...@ti...> + +simpleclient/tkiaxphone A command-line client, with a Tcl/Tk GUI + client that drives it. It should work on + all the platforms + + +The home page for iaxclient is "http://iaxclient.sourceforge.net/" + +Up-to-date versions of iaxclient are available from a sourceforge SVN +repository. + +CVS tarballs are also available as a link from the home page. + + +======================================================================= +LICENSES + + +The iaxclient library itself, is provided under the terms of the LGPL: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA + +The iaxclient library may also include, when compiled, works distributed +under other licenses. See those directories and source files for +specifics. These include: + + libiax: (c) 2001 Mark Spencer under the LGPL. + libiax2: (c) 2001 Mark Spencer under the LGPL. + gsm encoder: Copyright 1992, 1993, 1994 by Jutta Degener + and Carsten Bormann, Technische Universitaet Berlin + (free license, terms in gsm/copyright) + portaudio: Copyright (c) 1999-2000 Ross Bencina and Phil Burk + Modified BSD style license, in portaudio/LICENSE.txt + + sox tools: compand.c: Copyright 1999 Chris Bagwell And + Nick Bailey + resample.c: (not currently used) Copyright 1991 + Lance Norskog And Sundry Contributors, + free licenses in source files. + libspeex: (c) various authors + BSD-like license. + + +======================================================================= +CONTRIBUTORS: + +IAXCLIENT itself was contributed to by: + +Steve Kann <st...@st...> +Shawn Lawrence <sha...@te...> +Faizan "Tili" Naqvi <fa...@ti...> [Win32 VC++ build/client] +Scott Lambert <la...@la...> [FreeBSD build changes] +Michael Van Donselaar <mv...@va...> [Win32/MinGW build directions, UI changes, IAXComm phone ] +Steven Sokol <ss...@so...> [ Debugging, Blind Transfer ] +Stephan Kauss <St...@ka...> [ 32-bit alignment for IAX2 ] +Stephen Uhler <su...@su...> [Solaris build, tkiaxphone] +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] +Mihai Balea <mihai at hates dot ms> +Bill Welch <welch1820 at gmail dot com> [Project files for several MS development environments] + + +In addition to including libiax, IAXCLIENT is also based in part on code +included in test clients within libiax itself. + +The included sub-libraries, including libiax, libiax2, gsm, portaudio, +and the sox-derived filters, were developed by others, as noted in above +and in their sources. We couldn't have built IAXCLIENT (or, it would +have been much more difficult!) without the great work from these +projects. + +======================================================================= +BUILDING THE LIBRARY: + +From the "lib" directory: + Linux: type "make" using standard gnu make/gcc + FreeBSD: type "gmake" using standard gnu make/gcc + MacOSX: type "make" using Apple Dev Tools (gnu make/gcc) + Win32: type "make" using Cygwin or Cygwin and MinGW (see below) + Solaris: type "gmake" using standard gnu make/gcc + +For a shared library, make clean, then make shared. +You should receive a shared library (.dll, .so, .dylib, depending on your platform). + +Win32 Cygwin/MinGW; General: +The Win32 build has been tested using the Cygwin Environment, and the +MinGW port of the GCC compiler suite. Previously, we only supported +compilation with the cygwin _and_ mingw environments installed. We are +moving (4/20/2005) to support having the cygwin environment alone, with +cygwin's own mingw packages, instead. Compilation of the basic sample +clients (but not iaxcomm), works fine with cygwin alone. + +Cygwin Alone: +To install cygwin, download and run http://www.cygwin.com/setup.exe +You will need to install, in addition to the defaults, these packages: +gcc-mingw, gcc-mingw-core, (and for C++ clients, gcc-mingw-g++). +[please let the maintainers know if other non-default packages are +required]. + +There's lots of goodies available from cygwin. + +Once you have this installed, open the cygwin shell, and build. The +library makefiles use the -mno-cygwin option, to create native Win32 +binaries which do _not_ require cygwin.dll, or any special runtimes. + +Cygwin and MinGW: +Previously, we advocated installing cygwin environment (for Gnu Make and +such), alongside the MinGW distribution itself, as outlined here. This +may still be necessary for the Wx-Windows based clients like iaxcomm. + +http://www.mingw.org/mingwfaq.shtml#faq-usingwithcygwin for the +MinGW FAQ entry on using MinGW with Cygwin. You do need to make sure +that you install the Gnu "make" utility when you install cygwin. + +It should probably also work if you use the MSYS environment and the +MinGW compiler, but this configuration is not as well tested. + +======================================================================= +LIBRARY ORGANIZATION/DESIGN/CODING CONVENTION NOTES + +The iaxclient library is designed to be a small, simple library that +encapsulates all that you need in order to make IAX protocol telephony +programs. + +All exported symbols should be prefixed with "iaxc_", to avoid namespace +collisions/pollution in programs using this library. + +The header file "iaxclient.h" should contain those declarations needed +by client programs, but not rely on other headers (i.e. those from +included libraries). The "iaxclient-lib.h" header file is the main +header file for the library's internal declarations. + + +======================================================================= + +SAMPLE CLIENTS + +The "testcall" sample program, provided in the simpleclient/testcall +directory (above this "lib" directory) is a simple client program which +should also be portable. + +The Makefile for "testcall" will automatically build or update the +library when it it built, and the requirements for building testcall are +the same as for the library itself. + + +See README files in the other sample clients for directions for building +these. + +========================================================================= + +CODECS + +The codec API is pretty straightforward; just use any of the existing +available codecs as a guide. The only place in the main code they +interface is the switch in audio_encode.c:create_codec + +ILBC + +Lots of people are enamored with iLBC lately, so I put this together for +them. Personally, I prefer speex, because it seems to sound just as +good, but has no license restrictions. With proper compilation options +(i.e. use it's SSE optimizations), it can be made even faster than the +iLBC reference. + +There is glue to build iaxclient with iLBC available in the source, but +the source to iLBC itself is _not_ included. This is primarily because +of the licensing issues. + +I'm not a lawyer, but it appears that iLBC's license would make it +impossible to build iaxclient and link it with a GPL front-end, meaning +a library built this way is no longer something that could be considered +LGPL. However, you could probably build a client using iLBC and +distribute it legally, if you follow the rules in the LGPL. So, this is +an issue for you and your legal counsel to figure out. + +To actually build iaxclient with iLBC, though is very easy. Just make a +directory under lib named iLBC, and drop the iLBC reference sources into +it, then change CODEC_ILBC=0 to CODEC_ILBC=1 in the Makefile, and away +you go. + +The source presently is set up for the draft-5 version. + +The iLBC license and software can be found here +http://www.ilbcfreeware.org/software.html +(sources are also in asterisk). + +========================================================================= + +AUDIO DRIVERS + +The supported audio driver for iaxclient is audio_portaudio; which uses +a snapshot of the portaudio v19 library (included, with some minor +modifications) to access native audio services on each platform. +It includes support for Windows (WMME), Linux (OSS, ALSA, JACK) and +MacOS X (CoreAudio). + +There is a (presently broken) WMME-native audio driver which was used +during early development, and is no longer maintained. You probably +don't want to use this. + +All three Linux PortAudio drivers are enabled by default and supporting +libraries need to be present on the system in order to build. If you +prefer to disable one or more of the drivers, use the USE_PA_* options +in the main Makefile. + +Dmitry Panfilov has contributed a basic native ALSA driver for Linux. +Not all features are supported with this driver. It is not compiled in +by default, because this would add alsa libraries to the build and link +dependencies -- and we don't have a good way of communicating that to +applications (like pkg-config stuff, etc). To use it, though, you just +need to change AUDIO_ALSA=0 to AUDIO_ALSA=1 in the Makefile. + + Copied: trunk/README.1st (from rev 963, trunk/iaxclient/README.1st) =================================================================== --- trunk/README.1st (rev 0) +++ trunk/README.1st 2007-05-07 20:11:10 UTC (rev 964) @@ -0,0 +1,37 @@ +The README file is outdated. It pertains to audio only version of +iaxclient. Many things have happened since then, and at some point +I will update it. But in the meanwhile, here's what you need to know + +We now have working video. The video frame grabber is based on the +Tipic Video Library (http://sourceforge.net/projects/tipicforge/). +The iax support for video is also based on Tipic's project, but with +extensive modifications in order to make it work well. + +Video codecs: I am testing with Theora and an H.264 implementation +from Vanguard Software Solutions. If you don't have it, you will have +to disable it in the Makefile. Some people have had some luck with +ffmpeg, if you manage to get it to work, let me know and I'll add it +in. If you plan on using Theora, I suggest browsing codec_theora.c, +there are some implementation details there. + +Test apps: they're all in iaxclient/simpleclient. You will need +SDL (http://www.libsdl.org/index.php) in order to build them. +- videotest: Simple app that exercises the frame grabber. It displays + video from your camera in an SDL window and calculates + the frame rate +- vtestcall: Video/Audio call between two end points. + +Building the library: you need libtheora and libogg on your system. +A copy of each is included with this version of iaxclient, but you will +have to build them separately. Also, make sure you disable VSS H.264 +in the Makefiles, unless you actually have the library. Finally, this +build on Mac and Linux, but NOT on windows. + +I welcome any and all patches, suggestions and comments. Please feel +free to comment on the iaxclient development mailing list. This is still +very much in development, so don't expect everything to work out of the +box. + +Enjoy + +Mihai Balea <mihai at hates dot ms> Copied: trunk/README.VisualStudio (from rev 963, trunk/iaxclient/README.VisualStudio) =================================================================== --- trunk/README.VisualStudio (rev 0) +++ trunk/README.VisualStudio 2007-05-07 20:11:10 UTC (rev 964) @@ -0,0 +1,10 @@ +To build under MS Visual Studio + +1) Set environment variables: +%DXSDK_DIR% - points to DirectX SDK +%PSDK_DIR% - points to Platform SDK + +2) Open "Solution" file: +lib/iaxclient.sln + +3) Build "Solution" Copied: trunk/contrib (from rev 963, trunk/iaxclient/contrib) Deleted: trunk/iaxclient/COPYING.LIB =================================================================== --- trunk/iaxclient/COPYING.LIB 2007-05-07 19:35:54 UTC (rev 963) +++ trunk/iaxclient/COPYING.LIB 2007-05-07 20:11:10 UTC (rev 964) @@ -1,515 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. -^L - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. -^L - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. -^L - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. -^L - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. -^L - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the term... [truncated message content] |
From: <sb...@us...> - 2007-05-08 13:41:55
|
Revision: 968 http://svn.sourceforge.net/iaxclient/?rev=968&view=rev Author: sbalea Date: 2007-05-08 06:41:57 -0700 (Tue, 08 May 2007) Log Message: ----------- Moving the Mac OSX project files to contrib Added Paths: ----------- trunk/contrib/macosx/ Removed Paths: ------------- trunk/lib/macosx/ Copied: trunk/contrib/macosx (from rev 967, trunk/lib/macosx) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-06-14 15:29:28
|
Revision: 1038 http://svn.sourceforge.net/iaxclient/?rev=1038&view=rev Author: jpgrayson Date: 2007-06-14 08:29:29 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Merge branches/team/pete/autobranch 983:1037 into trunk. This brings the autotools build system into the iaxclient trunk. The package and library versions are maintained in configure.ac. The autogen.sh script must be run to generate (amongst other things) the configure script. After that, the standard ./configure && make && make install. Portaudio is no longer in the iaxclient tree. Portmixer demands that you use a relatively recent v19 branch version of portaudio. Gsm support is now optional. The clients need work. Modified Paths: -------------- trunk/README trunk/lib/audio_encode.c trunk/lib/audio_encode.h trunk/lib/audio_portaudio.c trunk/lib/codec_alaw.c trunk/lib/codec_alaw.h trunk/lib/codec_ffmpeg.c trunk/lib/codec_ffmpeg.h trunk/lib/codec_gsm.c trunk/lib/codec_gsm.h trunk/lib/codec_ilbc.c trunk/lib/codec_ilbc.h trunk/lib/codec_speex.c trunk/lib/codec_speex.h trunk/lib/codec_theora.c trunk/lib/codec_theora.h trunk/lib/codec_ulaw.c trunk/lib/codec_ulaw.h trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/iaxclient_lib.h trunk/lib/libiax2/src/iax.c trunk/lib/portmixer/px_common/portmixer.h trunk/lib/portmixer/px_mac_core/px_mac_core.c trunk/lib/unixfuncs.c trunk/lib/video.c trunk/lib/videoLib/linux/linuxgrab.c trunk/lib/videoLib/video_grab.c trunk/lib/videoLib/video_grab.h trunk/lib/videoLib/win32/wingrab.cpp trunk/lib/winfuncs.c trunk/simpleclient/iaxcomm/accounts.cc trunk/simpleclient/iaxcomm/devices.cc trunk/simpleclient/iaxcomm/directory.cc trunk/simpleclient/iaxcomm/frame.cc trunk/simpleclient/iaxcomm/main.cc trunk/simpleclient/iaxphone/iaxphone.h trunk/simpleclient/testcall/testcall.c trunk/simpleclient/vtestcall/vtestcall.c Added Paths: ----------- trunk/AUTHORS trunk/ChangeLog trunk/INSTALL trunk/Makefile.am trunk/NEWS trunk/autogen.sh trunk/clean.sh trunk/configure.ac trunk/iaxclient.pc.in trunk/lib/Makefile.am trunk/lib/ringbuffer.c trunk/lib/ringbuffer.h trunk/lib/video.h trunk/lib/videoLib/macosx/macgrab.c trunk/m4/ trunk/m4/acx_pthread.m4 trunk/m4/gsm.m4 trunk/m4/iax.m4 trunk/m4/iax2.m4 trunk/m4/ogg.m4 trunk/m4/portaudio.m4 trunk/m4/speex.m4 trunk/m4/theora.m4 trunk/m4/wxwin.m4 trunk/simpleclient/Makefile.am trunk/simpleclient/WinIAX/Makefile.am trunk/simpleclient/iaxcomm/Makefile.am trunk/simpleclient/iaxphone/Makefile.am trunk/simpleclient/testcall/Makefile.am trunk/simpleclient/tkphone/Makefile.am trunk/simpleclient/vtestcall/Makefile.am trunk/simpleclient/wx/Makefile.am Removed Paths: ------------- trunk/README.1st trunk/lib/Makefile trunk/lib/TODO trunk/lib/portaudio/ trunk/lib/videoLib/macosx/macgrab.cpp trunk/lib/videoLib/win32/BaseClasses/Debug_Unicode/ trunk/m4/acx_pthread.m4 trunk/m4/gsm.m4 trunk/m4/iax.m4 trunk/m4/iax2.m4 trunk/m4/ogg.m4 trunk/m4/portaudio.m4 trunk/m4/speex.m4 trunk/m4/theora.m4 trunk/simpleclient/iaxcomm/Makefile trunk/simpleclient/iaxphone/Makefile trunk/simpleclient/testcall/Makefile trunk/simpleclient/tkphone/Makefile trunk/simpleclient/vtestcall/Makefile trunk/simpleclient/win32/simpleiax.dsw trunk/simpleclient/win32/simpleiax.ncb trunk/simpleclient/win32/simpleiax.opt trunk/simpleclient/win32/simpleiax.plg trunk/simpleclient/wx/Makefile Copied: trunk/AUTHORS (from rev 1035, branches/team/pete/autobranch/AUTHORS) =================================================================== --- trunk/AUTHORS (rev 0) +++ trunk/AUTHORS 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,14 @@ +Steve Kann <st...@st...> +Shawn Lawrence <sha...@te...> +Faizan "Tili" Naqvi <fa...@ti...> [Win32 VC++ build/client] +Scott Lambert <la...@la...> [FreeBSD build changes] +Michael Van Donselaar <mv...@va...> [Win32/MinGW build directions, UI changes, IAXComm phone ] +Steven Sokol <ss...@so...> [ Debugging, Blind Transfer ] +Stephan Kauss <St...@ka...> [ 32-bit alignment for IAX2 ] +Stephen Uhler <su...@su...> [Solaris build, tkiaxphone] +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] +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...> Copied: trunk/ChangeLog (from rev 1035, branches/team/pete/autobranch/ChangeLog) =================================================================== --- trunk/ChangeLog (rev 0) +++ trunk/ChangeLog 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,2 @@ + + Copied: trunk/INSTALL (from rev 1035, branches/team/pete/autobranch/INSTALL) =================================================================== --- trunk/INSTALL (rev 0) +++ trunk/INSTALL 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + Copied: trunk/Makefile.am (from rev 1035, branches/team/pete/autobranch/Makefile.am) =================================================================== --- trunk/Makefile.am (rev 0) +++ trunk/Makefile.am 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,8 @@ +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = lib simpleclient + +EXTRA_DIST = contrib + +dist-hook: + find $(distdir) -name ".svn" -type d -print0 | xargs -0 rm -rf Copied: trunk/NEWS (from rev 1035, branches/team/pete/autobranch/NEWS) =================================================================== --- trunk/NEWS (rev 0) +++ trunk/NEWS 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,2 @@ + + Modified: trunk/README =================================================================== --- trunk/README 2007-06-14 15:16:42 UTC (rev 1037) +++ trunk/README 2007-06-14 15:29:29 UTC (rev 1038) @@ -7,8 +7,8 @@ directory as this README file. The library is designed to build for multiple platforms, and currently -supports Linux, MacOSX, Solaris, and Win32 platforms. It is designed to handle -the "backend" of IAX telephony operations, including call handling, +supports Linux, MacOSX, Solaris, and Win32 platforms. It is designed to +handle the "backend" of IAX telephony operations, including call handling, network protocols, audio encoding/decoding, and audio capture/playback. In it's future, it may be extended to also handle video encode, decode, capture and playback. @@ -19,34 +19,34 @@ there are three of them: simpleclient/testcall: A simple command-line oriented test program, - useful for testing and debugging. It supports - all of the same platforms as the library itself. + useful for testing and debugging. It supports + all of the same platforms as the library itself. -simpleclient/wx: A wxWindows (see wxwindows.org) based GUI - client. This client also supports all of the - same platforms as the library itself. +simpleclient/vtestcall: Like testcall, but for testing and debugging + video calls. Requires SDL. -simpleclient/WinIAX: A MSVC/Win32 client. This only works with - Win32, obviously, and was contributed by - Faizan "Tili" Naqvi <fa...@ti...> +simpleclient/wx: A wxWindows (see wxwindows.org) based GUI + client. This client also supports all of the + same platforms as the library itself. -simpleclient/tkiaxphone A command-line client, with a Tcl/Tk GUI - client that drives it. It should work on - all the platforms +simpleclient/WinIAX: A MSVC/Win32 client. This only works with + Win32, obviously, and was contributed by + Faizan "Tili" Naqvi <fa...@ti...> +simpleclient/tkiaxphone A command-line client, with a Tcl/Tk GUI + client that drives it. It should work on + all the platforms + The home page for iaxclient is "http://iaxclient.sourceforge.net/" Up-to-date versions of iaxclient are available from a sourceforge SVN repository. -CVS tarballs are also available as a link from the home page. - ======================================================================= LICENSES - The iaxclient library itself, is provided under the terms of the LGPL: This library is free software; you can redistribute it and/or @@ -83,8 +83,9 @@ free licenses in source files. libspeex: (c) various authors BSD-like license. + libtheora: (c) 2002-2005 Xiph.org Foundation + BSD-like license. - ======================================================================= CONTRIBUTORS: @@ -103,6 +104,7 @@ Panfilov Dmitry <di...@bd...> [Basic ALSA-native audio driver] 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...> In addition to including libiax, IAXCLIENT is also based in part on code @@ -117,49 +119,16 @@ ======================================================================= BUILDING THE LIBRARY: -From the "lib" directory: - Linux: type "make" using standard gnu make/gcc - FreeBSD: type "gmake" using standard gnu make/gcc - MacOSX: type "make" using Apple Dev Tools (gnu make/gcc) - Win32: type "make" using Cygwin or Cygwin and MinGW (see below) - Solaris: type "gmake" using standard gnu make/gcc + ./configure + make + make install -For a shared library, make clean, then make shared. -You should receive a shared library (.dll, .so, .dylib, depending on your platform). +See INSTALL for generic information about the building on Unix-like +systems. -Win32 Cygwin/MinGW; General: -The Win32 build has been tested using the Cygwin Environment, and the -MinGW port of the GCC compiler suite. Previously, we only supported -compilation with the cygwin _and_ mingw environments installed. We are -moving (4/20/2005) to support having the cygwin environment alone, with -cygwin's own mingw packages, instead. Compilation of the basic sample -clients (but not iaxcomm), works fine with cygwin alone. +See README.VisualStudio for information about how to build with +Microsoft Visual Studio. -Cygwin Alone: -To install cygwin, download and run http://www.cygwin.com/setup.exe -You will need to install, in addition to the defaults, these packages: -gcc-mingw, gcc-mingw-core, (and for C++ clients, gcc-mingw-g++). -[please let the maintainers know if other non-default packages are -required]. - -There's lots of goodies available from cygwin. - -Once you have this installed, open the cygwin shell, and build. The -library makefiles use the -mno-cygwin option, to create native Win32 -binaries which do _not_ require cygwin.dll, or any special runtimes. - -Cygwin and MinGW: -Previously, we advocated installing cygwin environment (for Gnu Make and -such), alongside the MinGW distribution itself, as outlined here. This -may still be necessary for the Wx-Windows based clients like iaxcomm. - -http://www.mingw.org/mingwfaq.shtml#faq-usingwithcygwin for the -MinGW FAQ entry on using MinGW with Cygwin. You do need to make sure -that you install the Gnu "make" utility when you install cygwin. - -It should probably also work if you use the MSYS environment and the -MinGW compiler, but this configuration is not as well tested. - ======================================================================= LIBRARY ORGANIZATION/DESIGN/CODING CONVENTION NOTES Deleted: trunk/README.1st =================================================================== --- trunk/README.1st 2007-06-14 15:16:42 UTC (rev 1037) +++ trunk/README.1st 2007-06-14 15:29:29 UTC (rev 1038) @@ -1,37 +0,0 @@ -The README file is outdated. It pertains to audio only version of -iaxclient. Many things have happened since then, and at some point -I will update it. But in the meanwhile, here's what you need to know - -We now have working video. The video frame grabber is based on the -Tipic Video Library (http://sourceforge.net/projects/tipicforge/). -The iax support for video is also based on Tipic's project, but with -extensive modifications in order to make it work well. - -Video codecs: I am testing with Theora and an H.264 implementation -from Vanguard Software Solutions. If you don't have it, you will have -to disable it in the Makefile. Some people have had some luck with -ffmpeg, if you manage to get it to work, let me know and I'll add it -in. If you plan on using Theora, I suggest browsing codec_theora.c, -there are some implementation details there. - -Test apps: they're all in iaxclient/simpleclient. You will need -SDL (http://www.libsdl.org/index.php) in order to build them. -- videotest: Simple app that exercises the frame grabber. It displays - video from your camera in an SDL window and calculates - the frame rate -- vtestcall: Video/Audio call between two end points. - -Building the library: you need libtheora and libogg on your system. -A copy of each is included with this version of iaxclient, but you will -have to build them separately. Also, make sure you disable VSS H.264 -in the Makefiles, unless you actually have the library. Finally, this -build on Mac and Linux, but NOT on windows. - -I welcome any and all patches, suggestions and comments. Please feel -free to comment on the iaxclient development mailing list. This is still -very much in development, so don't expect everything to work out of the -box. - -Enjoy - -Mihai Balea <mihai at hates dot ms> Copied: trunk/autogen.sh (from rev 1035, branches/team/pete/autobranch/autogen.sh) =================================================================== --- trunk/autogen.sh (rev 0) +++ trunk/autogen.sh 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,65 @@ +#!/bin/sh -e + +error() +{ + echo "error: $@" + exit 1 +} + +invoke() +{ + echo "$@" + $@ +} + +echo -n "checking for aclocal... " +for ACLOCAL in aclocal nope; do + ($ACLOCAL --version) < /dev/null > /dev/null 2>&1 && break +done +echo $ACLOCAL +if test x$ACLOCAL = xnope; then + error "aclocal must be installed" +fi + +echo -n "checking for autoheader... " +for AUTOHEADER in autoheader nope; do + ($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 && break +done +echo $AUTOHEADER +if test x$AUTOHEADER = xnope; then + error "autoheader must be installed" +fi + +echo -n "checking for autoconf... " +for AUTOCONF in autoconf nope; do + ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 && break +done +echo $AUTOCONF +if test x$AUTOCONF = xnope; then + error "autoconf must be installed" +fi + +echo -n "checking for libtoolize... " +for LIBTOOLIZE in libtoolize glibtoolize nope; do + ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break +done +echo $LIBTOOLIZE +if test x$LIBTOOLIZE = xnope; then + error "libtoolize must be installed" +fi + +echo -n "checking for automake... " +for AUTOMAKE in automake nope; do + ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 && break +done +echo $AUTOMAKE +if test x$AUTOMAKE = xnope; then + error "automake must be installed" +fi + +invoke $ACLOCAL -I m4 +invoke $AUTOHEADER +invoke $AUTOCONF --force +invoke $LIBTOOLIZE --automake --copy --force +invoke $AUTOMAKE --add-missing --copy + Copied: trunk/clean.sh (from rev 1035, branches/team/pete/autobranch/clean.sh) =================================================================== --- trunk/clean.sh (rev 0) +++ trunk/clean.sh 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,23 @@ +#!/bin/sh + +rm -rf \ + aclocal.m4 \ + autom4te.cache \ + compile \ + config.guess \ + config.h.in \ + config.h.in~ \ + config.sub \ + configure \ + depcomp \ + install-sh \ + ltmain.sh \ + missing + +for d in . lib simpleclient simpleclient/iaxcomm simpleclient/iaxphone \ + simpleclient/testcall simpleclient/tkphone simpleclient/WinIAX \ + simpleclient/wx +do + rm $d/Makefile.in +done + Copied: trunk/configure.ac (from rev 1035, branches/team/pete/autobranch/configure.ac) =================================================================== --- trunk/configure.ac (rev 0) +++ trunk/configure.ac 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,377 @@ +dnl Copyright (C) 2004-2005 Mikael Magnusson <mi...@us...> + +AC_PREREQ(2.59) + +dnl Package version +m4_define(IAXC_MAJOR, [2]) +m4_define(IAXC_MINOR, [0]) +m4_define(IAXC_MICRO, [0]) +m4_define(IAXC_EXTRA, [-svn]) + +AC_INIT(iaxclient, IAXC_MAJOR.IAXC_MINOR.IAXC_MICRO[]IAXC_EXTRA, [jpg...@gm...]) + +AC_CONFIG_SRCDIR([lib/iaxclient.h]) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([foreign -Wall]) +AM_MAINTAINER_MODE + +dnl Libtool library version +IAXC_LT_CURRENT=1 +IAXC_LT_REVISION=0 +IAXC_LT_AGE=0 + +AC_SUBST(IAXC_LT_CURRENT) +AC_SUBST(IAXC_LT_REVISION) +AC_SUBST(IAXC_LT_AGE) + +AC_CANONICAL_HOST + +AC_GNU_SOURCE + +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_GCC_TRADITIONAL +AC_PROG_CXX +AC_PROG_INSTALL +AC_LIBTOOL_WIN32_DLL +AC_PROG_LIBTOOL + +AC_HEADER_STDC +AC_HEADER_STDBOOL +AC_HEADER_TIME +AC_CHECK_HEADERS([sys/time.h varargs.h sys/socket.h]) + +AC_C_CONST +AC_C_INLINE +AC_C_VOLATILE +AC_TYPE_PID_T +AC_TYPE_SIZE_T + +AC_CHECK_FUNCS([vsnprintf _vsnprintf]) + +ACX_PTHREAD + +AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no) + +if test x"$have_pkg_config" = "xno"; then + AC_MSG_ERROR(pkg-config is required to install this program) +fi + +PKG_PROG_PKG_CONFIG + +AC_PATH_PROG([WISH],[wish]) + + +dnl Default CFLAGS and CXXFLAGS if unset +CFLAGS=${CFLAGS-"-O2 -g -Wall --std=gnu99"} +CXXFLAGS=${CXXFLAGS-"-O2 -g -Wall"} + +# AC_ARG_ENABLE saves the option's argument in enable_FEATURE +AC_ARG_ENABLE(local-gsm, + [AS_HELP_STRING([--enable-local-gsm], + [Use local gsm library [default=auto]])],, + [enable_local_gsm="auto"]) + +AC_ARG_ENABLE(local-iax, + [AS_HELP_STRING([--disable-local-iax], + [Don't use local iax library])],, + [enable_local_iax="yes"]) + +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]])], + use_echo_can=$withval, + use_echo_can="speex") + +AC_ARG_ENABLE(clients, + [AS_HELP_STRING([--enable-clients], + [Select clients (all iaxcomm iaxphone testcall tkphone vtestcall WinIAX wx) [default=auto]])],, + enable_clients="auto") + +AC_ARG_WITH(ilbc, + [AS_HELP_STRING([--with-ilbc], + [Enable iLBC support (You need to place the iLBC reference sources in lib/iLBC) [default=auto]])],, + with_ilbc="auto") + +case "$with_ilbc" in + yes) + enable_local_ilbc=yes ;; + no) + enable_local_ilbc=no ;; + auto) + AC_MSG_CHECKING([for iLBC reference sources in lib/iLBC]) + if test -r lib/iLBC/iLBC_encode.c; then + enable_local_ilbc=yes + else + enable_local_ilbc=no + fi + AC_MSG_RESULT([$enable_local_ilbc]) ;; + + *) + AC_MSG_ERROR([bad value ${with_ilbc} for --with-ilbc]) ;; +esac + +AC_ARG_WITH(wish, + [AS_HELP_STRING([--with-wish], + [Path to Tcl command language interpreter])], + WISH="${with_wish}", + with_wish="auto") + +if test ! "x$enable_clients" = "xauto"; then + for client in ${enable_clients}; do + case "$client" in + iaxcomm | iaxphone | testcall | tkphone | vtestcall | WinIAX | wx) + clients="$clients $client" ;; + all | yes) + clients="iaxcomm iaxphone testcall tkphone vtestcall WinIAX wx" + break ;; + none | no) + clients="" + break ;; + *) + AC_MSG_ERROR(bad value ${client} for --enable-clients) ;; + esac + done +fi + +AM_OPTIONS_WXCONFIG + +case $host_os in + *mingw32*|*cygwin* ) + OSTYPE=WIN32 + AC_DEFINE(WIN32,,[mingw or cygwin]);; + + *linux* ) + OSTYPE=LINUX + AC_DEFINE(LINUX,,[linux]);; + + *darwin* ) + OSTYPE=MACOSX + AC_DEFINE(MACOSX,,[darwin]);; + + * ) + AC_MSG_WARN([OSTYPE cannot be detected, assuming Linux ($host_os)]) + OSTYPE=LINUX + AC_DEFINE(LINUX,,[linux]);; +esac + +AC_SUBST(OSTYPE) + +PKG_CHECK_MODULES(PORTAUDIO, [portaudio-2.0 >= 19],,AC_MSG_ERROR([ + portaudio is required to build this package! + please see http://www.portaudio.com/ for how to + obtain a copy. +])) + +has_gsm=no +if test x$enable_local_gsm = xyes; then + has_gsm=yes + GSM_CFLAGS='-I$(top_srcdir)/lib/gsm/inc' +else + AM_PATH_GSM(has_gsm=yes, has_gsm=no) +fi + +PKG_CHECK_MODULES(OGG, [ogg >= 1.1.3],,AC_MSG_ERROR([ + libogg is required to build this package! + please see http://www.xiph.org/ for how to + obtain a copy. +])) + +PKG_CHECK_MODULES(SPEEX, [speex >= 1.2],,AC_MSG_ERROR([ + speex is required to build this package! + please see http://www.xiph.org/ for how to + obtain a copy. +])) + +PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7],,AC_MSG_ERROR([ + libtheora is required to build this package! + please see http://www.xiph.org/ for how to + obtain a copy. +])) + +PKG_CHECK_MODULES(SDL, [sdl >= 1.2], has_sdl=yes, has_sdl=no) +PKG_CHECK_MODULES(GTK2, [gtk >= 2.0], has_gtk2=yes, has_gtk2=no) + +has_iax2=no +if test ! x$enable_local_iax = xyes; then + AM_PATH_IAX2(0.2.3,has_iax2=yes,has_iax2=no) +fi + +if test x$has_iax2 = xno && test ! x$enable_local_iax = xno; then + has_iax2=yes + enable_local_iax2=yes + IAX2_CFLAGS='-I$(top_srcdir)/lib/libiax2/src -DLIBIAX' + IAX2_LIBS="" + IAX2_CONFIG="" +fi + +has_wx="no" +AM_PATH_WXCONFIG(2.6.0, [has_wx="2.6"], + [AM_PATH_WXCONFIG(2.4.0, [has_wx="2.4"])]) +AM_PATH_WXRC() + +dnl Begin wx xrc check +save_CPPFLAGS="$CPPFLAGS" +save_CXXFLAGS="$CXXFLAGS" +save_LIBS="$LIBS" + +CPPFLAGS="$WX_CPPFLAGS" +CXXFLAGS="$WX_CXXFLAGS_ONLY" + +AC_LANG_PUSH(C++) +if test ! x$has_wx = xno; then + AC_CHECK_HEADER(wx/xrc/xmlres.h,has_wx_xrc=yes, + [AC_MSG_WARN([Can't find wx/xrc/xml.h]) + has_wx_xrc=no]) +fi + +if test x$has_wx_xrc = xyes; then + +dnl Check for debug libraries + wx_lib_prefix= + + case $WX_CXXFLAGS in + *__WXDEBUG__*) wx_lib_prefix=d + esac + + has_wx_xrc=xno + AC_MSG_CHECKING([for wx xrc library]) + for wx_xrc_lib in " " "-lwx_gtk${wx_lib_prefix}_xrc-2.4" "-lwx_msw${wx_lib_prefix}_xrc-2.4" "-lwxxrc"; do + LIBS="$wx_xrc_lib $WX_LIBS $save_LIBS" + AC_LINK_IFELSE([ +#include <wx/xrc/xmlres.h> +int main() +{ + wxXmlResource *res; + res->Get(); + return 0; +}],[has_wx_xrc=yes + WX_XRC_LIBS="$wx_xrc_lib" + break]) + done + + AC_MSG_RESULT([$has_wx_xrc ($WX_XRC_LIBS)]) +fi +AC_SUBST(WX_XRC_LIBS) + +AC_LANG_POP(C++) + +LIBS="$save_LIBS" +CPPFLAGS="$save_CPPFLAGS" +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]) +fi + +if test x$use_echo_can = xspeex; then + AC_DEFINE(SPEEX_EC, 1, [Speex echo can]) +fi + +if test x$use_echo_can = xmec2; then + AC_DEFINE(MEC2_EC, 1, [Mec echo can]) +fi + +if test x$enable_local_ilbc = xyes; then + AC_DEFINE(CODEC_ILBC,,[Enable ILBC support]) +fi + +if test x$has_gsm = xyes && test ! x$with_gsmlibraries != xno; then + AC_DEFINE(CODEC_GSM,,[Enable GSM support]) +fi + +AM_CONDITIONAL(USE_CODEC_GSM, test x$has_gsm = xyes && test ! x$with_gsmlibraries != 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_LOCAL_ILBC, test x$enable_local_ilbc = xyes) +AM_CONDITIONAL(LINUX, test x$OSTYPE = xLINUX) +AM_CONDITIONAL(WIN32, test x$OSTYPE = xWIN32) +AM_CONDITIONAL(MACOSX, test x$OSTYPE = xMACOSX) + +# Autodetect clients +if test "x$enable_clients" = "xauto"; then + clients="$clients testcall" + + if test ! x$has_wx = xno; then + clients="$clients iaxphone wx" + + if test x$has_wx_xrc = xyes; then + clients="$clients iaxcomm" + fi + fi + + if test x$has_sdl = xyes; then + clients="$clients vtestcall" + fi + + if test x$OSTYPE = xWIN32; then + clients="$clients WinIAX" + fi + + if test ! x$WISH = x; then + clients="$clients tkphone" + fi +fi + +AC_CONFIG_FILES([ +Makefile +lib/Makefile +simpleclient/Makefile +iaxclient.pc +]) + +for client in $clients +do + case "$client" in + testcall) + AC_CONFIG_FILES([simpleclient/testcall/Makefile]) + CLIENTS="$CLIENTS $client";; + + vtestcall) + if ! test x$has_sdl = xyes; then + AC_MSG_ERROR([vtestcall requires SDL]) + fi + AC_CONFIG_FILES([simpleclient/vtestcall/Makefile]) + CLIENTS="$CLIENTS $client";; + + iaxcomm) + AC_CONFIG_FILES([simpleclient/iaxcomm/Makefile]) + CLIENTS="$CLIENTS $client";; + + iaxphone) + AC_CONFIG_FILES([simpleclient/iaxphone/Makefile]) + CLIENTS="$CLIENTS $client";; + + tkphone) + AC_CONFIG_FILES([simpleclient/tkphone/Makefile]) + CLIENTS="$CLIENTS $client";; + + WinIAX) + AC_CONFIG_FILES([simpleclient/WinIAX/Makefile]) + CLIENTS="$CLIENTS $client";; + + wx) + AC_CONFIG_FILES([simpleclient/wx/Makefile]) + CLIENTS="$CLIENTS $client";; + + *) ;; + esac +done + +AC_SUBST(CLIENTS) + +AC_OUTPUT + +AC_MSG_NOTICE([Configured clients: $clients]) Copied: trunk/iaxclient.pc.in (from rev 1035, branches/team/pete/autobranch/iaxclient.pc.in) =================================================================== --- trunk/iaxclient.pc.in (rev 0) +++ trunk/iaxclient.pc.in 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=@libdir@ +includedir=${prefix}/include + +Name: iaxclient +Description: Inter-Asterisk eXchange Client Library +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -liaxclient @PTHREAD_LIBS@ +Cflags: -I${includedir} +Requires: portaudio-2.0 speex theora ogg + Deleted: trunk/lib/Makefile =================================================================== --- trunk/lib/Makefile 2007-06-14 15:16:42 UTC (rev 1037) +++ trunk/lib/Makefile 2007-06-14 15:29:29 UTC (rev 1038) @@ -1,383 +0,0 @@ -# -# iaxclient: a cross-platform IAX softphone library -# -# Copyrights: -# Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. -# -# Contributors <see README for complete list> -# Steve Kann <st...@st...> -# Michael Van Donselaar <mv...@va...> -# Shawn Lawrence <sha...@te...> -# -# -# This program is free software, distributed under the terms of -# the GNU Lesser (Library) General Public License -# - -PRODUCTION_BUILD ?= 0 - -CODEC_ILBC=0 - -SPEEX_PREPROCESS=1 -SPAN_EC=0 -SPEEX_EC=1 -MEC2_EC=0 - -#Enable only ONE of the following -#Enable this if using ffmpeg -USE_FFMPEG=0 -# Enable this if using Vanguard Softare Solutions H.264 codec -USE_H264_VSS=0 - -# For Linux, you can choose between portaudio with OSS, Alsa and Jack backend, -# and native Alsa -# Choice is inclusive -USE_PA_OSS=1 -USE_PA_ALSA=1 -USE_PA_JACK=0 -AUDIO_ALSA=0 - -CPPFLAGS += -I. \ - -Igsm/inc \ - -Iportaudio/include \ - -Iportaudio/src/common \ - -Iportaudio/pablio \ - -Iportmixer/px_common - -CFLAGS += -Wall -Wmissing-noreturn - -ifeq ($(PRODUCTION_BUILD),1) -CFLAGS += -O2 -Wpointer-arith -else -CFLAGS += -g -O0 -endif - -CPPFLAGS += -DLIBVER='"SVN $(shell svnversion .)"' - -ifeq ($(SPEEX_PREPROCESS),1) -CPPFLAGS += -DSPEEX_PREPROCESS=1 -endif - -# debug flags -# CPPFLAGS += -DDEBUG_SUPPORT -DDEBUG_DEFAULT -DEXTREME_DEBUG -D_DEBUG -# CPPFLAGS += -DDEBUG_SUPPORT -DDEBUG_DEFAULT -D_DEBUG -# enable this for API level debug info for PortAudio -# CPPFLAGS += -DPA_LOG_API_CALLS - -OBJS=\ - portaudio/src/common/pa_allocation.o \ - portaudio/src/common/pa_converters.o \ - portaudio/src/common/pa_cpuload.o \ - portaudio/src/common/pa_dither.o \ - portaudio/src/common/pa_front.o \ - portaudio/src/common/pa_process.o \ - portaudio/src/common/pa_skeleton.o \ - portaudio/src/common/pa_stream.o \ - portaudio/src/common/pa_trace.o \ - spandsp/plc.o \ - audio_encode.o \ - audio_portaudio.o \ - codec_gsm.o \ - codec_ulaw.o \ - codec_alaw.o \ - codec_speex.o \ - iaxclient_lib.o \ - video.o \ - videoLib/video_grab.o \ - codec_theora.o - -OBJS_GSM=\ - gsm/src/add.o \ - gsm/src/code.o \ - gsm/src/debug.o \ - gsm/src/decode.o \ - gsm/src/gsm_create.o \ - gsm/src/gsm_decode.o \ - gsm/src/gsm_destroy.o \ - gsm/src/gsm_encode.o \ - gsm/src/gsm_explode.o \ - gsm/src/gsm_implode.o \ - gsm/src/gsm_option.o \ - gsm/src/gsm_print.o \ - gsm/src/long_term.o \ - gsm/src/lpc.o \ - gsm/src/preprocess.o \ - gsm/src/rpe.o \ - gsm/src/short_term.o \ - gsm/src/table.o - -OBJS_ILBC=\ - iLBC/anaFilter.o\ - iLBC/iCBSearch.o\ - iLBC/packing.o\ - iLBC/constants.o\ - iLBC/gainquant.o\ - iLBC/iLBC_decode.o\ - iLBC/StateConstructW.o \ - iLBC/createCB.o\ - iLBC/getCBvec.o\ - iLBC/iLBC_encode.o\ - iLBC/StateSearchW.o\ - iLBC/doCPLC.o\ - iLBC/helpfun.o\ - iLBC/syntFilter.o\ - iLBC/enhancer.o\ - iLBC/hpInput.o\ - iLBC/LPCdecode.o\ - iLBC/filter.o\ - iLBC/hpOutput.o\ - iLBC/LPCencode.o\ - iLBC/FrameClassify.o\ - iLBC/iCBConstruct.o\ - iLBC/lsf.o - -OBJS:= $(OBJS) $(OBJS_GSM) - -ifeq ($(CODEC_ILBC),1) -OBJS:= $(OBJS) $(OBJS_ILBC) codec_ilbc.o -CPPFLAGS += -DCODEC_ILBC -endif - -OBJS_WIN32=\ - winfuncs.o \ - portmixer/px_win_wmme/px_win_wmme.o \ - portaudio/src/hostapi/wmme/pa_win_wmme.o \ - portaudio/src/os/win/pa_win_hostapis.o \ - portaudio/src/os/win/pa_win_util.o \ - portaudio/pablio/ringbuffer.o - -OBJS_LIBFG = \ - videoLib/linux/linuxgrab.o \ - videoLib/linux/libfg/capture.o \ - videoLib/linux/libfg/frame.o - -OBJS_LINUX=\ - unixfuncs.o \ - portmixer/px_unix_oss/px_unix_oss.o \ - portaudio/src/os/unix/pa_unix_util.o \ - portaudio/src/os/unix/pa_unix_hostapis.o \ - portaudio/pablio/ringbuffer.o \ - $(OBJS_LIBFG) - -OBJS_SOLARIS=\ - unixfuncs.o \ - portmixer/px_solaris/px_solaris.o \ - portaudio/pa_unix_oss/pa_unix_solaris.o \ - portaudio/pa_unix_oss/pa_unix.o - -OBJS_MACOSX=\ - unixfuncs.o \ - portmixer/px_mac_core/px_mac_core.o \ - portaudio/src/hostapi/coreaudio/pa_mac_core.o \ - portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.o \ - portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.o \ - portaudio/src/os/unix/pa_unix_util.o \ - portaudio/src/os/mac_osx/pa_mac_hostapis.o \ - portaudio/src/hostapi/coreaudio/ringbuffer.o \ - videoLib/macosx/SSUtility.o \ - videoLib/macosx/vdigGrab.o \ - videoLib/macosx/macgrab.o - -OBJS_IAX2=\ - libiax2/src/md5.o \ - libiax2/src/iax.o \ - libiax2/src/iax2-parser.o \ - libiax2/src/jitterbuf.o - - -LIB=libiaxclient.a - -RANLIB= echo - -all: $(LIB) - -# glean the platform -# We will define this as either Linux, Win32, SOLARIS, or MacOSX -ifneq (,$(findstring Linux,$(shell uname))) -OSTYPE=LINUX -else -ifneq (,$(findstring Darwin,$(shell uname))) -OSTYPE=MACOSX -else -# CYGWIN reports CYGWIN_NT-5.0 under Win2K -ifneq (,$(findstring WIN,$(shell uname))) -OSTYPE=WIN32 -else -ifneq (,$(findstring MINGW,$(shell uname))) -OSTYPE=WIN32 -else -ifneq (,$(findstring SunOS,$(shell uname))) -OSTYPE=SOLARIS -else -$(warning OSTYPE cannot be detected, assuming Linux) -OSTYPE=LINUX -endif -endif -endif -endif -endif - -# Setup platform-specific stuff based on gleaning -ifeq ($(OSTYPE),WIN32) - OBJS += $(OBJS_WIN32) - CPPFLAGS += -DPA_NO_DS -DPA_NO_ASIO \ - -IPortVideoSDL/win32/dslib/include \ - -Ic:/DX90SDK/include-gcc \ - -Ic:/DX90SDK/Samples/C++/DirectShow/BaseClasses - CFLAGS += -mno-cygwin - DYNLDFLAGS = -mno-cygwin -lwinmm -lwsock32 -lcomdlg32 -luser32 -lgdi32 \ - -lole32 -lcomctl32 -lctl3d32 -lstdc++ -lshell32 -loleaut32 \ - -ladvapi32 -luuid \ - -Wl,--output-def,iaxclient.def,--add-stdcall-alias,--enable-stdcall-fixup,--out-implib,$(LIB) - DYNCFLAGS = -DBUILDING_DLL - DYNLIB = iaxclient.dll -endif - -ifeq ($(OSTYPE),LINUX) - CPPFLAGS += -Iportaudio/src/os/unix -IvideoLib/linux/libfg - DYNCFLAGS = -fPIC - DYNLIB = libiaxclient.so - ifeq ($(USE_PA_OSS),1) - OBJS_LINUX += portaudio/src/hostapi/oss/pa_unix_oss.o - CPPFLAGS += -DPA_USE_OSS - endif - ifeq ($(USE_PA_ALSA),1) - OBJS_LINUX += portaudio/src/hostapi/alsa/pa_linux_alsa.o - CPPFLAGS += -DPA_USE_ALSA - endif - ifeq ($(USE_PA_JACK),1) - OBJS_LINUX += portaudio/src/hostapi/jack/pa_jack.o - CPPFLAGS += -DPA_USE_JACK - endif - OBJS += $(OBJS_LINUX) -endif - -ifeq ($(OSTYPE),SOLARIS) - OBJS += $(OBJS_SOLARIS) - # only SPARC solaris machines need the alignment stuff - ifeq (sparc,$(findstring sparc,$(shell uname -a))) - CPPFLAGS += -DALIGN32 - endif - DYNCFLAGS = -fPIC - DYNLIB = libiaxclient.so - CC = gcc -endif - -ifeq ($(OSTYPE),MACOSX) - OBJS += $(OBJS_MACOSX) - - RANLIB = ranlib - CPPFLAGS += -DPA_USE_COREAUDIO=1 -Iportaudio/src/hostapi/coreaudio \ - -I../../theora/include -I/sw/include - - ifeq ($(PRODUCTION_BUILD),1) - CFLAGS += -arch i386 -arch ppc - else - # gcc will only generate dependencies with these options when not - # using multiple -arch options (as used above). - CFLAGS += -MP -MD - endif - - export MACOSX_DEPLOYMENT_TARGET=10.3 - export NEXT_ROOT=/Developer/SDKs/MacOSX10.4u.sdk - - DYNLIB = libiaxclient.dylib - - # Uncomment these lines in to build against version 10.2.7. - #export MACOSX_DEPLOYMENT_TARGET=10.2 - #export NEXT_ROOT=/Developer/SDKs/MacOSX10.2.7.sdk -endif - -ifneq ($(OSTYPE),MACOSX) - CFLAGS += -MP -MD -endif - -ifeq ($(USE_FFMPEG),1) - OBJS += codec_ffmpeg.o - CPPFLAGS += -DUSE_FFMPEG -endif - -ifeq ($(USE_H264_VSS),1) - OBJS += codec_h264_vss.o - CPPFLAGS += -Ivssh_sdk/include -DUSE_H264_VSS -endif - -ifeq ($(AUDIO_ALSA),1) - OBJS += audio_alsa.o - CPPFLAGS += -DAUDIO_ALSA -endif - -OBJS += $(OBJS_IAX2) -#CPPFLAGS += -Ilibiax2/src -DIAXC_IAX2 -DLIBIAX -DDEBUG_SUPPORT -CPPFLAGS += -Ilibiax2/src -DLIBIAX - -ifeq ($(SPAN_EC),1) - OBJS += ec/echo.o - CPPFLAGS += -DSPAN_EC=1 -endif - -ifeq ($(SPEEX_EC),1) - CPPFLAGS += -DSPEEX_EC=1 -endif - -ifeq ($(MEC2_EC),1) - CPPFLAGS += -DUSE_MEC2=1 -endif - -CPPFLAGS += -D$(OSTYPE) - -CXXFLAGS = $(CFLAGS) - -CFLAGS += -std=gnu99 - -# Treat some included libraries specially: -# compile gsm w/o warnings, because it was written to less strict warning systems. -gsm/%.o: gsm/%.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) -w $< -o $@ - -# These objects are kinda wimpy and so we use the less awesome gnu89 -# instead of the more awesome default c99. -$(OBJS_LIBFG) \ -portaudio/src/hostapi/jack/pa_jack.o \ -portaudio/src/hostapi/alsa/pa_linux_alsa.o \ - : CFLAGS += --std=gnu89 - -$(LIB): $(OBJS) - $(RM) $(LIB) - ar cru $(LIB) $(OBJS) - $(RANLIB) $(LIB) - -# libtool -static -o $(LIB) $(OBJS) portaudio/lib/libportaudio.a -# ar cru $(LIB) $(OBJS) - - -MSLIB=iaxclient.lib -MGLIBDIR=c:/mingw/lib -GCCLIBDIR=$(MGLIBDIR)/gcc-lib/mingw32/3.2/ - -GCCLIB=$(GCCLIBDIR)/libgcc.a - -$(MSLIB): $(OBJS) -# rm -f $(MSLIB) - cp $(GCCLIB) $(MSLIB) - ar rs $(MSLIB) $(OBJS) - - -#shared: CFLAGS := $(CFLAGS) $(DYNCFLAGS) -#shared: clean libiaxclient.a -#shared: libiaxclient.a -#ifeq ($(OSTYPE),MACOSX) -# $(CC) -single_module -dylib -dynamiclib -o $(DYNLIB) $(OBJS) $(DYNLDFLAGS) -framework CoreAudio -framework AudioToolbox -framework System -framework Carbon -framework AudioUnit portaudio/lib/libportaudio.a -#else -# $(CC) -shared -o $(DYNLIB) $(OBJS) $(DYNLDFLAGS) -#endif - -plat: - echo Platform is $(OSTYPE) - echo OBJS are $(OBJS) - echo OBJS_LINUX are $(OBJS_LINUX) - -clean: - rm -f $(OBJS) $(LIB) $(addsuffix .d,$(basename $(OBJS))) - --include *.d Copied: trunk/lib/Makefile.am (from rev 1035, branches/team/pete/autobranch/lib/Makefile.am) =================================================================== --- trunk/lib/Makefile.am (rev 0) +++ trunk/lib/Makefile.am 2007-06-14 15:29:29 UTC (rev 1038) @@ -0,0 +1,196 @@ +# Autoconf etc. macros +AUTOMAKE_OPTIONS = subdir-objects + +# Targets +lib_LTLIBRARIES = libiaxclient.la +libiaxclient_la_SOURCES = $(SRCS) +nodist_libiaxclient_la_SOURCES = $(NODIST_SRCS) + +AM_CFLAGS = \ + -I$(srcdir)/portmixer/px_common \ + $(PTHREAD_CFLAGS) \ + $(SPEEX_CFLAGS) \ + $(THEORA_CFLAGS) \ + $(IAX2_CFLAGS) \ + $(PORTAUDIO_CFLAGS) + +AM_CFLAGS += -Wall +AM_CFLAGS += -Wextra +AM_CFLAGS += -Wno-unused-parameter +AM_CFLAGS += -Wpointer-arith +AM_CFLAGS += -DLIBVER='"$(PACKAGE_VERSION)"' + +libiaxclient_la_LIBADD = \ + $(PTHREAD_LIBS) \ + $(IAX2_LIBS) \ + $(PORTAUDIO_LIBS) \ + $(SPEEX_LIBS) \ + $(THEORA_LIBS) \ + $(OGG_LIBS) + +AM_LDFLAGS = \ + -no-undefined \ + -version-info @IAXC_LT_CURRENT@:@IAXC_LT_REVISION@:@IAXC_LT_AGE@ \ + -export-symbols-regex "iaxc_.*" + +include_HEADERS=iaxclient.h + +SRCS = +NODIST_SRCS = + +if WIN32 +SRCS += $(SRCS_WIN32) +libiaxclient_la_LIBADD += -lwinmm -lwsock32 +endif WIN32 + +if LINUX +SRCS += $(SRCS_LINUX) +endif LINUX + +if MACOSX +SRCS += $(SRCS_MACOSX) +endif MACOSX + +if USE_LOCAL_GSM +SRCS += $(SRCS_LIBGSM) +endif + +if USE_LOCAL_IAX2 +SRCS += $(SRCS_IAX2) +# AM_CFLAGS += -DDEBUG_SUPPORT +endif USE_LOCAL_IAX2 + +if USE_LOCAL_ILBC +SRCS += codec_ilbc.c +NODIST_SRCS += $(SRCS_ILBC) +endif USE_LOCAL_ILBC + +if USE_CODEC_GSM +SRCS += codec_gsm.c codec_gsm.h +libiaxclient_la_LIBADD += $(GSM_LIBS) +AM_CFLAGS += $(GSM_CFLAGS) +endif + +SRCS_LIBGSM= \ + gsm/src/add.c \ + gsm/src/code.c \ + gsm/src/debug.c \ + gsm/src/decode.c \ + gsm/src/gsm_create.c \ + gsm/src/gsm_decode.c \ + gsm/src/gsm_destroy.c \ + gsm/src/gsm_encode.c \ + gsm/src/gsm_explode.c \ + gsm/src/gsm_implode.c \ + gsm/src/gsm_option.c \ + gsm/src/gsm_print.c \ + gsm/src/long_term.c \ + gsm/src/lpc.c \ + gsm/src/preprocess.c \ + gsm/src/rpe.c \ + gsm/src/short_term.c \ + gsm/src/table.c \ + gsm/inc/private.h \ + gsm/inc/gsm.h \ + gsm/inc/unproto.h \ + gsm/inc/config.h \ + gsm/inc/proto.h + +SRCS += \ + audio_encode.c \ + audio_encode.h \ + audio_portaudio.c \ + audio_portaudio.h \ + codec_alaw.c \ + codec_alaw.h \ + codec_ilbc.h \ + codec_speex.c \ + codec_speex.h \ + codec_theora.c \ + codec_theora.h \ + codec_ulaw.c \ + codec_ulaw.h \ + iaxclient_lib.c \ + iaxclient_lib.h \ + ringbuffer.c \ + ringbuffer.h \ + portmixer/px_common/portmixer.h \ + spandsp/plc.c \ + spandsp/plc.h \ + video.c \ + video.h \ + videoLib/video_grab.c \ + videoLib/video_grab.h + +SRCS_ILBC= \ + iLBC/anaFilter.c \ + iLBC/iCBSearch.c \ + iLBC/packing.c \ + iLBC/constants.c \ + iLBC/gainquant.c \ + iLBC/iLBC_decode.c \ + iLBC/StateConstructW.c \ + iLBC/createCB.c \ + iLBC/getCBvec.c \ + iLBC/iLBC_encode.c \ + iLBC/StateSearchW.c \ + iLBC/doCPLC.c \ + iLBC/helpfun.c \ + iLBC/syntFilter.c \ + iLBC/enhancer.c \ + iLBC/hpInput.c \ + iLBC/LPCdecode.c \ + iLBC/filter.c \ + iLBC/hpOutput.c \ + iLBC/LPCencode.c \ + iLBC/FrameClassify.c \ + iLBC/iCBConstruct.c \ + iLBC/lsf.c + +SRCS_WIN32= \ + winfuncs.c \ + portmixer/px_win_wmme/px_win_wmme.c + +SRCS_LINUX= \ + portmixer/px_unix_oss/px_unix_oss.c \ + unixfuncs.c \ + 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 \ + videoLib/macosx/SSUtility.c \ + videoLib/macosx/SSUtility.h \ + videoLib/macosx/macgrab.c \ + videoLib/macosx/vdigGrab.c \ + videoLib/macosx/vdigGrab.h + +SRCS_IAX2= \ + libiax2/src/md5.c \ + libiax2/src/iax.c \ + libiax2/src/iax2-parser.c \ + libiax2/src/jitterbuf.c \ + libiax2/src/frame.h \ + libiax2/src/iax2.h \ + libiax2/src/iax2-parser.h \ + libiax2/src/iax-client.h \ + libiax2/src/jitterbuf.h \ + libiax2/src/md5.h + +EXTRA_DIST = \ + sound2c.pl \ + gsm/copyright \ + gsm/readme \ + libiax2/AUTHORS \ + libiax2/ChangeLog \ + libiax2/COPYING \ + libiax2/COPYING.LIB \ + libiax2/NEWS \ + libiax2/README \ + portmixer/LICENSE.txt + Deleted: trunk/lib/TODO =================================================================== --- trunk/lib/TODO 2007-06-14 15:16:42 UTC (rev 1037) +++ trunk/lib/TODO 2007-06-14 15:29:29 UTC (rev 1038) @@ -1,122 +0,0 @@ -Problems: -- Thread creation does not have any safeguards, so in theory one can -create an unlimited number of processing threads. -- There is a producer/consumer race condition in the iaxclient event -queue. When the library is locked, incoming events are queued by the -iaxc_post_event() method and delivered in sequence, once the lock is -released. The event queue is not synchronized. Ocasionally, this will -cause the delivery of an event with type 0, which is filtered out and -an error is reported. This has no apparent negative impact on the -overall operation of the library, but should be addresses nonetheless. -One possible way of solving this would be to lock queue access with -a separate mutex, but care should be exercised to avoid deadlocks. -- The framerate is hardcoded to 15 fps in iax.c. This should be -rectified. -- Linux framegrabber is slow (around 9 fps). -- Mac framegrabber eats too much CPU. -- iaxclient crashes sometimes. Suspect a concurency issue. - -The items beloware old. Most of them have already been implemented. -I am keeping this here for historical and reference reasons - -TODO items: - - -1) Audio driver work: - Properly abstract audio drivers (currently, we use only - portaudio, but we may also want to support others. - The most likely candidate here would be zaptel devices. - - Instead of the "switch" statements in the code, define an audio - driver structure, with - - - function pointers for actual driver entry points. - initialization: (scans available devices, sets up data - structures) - destruction: (stops everything, cleans up) - "start": starts audio for a particular call? - "stop": stops audio for a particular call? - "playsound": plays a particular sound: can be used for - incoming call notification, ringback, dialtone etc? - "select": select input and output devices to use? - [maybe extend this for zap devices to have "ring", etc - functions?] - - - - Common audio driver data members: - a) perhaps an array of devices the driver has found, - with for each device, a device name, an - indication of whether this device is the default - input or output, and whether this device - supports input, output, or both. - - For portaudio, we probably want to switch to the "standard" - portaudio callback interface, and away from pablio, which isn't - really robust enough for our needs once we do this stuff. - - - -2) Codecs: (I think that someone is working on this) - - Currently, the library assumes that all calls will be GSM only, - and further assumes that all frames will be 20ms. It can - control the frame size (within reason) for frames it sends out, - but should deal gracefully with incoming frames that aren't - 20ms. - - Codecs should probably be implemented via a similar set of - structure abstractions as audio drivers, above. They also need - to handle incoming packets which may switch formats abruptly(?). - -DONE (or, at least, mostly done): -============================================================== -Call handling - currently, the library really only supports one call, and not - very well. It should have a collection of calls (either an - array, or a linked list), and keep track of the current state of - each call. - - An array might be easiest to manage, and would map well to a - softphone client. We would then just refer to calls by their - index, and a GUI client might present these like call - appearances on their display. - - Incoming calls might come in on the first free call appearance, - and outgoing calls by default would do the same. - - The state of each call might be similar to phonecore - (incoming_incomplete, incoming, outgoing_incomplete, outgoing), - but we'd also have to keep track of which call, if any, we - currenly have "selected" -- i.e. which one we should connect to - the audio system. - - We'd need to send events to the client whenever a call changed - "state" in any way. - - We can make the number of calls in the array defined at runtime - when the library is initialized. A very simple client like - testcall would just ask for a single call, so it wouldn't have - to worry about a lot of this. - -Events: - We might want to consolidate the (currently three) callbacks - that the library makes to clients, into a single callback, that - passes back a structure with event info. I was thinking of a - structure with an event type, and then a union of different - structures depending on the event type. - - The only thing is that we might want to decide whether or not, - or how clients will "register" for different event types, even - if they're handled through the same callback mechanism. - - Ideally, the library would handle all of the events itself, via - some "default" handlers. (I.e. for messages, it might just print - them to stdout or stderr. For incoming calls, it might accept - them by default). - - So, the choices then are whether the client should register for - individual events, or perhaps it can just decline events as they - happen, and then the library could handle them. - - - Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2007-06-14 15:16:42 UTC (rev 1037) +++ trunk/lib/audio_encode.c 2007-06-14 15:29:29 UTC (rev 1038) @@ -16,16 +16,19 @@ #include "iaxclient_lib.h" #include "iax-client.h" +#ifdef CODEC_GSM #include "codec_gsm.h" +#endif #include "codec_ulaw.h" #include "codec_alaw.h" #include "codec_speex.h" +#include <speex/speex_preprocess.h> #ifdef CODEC_ILBC #include "codec_ilbc.h" #endif -float iaxc_silence_threshold = -99.0f; +float iaxci_silence_threshold = -99.0f; static float input_level = 0.0f; static float output_level = 0.0f; @@ -33,7 +36,7 @@ static SpeexPreprocessState *st = NULL; static int speex_state_size = 0; static int speex_state_rate = 0; -int iaxc_filters = IAXC_FILTER_AGC|IAXC_FILTER_DENOISE|IAXC_FILTER_AAGC|IAXC_FILTER_CN; +int iaxci_filters = IAXC_FILTER_AGC|IAXC_FILTER_DENOISE|IAXC_FILTER_AAGC|IAXC_FILTER_CN; /* use to measure time since last audio was processed */ static struct timeval timeLastInput ; @@ -69,26 +72,25 @@ gettimeofday(&now, 0); - if ( last.tv_sec != 0 && iaxc_usecdiff(&now, &last) < 100000 ) + if ( last.tv_sec != 0 && iaxci_usecdiff(&now, &last) < 100000 ) return 0; last = now; /* if input has not been processed in the last second, set to silent */ - input_db = iaxc_usecdiff(&now, &timeLastInput) < 1000000 ? + input_db = iaxci_usecdiff(&now, &timeLastInput) < 1000000 ? vol_to_db(input_level) : -99.9f; /* if output has not been processed in the last second, set to silent */ - output_db = iaxc_usecdiff(&now, &timeLastOutput) < 1000000 ? + output_db = iaxci_usecdiff(&now, &timeLastOutput) < 1000000 ? vol_to_db(output_level) : -99.9f; - iaxc_do_levels_callback(input_db, output_db); + iaxci_do_levels_callback(input_db, output_db); return 0; } - -void iaxc_set_speex_filters() +static void set_speex_filters() { int i; float f; @@ -98,9 +100,9 @@ i = 1; /* always make VAD decision */ speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_VAD, &i); - i = (iaxc_filters & IAXC_FILTER_AGC) ? 1 : 0; + i = (iaxci_filters & IAXC_FILTER_AGC) ? 1 : 0; speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i); - i = (iaxc_filters & IAXC_FILTER_DENOISE) ? 1 : 0; + i = (iaxci_filters & IAXC_FILTER_DENOISE) ? 1 : 0; speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i); /* make vad more sensitive */ @@ -138,22 +140,22 @@ st = speex_preprocess_state_init(len,rate); speex_state_size = len; speex_state_rate = rate; - iaxc_set_speex_filters(); + set_speex_filters(); } calculate_level((short *)audio, len, &input_level); /* only preprocess if we're interested in VAD, AGC, or DENOISE */ - if ( (iaxc_filters & (IAXC_FILTER_DENOISE | IAXC_FILTER_AGC)) || - iaxc_silence_threshold > 0.0f ) + if ( (iaxci_filters & (IAXC_FILTER_DENOISE | IAXC_FILTER_AGC)) || + iaxci_silence_threshold > 0.0f ) silent = !speex_preprocess(st, (spx_int16_t *)audio, NULL); /* Analog AGC: Bring speex AGC gain out to mixer, with lots of hysteresis */ /* use a higher continuation threshold for AAGC than for VAD itself */ if ( !silent && - iaxc_silence_threshold != 0.0f && - (iaxc_filters & IAXC_FILTER_AGC) && - (iaxc_filters & IAXC_FILTER_AAGC) && + iaxci_silence_threshold != 0.0f && + (iaxci_filters & IAXC_FILTER_AGC) && + (iaxci_filters & IAXC_FILTER_AAGC) && st->speech_prob > 0.20f ) { static int i = 0; @@ -189,7 +191,7 @@ /* This is ugly. Basically just don't get volume level if speex thought * we were silent. Just set it to 0 in that case */ - if ( iaxc_silence_threshold > 0.0f && silent ) + if ( iaxci_silence_threshold > 0.0f && silent ) input_level = 0.0f; do_level_callback(); @@ -199,10 +201,10 @@ if ( volume < lowest_volume ) lowest_volume = volume; - if ( iaxc_silence_threshold > 0.0f ) + if ( iaxci_silence_threshold > 0.0f ) return silent; else - return volume < iaxc_silence_threshold; + return volume < iaxci_silence_threshold; } static int output_postprocess(void *audio, int len) @@ -218,17 +220,19 @@ { switch (format & IAXC_AUDIO_FORMAT_MASK) { +#ifdef CODEC_GSM case IAXC_FORMAT_GSM: - return iaxc_audio_codec_gsm_new(); + return codec_audio_gsm_new(); +#endif case IAXC_FORMAT_ULAW: - return iaxc_audio_codec_ulaw_new(); + return codec_audio_ulaw_new(); case IAXC_FORMAT_ALAW: - return iaxc_audio_codec_alaw_new(); + return codec_audio_alaw_new(); case IAXC_FORMAT_SPEEX: - return iaxc_audio_codec_speex_new(&speex_settings); + return codec_audio_speex_new(&speex_settings); #ifdef CODEC_ILBC case IAXC_FORMAT_ILBC: - return iaxc_audio_codec_ilbc_new(); + return codec_audio_ilbc_new(); #endif default: /* ERROR: codec not s... [truncated message content] |
From: <jpg...@us...> - 2007-06-14 16:29:36
|
Revision: 1040 http://svn.sourceforge.net/iaxclient/?rev=1040&view=rev Author: jpgrayson Date: 2007-06-14 09:29:38 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Add some bits to EXTRA_DIST. 'make dist' still misses a whole bunch of files, needs help. Modified Paths: -------------- trunk/Makefile.am trunk/simpleclient/Makefile.am Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2007-06-14 15:32:11 UTC (rev 1039) +++ trunk/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) @@ -2,7 +2,10 @@ SUBDIRS = lib simpleclient -EXTRA_DIST = contrib +EXTRA_DIST = \ + README.VisualStudio \ + autogen.sh \ + contrib dist-hook: find $(distdir) -name ".svn" -type d -print0 | xargs -0 rm -rf Modified: trunk/simpleclient/Makefile.am =================================================================== --- trunk/simpleclient/Makefile.am 2007-06-14 15:32:11 UTC (rev 1039) +++ trunk/simpleclient/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) @@ -1,3 +1,6 @@ SUBDIRS = $(CLIENTS) -EXTRA_DIST = win32 IAXClientDotNetWrapper +EXTRA_DIST = \ + IAXClientDotNetWrapper \ + iax2slin \ + win32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-06-14 22:23:37
|
Revision: 1041 http://svn.sourceforge.net/iaxclient/?rev=1041&view=rev Author: jpgrayson Date: 2007-06-14 15:23:39 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Fixup 'make dist'. It's pretty complete now. It does leave out codec_h264_vss.[ch]. This is on purpuse since the code is not used and because it references symbols in a proprietary library. Remove some crust. Modified Paths: -------------- trunk/Makefile.am trunk/configure.ac trunk/lib/Makefile.am trunk/simpleclient/Makefile.am trunk/simpleclient/iaxcomm/Makefile.am trunk/simpleclient/testcall/Makefile.am trunk/simpleclient/tkphone/Makefile.am trunk/simpleclient/vtestcall/Makefile.am Removed Paths: ------------- trunk/simpleclient/videotest/Debug/ trunk/simpleclient/videotest/mihai.vcproj.SPLASH.Mihai Balea.user Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -1,11 +1,21 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib simpleclient +DIST_SUBDIRS = lib simpleclient +m4datadir = $(datadir)/aclocal + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = iaxclient.pc + EXTRA_DIST = \ README.VisualStudio \ autogen.sh \ - contrib + contrib \ + m4 dist-hook: - find $(distdir) -name ".svn" -type d -print0 | xargs -0 rm -rf + find $(distdir) "(" -name ".svn" -o -name ".deps" ")" \ + -type d -print0 | xargs -0 rm -rf + find $(distdir) "(" -name "*.lo" -o -name ".dirstamp" ")" \ + -type f -print0 | xargs -0 rm -f Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/configure.ac 2007-06-14 22:23:39 UTC (rev 1041) @@ -325,45 +325,31 @@ fi fi -AC_CONFIG_FILES([ -Makefile -lib/Makefile -simpleclient/Makefile -iaxclient.pc -]) - for client in $clients do case "$client" in testcall) - AC_CONFIG_FILES([simpleclient/testcall/Makefile]) CLIENTS="$CLIENTS $client";; vtestcall) if ! test x$has_sdl = xyes; then AC_MSG_ERROR([vtestcall requires SDL]) fi - AC_CONFIG_FILES([simpleclient/vtestcall/Makefile]) CLIENTS="$CLIENTS $client";; iaxcomm) - AC_CONFIG_FILES([simpleclient/iaxcomm/Makefile]) CLIENTS="$CLIENTS $client";; iaxphone) - AC_CONFIG_FILES([simpleclient/iaxphone/Makefile]) CLIENTS="$CLIENTS $client";; tkphone) - AC_CONFIG_FILES([simpleclient/tkphone/Makefile]) CLIENTS="$CLIENTS $client";; WinIAX) - AC_CONFIG_FILES([simpleclient/WinIAX/Makefile]) CLIENTS="$CLIENTS $client";; wx) - AC_CONFIG_FILES([simpleclient/wx/Makefile]) CLIENTS="$CLIENTS $client";; *) ;; @@ -372,6 +358,20 @@ AC_SUBST(CLIENTS) +AC_CONFIG_FILES([ + Makefile + lib/Makefile + simpleclient/Makefile + iaxclient.pc + simpleclient/testcall/Makefile + simpleclient/vtestcall/Makefile + simpleclient/iaxcomm/Makefile + simpleclient/iaxphone/Makefile + simpleclient/tkphone/Makefile + simpleclient/WinIAX/Makefile + simpleclient/wx/Makefile +]) + AC_OUTPUT AC_MSG_NOTICE([Configured clients: $clients]) Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/lib/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -183,14 +183,16 @@ libiax2/src/md5.h EXTRA_DIST = \ + audio_alsa.c \ + audio_alsa.h \ + codec_ffmpeg.c \ + codec_ffmpeg.h \ sound2c.pl \ - gsm/copyright \ - gsm/readme \ - libiax2/AUTHORS \ - libiax2/ChangeLog \ - libiax2/COPYING \ - libiax2/COPYING.LIB \ - libiax2/NEWS \ - libiax2/README \ - portmixer/LICENSE.txt + gsm \ + libiax2 \ + portmixer \ + sox \ + spandsp \ + videoLib \ + wince Modified: trunk/simpleclient/Makefile.am =================================================================== --- trunk/simpleclient/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/simpleclient/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -1,6 +1,17 @@ SUBDIRS = $(CLIENTS) +DIST_SUBDIRS = \ + WinIAX \ + iaxcomm \ + iaxphone \ + testcall \ + tkphone \ + vtestcall \ + wx + EXTRA_DIST = \ - IAXClientDotNetWrapper \ - iax2slin \ + IAXClientDotNetWrapper \ + iax2slin \ + videotest \ win32 + Modified: trunk/simpleclient/iaxcomm/Makefile.am =================================================================== --- trunk/simpleclient/iaxcomm/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/simpleclient/iaxcomm/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -85,4 +85,4 @@ endif MACOSX -EXTRA_DIST = QUICKSTART ring.raw +EXTRA_DIST = QUICKSTART ring.raw iaxcomm.icns Modified: trunk/simpleclient/testcall/Makefile.am =================================================================== --- trunk/simpleclient/testcall/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/simpleclient/testcall/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -8,5 +8,5 @@ AM_CPPFLAGS += -DPOSIXSLEEP endif -EXTRA_DIST = .cvsignore +EXTRA_DIST = .cvsignore testcall-jb.c testcall.vcproj Modified: trunk/simpleclient/tkphone/Makefile.am =================================================================== --- trunk/simpleclient/tkphone/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/simpleclient/tkphone/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -2,7 +2,7 @@ bin_SCRIPTS = tkphone iaxcli_PROGRAMS=iaxcli -iaxcli_SOURCES = iaxcli.c tones.c +iaxcli_SOURCES = iaxcli.c tones.c tones.h iaxclidir = ${libdir}/iaxclient/tkphone @@ -26,4 +26,4 @@ CLEANFILES = -EXTRA_DIST = License +EXTRA_DIST = License tkiaxphone Deleted: trunk/simpleclient/videotest/mihai.vcproj.SPLASH.Mihai Balea.user =================================================================== --- trunk/simpleclient/videotest/mihai.vcproj.SPLASH.Mihai Balea.user 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/simpleclient/videotest/mihai.vcproj.SPLASH.Mihai Balea.user 2007-06-14 22:23:39 UTC (rev 1041) @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioUserFile - ProjectType="Visual C++" - Version="8.00" - ShowAllFiles="false" - > - <Configurations> - <Configuration - Name="Debug|Win32" - > - <DebugSettings - Command="$(TargetPath)" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="SPLASH" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - <Configuration - Name="Release|Win32" - > - <DebugSettings - Command="$(TargetPath)" - WorkingDirectory="" - CommandArguments="" - Attach="false" - DebuggerType="3" - Remote="1" - RemoteMachine="SPLASH" - RemoteCommand="" - HttpUrl="" - PDBPath="" - SQLDebugging="" - Environment="" - EnvironmentMerge="true" - DebuggerFlavor="" - MPIRunCommand="" - MPIRunArguments="" - MPIRunWorkingDirectory="" - ApplicationCommand="" - ApplicationArguments="" - ShimCommand="" - MPIAcceptMode="" - MPIAcceptFilter="" - /> - </Configuration> - </Configurations> -</VisualStudioUserFile> Modified: trunk/simpleclient/vtestcall/Makefile.am =================================================================== --- trunk/simpleclient/vtestcall/Makefile.am 2007-06-14 16:29:38 UTC (rev 1040) +++ trunk/simpleclient/vtestcall/Makefile.am 2007-06-14 22:23:39 UTC (rev 1041) @@ -3,3 +3,5 @@ AM_CPPFLAGS=-I$(top_srcdir)/lib $(SDL_CFLAGS) vtestcall_LDADD=$(top_builddir)/lib/libiaxclient.la $(SDL_LIBS) + +EXTRA_DIST = vtestcall.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-08-15 16:07:08
|
Revision: 1082 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1082&view=rev Author: jpgrayson Date: 2007-08-15 09:07:09 -0700 (Wed, 15 Aug 2007) Log Message: ----------- Fixup copyright headers and contributor lists. Remove trailing whitespace. Modified Paths: -------------- trunk/AUTHORS trunk/lib/audio_alsa.c trunk/lib/audio_alsa.h trunk/lib/audio_encode.c trunk/lib/audio_encode.h trunk/lib/audio_portaudio.c trunk/lib/audio_portaudio.h trunk/lib/codec_alaw.c trunk/lib/codec_alaw.h trunk/lib/codec_ffmpeg.c trunk/lib/codec_ffmpeg.h trunk/lib/codec_gsm.c trunk/lib/codec_gsm.h trunk/lib/codec_h264_vss.c trunk/lib/codec_h264_vss.h trunk/lib/codec_ilbc.c trunk/lib/codec_ilbc.h trunk/lib/codec_speex.c trunk/lib/codec_speex.h trunk/lib/codec_theora.c trunk/lib/codec_theora.h trunk/lib/codec_ulaw.c trunk/lib/codec_ulaw.h trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/iaxclient_lib.h trunk/lib/ringbuffer.c trunk/lib/ringbuffer.h trunk/lib/unixfuncs.c trunk/lib/video.c trunk/lib/video.h trunk/lib/videoLib/linux/linuxgrab.c trunk/lib/videoLib/macosx/macgrab.c trunk/lib/videoLib/macosx/vdigGrab.c trunk/lib/videoLib/macosx/vdigGrab.h trunk/lib/videoLib/readme trunk/lib/videoLib/video_grab.c trunk/lib/videoLib/video_grab.h trunk/lib/videoLib/win32/wingrab.cpp trunk/lib/winfuncs.c Modified: trunk/AUTHORS =================================================================== --- trunk/AUTHORS 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/AUTHORS 2007-08-15 16:07:09 UTC (rev 1082) @@ -12,3 +12,4 @@ 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...> +Bill Cholewka <bc...@gm...> Modified: trunk/lib/audio_alsa.c =================================================================== --- trunk/lib/audio_alsa.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/audio_alsa.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,19 +1,15 @@ /* - * iaxclient_lib: An Inter-Asterisk eXchange communication library + * iaxclient: a cross-platform IAX softphone library * - * Module: audio_alsa - * Purpose: Audio code to output to ALSA - * based on audio_file, originally Developed by: Steve Kann - * Developed by: Panfilov Dmitry - * Creation Date: Febr 9, 2006 + * Copyrights: + * Copyright (C) 2006 Panfilov Dmitry * + * Contributors: + * Panfilov Dmitry + * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. * - * IAX library Copyright (c) 2001 Linux Support Services - * IAXlib is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - * */ #include "iaxclient_lib.h" @@ -30,7 +26,7 @@ } int alsa_stop_sound(int soundID) { - return 0; + return 0; } @@ -42,7 +38,7 @@ return 0; } -void alsa_shutdown_audio() +void alsa_shutdown_audio() { return; } @@ -55,7 +51,7 @@ long byteread=*nSamples; static int h; *nSamples=0; - snd_pcm_start(stream_in); + snd_pcm_start(stream_in); if(h==1) { h=0; return 0;} do{ r = snd_pcm_readi(stream_in, samples, byteread); @@ -77,7 +73,7 @@ int alsa_output(struct iaxc_audio_driver *d, void *samples, int nSamples) { long r; - snd_pcm_start(stream_out); + snd_pcm_start(stream_out); while (nSamples > 0) { r = snd_pcm_writei(stream_out, samples, nSamples); if (r == -EAGAIN){ @@ -107,7 +103,7 @@ return 0; } -int alsa_destroy (struct iaxc_audio_driver *d ) +int alsa_destroy (struct iaxc_audio_driver *d ) { /* TODO: something should happen here */ return 0; @@ -137,9 +133,9 @@ short buf[128]; snd_pcm_hw_params_t *hw_params; snd_pcm_sw_params_t *sw_params; - + if ((err = snd_pcm_open (&stream_out, "default", SND_PCM_STREAM_PLAYBACK, 0)) < 0) { - fprintf (stderr, "cannot open audio device default (%s)\n", + fprintf (stderr, "cannot open audio device default (%s)\n", snd_strerror (err)); exit (1); } @@ -178,9 +174,9 @@ snd_strerror (err)); exit (1); } - + snd_pcm_sw_params_malloc(&sw_params); - + err = snd_pcm_sw_params_current(stream_out, sw_params); if (err < 0) { printf("Unable to determine current swparams for playback: %s\n", snd_strerror(err)); @@ -198,7 +194,7 @@ } if ((err = snd_pcm_open (&stream_in, "default", SND_PCM_STREAM_CAPTURE, 0)) < 0) { - fprintf (stderr, "cannot open audio device default (%s)\n", + fprintf (stderr, "cannot open audio device default (%s)\n", snd_strerror (err)); exit (1); } @@ -232,7 +228,7 @@ snd_strerror (err)); exit (1); } - + err = snd_pcm_sw_params_current(stream_in, sw_params); if (err < 0) { printf("Unable to determine current swparams for playback: %s\n", snd_strerror(err)); @@ -248,8 +244,8 @@ fprintf(stderr, "Unable to set sw params for playback: %s\n", snd_strerror(err)); return err; } - - + + if ((err = snd_pcm_prepare (stream_in)) < 0) { fprintf (stderr, "cannot prepare audio interface for use (%s)\n", snd_strerror (err)); @@ -261,7 +257,7 @@ snd_strerror (err)); exit (1); } - + d->initialize = alsa_initialize; d->destroy = alsa_destroy; d->select_devices = alsa_select_devices; Modified: trunk/lib/audio_alsa.h =================================================================== --- trunk/lib/audio_alsa.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/audio_alsa.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,14 +2,16 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ + #ifndef _AUDIO_ALSA_H #define _AUDIO_ALSA_H Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/audio_encode.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,16 +2,16 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * Michael Van Donselaar <mv...@va...> * Shawn Lawrence <sha...@te...> * - * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "iaxclient_lib.h" Modified: trunk/lib/audio_encode.h =================================================================== --- trunk/lib/audio_encode.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/audio_encode.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,14 +2,16 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ + #ifndef _AUDIO_ENCODE_H #define _AUDIO_ENCODE_H Modified: trunk/lib/audio_portaudio.c =================================================================== --- trunk/lib/audio_portaudio.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/audio_portaudio.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,16 +2,16 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * Michael Van Donselaar <mv...@va...> * Shawn Lawrence <sha...@te...> * - * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. * * Module: audio_portaudio * Purpose: Audio code to provide portaudio driver support for IAX library @@ -19,7 +19,7 @@ * Creation Date: April 18, 2003 * * This library uses the PortAudio Portable Audio Library - * For more information see: http://www.portaudio.com + * For more information see: http://www.portaudio.com/ * PortAudio Copyright (c) 1999-2000 Ross Bencina and Phil Burk * */ Modified: trunk/lib/audio_portaudio.h =================================================================== --- trunk/lib/audio_portaudio.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/audio_portaudio.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,14 +2,16 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ + #ifndef _AUDIO_PORTAUDIO_H #define _AUDIO_PORTAUDIO_H Modified: trunk/lib/codec_alaw.c =================================================================== --- trunk/lib/codec_alaw.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_alaw.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,11 +1,14 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * (c) 2004 Cyril VELTER <cyr...@me...> - * Written by Cyril VELTER <cyr...@me...> + * Copyrights: + * Copyright (C) 2004 Cyril VELTER * + * Contributors: + * Cyril VELTER <cyr...@me...> + * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "codec_alaw.h" @@ -25,13 +28,13 @@ { int value; int segment; - + /* Mask value */ alaw ^= 0x55; /* Extract and scale value */ value = (alaw & 0x0f) << 4; - + /* Extract segment number */ segment = (alaw & 0x70) >> 4; @@ -56,9 +59,9 @@ int mask = 0x55; int segment; unsigned char alaw; - + static int segments[8] = {0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF}; - + if (linear >= 0) { /* Sign (7th) bit = 1 */ @@ -69,7 +72,7 @@ /* Sign (7th) bit = 0 */ linear = -linear; } - + /* Find the segment */ for (segment = 0;segment < 8;segment++) if (linear <= segments[segment]) @@ -77,13 +80,13 @@ /* Combine the sign, segment, and quantization bits. */ - if (segment < 8) + if (segment < 8) { if (segment < 2) alaw = (linear >> 4) & 0x0F; else alaw = (linear >> (segment + 3)) & 0x0F; - + return ((alaw | (segment << 4)) ^ mask); } else @@ -91,13 +94,13 @@ return (0x7F ^ mask); } -static int decode ( struct iaxc_audio_codec *c, +static int decode ( struct iaxc_audio_codec *c, int *inlen, unsigned char *in, int *outlen, short *out ) { struct state *state = (struct state *)(c->decstate); short *orig_out = out; short sample; - + if(*inlen == 0) { int interp_len = 160; if(*outlen < interp_len) interp_len = *outlen; @@ -117,7 +120,7 @@ return 0; } -static int encode ( struct iaxc_audio_codec *c, +static int encode ( struct iaxc_audio_codec *c, int *inlen, short *in, int *outlen, unsigned char *out ) { while ((*inlen > 0) && (*outlen > 0)) { @@ -135,7 +138,7 @@ struct iaxc_audio_codec *codec_audio_alaw_new() { struct iaxc_audio_codec *c = (struct iaxc_audio_codec *)calloc(1, sizeof(struct iaxc_audio_codec)); - + if(!c) return c; strcpy(c->name,"alaw"); Modified: trunk/lib/codec_alaw.h =================================================================== --- trunk/lib/codec_alaw.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_alaw.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,11 +1,14 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Written by Cyril VELTER <cyr...@me...> - * (c) 2004 Cyril VELTER <cyr...@me...> + * Copyrights: + * Copyright (C) 2004 Cyril VELTER * + * Contributors: + * Cyril VELTER <cyr...@me...> + * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ struct iaxc_audio_codec *codec_audio_alaw_new(); Modified: trunk/lib/codec_ffmpeg.c =================================================================== --- trunk/lib/codec_ffmpeg.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_ffmpeg.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,13 +1,16 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * + * Copyrights: * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. * * A video codec using the ffmpeg library. */ Modified: trunk/lib/codec_ffmpeg.h =================================================================== --- trunk/lib/codec_ffmpeg.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_ffmpeg.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,15 +1,20 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> + * Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. + * + * A video codec using the ffmpeg library. */ - struct iaxc_video_codec *codec_video_ffmpeg_new(int format, int w, int h, int framerate, int bitrate, int fragsize); int codec_video_ffmpeg_check_codec(int format); Modified: trunk/lib/codec_gsm.c =================================================================== --- trunk/lib/codec_gsm.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_gsm.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "codec_gsm.h" @@ -32,7 +35,7 @@ } -static int decode ( struct iaxc_audio_codec *c, +static int decode ( struct iaxc_audio_codec *c, int *inlen, unsigned char *in, int *outlen, short *out ) { struct state * decstate = (struct state *) c->decstate; @@ -57,7 +60,7 @@ plc_rx(&decstate->plc,out,160); /* we used 33 bytes of input, and 160 bytes of output */ - *inlen -= 33; + *inlen -= 33; in += 33; *outlen -= 160; out += 160; @@ -66,7 +69,7 @@ return 0; } -static int encode ( struct iaxc_audio_codec *c, +static int encode ( struct iaxc_audio_codec *c, int *inlen, short *in, int *outlen, unsigned char *out ) { struct state * encstate = (struct state *) c->encstate; @@ -77,7 +80,7 @@ gsm_encode(encstate->gsmstate, in, out); /* we used 160 bytes of input, and 33 bytes of output */ - *inlen -= 160; + *inlen -= 160; in += 160; *outlen -= 33; out += 33; @@ -87,12 +90,12 @@ } struct iaxc_audio_codec *codec_audio_gsm_new() { - + struct state * encstate; struct state * decstate; struct iaxc_audio_codec *c = (struct iaxc_audio_codec *)calloc(sizeof(struct iaxc_audio_codec),1); - + if(!c) return c; strcpy(c->name,"gsm 06.10"); @@ -107,7 +110,7 @@ c->decstate = calloc(sizeof(struct state),1); /* leaks a bit on no-memory */ - if(!(c->encstate && c->decstate)) + if(!(c->encstate && c->decstate)) return NULL; encstate = (struct state *) c->encstate; @@ -116,7 +119,7 @@ encstate->gsmstate = gsm_create(); decstate->gsmstate = gsm_create(); - if(!(encstate->gsmstate && decstate->gsmstate)) + if(!(encstate->gsmstate && decstate->gsmstate)) return NULL; return c; Modified: trunk/lib/codec_gsm.h =================================================================== --- trunk/lib/codec_gsm.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_gsm.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ struct iaxc_audio_codec *codec_audio_gsm_new(); Modified: trunk/lib/codec_h264_vss.c =================================================================== --- trunk/lib/codec_h264_vss.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_h264_vss.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * + * Copyrights: * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Mihai Balea <mihaiAThatesDOTms> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #define USE_H264_RTP_FOO @@ -279,7 +282,7 @@ encoded_ts = (vss_uint)slice.frame_info.timestamp; #endif - // If the slice is the first slice in an IDR (key) frame, add the + // If the slice is the first slice in an IDR (key) frame, add the // SPS and PPS headers to allow for decoder (re)initialziation // This way, a client can connect in the middle of a stream, as soon as // an IDR frame arrives Modified: trunk/lib/codec_h264_vss.h =================================================================== --- trunk/lib/codec_h264_vss.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_h264_vss.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * + * Copyrights: * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Mihai Balea <mihaiAThatesDOTms> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ struct iaxc_video_codec *iaxc_video_codec_h264_new(int format, int w, int h, int framerate, int bitrate, int fragsize); Modified: trunk/lib/codec_ilbc.c =================================================================== --- trunk/lib/codec_ilbc.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_ilbc.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "codec_ilbc.h" @@ -22,7 +25,7 @@ } -static int decode ( struct iaxc_audio_codec *c, +static int decode ( struct iaxc_audio_codec *c, int *inlen, char *in, int *outlen, short *out ) { float fbuf[240]; @@ -58,7 +61,7 @@ return 0; } -static int encode ( struct iaxc_audio_codec *c, +static int encode ( struct iaxc_audio_codec *c, int *inlen, short *in, int *outlen, char *out ) { float fbuf[240]; @@ -83,7 +86,7 @@ struct iaxc_audio_codec *codec_audio_ilbc_new() { struct iaxc_audio_codec *c = calloc(sizeof(struct iaxc_audio_codec),1); - + if(!c) return c; strcpy(c->name,"iLBC"); @@ -98,11 +101,11 @@ c->decstate = calloc(sizeof(iLBC_Dec_Inst_t),1); /* leaks a bit on no-memory */ - if(!(c->encstate && c->decstate)) + if(!(c->encstate && c->decstate)) return NULL; - /* the 30 parameters are used for the latest iLBC sources, in - * http://www.ietf.org/internet-drafts/draft-ietf-avt-ilbc-codec-05.txt + /* the 30 parameters are used for the latest iLBC sources, in + * http://www.ietf.org/internet-drafts/draft-ietf-avt-ilbc-codec-05.txt * as used in asterisk-CVS as of 14 Oct 2004 */ initEncode(c->encstate, 30); initDecode(c->decstate, 30, 1); /* use enhancer */ Modified: trunk/lib/codec_ilbc.h =================================================================== --- trunk/lib/codec_ilbc.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_ilbc.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ struct iaxc_audio_codec *codec_audio_ilbc_new(); Modified: trunk/lib/codec_speex.c =================================================================== --- trunk/lib/codec_speex.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_speex.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * + * Copyrights: * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "codec_speex.h" Modified: trunk/lib/codec_speex.h =================================================================== --- trunk/lib/codec_speex.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_speex.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "speex/speex.h" Modified: trunk/lib/codec_theora.c =================================================================== --- trunk/lib/codec_theora.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_theora.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,15 +1,16 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2005, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * Mihai Balea <mihai at hates dot ms> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - * - * A video codec using the theora library. + * the GNU Lesser (Library) General Public License. */ /* Modified: trunk/lib/codec_theora.h =================================================================== --- trunk/lib/codec_theora.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_theora.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,16 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> + * Mihai Balea <mihai at hates dot ms> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ struct iaxc_video_codec *codec_video_theora_new(int format, int w, int h, Modified: trunk/lib/codec_ulaw.c =================================================================== --- trunk/lib/codec_ulaw.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_ulaw.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "codec_ulaw.h" @@ -20,14 +23,14 @@ static unsigned char lin_2ulaw [16384]; static int initialized=0; -/* this looks similar to asterisk, but comes from public domain code by craig reese +/* this looks similar to asterisk, but comes from public domain code by craig reese I've just followed asterisk's table sizes for lin_2u, and also too lazy to do binary arith to decide which iterations to skip -- this way we get the same result.. */ static void initialize() { int i; /* ulaw_2lin */ - for(i=0;i<256;i++) { + for(i=0;i<256;i++) { int b = ~i; int exp_lut[8] = {0,132,396,924,1980,4092,8316,16764}; int sign, exponent, mantissa, sample; @@ -38,10 +41,10 @@ sample = exp_lut[exponent] + (mantissa << (exponent + 3)); if (sign != 0) sample = -sample; ulaw_2lin[i] = sample; - } + } /* lin_2ulaw */ - for(i=-32767;i<32768;i+=4) { + for(i=-32767;i<32768;i+=4) { int sample = i; int exp_lut[256] = {0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3, 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, @@ -73,11 +76,11 @@ mantissa = (sample >> (exponent + 3)) & 0x0F; ulawbyte = ~(sign | (exponent << 4) | mantissa); if (ulawbyte == 0) ulawbyte = 0x02; /* optional CCITT trap */ - - lin_2ulaw[((unsigned short)i) >> 2] = ulawbyte; - } - - initialized = 1; + + lin_2ulaw[((unsigned short)i) >> 2] = ulawbyte; + } + + initialized = 1; } static void destroy ( struct iaxc_audio_codec *c) { @@ -85,7 +88,7 @@ } -static int decode ( struct iaxc_audio_codec *c, +static int decode ( struct iaxc_audio_codec *c, int *inlen, unsigned char *in, int *outlen, short *out ) { struct state *state = (struct state *)c->decstate; short *orig_out = out; @@ -109,7 +112,7 @@ return 0; } -static int encode ( struct iaxc_audio_codec *c, +static int encode ( struct iaxc_audio_codec *c, int *inlen, short *in, int *outlen, unsigned char *out ) { while ((*inlen > 0) && (*outlen > 0)) { @@ -124,7 +127,7 @@ struct iaxc_audio_codec *codec_audio_ulaw_new() { struct iaxc_audio_codec *c = (struct iaxc_audio_codec *)calloc(sizeof(struct iaxc_audio_codec),1); - + if(!c) return c; if(!initialized) initialize(); Modified: trunk/lib/codec_ulaw.h =================================================================== --- trunk/lib/codec_ulaw.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/codec_ulaw.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,12 +1,15 @@ /* - * iaxclient: a portable telephony toolkit + * iaxclient: a cross-platform IAX softphone library * - * Copyright (C) 2003-2004, Horizon Wimba, Inc. + * Copyrights: + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: * Steve Kann <st...@st...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ struct iaxc_audio_codec *codec_audio_ulaw_new(); Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/iaxclient.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,15 +2,18 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * Frik Strecker <fr...@ga...> * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * Bill Cholewka <bc...@gm...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #ifndef _iaxclient_h #define _iaxclient_h Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/iaxclient_lib.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,7 +2,8 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> @@ -10,10 +11,11 @@ * Shawn Lawrence <sha...@te...> * Frik Strecker <fr...@ga...> * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * Bill Cholewka <bc...@gm...> * - * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include <assert.h> @@ -724,7 +726,7 @@ static THREADFUNCDECL(main_proc_thread_func) { static int refresh_registration_count = 0; - + THREADFUNCRET(ret); /* Increase Priority */ @@ -733,17 +735,17 @@ while ( !main_proc_thread_flag ) { get_iaxc_lock(); - + service_network(); service_audio(); - + // Check registration refresh once a second if ( refresh_registration_count++ > 1000/LOOP_SLEEP ) { iaxc_refresh_registrations(); refresh_registration_count = 0; } - + put_iaxc_lock(); iaxc_millisleep(LOOP_SLEEP); @@ -782,7 +784,7 @@ e.type = IAXC_EVENT_VIDEOSTATS; e.ev.videostats.callNo = selected_call; iaxci_post_event(e); - + video_stats_start = now; } } @@ -803,7 +805,7 @@ video_send_video(call, selected_call); send_video_stats(); - + // Tight spinloops are bad, mmmkay? iaxc_millisleep(LOOP_SLEEP); } Modified: trunk/lib/iaxclient_lib.h =================================================================== --- trunk/lib/iaxclient_lib.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/iaxclient_lib.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,16 +2,16 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> - * Michael Van Donselaar <mv...@va...> + * Michael Van Donselaar <mv...@va...> * Shawn Lawrence <sha...@te...> * - * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #ifndef _iaxclient_lib_h #define _iaxclient_lib_h @@ -132,8 +132,8 @@ int (*select_devices)(struct iaxc_audio_driver *d, int input, int output, int ring); int (*selected_devices)(struct iaxc_audio_driver *d, int *input, int *output, int *ring); - /* - * select_ring ? + /* + * select_ring ? * set_latency */ @@ -155,7 +155,7 @@ /* mic boost */ int (*mic_boost_get)(struct iaxc_audio_driver *d ) ; int (*mic_boost_set)(struct iaxc_audio_driver *d, int enable); -}; +}; struct iaxc_audio_codec { char name[256]; Modified: trunk/lib/ringbuffer.c =================================================================== --- trunk/lib/ringbuffer.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/ringbuffer.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,4 +1,19 @@ /* + * iaxclient: a cross-platform IAX softphone library + * + * Copyrights: + * Copyright (c) 1999-2000 Ross Bencina and Phil Burk + * Copyright (C) 2007, Wimba, Inc. + * + * Contributors: + * <see below> + * Peter Grayson <jpg...@gm...> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License. + */ + +/* * Ring Buffer utility. * * Author: Phil Burk, http://www.softsynth.com @@ -33,13 +48,13 @@ */ /* - * The text above constitutes the entire PortAudio license; however, + * The text above constitutes the entire PortAudio license; however, * the PortAudio community also makes the following non-binding requests: * * Any person wishing to distribute modifications to the Software is * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the + * they can be incorporated into the canonical version. It is also + * requested that these non-binding requests be included along with the * license above. */ Modified: trunk/lib/ringbuffer.h =================================================================== --- trunk/lib/ringbuffer.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/ringbuffer.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,6 +1,19 @@ -#ifndef RINGBUFFER_H -#define RINGBUFFER_H /* + * iaxclient: a cross-platform IAX softphone library + * + * Copyrights: + * Copyright (c) 1999-2000 Ross Bencina and Phil Burk + * Copyright (C) 2007, Wimba, Inc. + * + * Contributors: + * <see below> + * Peter Grayson <jpg...@gm...> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License. + */ + +/* * Ring Buffer utility. * * Author: Phil Burk, http://www.softsynth.com @@ -34,16 +47,19 @@ */ /* - * The text above constitutes the entire PortAudio license; however, + * The text above constitutes the entire PortAudio license; however, * the PortAudio community also makes the following non-binding requests: * * Any person wishing to distribute modifications to the Software is * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the + * they can be incorporated into the canonical version. It is also + * requested that these non-binding requests be included along with the * license above. */ +#ifndef RINGBUFFER_H +#define RINGBUFFER_H + #ifdef __cplusplus extern "C" { Modified: trunk/lib/unixfuncs.c =================================================================== --- trunk/lib/unixfuncs.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/unixfuncs.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,14 +2,14 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * - * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #define _BSD_SOURCE @@ -103,7 +103,7 @@ THREAD_TIME_CONSTRAINT_POLICY_COUNT)) != KERN_SUCCESS ) { fprintf(stderr, "thread_policy_set failed: %d.\n", ret); - } + } return 0; } @@ -140,7 +140,7 @@ * they can be incorporated into the canonical version. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - */ + */ /* It has been clarified by the authors that the request to send modifications is a request, and not a condition */ @@ -165,7 +165,7 @@ #include <errno.h> //#define DBUG(...) fprintf(stderr, __VA_ARGS__) -#define DBUG(...) +#define DBUG(...) #define ERR_RPT(...) fprintf(stderr, __VA_ARGS__) #define SCHEDULER_POLICY SCHED_RR @@ -182,11 +182,11 @@ int CanaryRun; pthread_t CanaryThread; int IsCanaryThreadValid; - + int WatchDogRun; pthread_t WatchDogThread; int IsWatchDogThreadValid; - + } prioboost; static prioboost *pb; @@ -226,7 +226,7 @@ goto killAudio; } - DBUG("prioboost: WatchDog priority set to level %d!\n", schp.sched_priority); + DBUG("prioboost: WatchDog priority set to level %d!\n", schp.sched_priority); /* Compare watchdog time with audio and canary thread times. */ /* Sleep for a while or until thread cancelled. */ @@ -366,7 +366,7 @@ struct sched_param schp = { 0 }; prioboost *b = calloc(sizeof(*b),1); - int result = 0; + int result = 0; b->priority = (sched_get_priority_max(SCHEDULER_POLICY) - sched_get_priority_min(SCHEDULER_POLICY)) / 2; @@ -392,7 +392,7 @@ pthread_setschedparam(b->ThreadID, SCHED_OTHER, &schp); } - return result; + return result; } int iaxci_prioboostend() Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/video.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,14 +2,18 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2005 Horizon Wimba, inc. + * Copyright (C) 2005-2006, Horizon Wimba, inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> + * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ + #include <assert.h> #include "video.h" @@ -212,7 +216,7 @@ for ( i = 0; i <= 24; i++) { tmp_allowed = 1 << i; - if ( (allowed & tmp_allowed) && + if ( (allowed & tmp_allowed) && codec_video_ffmpeg_check_codec(tmp_allowed) ) real_allowed |= tmp_allowed; } @@ -434,7 +438,7 @@ /* It is okay if we do not get any video; video capture may be * disabled. */ - if ( !videobuf || + if ( !videobuf || (iaxc_video_prefs & IAXC_VIDEO_PREF_CAPTURE_DISABLE) ) return 0; @@ -734,7 +738,7 @@ yuv2rgb_clip8[i] = 255 << 8; yuv2rgb_clip16[i] = 255 << 16; } - + yuv2rgb_tables_initialized = 1; } @@ -742,7 +746,7 @@ /* * Faster function to convert YUV420 images to RGB32 * RGB32: 0xFFRRGGBB - * This function uses precalculated tables that are initialized + * This function uses precalculated tables that are initialized * on the first run. * Make sure the src and dest buffers have enough room * dest should be width * height * 4 bytes in size @@ -753,21 +757,21 @@ unsigned char *y, *u, *v; unsigned int *dst; int i; - + if ( !yuv2rgb_tables_initialized ) iaxc_init_yuv2rgb_tables(); - + dst = (unsigned int *)dest; y = (unsigned char *)src; u = y + width * height; v = u + width * height / 4; - + for (i = 0; i < height; i++) { unsigned char *uu,*vv; unsigned int *d; int j; - + d = dst; uu = u; vv = v; @@ -809,54 +813,54 @@ // unsigned char * u = y + width * height; // unsigned char * v = u + width * height / 4; // unsigned int * dst = (unsigned int *)dest; -// +// // for ( i = 0; i < height; i++ ) // { // int j; -// +// // unsigned char * uu = u; // unsigned char * vv = v; -// +// // for ( j = 0; j < width; j++ ) // { // int yyy = *y - 16; // int uuu = *uu - 128; // int vvv = *vv - 128; -// +// // int r = ( 298*yyy + 409*vvv + 128) >> 8; // int g = ( 298*yyy - 100*uuu - 208*vvv + 128) >> 8; // int b = ( 298*yyy + 516*uuu + 128) >> 8; -// +// // // Clip values to make sure they fit in range // if ( r < 0 ) // r = 0; // else if ( r > 255 ) // r = 255; -// +// // if ( g < 0 ) // g = 0; // else if ( g > 255 ) // g = 255; -// +// // if ( b < 0 ) // b = 0; // else if ( b > 255 ) // b = 255; -// +// // *(dst++) = 0xff000000 | // ((unsigned char)r << 16) | // ((unsigned char)g << 8) | // ((unsigned char)b << 0); -// +// // y++; -// +// // if ( j & 1 ) // { // uu++; // vv++; // } // } -// +// // if ( i & 1 ) // { // u += width >> 1; Modified: trunk/lib/video.h =================================================================== --- trunk/lib/video.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/video.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,11 +2,13 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. - * Copyright (C) 2007 Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * + * Contributors: + * Peter Grayson <jpg...@gm...> + * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #ifndef __VIDEO_H__ @@ -34,7 +36,7 @@ int (*stop)(struct iaxc_video_driver *d); int (*input)(struct iaxc_video_driver *d, char **data); int (*is_camera_working)(struct iaxc_video_driver *d); - + /* HACK ALERT!!! * If the requested size of the video is not 320x240, then we * resize the image in software rather than relying on the camera @@ -44,7 +46,7 @@ int req_width; int req_height; int camera_working; /* true if the camera is working */ -}; +}; int video_initialize(void); Modified: trunk/lib/videoLib/linux/linuxgrab.c =================================================================== --- trunk/lib/videoLib/linux/linuxgrab.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/linux/linuxgrab.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,21 +2,23 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004-2006, Horizon Wimba, Inc. + * Copyright (C) 2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: - * Peter Grayson <jpg...@gm...> * Steve Kann <st...@st...> * Stefano Falsetto <fal...@gn...> + * Peter Grayson <jpg...@gm...> * * This program is free software, distributed under the terms of * the GNU Lesser (Library) General Public License - * + */ + +/* * Module: video_portvideo * Purpose: Video code to provide portvideo driver support for IAX library * Developed by: Steve Kann * Creation Date: April 7, 2005 - * Modify Data: July, 18, 2005 */ #include "iaxclient_lib.h" @@ -142,7 +144,7 @@ void *grabber_init( grab_callback_t gc, void *gc_data, int w, int h) { int got_camera; - + grab_callback = gc; grab_callback_data = gc_data; width = w; Modified: trunk/lib/videoLib/macosx/macgrab.c =================================================================== --- trunk/lib/videoLib/macosx/macgrab.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/macosx/macgrab.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,7 +1,25 @@ /* - * code based on videoWindow.c - * seeSaw + * iaxclient: a cross-platform IAX softphone library * + * Copyrights: + * Copyright (c) 2004, Daniel Heckenberg. All rights reserved. + * Copyright (c) 2005, Tipic, Inc. All rights reserved. + * Copyright (C) 2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. + * + * Contributors: + * Daniel Heckenberg <danielh.seeSaw<at>cse<dot>unsw<dot>edu<dot>au> + * Francesco Delfino <pl...@ti...> + * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License. + */ + +/* + * code based on videoWindow.c from seeSaw + * * Created by Daniel Heckenberg. * Copyright (c) 2004 Daniel Heckenberg. All rights reserved. * (danielh.seeSaw<at>cse<dot>unsw<dot>edu<dot>au) @@ -144,7 +162,7 @@ pWnd->dstDataSize = GetPixRowBytes(GetGWorldPixMap(pWnd->dstPort)) * (pWnd->dstPortBounds.bottom - pWnd->dstPortBounds.top); pWnd->dstDisplayBounds = pWnd->dstPortBounds; - + return 0; } Modified: trunk/lib/videoLib/macosx/vdigGrab.c =================================================================== --- trunk/lib/videoLib/macosx/vdigGrab.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/macosx/vdigGrab.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,4 +1,23 @@ /* + * iaxclient: a cross-platform IAX softphone library + * + * Copyrights: + * Copyright (c) 2004, Daniel Heckenberg. All rights reserved. + * Copyright (c) 2005, Tipic, Inc. All rights reserved. + * Copyright (C) 2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. + * + * Contributors: + * Daniel Heckenberg <danielh.seeSaw<at>cse<dot>unsw<dot>edu<dot>au> + * Francesco Delfino <pl...@ti...> + * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License. + */ + +/* * vdigGrab.c * seeSaw * @@ -220,7 +239,7 @@ goto endFunc; } } - + // VDGetCompressTypes() // tells you the supported types /* Modified: trunk/lib/videoLib/macosx/vdigGrab.h =================================================================== --- trunk/lib/videoLib/macosx/vdigGrab.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/macosx/vdigGrab.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,4 +1,23 @@ /* + * iaxclient: a cross-platform IAX softphone library + * + * Copyrights: + * Copyright (c) 2004, Daniel Heckenberg. All rights reserved. + * Copyright (c) 2005, Tipic, Inc. All rights reserved. + * Copyright (C) 2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. + * + * Contributors: + * Daniel Heckenberg <danielh.seeSaw<at>cse<dot>unsw<dot>edu<dot>au> + * Francesco Delfino <pl...@ti...> + * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License. + */ + +/* * vdigGrab.h * seeSaw * Modified: trunk/lib/videoLib/readme =================================================================== --- trunk/lib/videoLib/readme 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/readme 2007-08-15 16:07:09 UTC (rev 1082) @@ -14,10 +14,10 @@ License: Lesser GPL v2.1 (LGPL) Description: This library provides a portable solution to - use grab frames from webcam under Linux, + use grab frames from webcam under Linux, MacOS X and Windows - + License Terms ~~~~~~~~~~~~~ @@ -41,7 +41,7 @@ -Credits +Credits ~~~~~~~ This library uses parts of projects from: Modified: trunk/lib/videoLib/video_grab.c =================================================================== --- trunk/lib/videoLib/video_grab.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/video_grab.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,16 +2,22 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * Stefano Falsetto <fal...@gn...> * Francesco Delfino <pl...@ti...> + * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * Bill Cholewka <bc...@gm...> * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License - * + * the GNU Lesser (Library) General Public License. + */ + +/* * Module: video_grab * Purpose: Video code to provide portvideo driver support for IAX library * Developed by: Stefano Falsetto and Francesco Delfino @@ -274,9 +280,9 @@ int v = 0; int s = 0; int i, j; - - // YUY2 has a vertical sampling PERIOD (for U and V) - // half that for YUV420. Will toss half of the + + // YUY2 has a vertical sampling PERIOD (for U and V) + // half that for YUV420. Will toss half of the // U and V data during repackaging. for ( i = 0; i < height / 2; i++ ) { Modified: trunk/lib/videoLib/video_grab.h =================================================================== --- trunk/lib/videoLib/video_grab.h 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/video_grab.h 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,3 +1,22 @@ +/* + * iaxclient: a cross-platform IAX softphone library + * + * Copyrights: + * Copyright (C) 2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. + * + * Contributors: + * Steve Kann <st...@st...> + * Stefano Falsetto <fal...@gn...> + * Francesco Delfino <pl...@ti...> + * Mihai Balea <mihai AT hates DOT ms> + * Peter Grayson <jpg...@gm...> + * Bill Cholewka <bc...@gm...> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License. + */ + #ifndef VIDEO_GRAB_H #define VIDEO_GRAB_H Modified: trunk/lib/videoLib/win32/wingrab.cpp =================================================================== --- trunk/lib/videoLib/win32/wingrab.cpp 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/videoLib/win32/wingrab.cpp 2007-08-15 16:07:09 UTC (rev 1082) @@ -1,3 +1,19 @@ +// +// iaxclient: a cross-platform IAX softphone library +// +// Copyrights: +// Copyright (C) 2006, Horizon Wimba, Inc. +// Copyright (C) 2007, Wimba, Inc. +// +// Contributors: +// Mihai Balea <mihai AT hates DOT ms> +// Peter Grayson <jpg...@gm...> +// Bill Cholewka <bc...@gm...> +// +// This program is free software, distributed under the terms of +// the GNU Lesser (Library) General Public License. +// + //------------------------------------------------------------------------------ // File: wingrab.cpp // Modified: trunk/lib/winfuncs.c =================================================================== --- trunk/lib/winfuncs.c 2007-08-13 22:42:45 UTC (rev 1081) +++ trunk/lib/winfuncs.c 2007-08-15 16:07:09 UTC (rev 1082) @@ -2,14 +2,14 @@ * iaxclient: a cross-platform IAX softphone library * * Copyrights: - * Copyright (C) 2003 HorizonLive.com, (c) 2004, Horizon Wimba, Inc. + * Copyright (C) 2003-2006, Horizon Wimba, Inc. + * Copyright (C) 2007, Wimba, Inc. * * Contributors: * Steve Kann <st...@st...> * - * * This program is free software, distributed under the terms of - * the GNU Lesser (Library) General Public License + * the GNU Lesser (Library) General Public License. */ #include "iaxclient_lib.h" @@ -28,11 +28,11 @@ /* changed 'struct timezone*' to 'void*' since timezone is defined as a long in MINGW and caused compile-time warnings. - this should be okay since we don't use the passed value. + this should be okay since we don't use the passed value. */ -/* +/* * functions implementations */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-09-03 19:21:51
|
Revision: 1114 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1114&view=rev Author: jpgrayson Date: 2007-09-03 12:21:53 -0700 (Mon, 03 Sep 2007) Log Message: ----------- Remove some remnant references to vss_h264. Modified Paths: -------------- trunk/lib/video.c trunk/simpleclient/videotest/Makefile Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-09-03 19:14:08 UTC (rev 1113) +++ trunk/lib/video.c 2007-09-03 19:21:53 UTC (rev 1114) @@ -26,9 +26,6 @@ #ifdef USE_THEORA #include "codec_theora.h" #endif -#ifdef USE_H264_VSS -#include "codec_h264_vss.h" -#endif #define VIDEO_BUFSIZ (1<<19) @@ -190,11 +187,6 @@ real_pref = preferred; #endif -#ifdef USE_H264_VSS - if ( preferred & IAXC_FORMAT_H264 ) - real_pref = IAXC_FORMAT_H264; -#endif - if ( !real_pref ) { // If preferred codec is not available switch to the @@ -224,11 +216,6 @@ } #endif -#ifdef USE_H264_VSS - if ( allowed & IAXC_FORMAT_H264 ) - real_allowed |= IAXC_FORMAT_H264; -#endif - if ( !real_pref ) { fprintf(stderr, "Audio-only client!\n"); @@ -253,9 +240,6 @@ | IAXC_FORMAT_MPEG4 | IAXC_FORMAT_H264; #endif -#ifdef USE_H264_VSS - iaxc_video_format_allowed |= IAXC_FORMAT_H264; -#endif iaxc_video_format_allowed |= IAXC_FORMAT_THEORA; } } @@ -339,14 +323,6 @@ #endif case IAXC_FORMAT_H264: -#ifdef USE_H264_VSS - return codec_video_h264_new(format, - iaxc_video_width, - iaxc_video_height, - iaxc_video_framerate, - iaxc_video_bitrate, - iaxc_video_fragsize); -#endif #ifdef USE_FFMPEG return codec_video_ffmpeg_new(format, iaxc_video_width, Modified: trunk/simpleclient/videotest/Makefile =================================================================== --- trunk/simpleclient/videotest/Makefile 2007-09-03 19:14:08 UTC (rev 1113) +++ trunk/simpleclient/videotest/Makefile 2007-09-03 19:21:53 UTC (rev 1114) @@ -4,7 +4,6 @@ AMR=0 AMR_WB=0 USE_FFMPEG=0 -USE_H264_VSS=0 CFLAGS= -I../../lib -I../../lib/videoLib -I../../lib/libiax2/src -I../../lib/gsm/inc -I../../lib/portaudio/pa_common -I../../lib/portaudio/pablio -Iinclude `sdl-config --cflags` -I../../lib/ogg/include -I../../lib/theora/include -I../../lib/SDL/include @@ -85,14 +84,6 @@ CFLAGS:= $(CFLAGS) -DUSE_FFMPEG endif -ifeq ($(USE_H264_VSS),1) - CFLAGS:= $(CFLAGS) -DUSE_H264_VSS - LIBS:= $(LIBS) -L../../lib/vssh_sdk/lib -lvsshdec -lvsshenc -lvsshprep -lvsshcsp -lvsshcom - ifeq ($(OSTYPE),LINUX) - LIBS:= $(LIBS) -limf -lirc - endif -endif - ifeq ($(OSTYPEREAL),FREEBSD) MAKE=gmake else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <do...@us...> - 2007-09-12 19:54:31
|
Revision: 1132 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1132&view=rev Author: dohpaz Date: 2007-09-12 12:54:25 -0700 (Wed, 12 Sep 2007) Log Message: ----------- Add ffmpeg support to autotools files. Tracker Patch# 1793310. Modified Paths: -------------- trunk/configure.ac trunk/lib/Makefile.am Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-09-12 19:39:12 UTC (rev 1131) +++ trunk/configure.ac 2007-09-12 19:54:25 UTC (rev 1132) @@ -135,6 +135,13 @@ [Theora support])],, with_theora="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 @@ -232,6 +239,22 @@ fi AM_CONDITIONAL(THEORA, test x$has_theora = xyes) +has_ffmpeg=no +if test ! x$with_ffmpeg = xno; then +PKG_CHECK_MODULES(FFMPEG, [libavcodec >= 51.40.3],has_ffmpeg=yes) +if test x$has_ffmpeg = xyes; then + AC_DEFINE(USE_FFMPEG, 1, [FFMPEG]) + PKG_REQUIRES="$PKG_REQUIRES ffmpeg" +elif test ! x$with_ffmpeg = xauto ; then + AC_MSG_ERROR([ + FFmpeg is required to build this package! + please see http://ffmpeg.mplayerhq.hu/ for how to + obtain a copy. + ]) +fi +fi +AM_CONDITIONAL(FFMPEG, test x$has_ffmpeg = xyes) + PKG_CHECK_MODULES(SDL, [sdl >= 1.2], has_sdl=yes, has_sdl=no) PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0], has_gtk2=yes, has_gtk2=no) PKG_CHECK_MODULES(GDK2, [gdk-2.0 >= 2.0.0], has_gdk2=yes, has_gdk2=no) Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-09-12 19:39:12 UTC (rev 1131) +++ trunk/lib/Makefile.am 2007-09-12 19:54:25 UTC (rev 1132) @@ -98,6 +98,12 @@ AM_CFLAGS += $(THEORA_CFLAGS) endif +if FFMPEG +SRCS += codec_ffmpeg.c codec_ffmpeg.h +libiaxclient_la_LIBADD += $(FFMPEG_LIBS) +AM_CFLAGS += $(FFMPEG_CFLAGS) +endif + SRCS_LIBGSM= \ gsm/src/add.c \ gsm/src/code.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-09-26 19:13:31
|
Revision: 1156 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1156&view=rev Author: sbalea Date: 2007-09-26 12:13:29 -0700 (Wed, 26 Sep 2007) Log Message: ----------- Merge stresstest branch into trunk Modified Paths: -------------- trunk/configure.ac trunk/lib/Makefile.am trunk/lib/codec_ffmpeg.c trunk/lib/codec_theora.c trunk/lib/iaxclient.h trunk/lib/iaxclient_lib.c trunk/lib/libiax2/src/iax.c trunk/lib/video.c trunk/simpleclient/Makefile.am trunk/simpleclient/vtestcall/Makefile.am trunk/simpleclient/vtestcall/vtestcall.c Added Paths: ----------- trunk/lib/slice.c trunk/lib/slice.h trunk/simpleclient/stresstest/ trunk/simpleclient/stresstest/Makefile.am trunk/simpleclient/stresstest/README trunk/simpleclient/stresstest/file.c trunk/simpleclient/stresstest/file.h trunk/simpleclient/stresstest/stresstest.c trunk/simpleclient/stresstest/stresstest.vcproj Removed Paths: ------------- trunk/simpleclient/stresstest/Makefile.am trunk/simpleclient/stresstest/README trunk/simpleclient/stresstest/file.c trunk/simpleclient/stresstest/file.h trunk/simpleclient/stresstest/stresstest.c trunk/simpleclient/stresstest/stresstest.vcproj Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/configure.ac 2007-09-26 19:13:29 UTC (rev 1156) @@ -88,7 +88,7 @@ AC_ARG_ENABLE(clients, [AS_HELP_STRING([--enable-clients], - [Select clients (all iaxcomm iaxphone testcall tkphone vtestcall WinIAX wx) [default=auto]])],, + [Select clients (all iaxcomm iaxphone stresstest testcall tkphone vtestcall WinIAX wx) [default=auto]])],, enable_clients="auto") AC_ARG_WITH(ilbc, @@ -145,10 +145,10 @@ if test ! "x$enable_clients" = "xauto"; then for client in ${enable_clients}; do case "$client" in - iaxcomm | iaxphone | testcall | tkphone | vtestcall | WinIAX | wx) + iaxcomm | iaxphone | stresstest | testcall | tkphone | vtestcall | WinIAX | wx) clients="$clients $client" ;; all | yes) - clients="iaxcomm iaxphone testcall tkphone vtestcall WinIAX wx" + clients="iaxcomm iaxphone stresstest testcall tkphone vtestcall WinIAX wx" break ;; none | no) clients="" @@ -259,6 +259,7 @@ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0], has_gtk2=yes, has_gtk2=no) PKG_CHECK_MODULES(GDK2, [gdk-2.0 >= 2.0.0], has_gdk2=yes, has_gdk2=no) PKG_CHECK_MODULES(ALSA, [alsa >= 1.0], has_alsa=yes, has_alsa=no) +PKG_CHECK_MODULES(OGGZ, [oggz >= 0.9.5], has_oggz=yes, has_oggz=no) has_iax2=no if test ! x$enable_local_iax = xyes; then @@ -364,7 +365,7 @@ # Autodetect clients if test "x$enable_clients" = "xauto"; then - clients="$clients testcall" + clients="$clients testcall stresstest" if test ! x$has_wx = xno; then clients="$clients iaxphone" @@ -396,6 +397,9 @@ testcall) CLIENTS="$CLIENTS $client";; + stresstest) + CLIENTS="$CLIENTS $client";; + vtestcall) if test ! x$has_sdl = xyes || test ! x$with_video = xyes ; then AC_MSG_ERROR([vtestcall requires SDL and video]) @@ -445,6 +449,7 @@ simpleclient/Makefile iaxclient.pc simpleclient/testcall/Makefile + simpleclient/stresstest/Makefile simpleclient/vtestcall/Makefile simpleclient/iaxcomm/Makefile simpleclient/iaxphone/Makefile Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/Makefile.am 2007-09-26 19:13:29 UTC (rev 1156) @@ -146,6 +146,8 @@ ringbuffer.c \ ringbuffer.h \ portmixer/px_common/portmixer.h \ + slice.c \ + slice.h \ spandsp/plc.c \ spandsp/plc.h Modified: trunk/lib/codec_ffmpeg.c =================================================================== --- trunk/lib/codec_ffmpeg.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/codec_ffmpeg.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -13,6 +13,9 @@ * the GNU Lesser (Library) General Public License. * * A video codec using the ffmpeg library. + * + * TODO: this code still uses its own slicing mechanism + * It should be converted to use the API provided in slice.[ch] */ #include <stdlib.h> Modified: trunk/lib/codec_theora.c =================================================================== --- trunk/lib/codec_theora.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/codec_theora.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -32,24 +32,9 @@ * - No support for splitting the frame into multiple slices. Frames can * be relatively large. For a 320x240 video stream, you can see key * frames larger than 9KB, which is the maximum UDP packet size on Mac - * OS X. We split the encoded frame artificially into slices that will - * fit into a typical MTU. We also add six bytes at the beginning of - * each slice. - * - * - version: right now, first bit should be 0, the rest are undefined - * - * - source id: 2 bytes random number used to identify stream changes in - * conference applications this number is transmitted in big endian - * format over the wire - * - * - frame index number - used to detect a new frame when some of the - * slices of the current frame are missing (only the least significant - * 4 bits are used) - * - * - index of slice in the frame, starting at 0 - * - * - total number of slices in the frame - * + * OS X. To work around this limitation, we use the slice API to fragment + * encoded frames to a reasonable size that UDP can safely transport + * * Other miscellaneous comments: * * - For quality reasons, when we detect a video stream switch, we reject all @@ -68,34 +53,29 @@ #include <stdlib.h> #include "iaxclient_lib.h" #include "video.h" +#include "slice.h" #include "codec_theora.h" #include <theora/theora.h> #define MAX_SLICE_SIZE 8000 -#define MAX_ENCODED_FRAME_SIZE 48*1024 struct theora_decoder { - theora_state td; - theora_info ti; - theora_comment tc; - unsigned char frame_index; - unsigned char slice_count; - int frame_size; - unsigned short source_id; - int got_key_frame; - unsigned char buffer[MAX_ENCODED_FRAME_SIZE]; + theora_state td; + theora_info ti; + theora_comment tc; + struct deslicer_context *dsc; + int got_key_frame; }; struct theora_encoder { - theora_state td; - theora_info ti; - theora_comment tc; - int needs_padding; - unsigned char frame_index; - unsigned short source_id; - unsigned char *pad_buffer; + theora_state td; + theora_info ti; + theora_comment tc; + int needs_padding; + struct slicer_context *sc; + unsigned char *pad_buffer; }; static void destroy( struct iaxc_video_codec *c) @@ -111,6 +91,8 @@ e = (struct theora_encoder *)c->encstate; if ( e->pad_buffer ) free(e->pad_buffer); + if ( e->sc ) + free_slicer_context(e->sc); theora_comment_clear(&e->tc); theora_info_clear(&e->ti); theora_clear(&e->td); @@ -119,6 +101,8 @@ if ( c->decstate ) { d = (struct theora_decoder *)c->decstate; + if ( d->dsc ) + free_deslicer_context(d->dsc); theora_comment_clear(&d->tc); theora_info_clear(&d->ti); theora_clear(&d->td); @@ -127,25 +111,34 @@ free(c); } -static void reset_decoder_frame_state(struct theora_decoder * d) +static int decode(struct iaxc_video_codec *c, int inlen, char *in, int *outlen, char *out) { - memset(d->buffer, 0, MAX_ENCODED_FRAME_SIZE); - d->frame_size = 0; - d->slice_count = 0; -} + struct theora_decoder *d; + ogg_packet op; + yuv_buffer picture; + unsigned int line; + int my_out_len; + int w, h, ph; + int flen; + char *frame; -static int pass_frame_to_decoder(struct theora_decoder *d, int *outlen, char *out) -{ - ogg_packet op; - yuv_buffer picture; - unsigned int line; - int my_out_len; - int w, h, ph; + // Sanity checks + if ( !c || !c->decstate || !in || inlen <= 0 || !out || !outlen ) + return -1; + // Assemble slices + d = (struct theora_decoder *)c->decstate; + if ( !d->dsc ) + return -1; + + frame = deslice(in, inlen, &flen, d->dsc); + if ( frame == NULL ) + return 1; + /* decode into an OP structure */ memset(&op, 0, sizeof(op)); - op.bytes = d->frame_size; - op.packet = d->buffer; + op.bytes = flen; + op.packet = (unsigned char *)frame; /* reject all incoming frames until we get a key frame */ if ( !d->got_key_frame ) @@ -190,21 +183,19 @@ { // Y-even memcpy(out + picture.y_width * 2 * line, - picture.y + 2 * line * picture.y_stride, - picture.y_width); + picture.y + 2 * line * picture.y_stride, + picture.y_width); // Y-odd memcpy(out + picture.y_width * (2 * line + 1), - picture.y + (2 * line + 1) * picture.y_stride, - picture.y_width); + picture.y + (2 * line + 1) * picture.y_stride, + picture.y_width); // U + V - memcpy(out + (d->ti.frame_width * d->ti.frame_height) + - line * d->ti.frame_width / 2, - picture.u + line * picture.uv_stride, - picture.uv_width); - memcpy(out + (d->ti.frame_width * d->ti.frame_height * 5 / 4) + - line * d->ti.frame_width / 2, - picture.v + line * picture.uv_stride, - picture.uv_width); + memcpy(out + (d->ti.frame_width * d->ti.frame_height) + line * d->ti.frame_width / 2, + picture.u + line * picture.uv_stride, + picture.uv_width); + memcpy(out + (d->ti.frame_width * d->ti.frame_height * 5 / 4) + line * d->ti.frame_width / 2, + picture.v + line * picture.uv_stride, + picture.uv_width); } *outlen = my_out_len; @@ -212,96 +203,6 @@ return 0; } -static int decode(struct iaxc_video_codec *c, int inlen, char *in, int *outlen, char *out) -{ - struct theora_decoder *d; - unsigned char frame_index, slice_index, num_slices, version; - unsigned short source_id; - - // Sanity checks - if ( !c || !c->decstate || !in || inlen <= 0 || !out || !outlen ) - return -1; - - d = (struct theora_decoder *)c->decstate; - - version = *in++; - source_id = (unsigned short)(*in++) << 8; - source_id |= *in++; - frame_index = *in++ & 0x0f; - slice_index = *in++; - num_slices = *in++; - inlen -= 6; - - if ( version & 0x80 ) - { - fprintf(stderr, "Theora: unknown slice protocol\n"); - return -1; - } - - if ( source_id == d->source_id ) - { - /* We use only the least significant bits to calculate delta - * this helps with conferencing and video muting/unmuting - */ - unsigned char frame_delta = (frame_index - d->frame_index) & 0x0f; - - if ( frame_delta > 8 ) - { - /* Old slice coming in late, ignore. */ - return 1; - } else if ( frame_delta > 0 ) - { - /* Slice belongs to a new frame */ - d->frame_index = frame_index; - - if ( d->slice_count > 0 ) - { - /* Current frame is incomplete, drop it */ - c->video_stats.dropped_frames++; - reset_decoder_frame_state(d); - } - } - } else - { - /* Video stream was switched, the existing frame/slice - * indexes are meaningless. - */ - reset_decoder_frame_state(d); - d->source_id = source_id; - d->frame_index = frame_index; - d->got_key_frame = 0; - } - - // Process current slice - if ( c->fragsize * slice_index + inlen > MAX_ENCODED_FRAME_SIZE ) - { - // Frame would be too large, ignore slice - return -1; - } - - memcpy(d->buffer + c->fragsize * slice_index, in, inlen); - d->slice_count++; - - /* We only know the size of the frame when we get the final slice */ - if ( slice_index == num_slices - 1 ) - d->frame_size = c->fragsize * slice_index + inlen; - - if ( d->slice_count < num_slices ) - { - // we're still waiting for some slices - return 1; - } else - { - // Frame complete, send to decoder - int ret = pass_frame_to_decoder(d, outlen, out); - - // Clean up in preparation for next frame - reset_decoder_frame_state(d); - - return ret; - } -} - // Pads a w by h frame to bring it up to pw by ph size using value static void pad_channel(const char *src, int w, int h, unsigned char *dst, int pw, int ph, unsigned char value) @@ -329,8 +230,6 @@ static int encode(struct iaxc_video_codec *c, int inlen, char *in, struct slice_set_t *slice_set) { - int i, size, ssize; - const unsigned char *p; struct theora_encoder *e; ogg_packet op; yuv_buffer picture; @@ -402,41 +301,21 @@ // Check to see if we have a key frame slice_set->key_frame = theora_packet_iskeyframe(&op) == 1; + + // Slice the frame + slice((char *)op.packet, op.bytes, slice_set, e->sc); - // We need to split the frame into one or more slices - p = op.packet; - size = op.bytes; - - // Figure out how many slices we need - slice_set->num_slices = (size - 1) / c->fragsize + 1; - - // Copy up to fragsize bytes into each slice - for ( i = 0; i < slice_set->num_slices; i++ ) - { - slice_set->data[i][0] = 0; - slice_set->data[i][1] = (unsigned char)(e->source_id >> 8); - slice_set->data[i][2] = (unsigned char)(e->source_id & 0xff); - slice_set->data[i][3] = e->frame_index; - slice_set->data[i][4] = (unsigned char)i; - slice_set->data[i][5] = (unsigned char)slice_set->num_slices; - ssize = (i == slice_set->num_slices - 1) ? - size % c->fragsize : c->fragsize; - memcpy(&slice_set->data[i][6], p, ssize); - slice_set->size[i] = ssize + 6; - p += ssize; - } - e->frame_index++; - return 0; } struct iaxc_video_codec *codec_video_theora_new(int format, int w, int h, int framerate, int bitrate, int fragsize) { - struct iaxc_video_codec *c; - struct theora_encoder *e; - struct theora_decoder *d; - ogg_packet headerp, commentp, tablep; + struct iaxc_video_codec *c; + struct theora_encoder *e; + struct theora_decoder *d; + unsigned short source_id; + ogg_packet headerp, commentp, tablep; /* Basic sanity checks */ if ( w <= 0 || h <= 0 || framerate <= 0 || bitrate <= 0 || fragsize <= 0 ) @@ -470,6 +349,8 @@ if ( !c->encstate ) goto bail; + video_reset_codec_stats(c); + c->format = format; c->width = w; c->height = h; @@ -484,6 +365,15 @@ e = (struct theora_encoder *)c->encstate; d = (struct theora_decoder *)c->decstate; + // Initialize slicer + // Generate random source id + srand((unsigned int)time(0)); + source_id = rand() & 0xffff; + e->sc = create_slicer_context(source_id, fragsize); + if ( !e->sc ) + goto bail; + + /* set up some parameters in the contexts */ theora_info_init(&e->ti); @@ -576,11 +466,12 @@ if ( theora_decode_init(&d->td, &d->ti) ) goto bail; - // Generate random source id - srand((unsigned int)time(0)); - e->source_id = rand() & 0xffff; - d->got_key_frame = 0; + + // Initialize deslicer context + d->dsc = create_deslicer_context(c->fragsize); + if ( !d->dsc ) + goto bail; strcpy(c->name, "Theora"); return c; @@ -591,11 +482,19 @@ if ( c ) { if ( c->encstate ) + { + e = (struct theora_encoder *)c->encstate; + if ( e->sc ) + free_slicer_context(e->sc); free(c->encstate); - + } if ( c->decstate ) + { + d = (struct theora_decoder *)c->decstate; + if ( d->dsc ) + free_deslicer_context(d->dsc); free(c->decstate); - + } free(c); } Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/iaxclient.h 2007-09-26 19:13:29 UTC (rev 1156) @@ -22,7 +22,7 @@ #ifdef __cplusplus extern "C" { #endif - + /*! \file iaxclient.h \brief The IAXClient API @@ -1249,6 +1249,22 @@ */ EXPORT void iaxc_YUV420_to_RGB32(int width, int height, char *src, char *dest); + +/* + * Test mode functionality + * In test mode, iaxclient will do the following: + * - skip audio and video hardware initialization + * - wait for outgoing media to be provided by the main application + * - return incoming media to the calling application if required, via callbacks + * - not generate any meaningful statistics + * Test mode is designed to be used without a GUI, and with multiple instances of iaxclient + * running on the same machine. However, some applications might actually benefit from having + * this level of control. + * iaxc_set_test_mode() should be called before iaxc_initialize() + */ +EXPORT void iaxc_set_test_mode(int); +EXPORT int iaxc_push_audio(void *data, unsigned int size, unsigned int samples); +EXPORT int iaxc_push_video(void *data, unsigned int size, int fragment); #ifdef __cplusplus } #endif Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/iaxclient_lib.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -61,6 +61,9 @@ #undef JB_DEBUGGING +/* global test mode flag */ +int test_mode = 0; + /* configurable jitterbuffer options */ static long jb_target_extra = -1; @@ -615,33 +618,26 @@ strncpy(calls[i].callerid_number, DEFAULT_CALLERID_NUMBER, IAXC_EVENT_BUFSIZ); } + if ( !test_mode ) + { #ifndef AUDIO_ALSA - if ( pa_initialize(&audio_driver, 8000) ) - { - iaxci_usermsg(IAXC_ERROR, "failed pa_initialize"); - return -1; - } + if ( pa_initialize(&audio_driver, 8000) ) + { + iaxci_usermsg(IAXC_ERROR, "failed pa_initialize"); + return -1; + } #else - /* TODO: It is unknown whether this stuff for direct access to - * alsa should be left in iaxclient. We're leaving it in here for - * the time being, but unless it becomes clear that someone cares - * about having it, it will be removed. Also note that portaudio - * is capable of using alsa. This is another reason why this - * direct alsa access may be unneeded. - */ - if ( alsa_initialize(&audio_driver, 8000) ) - return -1; + /* TODO: It is unknown whether this stuff for direct access to + * alsa should be left in iaxclient. We're leaving it in here for + * the time being, but unless it becomes clear that someone cares + * about having it, it will be removed. Also note that portaudio + * is capable of using alsa. This is another reason why this + * direct alsa access may be unneeded. + */ + if ( alsa_initialize(&audio_driver, 8000) ) + return -1; #endif - - audio_format_capability = - IAXC_FORMAT_ULAW | - IAXC_FORMAT_ALAW | -#ifdef CODEC_GSM - IAXC_FORMAT_GSM | -#endif - IAXC_FORMAT_SPEEX; - audio_format_preferred = IAXC_FORMAT_SPEEX; - + } #ifdef USE_VIDEO if ( video_initialize() ) { @@ -650,6 +646,16 @@ } #endif + /* Default audio format capabilities */ + audio_format_capability = + IAXC_FORMAT_ULAW | + IAXC_FORMAT_ALAW | +#ifdef CODEC_GSM + IAXC_FORMAT_GSM | +#endif + IAXC_FORMAT_SPEEX; + audio_format_preferred = IAXC_FORMAT_SPEEX; + return 0; } @@ -660,9 +666,13 @@ get_iaxc_lock(); audio_driver.destroy(&audio_driver); + if ( !test_mode ) + { + audio_driver.destroy(&audio_driver); #ifdef USE_VIDEO - video_destroy(); + video_destroy(); #endif + } put_iaxc_lock(); #ifdef WIN32 @@ -749,7 +759,8 @@ get_iaxc_lock(); service_network(); - service_audio(); + if ( !test_mode ) + service_audio(); // Check registration refresh once a second if ( refresh_registration_count++ > 1000/LOOP_SLEEP ) @@ -783,7 +794,8 @@ else call = NULL; - video_send_video(call, selected_call); + if ( !test_mode ) + video_send_video(call, selected_call); video_send_stats(call); // Tight spinloops are bad, mmmkay? @@ -1098,8 +1110,10 @@ if ( iaxci_audio_output_mode ) continue; - audio_driver.output(&audio_driver, fr, - fr_samples - samples - mainbuf_delta); + if ( !test_mode ) + audio_driver.output(&audio_driver, fr, + fr_samples - samples - mainbuf_delta); + } while ( total_consumed < e->datalen ); } @@ -1784,6 +1798,9 @@ EXPORT int iaxc_audio_devices_get(struct iaxc_audio_device **devs, int *nDevs, int *input, int *output, int *ring) { + if ( test_mode ) + return 0; + *devs = audio_driver.devices; *nDevs = audio_driver.nDevices; audio_driver.selected_devices(&audio_driver, input, output, ring); @@ -1792,6 +1809,9 @@ EXPORT int iaxc_audio_devices_set(int input, int output, int ring) { + if ( test_mode ) + return 0; + int ret = 0; get_iaxc_lock(); ret = audio_driver.select_devices(&audio_driver, input, output, ring); @@ -1801,26 +1821,41 @@ EXPORT float iaxc_input_level_get() { + if ( test_mode ) + return 0; + return audio_driver.input_level_get(&audio_driver); } EXPORT float iaxc_output_level_get() { + if ( test_mode ) + return 0; + return audio_driver.output_level_get(&audio_driver); } EXPORT int iaxc_input_level_set(float level) { + if ( test_mode ) + return 0; + return audio_driver.input_level_set(&audio_driver, level); } EXPORT int iaxc_output_level_set(float level) { + if ( test_mode ) + return 0; + return audio_driver.output_level_set(&audio_driver, level); } EXPORT int iaxc_play_sound(struct iaxc_sound *s, int ring) { + if ( test_mode ) + return 0; + int ret = 0; get_iaxc_lock(); ret = audio_driver.play_sound(s,ring); @@ -1830,6 +1865,9 @@ EXPORT int iaxc_stop_sound(int id) { + if ( test_mode ) + return 0; + int ret = 0; get_iaxc_lock(); ret = audio_driver.stop_sound(id); @@ -1891,3 +1929,32 @@ audio_prefs = prefs; return 0; } + +EXPORT void iaxc_set_test_mode(int tm) +{ + test_mode = tm; +} + +EXPORT int iaxc_push_audio(void *data, unsigned int size, unsigned int samples) +{ + struct iaxc_call *call; + + if (selected_call < 0) + return -1; + + call = &calls[selected_call]; + + if ( audio_prefs & IAXC_AUDIO_PREF_SEND_DISABLE ) + return 0; + + //fprintf(stderr, "iaxc_push_audio: sending audio size %d\n", size); + + if ( iax_send_voice(call->session, call->format, data, size, samples) == -1 ) + { + fprintf(stderr, "iaxc_push_audio: failed to send audio frame of size %d on call %d\n", size, selected_call); + return -1; + } + + return 0; +} + Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/libiax2/src/iax.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -992,8 +992,9 @@ DEBU(G "Started on port %d\n", portno); } - srand((unsigned int)time(0)); - callnums = rand() % 32767 + 1; + //srand((unsigned int)time(0)); + //callnums = rand() % 32767 + 1; + callnums = 1; transfer_id = rand() % 32767 + 1; return portno; Copied: trunk/lib/slice.c (from rev 1155, branches/team/mihai/stresstest/stresstest/lib/slice.c) =================================================================== --- trunk/lib/slice.c (rev 0) +++ trunk/lib/slice.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -0,0 +1,184 @@ +/* + * iaxclient: a portable telephony toolkit + * + * Copyright (C) 2007, Wimba, Inc. + * + * Mihai Balea <mihai at hates dot ms> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License + * + * A codec independent frame slicer/assembler library + */ + +#include "slice.h" + +struct slicer_context * create_slicer_context(unsigned short source_id, unsigned int slice_size) +{ + struct slicer_context *sc; + + sc = calloc(1, sizeof(struct slicer_context)); + sc->source_id = source_id; + sc->slice_size = slice_size; + return sc; +} + +int free_slicer_context(struct slicer_context *sc) +{ + if ( sc == NULL ) + return -1; + + free(sc); + return 0; +} + +int slice(char *data, + unsigned int size, + struct slice_set_t *slice_set, + struct slicer_context *sc + ) +{ + int i, ssize; + + if ( data == NULL || slice_set == NULL || sc == NULL) + return -1; + + // Figure out how many slices we need + slice_set->num_slices = (size - 1) / sc->slice_size + 1; + + for ( i = 0; i < slice_set->num_slices; i++ ) + { + slice_set->data[i][0] = 0; + slice_set->data[i][1] = (unsigned char)(sc->source_id >> 8); + slice_set->data[i][2] = (unsigned char)(sc->source_id & 0xff); + slice_set->data[i][3] = sc->frame_index; + slice_set->data[i][4] = (unsigned char)i; + slice_set->data[i][5] = (unsigned char)slice_set->num_slices; + ssize = (i == slice_set->num_slices - 1) ? + size % sc->slice_size : sc->slice_size; + memcpy(&slice_set->data[i][6], data, ssize); + slice_set->size[i] = ssize + 6; + data += ssize; + } + sc->frame_index++; + + return 0; +} + +struct deslicer_context * create_deslicer_context(unsigned int slice_size) +{ + struct deslicer_context *dsc; + + dsc = calloc(1, sizeof(struct deslicer_context)); + dsc->slice_size = slice_size; + return dsc; +} + +int free_deslicer_context(struct deslicer_context *dsc) +{ + if ( dsc == NULL ) + return -1; + free(dsc); + return 0; +} + +static void reset_deslicer_context(struct deslicer_context *dsc) +{ + if ( dsc == NULL ) + return; + + memset(dsc->buffer, 0, sizeof(dsc->buffer)); + dsc->frame_size = 0; + dsc->slice_count = 0; + dsc->frame_complete = 0; +} + +char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc) +{ + unsigned char frame_index, slice_index, num_slices, version; + unsigned short source_id; + + // Sanity checks + if ( dsc == NULL || in == NULL || inlen <= 0 || outlen == NULL ) + return NULL; + + // If previous call returned a complete frame, clean up the context + if ( dsc->frame_complete ) + { + reset_deslicer_context(dsc); + } + + version = *in++; + source_id = (unsigned short)(*in++) << 8; + source_id |= *in++; + frame_index = *in++ & 0x0f; + slice_index = *in++; + num_slices = *in++; + inlen -= 6; + + if ( version & 0x80 ) + { + fprintf(stderr, "deslice: unknown slice protocol\n"); + return NULL; + } + + if ( source_id == dsc->source_id ) + { + /* We use only the least significant bits to calculate delta + * this helps with conferencing and video muting/unmuting + */ + unsigned char frame_delta = (frame_index - dsc->frame_index) & 0x0f; + + if ( frame_delta > 8 ) + { + /* Old slice coming in late, ignore. */ + return NULL; + } else if ( frame_delta > 0 ) + { + /* Slice belongs to a new frame */ + dsc->frame_index = frame_index; + + if ( dsc->slice_count > 0 ) + { + /* Current frame is incomplete, drop it */ + reset_deslicer_context(dsc); + } + } + } else + { + /* Video stream was switched, the existing frame/slice + * indexes are meaningless. + */ + reset_deslicer_context(dsc); + dsc->source_id = source_id; + dsc->frame_index = frame_index; + } + + // Process current slice + if ( dsc->slice_size * slice_index + inlen > MAX_ENCODED_FRAME_SIZE ) + { + // Frame would be too large, ignore slice + return NULL; + } + + memcpy(dsc->buffer + dsc->slice_size * slice_index, in, inlen); + dsc->slice_count++; + + /* We only know the size of the frame when we get the final slice */ + if ( slice_index == num_slices - 1 ) + { + dsc->frame_size = dsc->slice_size * slice_index + inlen; + } + + if ( dsc->slice_count < num_slices ) + { + // we're still waiting for some slices + return NULL; + } else + { + // Frame complete, set the flag and return the buffer + dsc->frame_complete = 1; + *outlen = dsc->frame_size; + return dsc->buffer; + } +} Copied: trunk/lib/slice.h (from rev 1155, branches/team/mihai/stresstest/stresstest/lib/slice.h) =================================================================== --- trunk/lib/slice.h (rev 0) +++ trunk/lib/slice.h 2007-09-26 19:13:29 UTC (rev 1156) @@ -0,0 +1,108 @@ +/* + * iaxclient: a portable telephony toolkit + * + * Copyright (C) 2007, Wimba, Inc. + * + * Mihai Balea <mihai at hates dot ms> + * + * This program is free software, distributed under the terms of + * the GNU Lesser (Library) General Public License + * + * A codec independent frame slicer/assembler library + */ + +/* + * This API can be used with codecs that do not provide internal support for + * splitting encoded frames in arbitrary-sized slices. This is useful for + * things like transmitting encoded frame over size constained packet + * protocols such as UDP. + * + * The slicer adds 6 bytes at the beginning of each slice. The + * format of this header is : + * - version: right now, first bit should be 0, the rest are undefined + * + * - source id: 2 bytes random number used to identify stream changes in + * conference applications this number is transmitted in big endian + * format over the wire + * + * - frame index number - used to detect a new frame when some of the + * slices of the current frame are missing (only the least significant + * 4 bits are used) + * + * - index of slice in the frame, starting at 0 + * + * - total number of slices in the frame + * + */ +#ifndef __SLICE_H__ +#define __SLICE_H__ + +#include "iaxclient_lib.h" + +#define MAX_ENCODED_FRAME_SIZE 48 * 1024 + +struct slicer_context +{ + unsigned char frame_index; + unsigned short source_id; + unsigned int slice_size; +}; + +struct deslicer_context +{ + unsigned char frame_index; + unsigned char slice_count; + int frame_size; + unsigned short source_id; + unsigned int slice_size; + int frame_complete; + char buffer[MAX_ENCODED_FRAME_SIZE]; +}; + +/* + * Allocates and initializes a slicer context with the given souirce_id + */ +struct slicer_context * create_slicer_context(unsigned short source_id, unsigned int slice_size); + +/* + * Deallocates a slicer_context + */ +int free_slicer_context(struct slicer_context *sc); + +/* + * Fragments a frame into one or several slices + * data - frame data + * size - size of frame data + * slice-set - pointer to a preallocated structure that will hold slices and slice information + * sc - holds stream information such as source id and frame index + * Returns 0 if completed successfully or a negative value if failure. + */ +int slice(char *data, + unsigned int size, + struct slice_set_t *slice_set, + struct slicer_context *sc + ); + +/* + * Allocates and initializes a deslicer context with the given souirce_id + */ +struct deslicer_context * create_deslicer_context(unsigned int slice_size); + +/* + * Deallocates a slicer_context + */ +int free_deslicer_context(struct deslicer_context *dsc); + +/* + * Assembles one frame out of multiple slices + * in - slice data + * inlen - length of slice + * outlen - length of assembled frame + * dsc - holds stream information + * Returns NULL if there is an error or the current frame is incomplete + * Returns a pointer to a buffer containing the completed frame and updates + * outlen with the frame size if successful + */ +char * deslice(char *in, int inlen, int *outlen, struct deslicer_context *dsc); + +#endif // __SLICE_H__ Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/lib/video.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -17,6 +17,7 @@ #include <assert.h> #include "video.h" +#include "slice.h" #include "iaxclient_lib.h" #include "videoLib/video_grab.h" #include "iax-client.h" @@ -30,6 +31,7 @@ #define VIDEO_BUFSIZ (1<<19) extern int selected_call; +extern int test_mode; extern struct iaxc_call * calls; static int iaxc_video_width = 320; @@ -41,6 +43,8 @@ static int iaxc_video_format_allowed = 0; static struct iaxc_video_driver video_driver; +static struct slice_set_t slice_set; + /* Set the default so that the local and remote raw video is * sent to the client application and encoded video is sent out. */ @@ -91,6 +95,11 @@ if ( prefs & ~prefs_mask ) return -1; + 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. @@ -118,8 +127,6 @@ } } - iaxc_video_prefs = prefs; - return 0; } @@ -456,7 +463,6 @@ /* try to get the next frame, encode and send */ int video_send_video(struct iaxc_call *call, int sel_call) { - static struct slice_set_t slice_set; int format; int i = 0; const int inlen = iaxc_video_width * iaxc_video_height * 6 / 4; @@ -690,18 +696,21 @@ int video_initialize(void) { - if ( pv_initialize(&video_driver, iaxc_video_width, iaxc_video_height, - iaxc_video_framerate) ) + if ( !test_mode ) { - fprintf(stderr, "ERROR: cannot initialize pv\n"); - return -1; + if ( pv_initialize(&video_driver, iaxc_video_width, iaxc_video_height, + iaxc_video_framerate) ) + { + fprintf(stderr, "ERROR: cannot initialize pv\n"); + return -1; + } + + /* We reset the existing video preferences to yield the side-effect + * of potentially starting or stopping the video capture. + */ + iaxc_set_video_prefs(iaxc_video_prefs); } - /* We reset the existing video preferences to yield the side-effect - * of potentially starting or stopping the video capture. - */ - iaxc_set_video_prefs(iaxc_video_prefs); - return 0; } @@ -863,3 +872,64 @@ return 0; } +void video_reset_codec_stats(struct iaxc_video_codec *vcodec) +{ + if ( vcodec == NULL ) return; + + memset(&vcodec->video_stats, 0, sizeof(struct iaxc_video_stats)); + gettimeofday(&vcodec->video_stats.start_time, NULL); +} + +static struct slicer_context *sc = NULL; + +EXPORT int iaxc_push_video(void *data, unsigned int size, int fragment) +{ + struct iaxc_call *call; + + if (selected_call < 0) + return -1; + + call = &calls[selected_call]; + + if ( iaxc_video_prefs & IAXC_VIDEO_PREF_SEND_DISABLE ) + return 0; + + //fprintf(stderr, "iaxc_push_video: sending video size %d\n", size); + + // Fragment if needed + if ( fragment ) + { + int i; + + if ( sc == NULL ) + sc = create_slicer_context(random(), iaxc_video_fragsize); + + slice(data, size, &slice_set, sc); + for ( i = 0 ; i < slice_set.num_slices ; i++ ) + { + if ( iax_send_video_trunk(call->session, + call->vformat, + slice_set.data[i], + slice_set.size[i], + 0, + i + ) == -1 + ) + { + fprintf(stderr, "Failed to send a slice, call %d, size %d\n", + selected_call, slice_set.size[i]); + return -1; + } + + } + } else + { + if ( iax_send_video_trunk(call->session, call->vformat, data, size, 0, 0) == -1 ) + { + fprintf(stderr, "iaxc_push_video: failed to send video frame of size %d on call %d\n", size, selected_call); + return -1; + } + } + + return 0; +} Modified: trunk/simpleclient/Makefile.am =================================================================== --- trunk/simpleclient/Makefile.am 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/simpleclient/Makefile.am 2007-09-26 19:13:29 UTC (rev 1156) @@ -4,6 +4,7 @@ WinIAX \ iaxcomm \ iaxphone \ + stresstest \ testcall \ tkphone \ vtestcall \ Copied: trunk/simpleclient/stresstest (from rev 1155, branches/team/mihai/stresstest/stresstest/simpleclient/stresstest) Deleted: trunk/simpleclient/stresstest/Makefile.am =================================================================== --- branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/Makefile.am 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/simpleclient/stresstest/Makefile.am 2007-09-26 19:13:29 UTC (rev 1156) @@ -1,7 +0,0 @@ -bin_PROGRAMS=stresstest -stresstest_SOURCES=stresstest.c file.c file.h - -AM_CPPFLAGS=-I$(top_srcdir)/lib $(SDL_CFLAGS) $(OGGZ_CFLAGS) $(THEORA_CFLAGS) -stresstest_LDADD=$(top_builddir)/lib/libiaxclient.la $(OGGZ_LIBS) $(THEORA_LIBS) - -EXTRA_DIST = stresstest.vcproj Copied: trunk/simpleclient/stresstest/Makefile.am (from rev 1155, branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/Makefile.am) =================================================================== --- trunk/simpleclient/stresstest/Makefile.am (rev 0) +++ trunk/simpleclient/stresstest/Makefile.am 2007-09-26 19:13:29 UTC (rev 1156) @@ -0,0 +1,7 @@ +bin_PROGRAMS=stresstest +stresstest_SOURCES=stresstest.c file.c file.h + +AM_CPPFLAGS=-I$(top_srcdir)/lib $(SDL_CFLAGS) $(OGGZ_CFLAGS) $(THEORA_CFLAGS) +stresstest_LDADD=$(top_builddir)/lib/libiaxclient.la $(OGGZ_LIBS) $(THEORA_LIBS) + +EXTRA_DIST = stresstest.vcproj Deleted: trunk/simpleclient/stresstest/README =================================================================== --- branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/README 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/simpleclient/stresstest/README 2007-09-26 19:13:29 UTC (rev 1156) @@ -1,24 +0,0 @@ -Use the following command line: - -vtestcall -F <codec> <framerate> <bps> <width> <height> <fragment size> -[destination] - -See iaxclient/lib/iaxclient.h for codec types. -Theora is 24 -H.264 is 21 - -Example: - -Theora stream, 15 fps, 200kbps, 320x240 -vtestcall -F 24 15 200000 320 240 1400 - -If destination is missing, vtestcall will wait for incoming calls. - -The fragment size parameter is now working. However, Asterisk seems to have -problems with frames bigger than 4K so don't go over that. - -Right now, you need all parameters, mainly because command line parsing in -vtestcall sucks and I am too lazy to fix it. If it bothers you, fix it -yourself and post a patch. - - Copied: trunk/simpleclient/stresstest/README (from rev 1155, branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/README) =================================================================== --- trunk/simpleclient/stresstest/README (rev 0) +++ trunk/simpleclient/stresstest/README 2007-09-26 19:13:29 UTC (rev 1156) @@ -0,0 +1,24 @@ +Use the following command line: + +vtestcall -F <codec> <framerate> <bps> <width> <height> <fragment size> +[destination] + +See iaxclient/lib/iaxclient.h for codec types. +Theora is 24 +H.264 is 21 + +Example: + +Theora stream, 15 fps, 200kbps, 320x240 +vtestcall -F 24 15 200000 320 240 1400 + +If destination is missing, vtestcall will wait for incoming calls. + +The fragment size parameter is now working. However, Asterisk seems to have +problems with frames bigger than 4K so don't go over that. + +Right now, you need all parameters, mainly because command line parsing in +vtestcall sucks and I am too lazy to fix it. If it bothers you, fix it +yourself and post a patch. + + Deleted: trunk/simpleclient/stresstest/file.c =================================================================== --- branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/file.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/simpleclient/stresstest/file.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -1,267 +0,0 @@ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include "file.h" - -static struct ogg_stream *audio_stream; -static struct ogg_stream *video_stream; - -struct op_node * create_node(ogg_packet *op, long serialno, long timestamp) -{ - struct op_node *node; - - node = malloc(sizeof(struct op_node)); - node->timestamp = timestamp; - node->serialno = serialno; - node->op = malloc(sizeof(*op)); - memcpy(node->op, op, sizeof(*op)); - node->op->packet = malloc(op->bytes); - memcpy(node->op->packet, op->packet, op->bytes); - - return node; -} - -void append_node(struct ogg_stream *os, struct op_node *node) -{ - if ( os->first == NULL ) - { - if ( os->last != NULL ) - { - fprintf(stderr, "Queue inconsistency, bailing...\n"); - return; - } - os->first = node; - os->last = node; - node->next = NULL; - } else - { - if ( os->last == NULL ) - { - fprintf(stderr, "Queue inconsistency, bailing...\n"); - return; - } - os->last->next = node; - os->last = node; - node->next = NULL; - } -} - -/* - * We're forced to use a dirty hack here, due to Theora's idiotic API - * Theora needs three separate pieces of data, called headers to initialize - * its internal decoder structure. After all three pieces have been received, - * we can call theora_decode_init. - * We use a counter and a flag to make sure we have decoded our three headers and then - * we call theora_decode_init so we can initialize a theora_state structure. - * We use the ts structure to convert a granule position into an actual timestamp. - * There are many ways in which this can fail, but we rely on having all three headers - * at the beginning of the ogg video bitstream. - * - * To whoever came up with this convoluted scheme: please consider a change of careers. - */ -int read_theora_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) -{ - struct op_node *node; - struct theora_headers *th; - long timestamp = 0; - - //fprintf(stderr, "Got theora packet, serialno=%d, size=%d, packetno=%lld, granulepos=%lld\n", serialno, op->bytes, op->packetno, op->granulepos); - - th = (struct theora_headers *)video_stream->data; - - if ( theora_packet_isheader(op) ) - { - theora_decode_header(&(th->ti), &(th->tc), op); - th->header_count++; - } - - if ( th->header_count >= 3 && !th->have_headers ) - { - theora_decode_init(&(th->ts), &(th->ti)); - th->have_headers = 1; - } - - if ( th->have_headers ) - { - double d; - - d = theora_granule_time(&(th->ts), op->granulepos); - timestamp = (long)(d * 1000); - } - - if ( timestamp < 0 ) - { - timestamp = video_stream->page_ts + video_stream->page_count * THEORA_FRAME_DURATION; - video_stream->page_count++; - } else - { - video_stream->page_ts = timestamp; - video_stream->page_count = 0; - } - - if ( !theora_packet_isheader(op) ) - { - node = create_node(op, serialno, timestamp); - append_node(video_stream, node); - } - - return 0; -} - -int read_speex_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) -{ - struct op_node *node; - long timestamp; - static int cnt = 0; - - timestamp = audio_stream->page_ts + audio_stream->page_count * SPEEX_FRAME_DURATION; - audio_stream->page_count++; - - cnt++; - //fprintf(stderr, "Got speex packet, serialno=%ld, size=%ld, packetno=%lld, granulepos=%lld, timestamp=%ld\n", serialno, op->bytes, op->packetno, op->granulepos, timestamp); - - // Ignore the first two packets, they are headers - if ( cnt > 2 ) - { - node = create_node(op, serialno, timestamp); - append_node(audio_stream, node); - } - - return 0; -} - -int read_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) -{ - struct theora_headers *th; - - const char theoraId[] = "\x80theora"; - const char speexId[] = "Speex "; - - if ( memcmp(op->packet, theoraId, strlen(theoraId)) == 0 ) - { - //fprintf(stderr, "Detected a Theora stream with serialno=%d\n", serialno); - oggz_set_read_callback(oggz, serialno, read_theora_cb, NULL); - video_stream->serialno = serialno; - - // Initialize theora specific data fields - th = (struct theora_headers *)calloc(1, sizeof(struct theora_headers)); - theora_info_init(&(th->ti)); - theora_comment_init(&(th->tc)); - video_stream->data = th; - - read_theora_cb(oggz, op, serialno, data); - } else if ( memcmp(op->packet, speexId, strlen(speexId)) == 0 ) - { - //fprintf(stderr, "Detected a Speex stream with serialno=%d\n", serialno); - oggz_set_read_callback(oggz, serialno, read_speex_cb, NULL); - audio_stream->serialno = serialno; - read_speex_cb(oggz, op, serialno, data); - } else - { - fprintf(stderr, "Got unknown ogg packet, serialno=%d, size=%d, packetno=%d, granulepos=%d\n", serialno, op->bytes, op->packetno, op->granulepos); - } - return 0; -} - -int read_page_cb(OGGZ *oggz, const ogg_page *og, long serialno, void *data) -{ - if ( serialno == audio_stream->serialno ) - { - audio_stream->page_ts = ogg_page_granulepos(og) * 1000 / SPEEX_SAMPLING_RATE; - audio_stream->page_count = 0; - } else if ( serialno == video_stream->serialno ) - { - //fprintf(stderr, "Got theora page serialno=%d, header_len=%d, body_len=%d, granulepos=%lld\n", serialno, og->header_len, og->body_len, ogg_page_granulepos(og)); - } - return 0; -} - -void dump_stream(struct ogg_stream *os) -{ - struct op_node *node; - - node = os->first; - while ( node != NULL ) - { - fprintf(stderr, "Size=%ld, Stream=%ld, packetno=%lld, timestamp=%ld\n", node->op->bytes, node->serialno, node->op->packetno, node->timestamp); - node = node->next; - } -} - -void load_ogg_file(const char *filename) -{ - OGGZ *oggz; - - oggz = oggz_open(filename, OGGZ_READ | OGGZ_AUTO); - if ( oggz == NULL ) - { - fprintf(stderr, "Error opening ogg file\n"); - } - fprintf(stderr, "Successfully opened ogg file %s\n", filename); - - // Initialize internal streams - audio_stream = calloc(1, sizeof(struct ogg_stream)); - video_stream = calloc(1, sizeof(struct ogg_stream)); - - oggz_set_read_callback(oggz, -1, read_cb, NULL); - oggz_set_read_page(oggz, -1, read_page_cb, NULL); - - oggz_run(oggz); - - //fprintf(stderr, "Audio stream, serialno=%d\n", audio_stream->serialno); - //dump_stream(audio_stream); - //fprintf(stderr, "Video stream, serialno=%d\n", video_stream->serialno); - //dump_stream(video_stream); - - oggz_close(oggz); -} - -ogg_packet * get_next_op(struct ogg_stream *os) -{ - ogg_packet *op; - struct timeval tv; - long time_now; - - if ( os == NULL ) - return NULL; - - gettimeofday(&tv, NULL); - time_now = tv.tv_sec * 1000 + tv.tv_usec / 1000; - - if ( os->current == NULL ) - { - // point to the beginning of the stream and reset the time base - os->base_ts = time_now; - os->current = os->first; - } - - op = NULL; - if ( os->current->timestamp < time_now - os->base_ts ) - { - op = os->current->op; - os->current = os->current->next; - } - - return op; -} - -ogg_packet * get_next_audio_op() -{ - return get_next_op(audio_stream); -} - -ogg_packet * get_next_video_op() -{ - return get_next_op(video_stream); -} - -int audio_is_eos() -{ - return audio_stream->current == NULL; -} - -int video_is_eos() -{ - return video_stream->current == NULL; -} - Copied: trunk/simpleclient/stresstest/file.c (from rev 1155, branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/file.c) =================================================================== --- trunk/simpleclient/stresstest/file.c (rev 0) +++ trunk/simpleclient/stresstest/file.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -0,0 +1,267 @@ +#include <string.h> +#include <stdlib.h> +#include <stdio.h> +#include "file.h" + +static struct ogg_stream *audio_stream; +static struct ogg_stream *video_stream; + +struct op_node * create_node(ogg_packet *op, long serialno, long timestamp) +{ + struct op_node *node; + + node = malloc(sizeof(struct op_node)); + node->timestamp = timestamp; + node->serialno = serialno; + node->op = malloc(sizeof(*op)); + memcpy(node->op, op, sizeof(*op)); + node->op->packet = malloc(op->bytes); + memcpy(node->op->packet, op->packet, op->bytes); + + return node; +} + +void append_node(struct ogg_stream *os, struct op_node *node) +{ + if ( os->first == NULL ) + { + if ( os->last != NULL ) + { + fprintf(stderr, "Queue inconsistency, bailing...\n"); + return; + } + os->first = node; + os->last = node; + node->next = NULL; + } else + { + if ( os->last == NULL ) + { + fprintf(stderr, "Queue inconsistency, bailing...\n"); + return; + } + os->last->next = node; + os->last = node; + node->next = NULL; + } +} + +/* + * We're forced to use a dirty hack here, due to Theora's idiotic API + * Theora needs three separate pieces of data, called headers to initialize + * its internal decoder structure. After all three pieces have been received, + * we can call theora_decode_init. + * We use a counter and a flag to make sure we have decoded our three headers and then + * we call theora_decode_init so we can initialize a theora_state structure. + * We use the ts structure to convert a granule position into an actual timestamp. + * There are many ways in which this can fail, but we rely on having all three headers + * at the beginning of the ogg video bitstream. + * + * To whoever came up with this convoluted scheme: please consider a change of careers. + */ +int read_theora_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) +{ + struct op_node *node; + struct theora_headers *th; + long timestamp = 0; + + //fprintf(stderr, "Got theora packet, serialno=%d, size=%d, packetno=%lld, granulepos=%lld\n", serialno, op->bytes, op->packetno, op->granulepos); + + th = (struct theora_headers *)video_stream->data; + + if ( theora_packet_isheader(op) ) + { + theora_decode_header(&(th->ti), &(th->tc), op); + th->header_count++; + } + + if ( th->header_count >= 3 && !th->have_headers ) + { + theora_decode_init(&(th->ts), &(th->ti)); + th->have_headers = 1; + } + + if ( th->have_headers ) + { + double d; + + d = theora_granule_time(&(th->ts), op->granulepos); + timestamp = (long)(d * 1000); + } + + if ( timestamp < 0 ) + { + timestamp = video_stream->page_ts + video_stream->page_count * THEORA_FRAME_DURATION; + video_stream->page_count++; + } else + { + video_stream->page_ts = timestamp; + video_stream->page_count = 0; + } + + if ( !theora_packet_isheader(op) ) + { + node = create_node(op, serialno, timestamp); + append_node(video_stream, node); + } + + return 0; +} + +int read_speex_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) +{ + struct op_node *node; + long timestamp; + static int cnt = 0; + + timestamp = audio_stream->page_ts + audio_stream->page_count * SPEEX_FRAME_DURATION; + audio_stream->page_count++; + + cnt++; + //fprintf(stderr, "Got speex packet, serialno=%ld, size=%ld, packetno=%lld, granulepos=%lld, timestamp=%ld\n", serialno, op->bytes, op->packetno, op->granulepos, timestamp); + + // Ignore the first two packets, they are headers + if ( cnt > 2 ) + { + node = create_node(op, serialno, timestamp); + append_node(audio_stream, node); + } + + return 0; +} + +int read_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data) +{ + struct theora_headers *th; + + const char theoraId[] = "\x80theora"; + const char speexId[] = "Speex "; + + if ( memcmp(op->packet, theoraId, strlen(theoraId)) == 0 ) + { + //fprintf(stderr, "Detected a Theora stream with serialno=%d\n", serialno); + oggz_set_read_callback(oggz, serialno, read_theora_cb, NULL); + video_stream->serialno = serialno; + + // Initialize theora specific data fields + th = (struct theora_headers *)calloc(1, sizeof(struct theora_headers)); + theora_info_init(&(th->ti)); + theora_comment_init(&(th->tc)); + video_stream->data = th; + + read_theora_cb(oggz, op, serialno, data); + } else if ( memcmp(op->packet, speexId, strlen(speexId)) == 0 ) + { + //fprintf(stderr, "Detected a Speex stream with serialno=%d\n", serialno); + oggz_set_read_callback(oggz, serialno, read_speex_cb, NULL); + audio_stream->serialno = serialno; + read_speex_cb(oggz, op, serialno, data); + } else + { + fprintf(stderr, "Got unknown ogg packet, serialno=%d, size=%d, packetno=%d, granulepos=%d\n", serialno, op->bytes, op->packetno, op->granulepos); + } + return 0; +} + +int read_page_cb(OGGZ *oggz, const ogg_page *og, long serialno, void *data) +{ + if ( serialno == audio_stream->serialno ) + { + audio_stream->page_ts = ogg_page_granulepos(og) * 1000 / SPEEX_SAMPLING_RATE; + audio_stream->page_count = 0; + } else if ( serialno == video_stream->serialno ) + { + //fprintf(stderr, "Got theora page serialno=%d, header_len=%d, body_len=%d, granulepos=%lld\n", serialno, og->header_len, og->body_len, ogg_page_granulepos(og)); + } + return 0; +} + +void dump_stream(struct ogg_stream *os) +{ + struct op_node *node; + + node = os->first; + while ( node != NULL ) + { + fprintf(stderr, "Size=%ld, Stream=%ld, packetno=%lld, timestamp=%ld\n", node->op->bytes, node->serialno, node->op->packetno, node->timestamp); + node = node->next; + } +} + +void load_ogg_file(const char *filename) +{ + OGGZ *oggz; + + oggz = oggz_open(filename, OGGZ_READ | OGGZ_AUTO); + if ( oggz == NULL ) + { + fprintf(stderr, "Error opening ogg file\n"); + } + fprintf(stderr, "Successfully opened ogg file %s\n", filename); + + // Initialize internal streams + audio_stream = calloc(1, sizeof(struct ogg_stream)); + video_stream = calloc(1, sizeof(struct ogg_stream)); + + oggz_set_read_callback(oggz, -1, read_cb, NULL); + oggz_set_read_page(oggz, -1, read_page_cb, NULL); + + oggz_run(oggz); + + //fprintf(stderr, "Audio stream, serialno=%d\n", audio_stream->serialno); + //dump_stream(audio_stream); + //fprintf(stderr, "Video stream, serialno=%d\n", video_stream->serialno); + //dump_stream(video_stream); + + oggz_close(oggz); +} + +ogg_packet * get_next_op(struct ogg_stream *os) +{ + ogg_packet *op; + struct timeval tv; + long time_now; + + if ( os == NULL ) + return NULL; + + gettimeofday(&tv, NULL); + time_now = tv.tv_sec * 1000 + tv.tv_usec / 1000; + + if ( os->current == NULL ) + { + // point to the beginning of the stream and reset the time base + os->base_ts = time_now; + os->current = os->first; + } + + op = NULL; + if ( os->current->timestamp < time_now - os->base_ts ) + { + op = os->current->op; + os->current = os->current->next; + } + + return op; +} + +ogg_packet * get_next_audio_op() +{ + return get_next_op(audio_stream); +} + +ogg_packet * get_next_video_op() +{ + return get_next_op(video_stream); +} + +int audio_is_eos() +{ + return audio_stream->current == NULL; +} + +int video_is_eos() +{ + return video_stream->current == NULL; +} + Deleted: trunk/simpleclient/stresstest/file.h =================================================================== --- branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/file.h 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/simpleclient/stresstest/file.h 2007-09-26 19:13:29 UTC (rev 1156) @@ -1,54 +0,0 @@ -#ifndef __FILE_H__ -#define __FILE_H__ - -#include <oggz/oggz.h> -#include <theora/theora.h> - -#define SPEEX_FRAME_DURATION 20 -#define SPEEX_SAMPLING_RATE 8000 - -#define THEORA_FRAME_DURATION 1000 / 15 - -// Struct used to build chains of packets for delivery -struct op_node -{ - ogg_packet *op; - long serialno; - long timestamp; - struct op_node *next; -}; - -struct ogg_stream -{ - struct op_node *first; - struct op_node *last; - struct op_node *current; - long serialno; - long page_ts; - long page_count; - long base_ts; - void *data; -}; - -struct theora_headers -{ - theora_info ti; - theora_comment tc; - theora_state ts; - int header_count; - int have_headers; -}; - -int read_theora_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data); -int read_speex_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data); -int read_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data); -int read_page_cb(OGGZ *oggz, const ogg_page *og, long serialno, void *data); -void load_ogg_file(const char *filename); - -ogg_packet * get_next_audio_op(); -ogg_packet * get_next_video_op(); - -int audio_is_eos(); -int video_is_eos(); - -#endif // __FILE_H__ Copied: trunk/simpleclient/stresstest/file.h (from rev 1155, branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/file.h) =================================================================== --- trunk/simpleclient/stresstest/file.h (rev 0) +++ trunk/simpleclient/stresstest/file.h 2007-09-26 19:13:29 UTC (rev 1156) @@ -0,0 +1,54 @@ +#ifndef __FILE_H__ +#define __FILE_H__ + +#include <oggz/oggz.h> +#include <theora/theora.h> + +#define SPEEX_FRAME_DURATION 20 +#define SPEEX_SAMPLING_RATE 8000 + +#define THEORA_FRAME_DURATION 1000 / 15 + +// Struct used to build chains of packets for delivery +struct op_node +{ + ogg_packet *op; + long serialno; + long timestamp; + struct op_node *next; +}; + +struct ogg_stream +{ + struct op_node *first; + struct op_node *last; + struct op_node *current; + long serialno; + long page_ts; + long page_count; + long base_ts; + void *data; +}; + +struct theora_headers +{ + theora_info ti; + theora_comment tc; + theora_state ts; + int header_count; + int have_headers; +}; + +int read_theora_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data); +int read_speex_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data); +int read_cb(OGGZ *oggz, ogg_packet *op, long serialno, void *data); +int read_page_cb(OGGZ *oggz, const ogg_page *og, long serialno, void *data); +void load_ogg_file(const char *filename); + +ogg_packet * get_next_audio_op(); +ogg_packet * get_next_video_op(); + +int audio_is_eos(); +int video_is_eos(); + +#endif // __FILE_H__ Deleted: trunk/simpleclient/stresstest/stresstest.c =================================================================== --- branches/team/mihai/stresstest/stresstest/simpleclient/stresstest/stresstest.c 2007-09-26 15:11:22 UTC (rev 1155) +++ trunk/simpleclient/stresstest/stresstest.c 2007-09-26 19:13:29 UTC (rev 1156) @@ -1,353 +0,0 @@ -/* -* vtestcall: make a single video test call with IAXCLIENT -* -* IAX Support for talking to Asterisk and other Gnophone clients -* -* Copyright (C) 1999, Linux Support Services, Inc. -* -* Mark Spencer <mar...@li...> -* Stefano Falsetto <fal...@gn...> -* Mihai Balea <mihai AT hates DOT ms> -* -* This program is free software, distributed under the terms of -* the GNU Lesser (Library) General Public License -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <fcntl.h> -#include <stdio.h> -#include <time.h> -#include <signal.h> - -#include "iaxclient.h" -#include "slice.h" -#include "file.h" - -#ifdef WIN32 -// Only under windows... -#undef main -#endif - -#define MAX_CALLS 1 - -//int format = IAXC_FORMAT_THEORA | IAXC_FORMAT_SPEEX; -int format = IAXC_FORMAT_H263 | IAXC_FORMAT_H263_PLUS | IAXC_FORMAT_H264 | IAXC_FORMAT_MPEG4 | IAXC_FORMAT_THEORA; -int formatp = IAXC_FORMAT_H264; //IAXC_FORMAT_THEORA; -int framerate = 15; -int bitrate = 200000; -int width = 320; -int height = 240; -int fragsize = 1400; - -int call_established = 0; - -// Forward declaration -void process_text_message(char *message); - -char caption[80] = ""; - -int send_video = 1; -int send_audio = 1; -int print_netstats = 0; - -// Audio-cosmetic... -struct iaxc_sound sound_ringOUT, sound_ringIN; - -/* routine called at exit to shutdown audio I/O and close nicely. -NOTE: If all this isnt done, the system doesnt not handle this -cleanly and has to be rebooted. What a pile of doo doo!! */ -void killem(void) -{ - fprintf(stderr,"Calling iaxc_shutdown..."); - iaxc_shutdown(); - fprintf(stderr,"Done\nProgram terminated correctly.\n"); - exit(0); -} - -void signal_handler(int signum) -{ - if ( signum == SIGTERM || signum == SIGINT ) - { - killem(); - exit(0); - } -} - -void fatal_error(char *err) { - killem(); - fprintf(stderr, "FATAL ERROR: %s\n", err); - exit(1); -} - -int levels_callback(float input, float output) { - //fprintf(stderr,"Input level: %f\nOutput level: %f\n",input,output); - return 1; -} - -int netstat_callback(struct iaxc_ev_netstats n) { - static int i; - - if ( !print_netstats ) - return 0; - - if(i++%25 == 0) - fprintf(stderr, "RTT\t" - "Rjit\tRlos%%\tRlosC\tRpkts\tRdel\tRdrop\tRooo\t" - "Ljit\tLlos%%\tLlosC\tLpkts\tLdel\tLdrop\tLooo\n"); - - fprintf(stderr, "%d\t" - "%d\t%d\t%d\t%d\t%d\t%d\t%d\t" - "%d\t%d\t%d\t%d\t%d\t%d\t%d\n", - - n.rtt, - - n.remote.jitter, - n.remote.losspct, - n.remote.losscnt, - n.remote.packets, - n.remote.delay, - n.remote.dropped, - n.remote.ooo, - - n.local.jitter, - n.local.losspct, - n.local.losscnt, - n.local.packets, - n.local.delay, - n.local.dropped, - n.local.ooo - ); - - return 0; -} - -void hangup_and_exit(void) -{ - iaxc_dump_call(); - fprintf(stderr,"Dumped call\n"); - iaxc_millisleep(1000); - fprintf(stderr,"Sleeped for 1000 msec\n"); - iaxc_stop_processing_thread(); - fprintf(stderr,"Stopped processing thread\n"); - killem(); -} - -void process_text_message(char *message) -{ - unsigned int prefs; - - if ( strncmp(message, "CONTROL:", strlen("CONTROL:")) == 0 ) - { - message += strlen("CONTROL:"); - if ( strcmp(message, "STOPVIDEO") == 0 ) - { - // Stop sending video - prefs = iaxc_get_video_prefs(); - prefs = prefs | IAXC_VIDEO_PREF_SEND_DISABLE ; - iaxc_set_video_prefs(prefs); - } else if ( strcmp(message, "STARTVIDEO") == 0 ) ... [truncated message content] |
From: <do...@us...> - 2007-10-11 20:10:21
|
Revision: 1194 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1194&view=rev Author: dohpaz Date: 2007-10-11 13:10:25 -0700 (Thu, 11 Oct 2007) Log Message: ----------- Fix case of QuickTime framework so things will build for folks with case sensitive file systems on Mac OS X. Modified Paths: -------------- trunk/lib/Makefile.am trunk/simpleclient/stresstest/Makefile.am Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-10-11 19:49:59 UTC (rev 1193) +++ trunk/lib/Makefile.am 2007-10-11 20:10:25 UTC (rev 1194) @@ -57,7 +57,7 @@ if MACOSX SRCS += $(SRCS_MACOSX) -AM_LDFLAGS += -framework Quicktime +AM_LDFLAGS += -framework QuickTime if VIDEO SRCS += $(SRCS_MACOSX_VIDEO) endif Modified: trunk/simpleclient/stresstest/Makefile.am =================================================================== --- trunk/simpleclient/stresstest/Makefile.am 2007-10-11 19:49:59 UTC (rev 1193) +++ trunk/simpleclient/stresstest/Makefile.am 2007-10-11 20:10:25 UTC (rev 1194) @@ -10,7 +10,7 @@ -framework AudioUnit \ -framework Carbon \ -framework CoreAudio \ - -framework Quicktime + -framework QuickTime endif EXTRA_DIST = stresstest.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2007-10-31 17:31:25
|
Revision: 1250 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1250&view=rev Author: bcholew Date: 2007-10-31 10:31:21 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Add video capture device notification feature - for device plug-n-play. Add two new events: IAXC_EVENT_VIDCAP_ERROR (to signify a vidcap device error) and IAXC_EVENT_VIDCAP_DEVICE (to signify a potential change to the vidcap device list). Two new functions: iaxc_video_devices_get() and iaxc_video_devices_set() to retrieve a vidcap device list, and select one for capture. Don't acquire a vidcap device until asked to capture. Release device when capture is stopped. Update vtestcall to take advantage of video device selection. Modified Paths: -------------- trunk/README.VisualStudio trunk/contrib/win/vs2005/iaxclient.sln trunk/lib/iaxclient.h trunk/lib/video.c trunk/simpleclient/vtestcall/vtestcall.c Added Paths: ----------- trunk/contrib/win/vs2005/libvidcap.vcproj Modified: trunk/README.VisualStudio =================================================================== --- trunk/README.VisualStudio 2007-10-31 13:10:33 UTC (rev 1249) +++ trunk/README.VisualStudio 2007-10-31 17:31:21 UTC (rev 1250) @@ -28,18 +28,19 @@ http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf 2) Obtain dependencies. At the time of this writing, portaudio-v19, - libogg 1.1.3, speex 1.2beta1, and libtheora 1.0alpha7 are required. + libogg 1.1.3, speex 1.2beta1, libtheora 1.0alpha7, and libvidcap are required. Source for these dependencies are available here: http://portaudio.com/archives/pa_snapshot_v19.tar.gz http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz http://downloads.xiph.org/releases/speex/speex-1.2beta1.tar.gz http://downloads.xiph.org/releases/theora/libtheora-1.0alpha7.tar.gz + http://downloads.sourceforge.net/libvidcap/libvidcap-0.1.tar.gz In order to build with the vcproj files provided by iaxclient, these dependent libraries must be moved to be peer directories to the iaxclient source directory. They also must have the following - names: libogg, speex, and libtheora. So the final directory + names: libogg, speex, libtheora and libvidcap. So the final directory layout would be as follows: C:\...\whereever\iaxclient @@ -47,6 +48,7 @@ C:\...\whereever\libogg C:\...\whereever\speex C:\...\whereever\libtheora + C:\...\whereever\libvidcap 2) Open the solution file: contrib/win/vs2005/iaxclient.sln Modified: trunk/contrib/win/vs2005/iaxclient.sln =================================================================== --- trunk/contrib/win/vs2005/iaxclient.sln 2007-10-31 13:10:33 UTC (rev 1249) +++ trunk/contrib/win/vs2005/iaxclient.sln 2007-10-31 17:31:21 UTC (rev 1250) @@ -7,14 +7,14 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}" ProjectSection(ProjectDependencies) = postProject + {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A} + {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569} + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} + {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4} + {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8} + {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE} {3B023516-2C69-4CCB-9302-239991B6EC2C} = {3B023516-2C69-4CCB-9302-239991B6EC2C} - {F5166D99-32BB-40D5-BE95-6F97F72C44CE} = {F5166D99-32BB-40D5-BE95-6F97F72C44CE} - {E2C6AD95-7A61-41FE-8754-A4623C891BF8} = {E2C6AD95-7A61-41FE-8754-A4623C891BF8} - {E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4} - {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} = {2F463562-375D-481E-A6E0-7C7D0DC1ED7A} - {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} - {3A76129B-55AB-4D54-BAA7-08F63ED52569} = {3A76129B-55AB-4D54-BAA7-08F63ED52569} - {82C9BD79-9796-405F-8A28-3F538514AC3A} = {82C9BD79-9796-405F-8A28-3F538514AC3A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}" @@ -34,6 +34,11 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "..\..\..\simpleclient\vtestcall\vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" + ProjectSection(ProjectDependencies) = postProject + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_dll|Win32 = Debug_dll|Win32 @@ -122,6 +127,14 @@ {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release_dll|Win32.Build.0 = Release|Win32 {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.ActiveCfg = Release|Win32 {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.Build.0 = Release|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.Build.0 = Debug|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.ActiveCfg = Debug|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.Build.0 = Debug|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.ActiveCfg = Release|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.Build.0 = Release|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.ActiveCfg = Release|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Added: trunk/contrib/win/vs2005/libvidcap.vcproj =================================================================== --- trunk/contrib/win/vs2005/libvidcap.vcproj (rev 0) +++ trunk/contrib/win/vs2005/libvidcap.vcproj 2007-10-31 17:31:21 UTC (rev 1250) @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="libvidcap" + ProjectGUID="{F5166D99-32BB-40D5-BE95-6F97F72C44CE}" + RootNamespace="libvidcap" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="4" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include"" + PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="4" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\..\..\..\libvidcap\src;..\..\..\..\libvidcap\src\directshow;..\..\..\..\libvidcap\include;"$(DXSDK_DIR)\Include"" + PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_DIRECTSHOW;HAVE_SLEEP" + RuntimeLibrary="2" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\..\..\libvidcap\src\conv.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\conv_to_i420.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\conv_to_rgb.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\conv_to_yuy2.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\hotlist.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\logging.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\sapi.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\sapi_dshow.cpp" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\sliding_window.c" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\vidcap.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\..\..\libvidcap\src\conv.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\include\vidcap\converters.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\DevMonitor.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\DirectShowSource.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\GraphMonitor.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\hotlist.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\directshow\LocklessQueue.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\logging.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\logging.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\sapi.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\sapi_context.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\src\sliding_window.h" + > + </File> + <File + RelativePath="..\..\..\..\libvidcap\include\vidcap\vidcap.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: trunk/lib/iaxclient.h =================================================================== --- trunk/lib/iaxclient.h 2007-10-31 13:10:33 UTC (rev 1249) +++ trunk/lib/iaxclient.h 2007-10-31 17:31:21 UTC (rev 1250) @@ -132,6 +132,8 @@ #define IAXC_EVENT_DTMF 9 /*!< Indicates a DTMF event */ #define IAXC_EVENT_AUDIO 10 /*!< Indicates an audio event */ #define IAXC_EVENT_VIDEOSTATS 11 /*!< Indicates a video statistics update event */ +#define IAXC_EVENT_VIDCAP_ERROR 12 /*!< Indicates a video capture error occurred */ +#define IAXC_EVENT_VIDCAP_DEVICE 13 /*!< Indicates a possible video capture device insertion/removal */ #define IAXC_CALL_STATE_FREE 0 /*!< Indicates a call slot is free */ #define IAXC_CALL_STATE_ACTIVE (1<<1) /*!< Indicates a call is active */ @@ -920,6 +922,26 @@ */ EXPORT int iaxc_get_netstats(int call, int *rtt, struct iaxc_netstat *local, struct iaxc_netstat *remote); +/*! + A structure containing information about a video capture device. +*/ +struct iaxc_video_device { + /*! + The "human readable" name of the device + */ + const char *name; + + /*! + unique id of the device + */ + const char *id_string; + + /*! + iaxclient id of the device + */ + int id; +}; + #define IAXC_AD_INPUT (1<<0) /*!< Device is usable for input*/ #define IAXC_AD_OUTPUT (1<<1) /*!< Device is usable for output */ #define IAXC_AD_RING (1<<2) /*!< Device is usable for ring */ @@ -1111,6 +1133,23 @@ */ EXPORT int iaxc_set_audio_prefs(unsigned int prefs); +/*! + Get video capture device information: + \param devs Returns an array of iaxc_video_device structures. + The array will will be valid as long as iaxc is initialized. + \param nDevs Returns the number of devices in the devs array + \param devId Returns the id of the currently selected video capture device + + \return -1 on error, 0 if no change to the device list, 1 if it's been updated + */ +EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, int *nDevs, int *devId); + +/*! + Sets the current video capture device + \param devId The id of the device to use for video capture + */ +EXPORT int iaxc_video_device_set(int devId); + /* * Acceptable range for video rezolution */ Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-10-31 13:10:33 UTC (rev 1249) +++ trunk/lib/video.c 2007-10-31 17:31:21 UTC (rev 1250) @@ -31,13 +31,16 @@ #include "codec_theora.h" #endif +#if defined(WIN32) +#define strdup _strdup +#endif + struct video_info { vidcap_state * vc; vidcap_sapi * sapi; vidcap_src * src; struct vidcap_sapi_info sapi_info; - struct vidcap_src_info src_info; struct vidcap_fmt_info fmt_info; /* these are the requested (post-scaling) dimensions */ @@ -63,6 +66,15 @@ int prefs; struct slicer_context * sc; + + /* these two struct arrays are correlated by index */ + struct vidcap_src_info * vc_src_info; + struct iaxc_video_device * devices; + MUTEX dev_list_lock; + + int device_count; + int selected_device_id; + int next_id; }; struct video_format_info @@ -492,6 +504,24 @@ */ } +static int video_device_notification_callback(vidcap_sapi *sapi, + void * user_context) +{ + iaxc_event evt; + + if ( sapi != vinfo.sapi ) + { + fprintf(stderr, "ERROR: wrong sapi in device notification\n"); + return -1; + } + + /* notify application that device list has been updated */ + evt.type = IAXC_EVENT_VIDCAP_DEVICE; + iaxci_post_event(evt); + + return 0; +} + static int capture_callback(vidcap_src * src, void * user_data, struct vidcap_capture_info * cap_info) { @@ -517,6 +547,8 @@ const char * source_buf = 0; int source_buf_size = 0; + iaxc_event evt; + int i; if ( cap_info->error_status ) @@ -524,6 +556,9 @@ fprintf(stderr, "vidcap capture error %d\n", cap_info->error_status); vinfo.capturing = 0; + + evt.type = IAXC_EVENT_VIDCAP_ERROR; + iaxci_post_event(evt); return -1; } @@ -732,30 +767,10 @@ }; static const int fourcc_list_len = sizeof(fourcc_list) / sizeof(int); - int i; static const int max_factor = 2; int scale_factor; + int i; - if ( !vinfo.src ) - { - /* Acquire the default source */ - if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi, 0)) ) - { - fprintf(stderr, "failed to acquire video source\n"); - return -1; - } - - if ( vidcap_src_info_get(vinfo.src, &vinfo.src_info) ) - { - fprintf(stderr, "failed to get video source info\n"); - return -1; - } - - fprintf(stderr, "acquired vidcap source %s (%s)\n", - vinfo.src_info.description, - vinfo.src_info.identifier); - } - vinfo.width = vfinfo.width; vinfo.height = vfinfo.height; vinfo.fmt_info.fps_numerator = vfinfo.framerate; @@ -878,6 +893,46 @@ return 0; } +static int ensure_acquired(int dev_id) +{ + int dev_num; + + if ( !vinfo.src ) + { + MUTEXLOCK(&vinfo.dev_list_lock); + + for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ ) + { + if ( vinfo.devices[dev_num].id == dev_id ) + break; + } + + if ( dev_num == vinfo.device_count ) + { + MUTEXUNLOCK(&vinfo.dev_list_lock); + fprintf(stderr, "invalid vidcap dev id: %d\n", dev_id); + return -1; + } + + if ( !(vinfo.src = vidcap_src_acquire(vinfo.sapi, + &vinfo.vc_src_info[dev_num])) ) + { + vinfo.src = 0; + MUTEXUNLOCK(&vinfo.dev_list_lock); + fprintf(stderr, "failed to acquire video source\n"); + return -1; + } + + fprintf(stderr, "acquired vidcap source %s (%s)\n", + vinfo.vc_src_info[dev_num].description, + vinfo.vc_src_info[dev_num].identifier); + + MUTEXUNLOCK(&vinfo.dev_list_lock); + } + + return 0; +} + EXPORT int iaxc_set_video_prefs(unsigned int prefs) { const unsigned int prefs_mask = @@ -888,9 +943,14 @@ IAXC_VIDEO_PREF_SEND_DISABLE | IAXC_VIDEO_PREF_RECV_RGB32 | IAXC_VIDEO_PREF_CAPTURE_DISABLE; + int ret; if ( prefs & ~prefs_mask ) + { + fprintf(stderr, "ERROR: unexpected video preference: 0x%0x\n", + prefs); return -1; + } vinfo.prefs = prefs; @@ -911,7 +971,15 @@ { if ( vidcap_src_capture_stop(vinfo.src) ) fprintf(stderr, "failed vidcap_src_capture_stop\n"); + vinfo.capturing = 0; + + if ( vinfo.src && vidcap_src_release(vinfo.src) ) + { + fprintf(stderr, "failed to release a video source\n"); + } + + vinfo.src = 0; } MUTEXUNLOCK(&vinfo.camera_lock); } @@ -920,17 +988,30 @@ MUTEXLOCK(&vinfo.camera_lock); if ( !vinfo.capturing ) { + if ( vinfo.selected_device_id < 0 ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + return -1; + } + + if ( ensure_acquired(vinfo.selected_device_id) ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + return -1; + } + if ( prepare_for_capture() ) { MUTEXUNLOCK(&vinfo.camera_lock); return -1; } - if ( vidcap_src_capture_start(vinfo.src, - capture_callback, 0) ) + if ( (ret = vidcap_src_capture_start(vinfo.src, + capture_callback, 0)) ) { MUTEXUNLOCK(&vinfo.camera_lock); - fprintf(stderr, "failed to start video capture\n"); + fprintf(stderr, "failed to start video capture: %d\n", + ret); return -1; } @@ -1231,10 +1312,230 @@ return 0; } +EXPORT int iaxc_video_devices_get(struct iaxc_video_device **devs, + int *num_devs, int *id_selected) +{ + int new_device_count; + int old_device_count; + struct vidcap_src_info *new_src_list; + struct vidcap_src_info *old_src_list; + struct iaxc_video_device *new_iaxc_dev_list; + struct iaxc_video_device *old_iaxc_dev_list; + int found_selected_device = 0; + int list_changed = 0; + int i, n; + + /* update libvidcap's device list */ + new_device_count = vidcap_src_list_update(vinfo.sapi); + if ( new_device_count != vinfo.device_count ) + list_changed = 1; + + if ( new_device_count < 0 ) + { + fprintf(stderr, "ERROR: failed getting updated vidcap device list: %d\n", + new_device_count); + return -1; + } + + new_src_list = (struct vidcap_src_info *)malloc(new_device_count * + sizeof(struct vidcap_src_info)); + if ( !new_src_list ) + { + fprintf(stderr, "ERROR: failed updated source allocation\n"); + return -1; + } + + new_iaxc_dev_list = (struct iaxc_video_device *)malloc( + new_device_count * sizeof(struct iaxc_video_device)); + if ( !new_iaxc_dev_list ) + { + free(new_src_list); + fprintf(stderr, "ERROR: failed source allocation update\n"); + return -1; + } + + /* get an updated libvidcap device list */ + if ( vidcap_src_list_get(vinfo.sapi, new_device_count, new_src_list) ) + { + fprintf(stderr, "ERROR: failed vidcap_srcList_get()\n"); + + free(new_src_list); + free(new_iaxc_dev_list); + return -1; + } + + /* build a new iaxclient video source list */ + found_selected_device = 0; + for ( n = 0; n < new_device_count; n++ ) + { + new_iaxc_dev_list[n].name = strdup(new_src_list[n].description); + new_iaxc_dev_list[n].id_string = strdup(new_src_list[n].identifier); + + /* this device may have been here all along + * Check if it has, and re-assign that device id + * else assign a new id + */ + for ( i = 0; i < vinfo.device_count; i++ ) + { + if ( !strcmp(new_iaxc_dev_list[n].name, vinfo.devices[i].name) ) + { + /*fprintf(stderr, "EXISTING DEVICE: %s - (id=%d) '%s'\n", + new_iaxc_dev_list[n].name, + vinfo.devices[i].id, + new_iaxc_dev_list[n].id_string); + */ + new_iaxc_dev_list[n].id = vinfo.devices[i].id; + + if ( vinfo.selected_device_id == new_iaxc_dev_list[n].id ) + found_selected_device = 1; + break; + } + } + if ( i == vinfo.device_count ) + { + new_iaxc_dev_list[n].id = vinfo.next_id++; + fprintf(stderr, "NEW DEVICE: %s - (id=%d) '%s'\n", + new_iaxc_dev_list[n].name, + new_iaxc_dev_list[n].id, + new_iaxc_dev_list[n].id_string); + + list_changed = 1; + } + } + + if ( !list_changed ) + { + /* Free new lists. Nothing's really changed */ + free(new_src_list); + for ( i = 0; i < new_device_count; i++ ) + { + free((void *)new_iaxc_dev_list[i].name); + free((void *)new_iaxc_dev_list[i].id_string); + } + free(new_iaxc_dev_list); + } + else + { + old_device_count = vinfo.device_count; + old_src_list = vinfo.vc_src_info; + old_iaxc_dev_list = vinfo.devices; + + /* Update iaxclient's device list info */ + /* Lock since other iaxclient funcs use these fields */ + MUTEXLOCK(&vinfo.dev_list_lock); + + vinfo.device_count = new_device_count; + vinfo.vc_src_info = new_src_list; + vinfo.devices = new_iaxc_dev_list; + + MUTEXUNLOCK(&vinfo.dev_list_lock); + + /* free old lists */ + free(old_src_list); + for ( i = 0; i < old_device_count; i++ ) + { + free((void *)old_iaxc_dev_list[i].name); + free((void *)old_iaxc_dev_list[i].id_string); + } + free(old_iaxc_dev_list); + } + + *devs = vinfo.devices; + *num_devs = vinfo.device_count; + *id_selected = found_selected_device ? vinfo.selected_device_id : -1; + + return list_changed; +} + +EXPORT int iaxc_video_device_set(int capture_dev_id) +{ + int ret = 0; + int dev_num = 0; + + MUTEXLOCK(&vinfo.camera_lock); + + if ( capture_dev_id == vinfo.selected_device_id ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + return 0; + } + + if ( capture_dev_id < 0 ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + fprintf(stderr, "invalid video device id ( < 0 )\n"); + return -1; + } + + MUTEXLOCK(&vinfo.dev_list_lock); + + for ( dev_num = 0; dev_num < vinfo.device_count; dev_num++ ) + { + if ( vinfo.devices[dev_num].id == capture_dev_id ) + break; + } + + if ( dev_num == vinfo.device_count ) + { + MUTEXUNLOCK(&vinfo.dev_list_lock); + MUTEXUNLOCK(&vinfo.camera_lock); + fprintf(stderr, "invalid video device id: %d\n", + capture_dev_id); + return -1; + } + + vinfo.selected_device_id = capture_dev_id; + + if ( vinfo.src && vidcap_src_release(vinfo.src) ) + { + fprintf(stderr, "failed to release video source\n"); + } + + vinfo.src = 0; + + MUTEXUNLOCK(&vinfo.dev_list_lock); + + if ( vinfo.capturing ) + { + if ( ensure_acquired(capture_dev_id) ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + return -1; + } + + if ( prepare_for_capture() ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + return -1; + } + + if ( (ret = vidcap_src_capture_start(vinfo.src, + capture_callback, 0)) ) + { + MUTEXUNLOCK(&vinfo.camera_lock); + fprintf(stderr, "failed to restart video capture: %d\n", ret); + return -1; + } + } + + MUTEXUNLOCK(&vinfo.camera_lock); + + return 0; +} + int video_initialize(void) { + int i; + const int starting_id = 50; + memset(&vinfo, 0, sizeof(vinfo)); + MUTEXINIT(&vinfo.camera_lock); + MUTEXINIT(&vinfo.dev_list_lock); + + vinfo.width = vfinfo.width; + vinfo.height = vfinfo.height; + if ( !(vinfo.vc = vidcap_initialize()) ) { fprintf(stderr, "ERROR: failed vidcap_initialize\n"); @@ -1257,23 +1558,89 @@ vinfo.sapi_info.description, vinfo.sapi_info.identifier); - /* TODO: Maybe we should reevaluate these defaults. Once could - * make an argument that reasonable users of iaxclient might - * not want video to be delivered as soon as they iaxc_initialize(). + vinfo.selected_device_id = -1; + + vinfo.device_count = vidcap_src_list_update(vinfo.sapi); + if ( vinfo.device_count < 0 ) + { + fprintf(stderr, + "ERROR: failed updating video capture devices list\n"); + goto bail; + } + + vinfo.vc_src_info = (struct vidcap_src_info *)malloc(vinfo.device_count * + sizeof(struct vidcap_src_info)); + if ( !vinfo.vc_src_info ) + { + fprintf(stderr, "ERROR: failed vinfo field allocations\n"); + goto bail; + } + + vinfo.devices = (struct iaxc_video_device *)malloc(vinfo.device_count * + sizeof(struct iaxc_video_device)); + if ( !vinfo.devices ) + { + fprintf(stderr, "ERROR: failed vinfo field allocation\n"); + free(vinfo.vc_src_info); + goto bail; + } + + if ( vidcap_src_list_get(vinfo.sapi, vinfo.device_count, + vinfo.vc_src_info) ) + { + fprintf(stderr, "ERROR: failed vidcap_src_list_get()\n"); + free(vinfo.vc_src_info); + free(vinfo.devices); + goto bail; + } + + /* build initial iaxclient video source list */ + for ( i = 0; i < vinfo.device_count; i++ ) + { + vinfo.devices[i].name = strdup(vinfo.vc_src_info[i].description); + vinfo.devices[i].id_string = strdup(vinfo.vc_src_info[i].identifier); + /* Let's be clear that the device id is not some + * base-zero index. Once plug-n-play is implemented, + * these ids may diverge as devices are added + * and removed. + */ + vinfo.devices[i].id = i + starting_id; + } + vinfo.next_id = vinfo.devices[vinfo.device_count - 1].id + 1; + + /* set default source - the first device */ + if ( vinfo.device_count ) + { + iaxc_video_device_set(vinfo.devices[0].id); + } + + /* setup device notification callback + * for device insertion and removal */ + if ( vidcap_srcs_notify(vinfo.sapi, &video_device_notification_callback, 0) ) + { + fprintf(stderr, "ERROR: failed vidcap_srcs_notify()\n"); + goto late_bail; + } + vinfo.prefs = IAXC_VIDEO_PREF_RECV_LOCAL_RAW | - IAXC_VIDEO_PREF_RECV_REMOTE_RAW; + IAXC_VIDEO_PREF_RECV_REMOTE_RAW | + IAXC_VIDEO_PREF_CAPTURE_DISABLE; - MUTEXINIT(&vinfo.camera_lock); + return 0; - /* We reset the existing video preferences to yield the side-effect - * of potentially starting or stopping the video capture. - */ - iaxc_set_video_prefs(vinfo.prefs); +late_bail: + free(vinfo.vc_src_info); - return 0; + for ( i = 0; i < vinfo.device_count; i++ ) + { + free((void *)vinfo.devices[i].name); + free((void *)vinfo.devices[i].id_string); + } + free(vinfo.devices); + bail: vidcap_destroy(vinfo.vc); vinfo.vc = 0; @@ -1289,6 +1656,7 @@ vinfo.vc = 0; MUTEXDESTROY(&vinfo.camera_lock); + MUTEXDESTROY(&vinfo.dev_list_lock); if ( vinfo.converted_i420_buf ) { @@ -1324,7 +1692,7 @@ * we are saying that the "camera is working" if there exists * more than zero cameras. */ - return vidcap_src_list_update(vinfo.sapi); + return vidcap_src_list_update(vinfo.sapi) > 0; } int video_send_stats(struct iaxc_call * call) Modified: trunk/simpleclient/vtestcall/vtestcall.c =================================================================== --- trunk/simpleclient/vtestcall/vtestcall.c 2007-10-31 13:10:33 UTC (rev 1249) +++ trunk/simpleclient/vtestcall/vtestcall.c 2007-10-31 17:31:21 UTC (rev 1250) @@ -238,6 +238,9 @@ e.ev.audio.source == IAXC_SOURCE_REMOTE ? "remote" : "local", e.ev.audio.encoded ? "encoded" : "raw"); break; + case IAXC_EVENT_VIDCAP_ERROR: + fprintf(stderr, "\nVIDEO CAPTURE DEVICE ERROR\n"); + break; default: break; } @@ -275,12 +278,28 @@ int nDevs, input, output,ring; int i; + int vinput; + int nVdevs; + struct iaxc_video_device *vDevs; + iaxc_audio_devices_get(&devs,&nDevs, &input, &output, &ring); + printf("\nThere are %d audio devices:\n", nDevs); for(i=0;i<nDevs;i++) { - fprintf(stderr, "DEVICE ID=%d NAME=%s CAPS=%lx\n", devs[i].devID, devs[i].name, devs[i].capabilities); + fprintf(stderr, "AUDIO DEVICE ID = %d NAME = %s CAPS=%lx\n", + devs[i].devID, devs[i].name, devs[i].capabilities); iaxc_audio_devices_set(input,output,ring); } + + iaxc_video_devices_get(&vDevs, &nVdevs, &vinput); + printf("\nThere are %d video capture devices:\n", nVdevs); + for ( i = 0; i < nVdevs; i++ ) + { + printf("VIDEO DEVICE ID = %d NAME = %s\n", + vDevs[i].id, vDevs[i].name); + } + printf("Currently selected VIDEO device id: %d\n", vinput); + } void usage() @@ -363,7 +382,11 @@ exit(-1); } - if ( v.size <= 0 ) fprintf(stderr, "WARNING: size %d in callback\n", v.size); + if ( v.size <= 0 ) + { + fprintf(stderr, "WARNING: size %d in callback\n", v.size); + return 0; + } if ( !remote ) { @@ -528,12 +551,18 @@ //iaxc_set_audio_prefs(IAXC_AUDIO_PREF_RECV_LOCAL_RAW | IAXC_AUDIO_PREF_RECV_REMOTE_RAW); fprintf(f, "\n\ - TestCall accept some keyboard input while it's running.\n\ + vtestcall accepts keyboard input while it's running.\n\ You must hit 'enter' for your keypresses to be recognized,\n\ - although you can type more than one key on a line\n\ + although you can type more than one key on a line:\n\ \n\ - q: drop the call and hangup.\n\ - 0-9 * or #: dial those DTMF digits.\n"); + s: switch video capture devices \n\ + b: bypass video jitter stuff\n\ + r: reject incoming call\n\ + d: dial\n\ + c: set caller id info\n\ + w: video window toggle\n\ + 0-9 * or #: dial those DTMF digits\n\ + q: drop the call and hangup\n"); printf("Starting processing thread...\n"); iaxc_start_processing_thread(); @@ -615,6 +644,39 @@ iaxc_set_callerid(myCIDname,myCIDnumber); } break; + case SDLK_s: + { + int input; + int ndevs; + struct iaxc_video_device *vDevs; + int newVideoDevId; + + iaxc_video_devices_get(&vDevs, &ndevs, &input); + + printf("There are %d video capture devices:\n", ndevs); + for ( i = 0; i < ndevs; i++ ) + { + printf("VIDEO DEVICE ID = %d NAME = %s\n", vDevs[i].id, vDevs[i].name); + } + printf("Currently selected device id: %d\n", input); + + printf("Select video capture device: "); + fflush(stdin); + fscanf(stdin,"%d", &newVideoDevId); + + if ( iaxc_video_device_set(newVideoDevId) ) + { + printf("Error selecting device id %d\n", + newVideoDevId); + break; + } + + /* explicitly set the prefs again in case + * previous capture device has failed + */ + iaxc_set_video_prefs( iaxc_get_video_prefs() ); + } + break; case SDLK_t: /* transmit-only */ printf("transmit mode active\n"); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2008-01-14 18:02:57
|
Revision: 1330 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1330&view=rev Author: bcholew Date: 2008-01-14 10:03:00 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Move local gettimeofday() implementation from winfuncs.c to new function iax_now() in libiax2 (different semantics). Use iax_now() in place of gettimeofday() throughout code. Add config-time check for gettimeofday() for unix builds. Move iax_seed_random() and iax_random() out of DEBUG_SUPPORT section. Remove small C99-ism to keep msoft happy. Modified Paths: -------------- trunk/configure.ac trunk/lib/audio_encode.c trunk/lib/iaxclient_lib.c trunk/lib/iaxclient_lib.h trunk/lib/libiax2/src/iax-client.h trunk/lib/libiax2/src/iax.c trunk/lib/video.c trunk/lib/winfuncs.c Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/configure.ac 2008-01-14 18:03:00 UTC (rev 1330) @@ -47,6 +47,7 @@ AC_CHECK_FUNCS([vsnprintf _vsnprintf]) AC_CHECK_FUNCS([srandomdev srandom srand48 random lrand48]) +AC_CHECK_FUNCS(gettimeofday) ACX_PTHREAD Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/audio_encode.c 2008-01-14 18:03:00 UTC (rev 1330) @@ -71,7 +71,7 @@ float input_db; float output_db; - gettimeofday(&now, 0); + now = iax_now(); if ( last.tv_sec != 0 && iaxci_usecdiff(&now, &last) < 100000 ) return 0; @@ -261,7 +261,7 @@ int insize = samples; /* update last input timestamp */ - gettimeofday( &timeLastInput, NULL ) ; + timeLastInput = iax_now(); silent = input_postprocess(data, insize, 8000); @@ -342,7 +342,7 @@ int insize = len; int outsize = *samples; - gettimeofday( &timeLastOutput, NULL ) ; + timeLastOutput = iax_now(); if ( format == 0 ) { Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/iaxclient_lib.c 2008-01-14 18:03:00 UTC (rev 1330) @@ -733,7 +733,7 @@ { if ( callNo < 0 ) return; - gettimeofday(&calls[callNo].last_activity, NULL); + calls[callNo].last_activity = iax_now(); } static void iaxc_refresh_registrations() @@ -741,7 +741,7 @@ struct iaxc_registration *cur; struct timeval now; - gettimeofday(&now,NULL); + now = iax_now(); for ( cur = registrations; cur != NULL; cur = cur->next ) { @@ -1264,7 +1264,7 @@ return -1; } - gettimeofday(&newreg->last,NULL); + newreg->last = iax_now(); newreg->refresh = refresh; strncpy(newreg->host, host, 256); Modified: trunk/lib/iaxclient_lib.h =================================================================== --- trunk/lib/iaxclient_lib.h 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/iaxclient_lib.h 2008-01-14 18:03:00 UTC (rev 1330) @@ -32,7 +32,6 @@ #include <string.h> #if defined(WIN32) || defined(_WIN32_WCE) -void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz); #include <winsock.h> #if !defined(_WIN32_WCE) #include <process.h> Modified: trunk/lib/libiax2/src/iax-client.h =================================================================== --- trunk/lib/libiax2/src/iax-client.h 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/libiax2/src/iax-client.h 2008-01-14 18:03:00 UTC (rev 1330) @@ -200,6 +200,8 @@ extern void iax_enable_debug(void); extern void iax_disable_debug(void); +extern struct timeval iax_now(void); + /* For attended transfer, application create a new session, * make a call on the new session. * On answer of the new session, call iax_setup_transfer and wait for Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/libiax2/src/iax.c 2008-01-14 18:03:00 UTC (rev 1330) @@ -34,6 +34,9 @@ #include <stdio.h> #include <limits.h> +#if !defined(_WIN32_WCE) +#include <sys/timeb.h> +#endif #define snprintf _snprintf @@ -47,7 +50,7 @@ #ifdef __cplusplus extern "C" { #endif -void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz); +struct timeval iax_now(void); #ifdef __cplusplus } #endif @@ -278,30 +281,6 @@ s->sendto = ptr; } -void iax_seed_random() -{ -#if defined(HAVE_SRANDOMDEV) - srandomdev(); -#elif defined(HAVE_SRANDOM) - srandom((unsigned int)time(0)); -#elif defined(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__, @@ -346,6 +325,30 @@ #define G #endif +void iax_seed_random() +{ +#if defined(HAVE_SRANDOMDEV) + srandomdev(); +#elif defined(HAVE_SRANDOM) + srandom((unsigned int)time(0)); +#elif defined(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 +} + typedef void (*sched_func)(void *); struct iax_sched { @@ -393,7 +396,7 @@ sched = (struct iax_sched*)malloc(sizeof(struct iax_sched)); if (sched) { memset(sched, 0, sizeof(struct iax_sched)); - gettimeofday(&sched->when, NULL); + sched->when = iax_now(); sched->when.tv_sec += (ms / 1000); ms = ms % 1000; sched->when.tv_usec += (ms * 1000); @@ -460,7 +463,7 @@ /* If there are no pending events, we don't need to timeout */ if (!cur) return -1; - gettimeofday(&tv, NULL); + tv = iax_now(); while(cur) { ms = (cur->when.tv_sec - tv.tv_sec) * 1000 + (cur->when.tv_usec - tv.tv_usec) / 1000; @@ -595,7 +598,7 @@ /* If this is the first packet we're sending, get our offset now. */ if (!session->offset.tv_sec && !session->offset.tv_usec) - gettimeofday(&session->offset, NULL); + session->offset = iax_now(); /* If the timestamp is specified, just use their specified timestamp no matter what. Usually this is done for @@ -608,7 +611,7 @@ } /* Otherwise calculate the timestamp from the current time */ - gettimeofday(&tv, NULL); + tv = iax_now(); /* Calculate the number of milliseconds since we sent the first packet */ ms = (tv.tv_sec - session->offset.tv_sec) * 1000 + @@ -1419,12 +1422,12 @@ struct iax_session *s0 = org_session; struct iax_session *s1 = new_session; + int transfer_id = 1 + (int)(32767.0 * (iax_random() / (RAND_MAX + 1.0))); + 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); @@ -2227,9 +2230,9 @@ int ms; if (!session->rxcore.tv_sec && !session->rxcore.tv_usec) { - gettimeofday(&session->rxcore, NULL); + session->rxcore = iax_now(); } - gettimeofday(&tv, NULL); + tv = iax_now(); ms = (tv.tv_sec - session->rxcore.tv_sec) * 1000 + (tv.tv_usec - session->rxcore.tv_usec) / 1000; @@ -3260,7 +3263,7 @@ struct iax_sched *cur; struct iax_session *session; - gettimeofday(&tv, NULL); + tv = iax_now(); while((cur = iax_get_sched(tv))) { @@ -3486,3 +3489,21 @@ return send_command(session, AST_FRAME_IAX, IAX_COMMAND_QUELCH, 0, ied.buf, ied.pos, -1); } + +struct timeval iax_now(void) +{ + struct timeval tv; + +#ifdef HAVE_GETTIMEOFDAY + gettimeofday(&tv, 0); +#elif defined(_MSC_VER) + struct _timeb curSysTime; + + _ftime(&curSysTime); + tv.tv_sec = (long)curSysTime.time; + tv.tv_usec = curSysTime.millitm * 1000; +#else +#error no gettimeofday or equivalent available +#endif + return tv; +} Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/video.c 2008-01-14 18:03:00 UTC (rev 1330) @@ -139,7 +139,7 @@ return; memset(&vcodec->video_stats, 0, sizeof(struct iaxc_video_stats)); - gettimeofday(&vcodec->video_stats.start_time, 0); + vcodec->video_stats.start_time = iax_now(); } static void reset_video_stats(struct iaxc_call * call) @@ -200,9 +200,9 @@ return -1; if ( video_stats_start.tv_sec == 0 && video_stats_start.tv_usec == 0 ) - gettimeofday(&video_stats_start, 0); + video_stats_start = iax_now(); - gettimeofday(&now, 0); + now = iax_now(); if ( iaxci_msecdiff(&now, &video_stats_start) > video_stats_interval ) { @@ -732,7 +732,7 @@ /* Gather statistics */ call->vencoder->video_stats.outbound_frames++; - gettimeofday(&now, 0); + now = iax_now(); time_delta = iaxci_msecdiff(&now, &call->vencoder->video_stats.start_time); @@ -1296,7 +1296,7 @@ } /* Statistics */ - gettimeofday(&now, 0); + now = iax_now(); time = iaxci_msecdiff(&now, &call->vdecoder->video_stats.start_time); call->vdecoder->video_stats.received_slices++; call->vdecoder->video_stats.acc_recv_size += encoded_video_len; @@ -1776,9 +1776,9 @@ return -1; if ( video_stats_start.tv_sec == 0 && video_stats_start.tv_usec == 0 ) - gettimeofday(&video_stats_start, 0); + video_stats_start = iax_now(); - gettimeofday(&now, 0); + now = iax_now(); if ( iaxci_msecdiff(&now, &video_stats_start) > video_stats_interval ) { Modified: trunk/lib/winfuncs.c =================================================================== --- trunk/lib/winfuncs.c 2008-01-09 07:59:40 UTC (rev 1329) +++ trunk/lib/winfuncs.c 2008-01-14 18:03:00 UTC (rev 1330) @@ -19,33 +19,6 @@ #include <stdio.h> -#if !defined(_WIN32_WCE) -#include <sys/timeb.h> - -/* Win-doze doesnt have gettimeofday(). This sux. So, what we did is -provide some gettimeofday-like functionality that works for our purposes. */ - -/* - changed 'struct timezone*' to 'void*' since - timezone is defined as a long in MINGW and caused compile-time warnings. - this should be okay since we don't use the passed value. -*/ - - -/* - * functions implementations - */ - -void gettimeofday( struct timeval* tv, void* tz ) -{ - struct _timeb curSysTime; - - _ftime(&curSysTime); - tv->tv_sec = (long)curSysTime.time; - tv->tv_usec = curSysTime.millitm * 1000; -} -#endif - void os_init(void) { WSADATA wsd; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bc...@us...> - 2008-01-14 19:04:00
|
Revision: 1331 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1331&view=rev Author: bcholew Date: 2008-01-14 11:04:03 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Drop unnecessary extern of iax_now() in iax.c. Rename iax_now() to iax_tvnow() for symmetry with asterisk. Remove most references to libiax2's unused winpoop.h. Add config-time check for gettimeofday() in libiax2's configure.in - for the future. Modified Paths: -------------- trunk/contrib/win/vc6/libiax2.dsp trunk/contrib/win/vs2005/libiax2.vcproj trunk/lib/audio_encode.c trunk/lib/iaxclient_lib.c trunk/lib/libiax2/configure.in trunk/lib/libiax2/src/iax-client.h trunk/lib/libiax2/src/iax.c trunk/lib/video.c Removed Paths: ------------- trunk/lib/libiax2/src/winpoop.h Modified: trunk/contrib/win/vc6/libiax2.dsp =================================================================== --- trunk/contrib/win/vc6/libiax2.dsp 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/contrib/win/vc6/libiax2.dsp 2008-01-14 19:04:03 UTC (rev 1331) @@ -159,10 +159,6 @@ SOURCE=..\..\..\lib\libiax2\src\ringtone.h # End Source File -# Begin Source File - -SOURCE=..\..\..\lib\libiax2\src\winpoop.h -# End Source File # End Group # End Target # End Project Modified: trunk/contrib/win/vs2005/libiax2.vcproj =================================================================== --- trunk/contrib/win/vs2005/libiax2.vcproj 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/contrib/win/vs2005/libiax2.vcproj 2008-01-14 19:04:03 UTC (rev 1331) @@ -222,10 +222,6 @@ RelativePath="..\..\..\lib\libiax2\src\ringtone.h" > </File> - <File - RelativePath="..\..\..\lib\libiax2\src\winpoop.h" - > - </File> </Filter> <Filter Name="Resource Files" Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/audio_encode.c 2008-01-14 19:04:03 UTC (rev 1331) @@ -71,7 +71,7 @@ float input_db; float output_db; - now = iax_now(); + now = iax_tvnow(); if ( last.tv_sec != 0 && iaxci_usecdiff(&now, &last) < 100000 ) return 0; @@ -261,7 +261,7 @@ int insize = samples; /* update last input timestamp */ - timeLastInput = iax_now(); + timeLastInput = iax_tvnow(); silent = input_postprocess(data, insize, 8000); @@ -342,7 +342,7 @@ int insize = len; int outsize = *samples; - timeLastOutput = iax_now(); + timeLastOutput = iax_tvnow(); if ( format == 0 ) { Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/iaxclient_lib.c 2008-01-14 19:04:03 UTC (rev 1331) @@ -733,7 +733,7 @@ { if ( callNo < 0 ) return; - calls[callNo].last_activity = iax_now(); + calls[callNo].last_activity = iax_tvnow(); } static void iaxc_refresh_registrations() @@ -741,7 +741,7 @@ struct iaxc_registration *cur; struct timeval now; - now = iax_now(); + now = iax_tvnow(); for ( cur = registrations; cur != NULL; cur = cur->next ) { @@ -1264,7 +1264,7 @@ return -1; } - newreg->last = iax_now(); + newreg->last = iax_tvnow(); newreg->refresh = refresh; strncpy(newreg->host, host, 256); Modified: trunk/lib/libiax2/configure.in =================================================================== --- trunk/lib/libiax2/configure.in 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/libiax2/configure.in 2008-01-14 19:04:03 UTC (rev 1331) @@ -15,6 +15,8 @@ dnl Check header files AC_HEADER_STDC +AC_CHECK_FUNCS(gettimeofday) + AC_SUBST(LIBS) AC_ARG_ENABLE(snomhack, [ --enable-snomhack Use slower memset for SNOM phoneem ],,enable_snomhack=no) Modified: trunk/lib/libiax2/src/iax-client.h =================================================================== --- trunk/lib/libiax2/src/iax-client.h 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/libiax2/src/iax-client.h 2008-01-14 19:04:03 UTC (rev 1331) @@ -200,7 +200,7 @@ extern void iax_enable_debug(void); extern void iax_disable_debug(void); -extern struct timeval iax_now(void); +extern struct timeval iax_tvnow(void); /* For attended transfer, application create a new session, * make a call on the new session. Modified: trunk/lib/libiax2/src/iax.c =================================================================== --- trunk/lib/libiax2/src/iax.c 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/libiax2/src/iax.c 2008-01-14 19:04:03 UTC (rev 1331) @@ -47,14 +47,6 @@ #endif #endif -#ifdef __cplusplus -extern "C" { -#endif -struct timeval iax_now(void); -#ifdef __cplusplus -} -#endif - #else #include <netdb.h> @@ -396,7 +388,7 @@ sched = (struct iax_sched*)malloc(sizeof(struct iax_sched)); if (sched) { memset(sched, 0, sizeof(struct iax_sched)); - sched->when = iax_now(); + sched->when = iax_tvnow(); sched->when.tv_sec += (ms / 1000); ms = ms % 1000; sched->when.tv_usec += (ms * 1000); @@ -463,7 +455,7 @@ /* If there are no pending events, we don't need to timeout */ if (!cur) return -1; - tv = iax_now(); + tv = iax_tvnow(); while(cur) { ms = (cur->when.tv_sec - tv.tv_sec) * 1000 + (cur->when.tv_usec - tv.tv_usec) / 1000; @@ -598,7 +590,7 @@ /* If this is the first packet we're sending, get our offset now. */ if (!session->offset.tv_sec && !session->offset.tv_usec) - session->offset = iax_now(); + session->offset = iax_tvnow(); /* If the timestamp is specified, just use their specified timestamp no matter what. Usually this is done for @@ -611,7 +603,7 @@ } /* Otherwise calculate the timestamp from the current time */ - tv = iax_now(); + tv = iax_tvnow(); /* Calculate the number of milliseconds since we sent the first packet */ ms = (tv.tv_sec - session->offset.tv_sec) * 1000 + @@ -2230,9 +2222,9 @@ int ms; if (!session->rxcore.tv_sec && !session->rxcore.tv_usec) { - session->rxcore = iax_now(); + session->rxcore = iax_tvnow(); } - tv = iax_now(); + tv = iax_tvnow(); ms = (tv.tv_sec - session->rxcore.tv_sec) * 1000 + (tv.tv_usec - session->rxcore.tv_usec) / 1000; @@ -3263,7 +3255,7 @@ struct iax_sched *cur; struct iax_session *session; - tv = iax_now(); + tv = iax_tvnow(); while((cur = iax_get_sched(tv))) { @@ -3490,7 +3482,7 @@ return send_command(session, AST_FRAME_IAX, IAX_COMMAND_QUELCH, 0, ied.buf, ied.pos, -1); } -struct timeval iax_now(void) +struct timeval iax_tvnow(void) { struct timeval tv; Deleted: trunk/lib/libiax2/src/winpoop.h =================================================================== --- trunk/lib/libiax2/src/winpoop.h 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/libiax2/src/winpoop.h 2008-01-14 19:04:03 UTC (rev 1331) @@ -1,41 +0,0 @@ -/* - * Functions Windows doesn't have... but should - * Copyright(C) 2001, Linux Support Services, Inc. - * - * Distributed under GNU LGPL. - * - * These are NOT fully compliant with BSD 4.3 and are not - * threadsafe. - * - */ - -#ifndef _winpoop_h -#define _winpoop_h - -#if defined(_MSC_VER) -#define INLINE __inline -#else -#define INLINE inline -#endif - -#include <winsock.h> - -void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz); - -static INLINE int inet_aton(char *cp, struct in_addr *inp) -{ - int a1, a2, a3, a4; - unsigned int saddr; - - if (sscanf(cp, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) != 4) - return 0; - a1 &= 0xff; - a2 &= 0xff; - a3 &= 0xff; - a4 &= 0xff; - saddr = (a1 << 24) | (a2 << 16) | (a3 << 8) | a4; - inp->s_addr = htonl(saddr); - return 1; -} - -#endif Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2008-01-14 18:03:00 UTC (rev 1330) +++ trunk/lib/video.c 2008-01-14 19:04:03 UTC (rev 1331) @@ -139,7 +139,7 @@ return; memset(&vcodec->video_stats, 0, sizeof(struct iaxc_video_stats)); - vcodec->video_stats.start_time = iax_now(); + vcodec->video_stats.start_time = iax_tvnow(); } static void reset_video_stats(struct iaxc_call * call) @@ -200,9 +200,9 @@ return -1; if ( video_stats_start.tv_sec == 0 && video_stats_start.tv_usec == 0 ) - video_stats_start = iax_now(); + video_stats_start = iax_tvnow(); - now = iax_now(); + now = iax_tvnow(); if ( iaxci_msecdiff(&now, &video_stats_start) > video_stats_interval ) { @@ -732,7 +732,7 @@ /* Gather statistics */ call->vencoder->video_stats.outbound_frames++; - now = iax_now(); + now = iax_tvnow(); time_delta = iaxci_msecdiff(&now, &call->vencoder->video_stats.start_time); @@ -1296,7 +1296,7 @@ } /* Statistics */ - now = iax_now(); + now = iax_tvnow(); time = iaxci_msecdiff(&now, &call->vdecoder->video_stats.start_time); call->vdecoder->video_stats.received_slices++; call->vdecoder->video_stats.acc_recv_size += encoded_video_len; @@ -1776,9 +1776,9 @@ return -1; if ( video_stats_start.tv_sec == 0 && video_stats_start.tv_usec == 0 ) - video_stats_start = iax_now(); + video_stats_start = iax_tvnow(); - now = iax_now(); + now = iax_tvnow(); if ( iaxci_msecdiff(&now, &video_stats_start) > video_stats_interval ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2008-02-05 23:56:30
|
Revision: 1341 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1341&view=rev Author: sbalea Date: 2008-02-05 15:56:33 -0800 (Tue, 05 Feb 2008) Log Message: ----------- Make iaxclient work (and require!!!) speex-1.2beta3 Modified Paths: -------------- trunk/configure.ac trunk/lib/Makefile.am trunk/lib/audio_encode.c trunk/m4/speex.m4 Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-02-05 20:29:40 UTC (rev 1340) +++ trunk/configure.ac 2008-02-05 23:56:33 UTC (rev 1341) @@ -235,6 +235,12 @@ obtain a copy. ])) +PKG_CHECK_MODULES(SPEEXDSP, [speexdsp >= 1.2],,AC_MSG_ERROR([ + speexdsp is required to build this package! + please see http://www.xiph.org/ for how to + obtain a copy. +])) + has_theora=no if test ! x$with_theora = xno; then PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7],has_theora=yes) Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2008-02-05 20:29:40 UTC (rev 1340) +++ trunk/lib/Makefile.am 2008-02-05 23:56:33 UTC (rev 1341) @@ -12,6 +12,7 @@ AM_CFLAGS = \ $(PTHREAD_CFLAGS) \ $(SPEEX_CFLAGS) \ + $(SPEEXDSP_CFLAGS) \ $(IAX2_CFLAGS) \ $(PORTAUDIO_CFLAGS) @@ -25,7 +26,8 @@ $(PTHREAD_LIBS) \ $(IAX2_LIBS) \ $(PORTAUDIO_LIBS) \ - $(SPEEX_LIBS) + $(SPEEX_LIBS) \ + $(SPEEXDSP_LIBS) AM_LDFLAGS = \ -no-undefined \ Modified: trunk/lib/audio_encode.c =================================================================== --- trunk/lib/audio_encode.c 2008-02-05 20:29:40 UTC (rev 1340) +++ trunk/lib/audio_encode.c 2008-02-05 23:56:33 UTC (rev 1341) @@ -105,10 +105,14 @@ i = (iaxci_filters & IAXC_FILTER_DENOISE) ? 1 : 0; speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i); - /* make vad more sensitive */ - i = 30; + /* + * We can tweak these parameters to play with VAD sensitivity. + * For now, we use the default values since it seems they are a good starting point. + * However, if need be, this is the code that needs to change + */ + i = 35; speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_START, &i); - i = 7; + i = 20; speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_PROB_CONTINUE, &i); } @@ -153,10 +157,10 @@ /* Analog AGC: Bring speex AGC gain out to mixer, with lots of hysteresis */ /* use a higher continuation threshold for AAGC than for VAD itself */ if ( !silent && - iaxci_silence_threshold != 0.0f && - (iaxci_filters & IAXC_FILTER_AGC) && - (iaxci_filters & IAXC_FILTER_AAGC) && - st->speech_prob > 0.20f ) + iaxci_silence_threshold != 0.0f && + (iaxci_filters & IAXC_FILTER_AGC) && + (iaxci_filters & IAXC_FILTER_AAGC) + ) { static int i = 0; @@ -164,8 +168,8 @@ if ( (i & 0x3f) == 0 ) { - const float loudness = st->loudness2; - + const float loudness; + speex_preprocess_ctl(st, SPEEX_PREPROCESS_GET_AGC_LOUDNESS, &loudness); if ( loudness > 8000.0f || loudness < 4000.0f ) { const float level = iaxc_input_level_get(); Modified: trunk/m4/speex.m4 =================================================================== --- trunk/m4/speex.m4 2008-02-05 20:29:40 UTC (rev 1340) +++ trunk/m4/speex.m4 2008-02-05 23:56:33 UTC (rev 1341) @@ -41,7 +41,7 @@ SPEEX_LIBS="-L$prefix/lib" fi - SPEEX_LIBS="$SPEEX_LIBS -lspeex" + SPEEX_LIBS="$SPEEX_LIBS -lspeex -lspeexdsp" if test "x$speex_includes" != "x" ; then SPEEX_CFLAGS="-I$speex_includes" @@ -60,7 +60,7 @@ LIBS="$LIBS $SPEEX_LIBS" dnl Check for a working version of speex that is of the right version. -min_speex_version=ifelse([$1], ,1.0.0,$1) +min_speex_version=ifelse([$1], ,1.2.0,$1) AC_MSG_CHECKING(for speex headers version >= $min_speex_version) #no_speex="" speex_min_major_version=`echo $min_speex_version | \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2008-02-26 19:41:04
|
Revision: 1355 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1355&view=rev Author: sbalea Date: 2008-02-26 11:41:09 -0800 (Tue, 26 Feb 2008) Log Message: ----------- Remove incorrect references to videoLib and stresstest.vcproj from Makefile.am Modified Paths: -------------- trunk/lib/Makefile.am trunk/simpleclient/stresstest/Makefile.am Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2008-02-26 19:40:03 UTC (rev 1354) +++ trunk/lib/Makefile.am 2008-02-26 19:41:09 UTC (rev 1355) @@ -211,6 +211,5 @@ portmixer \ sox \ spandsp \ - videoLib \ wince Modified: trunk/simpleclient/stresstest/Makefile.am =================================================================== --- trunk/simpleclient/stresstest/Makefile.am 2008-02-26 19:40:03 UTC (rev 1354) +++ trunk/simpleclient/stresstest/Makefile.am 2008-02-26 19:41:09 UTC (rev 1355) @@ -14,4 +14,3 @@ -framework QuickTime endif -EXTRA_DIST = stresstest.vcproj This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-02-29 17:19:50
|
Revision: 1358 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1358&view=rev Author: jpgrayson Date: 2008-02-29 09:19:56 -0800 (Fri, 29 Feb 2008) Log Message: ----------- Remove all references to deprecated and meaningless MEC2. Modified Paths: -------------- trunk/configure.ac trunk/contrib/macosx/Prefixes.h trunk/contrib/tcl/Prefixes.h Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-02-29 17:16:50 UTC (rev 1357) +++ trunk/configure.ac 2008-02-29 17:19:56 UTC (rev 1358) @@ -85,7 +85,7 @@ AC_ARG_WITH(echo-can, [AS_HELP_STRING([--with-echo-can], - [use echo can (span, speex or mec2) [default=speex]])], + [use echo can (span or speex) [default=speex]])], use_echo_can=$withval, use_echo_can="speex") @@ -368,10 +368,6 @@ AC_DEFINE(SPEEX_EC, 1, [Speex echo can]) fi -if test x$use_echo_can = xmec2; then - AC_DEFINE(MEC2_EC, 1, [Mec echo can]) -fi - if test x$enable_local_ilbc = xyes; then AC_DEFINE(CODEC_ILBC,,[Enable ILBC support]) fi Modified: trunk/contrib/macosx/Prefixes.h =================================================================== --- trunk/contrib/macosx/Prefixes.h 2008-02-29 17:16:50 UTC (rev 1357) +++ trunk/contrib/macosx/Prefixes.h 2008-02-29 17:19:56 UTC (rev 1358) @@ -5,7 +5,6 @@ //#define CODEC_ILBC 0 //#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-29 17:16:50 UTC (rev 1357) +++ trunk/contrib/tcl/Prefixes.h 2008-02-29 17:19:56 UTC (rev 1358) @@ -7,7 +7,6 @@ //#define CODEC_ILBC 0 //#define SPAN_EC 0 #define SPEEX_EC 1 -//#define MEC2_EC 0 #define USE_NEWJB 1 //#define USE_VIDEO 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-04-03 15:32:12
|
Revision: 1383 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1383&view=rev Author: jpgrayson Date: 2008-04-03 08:32:13 -0700 (Thu, 03 Apr 2008) Log Message: ----------- Add Release_novideo and Debug_novideo vs2005 build configurations. This enables building iaxclient without video support on Windows -- a much requested feature. Move vtestcall.vcproj to contrib/win/vs2005 with all the other .vcproj files. Remove mihai-specific mihai.vcproj file. Update vtestcall.vcproj to include and link from SDL in a similar manner to way it is done for the other dependencies. Update README.VisualStudio to remove the obsolete instructions for building without video. Update README.VisualStudio with new instructions for obtaining the SDL dependency. Other fixes to libiaxclient.vcproj. Modified Paths: -------------- trunk/README.VisualStudio trunk/contrib/win/vs2005/iaxclient.sln trunk/contrib/win/vs2005/libiaxclient.vcproj trunk/contrib/win/vs2005/testcall.vcproj Added Paths: ----------- trunk/contrib/win/vs2005/vtestcall.vcproj Removed Paths: ------------- trunk/simpleclient/videotest/mihai.vcproj trunk/simpleclient/vtestcall/vtestcall.vcproj Modified: trunk/README.VisualStudio =================================================================== --- trunk/README.VisualStudio 2008-04-02 21:38:13 UTC (rev 1382) +++ trunk/README.VisualStudio 2008-04-03 15:32:13 UTC (rev 1383) @@ -23,7 +23,7 @@ http://www.microsoft.com/downloads/details.aspx?familyid=4377F86D-C913-4B5C-B87E-EF72E5B4E065 3) Obtain dependencies. At the time of this writing, portaudio-v19, - libogg 1.1.3, speex 1.2beta3, libtheora 1.0beta2, and libvidcap are + libogg-1.1.3, speex-1.2beta3, libtheora-1.0beta2, and libvidcap are required. Source for these dependencies are available here: http://portaudio.com/archives/pa_snapshot_v19.tar.gz @@ -32,6 +32,11 @@ http://downloads.xiph.org/releases/theora/libtheora-1.0beta2.tar.gz http://downloads.sourceforge.net/libvidcap/libvidcap-0.1.tar.gz + Additionally, to build vtestcall, SDL is required. A prebuilt binary + development package is available here: + + http://www.libsdl.org/release/SDL-devel-1.2.13-VC8.zip + In order to build with the vcproj files provided by iaxclient, these dependent libraries must be moved to be peer directories to the iaxclient source directory. They also must have the following @@ -44,14 +49,17 @@ C:\...\whereever\speex C:\...\whereever\libtheora C:\...\whereever\libvidcap + C:\...\whereever\SDL 4) Open the solution file: contrib/win/vs2005/iaxclient.sln 5) Choose configuration. There are four options: - Release -- optimized static library - Release_dll -- optimized dynamic link library - Debug -- debug static library - Debug_dll -- debug dynamic link library + Release -- optimized static library + Release_dll -- optimized dynamic link library + Release_novideo -- optimized static library without video support + Debug -- debug static library + Debug_dll -- debug dynamic link library + Debug_novideo -- debug static library without video support 6) Build the solution. This will build iaxclient and all its dependent libraries. All dependent libraries are linked into @@ -60,26 +68,8 @@ Release\libiaxclient\libiaxclient.lib Release_dll\libiaxclient\libiaxclient.dll + Release_novideo\libiaxclient\libiaxclient.lib Debug\libiaxclient\libiaxclient.lib Debug_dll\libiaxclient\libiaxclient.dll + Debug_novideo\libiaxclient\libiaxclient.lib - APPENDIX A: Disable Video - - Not everyone wants or needs the video features in iaxclient. It is - possible to disable the video features in iaxclient by modifying - the solution and project files. - - A1) Remove "USE_VIDEO" and "USE_THEORA" from the PreprocessorDefinitions - sections of libiaxclient.vcproj. Note that there are four instances - of PreprocessorDefinitions, one for each configuration. - - A2) Remove vtestcall, libvidcap, libtheora, and libogg from solution. - - A3) Remove link dependencies from libiaxclient.vcproj. The following - should be removed from the "AdditionalDependencies" sections: - libvidcap.lib, libtheora.lib, and libogg.lib. - - A4) As a bonus, references to libtheora, libogg, and libvidcap may - be removed from AdditionalIncludeDirectories and - AdditionalLibraryDirectories. This is not explicitly required - though. Modified: trunk/contrib/win/vs2005/iaxclient.sln =================================================================== --- trunk/contrib/win/vs2005/iaxclient.sln 2008-04-02 21:38:13 UTC (rev 1382) +++ trunk/contrib/win/vs2005/iaxclient.sln 2008-04-03 15:32:13 UTC (rev 1383) @@ -28,13 +28,10 @@ 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 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "..\..\..\simpleclient\vtestcall\vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" ProjectSection(ProjectDependencies) = postProject {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} EndProjectSection @@ -42,97 +39,137 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_dll|Win32 = Debug_dll|Win32 + Debug_novideo|Win32 = Debug_novideo|Win32 Debug|Win32 = Debug|Win32 Release_dll|Win32 = Release_dll|Win32 + Release_novideo|Win32 = Release_novideo|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {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_novideo|Win32.ActiveCfg = Debug|Win32 + {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug_novideo|Win32.Build.0 = Debug|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug|Win32.ActiveCfg = Debug|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug|Win32.Build.0 = Debug|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release_dll|Win32.ActiveCfg = Release|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release_dll|Win32.Build.0 = Release|Win32 + {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release_novideo|Win32.ActiveCfg = Release|Win32 + {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release_novideo|Win32.Build.0 = Release|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release|Win32.ActiveCfg = Release|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release|Win32.Build.0 = Release|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug_dll|Win32.Build.0 = Debug|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug_novideo|Win32.Build.0 = Debug|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug|Win32.ActiveCfg = Debug|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug|Win32.Build.0 = Debug|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release_dll|Win32.ActiveCfg = Release|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release_dll|Win32.Build.0 = Release|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release_novideo|Win32.ActiveCfg = Release|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release_novideo|Win32.Build.0 = Release|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release|Win32.ActiveCfg = Release|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release|Win32.Build.0 = Release|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug_dll|Win32.ActiveCfg = Debug_dll|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug_dll|Win32.Build.0 = Debug_dll|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug_novideo|Win32.ActiveCfg = Debug_novideo|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug_novideo|Win32.Build.0 = Debug_novideo|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug|Win32.ActiveCfg = Debug|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug|Win32.Build.0 = Debug|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release_dll|Win32.ActiveCfg = Release_dll|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release_dll|Win32.Build.0 = Release_dll|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release_novideo|Win32.ActiveCfg = Release_novideo|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release_novideo|Win32.Build.0 = Release_novideo|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release|Win32.ActiveCfg = Release|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release|Win32.Build.0 = Release|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug_dll|Win32.Build.0 = Debug|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug_novideo|Win32.Build.0 = Debug|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug|Win32.ActiveCfg = Debug|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug|Win32.Build.0 = Debug|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release_dll|Win32.ActiveCfg = Release|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release_dll|Win32.Build.0 = Release|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release_novideo|Win32.ActiveCfg = Release|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release_novideo|Win32.Build.0 = Release|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release|Win32.ActiveCfg = Release|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release|Win32.Build.0 = Release|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug_dll|Win32.Build.0 = Debug|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug_novideo|Win32.Build.0 = Debug|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug|Win32.ActiveCfg = Debug|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug|Win32.Build.0 = Debug|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release_dll|Win32.ActiveCfg = Release|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release_dll|Win32.Build.0 = Release|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release_novideo|Win32.ActiveCfg = Release|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release_novideo|Win32.Build.0 = Release|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release|Win32.ActiveCfg = Release|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release|Win32.Build.0 = Release|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug_dll|Win32.Build.0 = Debug|Win32 + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug|Win32.ActiveCfg = Debug|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug|Win32.Build.0 = Debug|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release_dll|Win32.ActiveCfg = Release|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release_dll|Win32.Build.0 = Release|Win32 + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release_novideo|Win32.ActiveCfg = Release|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release|Win32.ActiveCfg = Release|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release|Win32.Build.0 = Release|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug_dll|Win32.Build.0 = Debug|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug_novideo|Win32.Build.0 = Debug|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.ActiveCfg = Debug|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.Build.0 = Debug|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release_dll|Win32.ActiveCfg = Release|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release_dll|Win32.Build.0 = Release|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release_novideo|Win32.ActiveCfg = Release|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release_novideo|Win32.Build.0 = Release|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.ActiveCfg = Release|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.Build.0 = Release|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug_dll|Win32.Build.0 = Debug|Win32 + {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug|Win32.ActiveCfg = Debug|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug|Win32.Build.0 = Debug|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release_dll|Win32.ActiveCfg = Release|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release_dll|Win32.Build.0 = Release|Win32 + {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release_novideo|Win32.ActiveCfg = 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_novideo|Win32.ActiveCfg = Debug_novideo|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Debug_novideo|Win32.Build.0 = Debug_novideo|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_novideo|Win32.ActiveCfg = Release_novideo|Win32 + {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release_novideo|Win32.Build.0 = Release_novideo|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_novideo|Win32.ActiveCfg = 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_novideo|Win32.ActiveCfg = Release|Win32 {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.ActiveCfg = Release|Win32 {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.Build.0 = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.Build.0 = Debug|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_novideo|Win32.Build.0 = Debug|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.ActiveCfg = Debug|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug|Win32.Build.0 = Debug|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.ActiveCfg = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_dll|Win32.Build.0 = Release|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_novideo|Win32.ActiveCfg = Release|Win32 + {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_novideo|Win32.Build.0 = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.ActiveCfg = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection Modified: trunk/contrib/win/vs2005/libiaxclient.vcproj =================================================================== --- trunk/contrib/win/vs2005/libiaxclient.vcproj 2008-04-02 21:38:13 UTC (rev 1382) +++ trunk/contrib/win/vs2005/libiaxclient.vcproj 2008-04-03 15:32:13 UTC (rev 1383) @@ -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;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_DLL;_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;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_DLL;_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;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_DLL;_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;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;USE_VIDEO;USE_THEORA;CODEC_GSM" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_DLL;_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" @@ -286,6 +286,133 @@ Name="VCPostBuildEventTool" /> </Configuration> + <Configuration + Name="Release_novideo|Win32" + OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="4" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\lib\portmixer\px_common" + PreprocessorDefinitions="WIN32;NDEBUG;BUILDING_DLL;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;CODEC_GSM" + RuntimeLibrary="2" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="libiax2.lib libportmixer.lib libportaudio.lib libgsm.lib libspeex.lib comsuppw.lib strmiids.lib wininet.lib" + AdditionalLibraryDirectories=""$(SolutionDir)Release\libiax2";"$(SolutionDir)Release\libportaudio";"$(SolutionDir)Release\libportmixer";"$(SolutionDir)Release\libspeex";"$(SolutionDir)Release\libgsm"" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug_novideo|Win32" + OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="4" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\lib\libiax2\src;..\..\..\..\portaudio\include;..\..\..\lib\spandsp;..\..\..\lib\gsm\inc;..\..\..\..\speex\include;..\..\..\lib\portmixer\px_common" + PreprocessorDefinitions="WIN32;_DEBUG;BUILDING_DLL;_CRT_SECURE_NO_DEPRECATE;strncasecmp=strnicmp;__inline__=_inline;NTDDI_VERSION=NTDDI_WIN2KSP4;_WIN32_WINNT=0x0500;WINVER=0x0500;CODEC_GSM" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="libiax2.lib libportmixer.lib libportaudio.lib libgsm.lib libspeex.lib comsuppw.lib strmiids.lib wininet.lib" + AdditionalLibraryDirectories=""$(SolutionDir)Debug\libiax2";"$(SolutionDir)Debug\libportaudio";"$(SolutionDir)Debug\libportmixer";"$(SolutionDir)Debug\libspeex";"$(SolutionDir)Debug\libgsm"" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> </Configurations> <References> </References> @@ -318,6 +445,22 @@ <File RelativePath="..\..\..\lib\codec_theora.c" > + <FileConfiguration + Name="Release_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\..\lib\codec_ulaw.c" @@ -362,6 +505,22 @@ CompileAs="2" /> </FileConfiguration> + <FileConfiguration + Name="Release_novideo|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug_novideo|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> </File> <File RelativePath="..\..\..\lib\ringbuffer.c" @@ -374,6 +533,22 @@ <File RelativePath="..\..\..\lib\video.c" > + <FileConfiguration + Name="Release_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\..\lib\winfuncs.c" @@ -420,6 +595,22 @@ <File RelativePath="..\..\..\lib\codec_theora.h" > + <FileConfiguration + Name="Release_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCustomBuildTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCustomBuildTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\..\lib\codec_ulaw.h" @@ -444,6 +635,22 @@ <File RelativePath="..\..\..\lib\video.h" > + <FileConfiguration + Name="Release_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCustomBuildTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug_novideo|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCustomBuildTool" + /> + </FileConfiguration> </File> </Filter> <Filter Modified: trunk/contrib/win/vs2005/testcall.vcproj =================================================================== --- trunk/contrib/win/vs2005/testcall.vcproj 2008-04-02 21:38:13 UTC (rev 1382) +++ trunk/contrib/win/vs2005/testcall.vcproj 2008-04-03 15:32:13 UTC (rev 1383) @@ -174,6 +174,165 @@ Name="VCPostBuildEventTool" /> </Configuration> + <Configuration + Name="Release_novideo|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + 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> + <Configuration + Name="Debug_novideo|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + 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> </Configurations> <References> </References> Copied: trunk/contrib/win/vs2005/vtestcall.vcproj (from rev 1382, trunk/simpleclient/vtestcall/vtestcall.vcproj) =================================================================== --- trunk/contrib/win/vs2005/vtestcall.vcproj (rev 0) +++ trunk/contrib/win/vs2005/vtestcall.vcproj 2008-04-03 15:32:13 UTC (rev 1383) @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="vtestcall" + ProjectGUID="{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" + RootNamespace="vtestcall" + Keyword="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;..\..\..\..\SDL\include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS" + MinimalRebuild="false" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + IgnoreImportLibrary="false" + AdditionalDependencies="libiaxclient.lib SDL.lib wsock32.lib winmm.lib strmiids.lib" + LinkIncremental="2" + AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";..\..\..\..\SDL\lib;$(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;..\..\..\..\SDL\include" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS" + 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 SDL.lib wsock32.lib winmm.lib strmiids.lib" + LinkIncremental="1" + AdditionalLibraryDirectories="..\..\..\..\SDL\lib;$(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> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\..\simpleclient\vtestcall\vtestcall.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + </Filter> + <File + RelativePath="..\..\..\simpleclient\vtestcall\ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Deleted: trunk/simpleclient/videotest/mihai.vcproj =================================================================== --- trunk/simpleclient/videotest/mihai.vcproj 2008-04-02 21:38:13 UTC (rev 1382) +++ trunk/simpleclient/videotest/mihai.vcproj 2008-04-03 15:32:13 UTC (rev 1383) @@ -1,199 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="mihai" - ProjectGUID="{3E95F9B8-9A45-4DBA-AF30-D3C06B710E58}" - RootNamespace="mihai" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\debug" - 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" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - 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 ..\..\lib\iaxclient_lib.lib theora.lib ogg.lib SDL.lib wsock32.lib winmm.lib strmiids.lib" - LinkIncremental="2" - 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" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - LinkIncremental="1" - 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=".\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/vtestcall/vtestcall.vcproj =================================================================== --- trunk/simpleclient/vtestcall/vtestcall.vcproj 2008-04-02 21:38:13 UTC (rev 1382) +++ trunk/simpleclient/vtestcall/vtestcall.vcproj 2008-04-03 15:32:13 UTC (rev 1383) @@ -1,244 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="vtestcall" - ProjectGUID="{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" - RootNamespace="vtestcall" - Keyword="ManagedCProj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\debug" - IntermediateDirectory=".\debug" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - ManagedExtensions="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_WINDOWS" - MinimalRebuild="false" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - BufferSecurityCheck="false" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - IgnoreImportLibrary="false" - AdditionalOptions="/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCD.lib " - AdditionalDependencies="dsound.lib libiaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib libvidcap.lib libiax2.lib libgsm.lib libportaudio.lib libspeex.lib strmiids.lib libportmixer.lib" - ShowProgress="0" - OutputFile="$(OutDir)\$(ProjectName).exe" - LinkIncremental="2" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";"$(SDL_DIR)\lib";..\..\lib\portmixer\winproj;..\..\contrib\win\vs2005\Debug\libiaxclient;..\..\contrib\win\vs2005\Debug\libtheora;..\..\contrib\win\vs2005\Debug\libogg;..\..\contrib\win\vs2005\Debug\libvidcap;..\..\contrib\win\vs2005\Debug\libiax2;..\..\contrib\win\vs2005\Debug\libgsm;..\..\contrib\win\vs2005\Debug\libportaudio;..\..\contrib\win\vs2005\Debug\libspeex;..\..\contrib\win\vs2005\Debug\libportmixer" - IgnoreAllDefaultLibraries="false" - GenerateDebugInformation="true" - AssemblyDebug="0" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="release" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - ManagedExtensions="0" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\lib;..\..\lib\SDL\include;"$(SDL_DIR)\include"" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_WINDOWS" - MinimalRebuild="false" - BasicRuntimeChecks="0" - RuntimeLibrary="2" - BufferSecurityCheck="true" - UsePrecompiledHeader="0" - WarningLevel="3" - DebugInformationFormat="3" - CompileAs="1" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="dsound.lib libiaxclient.lib libtheora.lib libogg.lib SDL.lib wsock32.lib winmm.lib libvidcap.lib libiax2.lib libgsm.lib libportaudio.lib libspeex.lib strmiids.lib libportmixer.lib" - LinkIncremental="1" - AdditionalLibraryDirectories=""$(DXSDK_DIR)\lib\x86";"$(SDL_DIR)\lib";..\..\lib\portmixer\winproj;..\..\contrib\win\vs2005\Release\libiaxclient;..\..\contrib\win\vs2005\Release\libtheora;..\..\contrib\win\vs2005\Release\libogg;..\..\contrib\win\vs2005\Release\libgsm;..\..\contrib\win\vs2005\Release\libvidcap;..\..\contrib\win\vs2005\Release\libiax2;..\..\contrib\win\vs2005\Release\libportaudio;..\..\contrib\win\vs2005\Release\libportmixer;..\..\contrib\win\vs2005\Release\libspeex" - 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> - <AssemblyReference - RelativePath="mscorlib.dll" - AssemblyName="mscorlib, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=IA64" - /> - <AssemblyReference - RelativePath="System.dll" - AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" - /> - <AssemblyReference - RelativePath="System.Data.dll" - AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" - /> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\vtestcall.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="1" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - CompileAs="1" - /> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </Filter> - <File - RelativePath=".\ReadMe.txt" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-04-03 17:56:02
|
Revision: 1386 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1386&view=rev Author: jpgrayson Date: 2008-04-03 10:56:08 -0700 (Thu, 03 Apr 2008) Log Message: ----------- Use iaxclient's libvidcap.vcproj instead of trying to use one from the libvidcap source tree. Clarify required libvidcap version in README.VisualStudio. Modified Paths: -------------- trunk/README.VisualStudio trunk/contrib/win/vs2005/iaxclient.sln Modified: trunk/README.VisualStudio =================================================================== --- trunk/README.VisualStudio 2008-04-03 17:54:45 UTC (rev 1385) +++ trunk/README.VisualStudio 2008-04-03 17:56:08 UTC (rev 1386) @@ -31,7 +31,7 @@ http://portaudio.com/archives/pa_snapshot_v19.tar.gz http://downloads.xiph.org/releases/speex/speex-1.2beta3.tar.gz - 3b*) For video support, libogg-1.1.3, libtheora-1.0beta2, and libvidcap + 3b*) For video support, libogg-1.1.3, libtheora-1.0beta2, and libvidcap-0.1 are also required. Source for these dependencies are available here: Modified: trunk/contrib/win/vs2005/iaxclient.sln =================================================================== --- trunk/contrib/win/vs2005/iaxclient.sln 2008-04-03 17:54:45 UTC (rev 1385) +++ trunk/contrib/win/vs2005/iaxclient.sln 2008-04-03 17:56:08 UTC (rev 1386) @@ -29,13 +29,13 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testcall", "testcall.vcproj", "{6F5AEE93-BA87-465B-BC75-C41C434FC4E4}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "..\..\..\..\libvidcap\contrib\win\vs2005\libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vtestcall", "vtestcall.vcproj", "{B5F8E725-85A8-4CB1-8824-B82127BB2B1E}" ProjectSection(ProjectDependencies) = postProject {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} = {9A9C003E-EAF6-4D0E-896F-E3994503C7E4} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvidcap", "libvidcap.vcproj", "{F5166D99-32BB-40D5-BE95-6F97F72C44CE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_dll|Win32 = Debug_dll|Win32 @@ -150,16 +150,6 @@ {6F5AEE93-BA87-465B-BC75-C41C434FC4E4}.Release_novideo|Win32.Build.0 = Release_novideo|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_novideo|Win32.ActiveCfg = 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_novideo|Win32.ActiveCfg = Release|Win32 - {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.ActiveCfg = Release|Win32 - {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release|Win32.Build.0 = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.ActiveCfg = Debug|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_dll|Win32.Build.0 = Debug|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Debug_novideo|Win32.ActiveCfg = Debug|Win32 @@ -172,6 +162,18 @@ {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release_novideo|Win32.Build.0 = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.ActiveCfg = Release|Win32 {B5F8E725-85A8-4CB1-8824-B82127BB2B1E}.Release|Win32.Build.0 = Release|Win32 + {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_novideo|Win32.ActiveCfg = Debug|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Debug_novideo|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_novideo|Win32.ActiveCfg = Release|Win32 + {F5166D99-32BB-40D5-BE95-6F97F72C44CE}.Release_novideo|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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-04-04 15:41:05
|
Revision: 1389 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1389&view=rev Author: jpgrayson Date: 2008-04-04 08:41:11 -0700 (Fri, 04 Apr 2008) Log Message: ----------- Change libvidcap requirement to new 0.2.1 release. - Update README.VisualStudio - Update libvidcap.vcproj to build new files in new libvidcap-0.2.1 release. Modified Paths: -------------- trunk/README.VisualStudio trunk/contrib/win/vs2005/libvidcap.vcproj Modified: trunk/README.VisualStudio =================================================================== --- trunk/README.VisualStudio 2008-04-03 21:38:02 UTC (rev 1388) +++ trunk/README.VisualStudio 2008-04-04 15:41:11 UTC (rev 1389) @@ -31,13 +31,13 @@ http://portaudio.com/archives/pa_snapshot_v19.tar.gz http://downloads.xiph.org/releases/speex/speex-1.2beta3.tar.gz - 3b*) For video support, libogg-1.1.3, libtheora-1.0beta2, and libvidcap-0.1 - are also required. Source for these dependencies are available - here: + 3b*) For video support, libogg-1.1.3, libtheora-1.0beta2, and + libvidcap-0.2.1 are also required. Source for these dependencies + are available here: http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz http://downloads.xiph.org/releases/theora/libtheora-1.0beta2.tar.gz - http://downloads.sourceforge.net/libvidcap/libvidcap-0.1.tar.gz + http://downloads.sourceforge.net/libvidcap/libvidcap-0.2.1.tar.gz 3c*) Additionally, to build vtestcall, SDL is required. A prebuilt binary development package is available here: Modified: trunk/contrib/win/vs2005/libvidcap.vcproj =================================================================== --- trunk/contrib/win/vs2005/libvidcap.vcproj 2008-04-03 21:38:02 UTC (rev 1388) +++ trunk/contrib/win/vs2005/libvidcap.vcproj 2008-04-04 15:41:11 UTC (rev 1389) @@ -227,6 +227,10 @@ </FileConfiguration> </File> <File + RelativePath="..\..\..\..\libvidcap\src\double_buffer.c" + > + </File> + <File RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.cpp" > <FileConfiguration @@ -353,6 +357,10 @@ > </File> <File + RelativePath="..\..\..\..\libvidcap\src\double_buffer.h" + > + </File> + <File RelativePath="..\..\..\..\libvidcap\src\directshow\DShowSrcManager.h" > </File> @@ -369,6 +377,10 @@ > </File> <File + RelativePath="..\..\..\..\libvidcap\src\os_funcs.h" + > + </File> + <File RelativePath="..\..\..\..\libvidcap\src\sapi.h" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2008-04-04 18:52:20
|
Revision: 1393 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1393&view=rev Author: jpgrayson Date: 2008-04-04 11:52:23 -0700 (Fri, 04 Apr 2008) Log Message: ----------- Add doc directory to the distribution list. Remove bogus reference to vtestcall.vcproj. Modified Paths: -------------- trunk/Makefile.am trunk/simpleclient/vtestcall/Makefile.am Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2008-04-04 18:51:03 UTC (rev 1392) +++ trunk/Makefile.am 2008-04-04 18:52:23 UTC (rev 1393) @@ -12,6 +12,8 @@ README.VisualStudio \ autogen.sh \ contrib \ + doc \ + Doxyfile \ m4 dist-hook: Modified: trunk/simpleclient/vtestcall/Makefile.am =================================================================== --- trunk/simpleclient/vtestcall/Makefile.am 2008-04-04 18:51:03 UTC (rev 1392) +++ trunk/simpleclient/vtestcall/Makefile.am 2008-04-04 18:52:23 UTC (rev 1393) @@ -4,4 +4,4 @@ AM_CPPFLAGS=-I$(top_srcdir)/lib $(SDL_CFLAGS) $(OGGZ_CFLAGS) vtestcall_LDADD=$(top_builddir)/lib/libiaxclient.la $(SDL_LIBS) $(OGGZ_LIBS) -EXTRA_DIST = vtestcall.vcproj +EXTRA_DIST = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-05-09 13:30:27
|
Revision: 969 http://svn.sourceforge.net/iaxclient/?rev=969&view=rev Author: sbalea Date: 2007-05-09 06:30:26 -0700 (Wed, 09 May 2007) Log Message: ----------- Moving lib/win to contrib Added Paths: ----------- trunk/contrib/win/ Removed Paths: ------------- trunk/lib/win/ Copied: trunk/contrib/win (from rev 968, trunk/lib/win) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sb...@us...> - 2007-05-30 17:25:13
|
Revision: 993 http://svn.sourceforge.net/iaxclient/?rev=993&view=rev Author: sbalea Date: 2007-05-30 10:25:05 -0700 (Wed, 30 May 2007) Log Message: ----------- Video improvements patch from Erik Bunce: + No longer attempt to send video when no call selected (crash fix). + Improved video codec negotiation. + Actually use the negotiated video format instead of hacking the video format capacity. + Send video whether outgoing or incoming call. + No longer warn on call to send video with format 0 (since it might have been negotiated). + Add IAXC_FORMAT_MAX_VIDEO to match AST_FORMAT_MAX_VIDEO. + Add option (-P) that disables video preview once remote video is available. 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-05-24 14:41:51 UTC (rev 992) +++ trunk/lib/iaxclient.h 2007-05-30 17:25:05 UTC (rev 993) @@ -97,8 +97,8 @@ #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_EVENT_TEXT 1 #define IAXC_EVENT_LEVELS 2 #define IAXC_EVENT_STATE 3 Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-05-24 14:41:51 UTC (rev 992) +++ trunk/lib/iaxclient_lib.c 2007-05-30 17:25:05 UTC (rev 993) @@ -297,7 +297,7 @@ e.type = IAXC_EVENT_TEXT; e.ev.text.type = type; - + e.ev.text.callNo = -1; va_start(args, fmt); vsnprintf(e.ev.text.message, IAXC_EVENT_BUFSIZ, fmt, args); va_end(args); @@ -774,7 +774,11 @@ iaxc_event e; struct timeval now; long time; - + + // make sure there is a call to do stats on + if (selected_call < 0) + return; + gettimeofday(&now, NULL); time = iaxc_msecdiff(&now, &video_stats_start); if ( time > VIDEO_STATS_INTERVAL ) @@ -795,11 +799,17 @@ static THREADFUNCDECL(video_proc_thread_func) { gettimeofday(&video_stats_start, NULL); - + + struct iaxc_call *call; while ( !video_proc_thread_flag ) { - iaxc_send_video(&calls[selected_call], selected_call); + if (selected_call >= 0) + call = &calls[selected_call]; + else + call = NULL; + iaxc_send_video(call, selected_call); + iaxc_send_video_stats(); // Tight spinloops are bad, mmmkay? @@ -1166,7 +1176,7 @@ iaxc_clear_call(callNo); break; case IAX_EVENT_ACCEPT: - calls[callNo].format = e->ies.format; + calls[callNo].format = e->ies.format & IAXC_AUDIO_FORMAT_MASK; calls[callNo].vformat = e->ies.format & IAXC_VIDEO_FORMAT_MASK; if ( !(e->ies.format & IAXC_VIDEO_FORMAT_MASK) ) { @@ -1658,10 +1668,6 @@ return; } } - else - { - iaxc_video_format_set_cap(video_format, video_format); - } calls[callno].vformat = video_format; calls[callno].format = format; Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-05-24 14:41:51 UTC (rev 992) +++ trunk/lib/video.c 2007-05-30 17:25:05 UTC (rev 993) @@ -135,6 +135,10 @@ { 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 ) @@ -187,7 +191,7 @@ { // If preferred codec is not available switch to the // supported default codec. - fprintf(stderr, "Preferred codec is not available. Switching to default"); + fprintf(stderr, "Preferred codec (0x%08x) is not available. Switching to default", preferred); real_pref = IAXC_FORMAT_THEORA; } @@ -203,8 +207,13 @@ * available valid codecs. With that, we should be able to come up * with a more elegant algorithm here for determining the video codec. */ - if ( iaxc_video_codec_ffmpeg_check_codec(allowed) ) - real_allowed |= allowed; + for ( i = 0; i <= 24; i++) + { + tmp_allowed = 1 << i; + if ( (allowed & tmp_allowed) && + iaxc_video_codec_ffmpeg_check_codec(tmp_allowed) ) + real_allowed |= tmp_allowed; + } #endif #ifdef USE_H264_VSS @@ -411,7 +420,7 @@ int iaxc_send_video(struct iaxc_call *call, int sel_call) { static struct slice_set_t slice_set; - int format = iaxc_video_format_preferred; + int format; int i = 0; const int inlen = iaxc_video_width * iaxc_video_height * 6 / 4; char * videobuf; @@ -435,12 +444,17 @@ iaxc_video_prefs & IAXC_VIDEO_PREF_RECV_RGB32); } - if ( sel_call < 0 || !call || !(call->state & IAXC_CALL_STATE_COMPLETE) ) + if ( sel_call < 0 || !call || !(call->state & (IAXC_CALL_STATE_COMPLETE | IAXC_CALL_STATE_OUTGOING) ) ) + { return -1; + } + // use the calls format, not random preference + format = call->vformat; + if ( format == 0 ) { - fprintf(stderr, "iaxc_send_video: Format is zero (should't happen)!\n"); +// fprintf(stderr, "iaxc_send_video: Format is zero (should't happen)!\n"); return -1; } @@ -472,7 +486,7 @@ if ( !call->vencoder ) { call->vencoder = create_codec(format, 1); - fprintf(stderr,"Created codec %s\n",call->vencoder->name); + fprintf(stderr,"**** Created encoder codec %s\n",call->vencoder->name); } if ( !call->vencoder ) @@ -584,7 +598,7 @@ if ( !call->vdecoder ) { call->vdecoder = create_codec(format, 0); - fprintf(stderr,"Created codec %s\n",call->vdecoder->name); + fprintf(stderr,"**** Created decoder codec %s\n",call->vdecoder->name); } if ( !call->vdecoder ) Modified: trunk/simpleclient/vtestcall/vtestcall.c =================================================================== --- trunk/simpleclient/vtestcall/vtestcall.c 2007-05-24 14:41:51 UTC (rev 992) +++ trunk/simpleclient/vtestcall/vtestcall.c 2007-05-30 17:25:05 UTC (rev 993) @@ -36,15 +36,19 @@ #define MAX_CALLS 6 -static int video; +static int video = 0; -int format = IAXC_FORMAT_THEORA | IAXC_FORMAT_SPEEX; +//int format = IAXC_FORMAT_THEORA | IAXC_FORMAT_SPEEX; +int format = IAXC_FORMAT_H263 | IAXC_FORMAT_H263_PLUS | IAXC_FORMAT_H264 | IAXC_FORMAT_MPEG4 | IAXC_FORMAT_THEORA; +int formatp = IAXC_FORMAT_H264; //IAXC_FORMAT_THEORA; int framerate = 15; int bitrate = 400000; int width = 320; int height = 240; int fragsize = 4000; +int preview = 1; + // Forward declaration int display_video(struct iaxc_ev_video v, int remote); void process_text_message(char *message); @@ -190,6 +194,7 @@ fprintf(stderr, "Mihai: answer call vformat=0x%x\n", s.vformat); //iaxc_unquelch(s.callNo); iaxc_millisleep(1000); + iaxc_answer_call(s.callNo); iaxc_select_call(s.callNo); //iaxc_millisleep(1000); return 0; @@ -375,13 +380,22 @@ } local_data = (unsigned char *)malloc(v.size); memcpy(local_data, v.data, v.size); - + SDL_LockYUVOverlay(lolay); lolay->pixels[0] = local_data; lolay->pixels[1] = local_data + (v.width * v.height); lolay->pixels[2] = local_data + (v.width * v.height * 5 / 4 ); SDL_UnlockYUVOverlay(lolay); - SDL_DisplayYUVOverlay(lolay, &Rrect); + + if (remote_data != NULL) + { + SDL_DisplayYUVOverlay(rolay, &rect); + if (preview) + SDL_DisplayYUVOverlay(lolay, &Rrect); + } + else + SDL_DisplayYUVOverlay(lolay, &Rrect); + } else { // Remote video @@ -401,9 +415,10 @@ rolay->pixels[2] = remote_data + (v.width * v.height * 5/4); SDL_UnlockYUVOverlay(rolay); SDL_DisplayYUVOverlay(rolay, &rect); - + // Display the current local frame as well, to minimize flicker - SDL_DisplayYUVOverlay(lolay, &Rrect); + if (preview) + SDL_DisplayYUVOverlay(lolay, &Rrect); } if( SDL_mutexV(mut) == -1 ) @@ -440,7 +455,7 @@ break; case 'F': /* set video formats */ { - format = 1<<atoi(argv[++i]); + formatp = 1<<atoi(argv[++i]); framerate = atoi(argv[++i]); bitrate = atoi(argv[++i]); width = atoi(argv[++i]); @@ -448,6 +463,9 @@ fragsize = atoi(argv[++i]); } break; + case 'P': /* */ + preview = 0; + break; case 's': if(i+1 >= argc) usage(); silence_threshold = atof(argv[++i]); @@ -485,7 +503,7 @@ } // To receive calls... - iaxc_video_format_set(format, format, framerate, bitrate, width, height, fragsize); + iaxc_video_format_set(formatp, format, framerate, bitrate, width, height, fragsize); fprintf(stderr,">>> Forcing video mode!\n"); video=1; @@ -540,7 +558,11 @@ sprintf(caption, "Calling to %s", dest); fprintf(stderr, "Calling to %s\n", dest); my_safe_caption(caption); - iaxc_call(dest); + int callNo = iaxc_call(dest); + if (callNo <= 0) + iaxc_select_call(callNo); + else + fprintf(stderr, "Failed to make call to '%s'", dest); } /* process keyboard input received by the video window */ @@ -584,8 +606,8 @@ 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",format, format, framerate, bitrate, width, height, fragsize); - iaxc_video_format_set(format, 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)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-07-02 19:58:14
|
Revision: 1049 http://svn.sourceforge.net/iaxclient/?rev=1049&view=rev Author: jpgrayson Date: 2007-07-02 12:58:17 -0700 (Mon, 02 Jul 2007) Log Message: ----------- Add test for GDK2. Improve buildability of simpleclient/wx. Modified Paths: -------------- trunk/configure.ac trunk/simpleclient/wx/Makefile.am Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-07-02 19:48:05 UTC (rev 1048) +++ trunk/configure.ac 2007-07-02 19:58:17 UTC (rev 1049) @@ -197,6 +197,8 @@ PKG_CHECK_MODULES(SDL, [sdl >= 1.2], has_sdl=yes, has_sdl=no) PKG_CHECK_MODULES(GTK2, [gtk >= 2.0], has_gtk2=yes, has_gtk2=no) +PKG_CHECK_MODULES(GDK2, [gdk-2.0 >= 2.0.0], has_gdk2=yes, has_gdk2=no) +PKG_CHECK_MODULES(ALSA, [alsa >= 1.0], has_alsa=yes, has_alsa=no) has_iax2=no if test ! x$enable_local_iax = xyes; then @@ -350,6 +352,12 @@ CLIENTS="$CLIENTS $client";; wx) + if test "x$has_wx" = "xno"; then + AC_MSG_ERROR([wx client requires wxWidgets]) + fi + if ! test "x$has_gdk2" = "xyes"; then + AC_MSG_ERROR([wx client requires GDK2]) + fi CLIENTS="$CLIENTS $client";; *) ;; Modified: trunk/simpleclient/wx/Makefile.am =================================================================== --- trunk/simpleclient/wx/Makefile.am 2007-07-02 19:48:05 UTC (rev 1048) +++ trunk/simpleclient/wx/Makefile.am 2007-07-02 19:58:17 UTC (rev 1049) @@ -2,11 +2,24 @@ bin_PROGRAMS = wxiax wxiax_SOURCES = wx.cc -AM_CPPFLAGS = -DDEFAULT_DESTSERV=\"guest@ast1\" -DDEFAULT_DESTEXT=\"1001\" \ - -DDEFAULT_NUM_CALLS=1 -I$(top_srcdir)/lib $(WX_CPPFLAGS) -AM_CXXFLAGS = $(GTK_CFLAGS) $(WX_CXXFLAGS_ONLY) -LDADD = $(top_builddir)/lib/libiaxclient.la $(GTK_LIBS) $(WX_LIBS) +AM_CPPFLAGS = \ + -DDEFAULT_DESTSERV=\"guest@ast1\" \ + -DDEFAULT_DESTEXT=\"1001\" \ + -DDEFAULT_NUM_CALLS=1 \ + -I$(top_srcdir)/lib \ + $(WX_CPPFLAGS) +AM_CXXFLAGS = \ + $(GTK_CFLAGS) \ + $(WX_CXXFLAGS_ONLY) \ + $(GDK2_CFLAGS) + +LDADD = \ + $(top_builddir)/lib/libiaxclient.la \ + $(GTK_LIBS) \ + $(WX_LIBS) \ + $(GDK2_LIBS) + if ! WIN32 AM_CPPFLAGS += -DPOSIXSLEEP endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-08-15 21:49:01
|
Revision: 1090 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1090&view=rev Author: jpgrayson Date: 2007-08-15 14:49:02 -0700 (Wed, 15 Aug 2007) Log Message: ----------- Update the vs2005 solution to be able to build release and debug dlls. Update README.VisualStudio with new instructions. Hopefully these new instructions are both simpler and more complete. Modified Paths: -------------- trunk/README.VisualStudio trunk/contrib/win/vs2005/iaxclient.sln trunk/contrib/win/vs2005/libiaxclient.vcproj Modified: trunk/README.VisualStudio =================================================================== --- trunk/README.VisualStudio 2007-08-15 21:38:51 UTC (rev 1089) +++ trunk/README.VisualStudio 2007-08-15 21:49:02 UTC (rev 1090) @@ -6,65 +6,63 @@ properties dialog in the Windows Control Panel to set these variables either for the user or system-wide. - %DXSDK_DIR% + %DXSDK_DIR% - Path to the DirectX SDK. The December 2006 version of the DirectX - SDK has been known to work. + Path to the DirectX SDK. The June 2007 version of the DirectX + SDK is known to work. The December 2006 version is also know to + work. - %PSDK_DIR% + %PSDK_DIR% - Path to the Platform SDK. The Platform SDK for Windows Server - 2003 Release 2 has been known to work. + Path to the Platform SDK. The Windows SDK is known to work for + this. Assuming the Windows SDK is installed in the default + location, PSDK_DIR would be set to: - 2) Open the solution file: contrib/win/vs2005/iaxclient.sln + C:\Program Files\Microsoft SDKs\Windows\v6.0 - 3) Build the solution. This will build the several libraries (.lib - files) that must be linked with the end application: + The older Platform SDK for Windows Server 2003 Release 2 is also + known to work. - Release\libgsm\libgsm.lib - Release\libiax2\libiax2.lib - Release\libiaxclient\libiaxclient.lib - Release\libportaudio\libportaudio.lib - Release\libportmixer\libportmixer.lib - Release\libvideolib\libvideolib.lib + See here for the Windows SDK: - 4) In addition to the above libraries that are built as part of the - iaxclient build, there are several other third-party library - dependencies that must be met: + http://www.microsoft.com/downloads/details.aspx?FamilyID=c2b1e300-f358-4523-b479-f53d234cdccf - speex - libtheora - libogg + 2) Obtain dependencies. At the time of this writing, portaudio-v19, + libogg 1.1.3, speex 1.2beta1, and libtheora 1.0alpha7 are required. + Source for these dependencies are available here: - These standard Windows-provided libraries must also be linked in: + http://portaudio.com/archives/pa_snapshot_v19.tar.gz + http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz + http://downloads.xiph.org/releases/speex/speex-1.2beta1.tar.gz + http://downloads.xiph.org/releases/theora/libtheora-1.0alpha7.tar.gz - comsuppw.lib - strmiids.lib - wininet.lib - ws2_32.lib + In order to build with the vcproj files provided by iaxclient, + these dependent libraries must be moved to be peer directories to + the iaxclient source directory. They also must have the following + names: libogg, speex, and libtheora. So the final directory + layout would be as follows: -Building a DLL --------------- -Note that the reference solution and project files are configured to -build a static library (.lib file). To build iaxclient as a dynamic -library (.dll file), the libiaxclient project needs to be modified. -First, change the "Configuration Type" to "Dynamic Library (.dll)". -Then iaxclient's link dependencies need to be specified in -"Linker->Input->Additional Dependencies". Some of these dependencies -are built as part of the solution (libiax2, libvideolib, ...), other -dependencies come from Windows (comsuppw.lib, strmiids.lib, ...), and -yet other dependencies must come from elsewhere (libspeex, libtheora, -libogg). A working list of link dependencies might look something like -this: - - ..\..\..\..\speex\$(ConfigurationName)\libspeex.lib - ..\..\..\..\libtheora\$(ConfigurationName)\libtheora.lib - ..\..\..\..\libogg\$(ConfigurationName)\libogg.lib - $(ProjectDir)\$(ConfigurationName)\libvideolib\libvideolib.lib - $(ProjectDir)\$(ConfigurationName)\libiax2\libiax2.lib - $(ProjectDir)\$(ConfigurationName)\libgsm\libgsm.lib - strmiids.lib - wininet.lib - comsuppw.lib - ws2_32.lib + C:\...\whereever\iaxclient + C:\...\whereever\portaudio + C:\...\whereever\libogg + C:\...\whereever\speex + C:\...\whereever\libtheora + 2) Open the solution file: contrib/win/vs2005/iaxclient.sln + + 3) Choose configuration. There are four options: + Release -- optimized static library + Release_dll -- optimized dynamic link library + Debug -- debug static library + Debug_dll -- debug dynamic link library + + 4) Build the solution. This will build iaxclient and all its + dependent libraries. All dependent libraries are linked into + the final library. The final libiaxclient library can be found + here (depending on the configuration chosen): + + Release\libiaxclient\libiaxclient.lib + Release_dll\libiaxclient\libiaxclient.dll + Debug\libiaxclient\libiaxclient.lib + Debug_dll\libiaxclient\libiaxclient.dll + Modified: trunk/contrib/win/vs2005/iaxclient.sln =================================================================== --- trunk/contrib/win/vs2005/iaxclient.sln 2007-08-15 21:38:51 UTC (rev 1089) +++ trunk/contrib/win/vs2005/iaxclient.sln 2007-08-15 21:49:02 UTC (rev 1090) @@ -9,11 +9,14 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiaxclient", "libiaxclient.vcproj", "{9A9C003E-EAF6-4D0E-896F-E3994503C7E4}" ProjectSection(ProjectDependencies) = postProject + {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} - {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} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libiax2.vcproj", "{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}" @@ -28,44 +31,82 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_dll|Win32 = Debug_dll|Win32 Debug|Win32 = Debug|Win32 + Release_dll|Win32 = Release_dll|Win32 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 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Debug|Win32.Build.0 = Debug|Win32 + {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release_dll|Win32.ActiveCfg = Release|Win32 + {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release_dll|Win32.Build.0 = Release|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release|Win32.ActiveCfg = Release|Win32 {3A76129B-55AB-4D54-BAA7-08F63ED52569}.Release|Win32.Build.0 = Release|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug_dll|Win32.Build.0 = Debug|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug|Win32.ActiveCfg = Debug|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Debug|Win32.Build.0 = Debug|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release_dll|Win32.ActiveCfg = Release|Win32 + {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release_dll|Win32.Build.0 = Release|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release|Win32.ActiveCfg = Release|Win32 {3B023516-2C69-4CCB-9302-239991B6EC2C}.Release|Win32.Build.0 = Release|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug_dll|Win32.ActiveCfg = Debug_dll|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug_dll|Win32.Build.0 = Debug_dll|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug|Win32.ActiveCfg = Debug|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Debug|Win32.Build.0 = Debug|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release_dll|Win32.ActiveCfg = Release_dll|Win32 + {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release_dll|Win32.Build.0 = Release_dll|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release|Win32.ActiveCfg = Release|Win32 {9A9C003E-EAF6-4D0E-896F-E3994503C7E4}.Release|Win32.Build.0 = Release|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug_dll|Win32.Build.0 = Debug|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug|Win32.ActiveCfg = Debug|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Debug|Win32.Build.0 = Debug|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release_dll|Win32.ActiveCfg = Release|Win32 + {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release_dll|Win32.Build.0 = Release|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release|Win32.ActiveCfg = Release|Win32 {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}.Release|Win32.Build.0 = Release|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug_dll|Win32.Build.0 = Debug|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug|Win32.ActiveCfg = Debug|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Debug|Win32.Build.0 = Debug|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release_dll|Win32.ActiveCfg = Release|Win32 + {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release_dll|Win32.Build.0 = Release|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release|Win32.ActiveCfg = Release|Win32 {82C9BD79-9796-405F-8A28-3F538514AC3A}.Release|Win32.Build.0 = Release|Win32 + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug_dll|Win32.Build.0 = Debug|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug|Win32.ActiveCfg = Debug|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Debug|Win32.Build.0 = Debug|Win32 + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release_dll|Win32.ActiveCfg = Release|Win32 + {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release_dll|Win32.Build.0 = Release|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release|Win32.ActiveCfg = Release|Win32 {2F463562-375D-481E-A6E0-7C7D0DC1ED7A}.Release|Win32.Build.0 = Release|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug_dll|Win32.Build.0 = Debug|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.ActiveCfg = Debug|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.Build.0 = Debug|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release_dll|Win32.ActiveCfg = Release|Win32 + {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release_dll|Win32.Build.0 = Release|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.ActiveCfg = Release|Win32 {E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.Build.0 = Release|Win32 + {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug_dll|Win32.ActiveCfg = Debug|Win32 + {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug_dll|Win32.Build.0 = Debug|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug|Win32.ActiveCfg = Debug|Win32 {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Debug|Win32.Build.0 = Debug|Win32 + {E2C6AD95-7A61-41FE-8754-A4623C891BF8}.Release_dll|Win32.ActiveCfg = Release|Win32 + {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 EndGlobalSection Modified: trunk/contrib/win/vs2005/libiaxclient.vcproj =================================================================== --- trunk/contrib/win/vs2005/libiaxclient.vcproj 2007-08-15 21:38:51 UTC (rev 1089) +++ trunk/contrib/win/vs2005/libiaxclient.vcproj 2007-08-15 21:49:02 UTC (rev 1090) @@ -141,6 +141,151 @@ Name="VCPostBuildEventTool" /> </Configuration> + <Configuration + Name="Release_dll|Win32" + OutputDirectory="$(SolutionDir)\$(ConfigurationName)\$(ProjectName)" + IntermediateDirectory="$(OutDir)" + ConfigurationType="2" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <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" + RuntimeLibrary="2" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="1" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <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"" + /> + <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="Debug_dll|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="2" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <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" + 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="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"" + /> + <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> @@ -201,6 +346,22 @@ CompileAs="2" /> </FileConfiguration> + <FileConfiguration + Name="Release_dll|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug_dll|Win32" + > + <Tool + Name="VCCLCompilerTool" + CompileAs="2" + /> + </FileConfiguration> </File> <File RelativePath="..\..\..\lib\ringbuffer.c" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpg...@us...> - 2007-09-03 19:05:46
|
Revision: 1112 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1112&view=rev Author: jpgrayson Date: 2007-09-03 12:05:46 -0700 (Mon, 03 Sep 2007) Log Message: ----------- Apply Michael Magnusson's patch for configurable video support. Modified Paths: -------------- trunk/configure.ac trunk/lib/Makefile.am trunk/lib/iaxclient_lib.c trunk/lib/video.c Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2007-08-28 19:55:45 UTC (rev 1111) +++ trunk/configure.ac 2007-09-03 19:05:46 UTC (rev 1112) @@ -120,6 +120,21 @@ WISH="${with_wish}", with_wish="auto") +AC_ARG_WITH(video, + [AS_HELP_STRING([--without-video], + [Video support])],, + with_video="yes") + +AC_ARG_WITH(ogg, + [AS_HELP_STRING([--without-ogg], + [OGG support])],, + with_ogg="auto") + +AC_ARG_WITH(theora, + [AS_HELP_STRING([--without-theora], + [Theora support])],, + with_theora="auto") + if test ! "x$enable_clients" = "xauto"; then for client in ${enable_clients}; do case "$client" in @@ -174,23 +189,46 @@ AM_PATH_GSM(has_gsm=yes, has_gsm=no) fi -PKG_CHECK_MODULES(OGG, [ogg >= 1.1.3],,AC_MSG_ERROR([ - libogg is required to build this package! - please see http://www.xiph.org/ for how to - obtain a copy. -])) +if test x$with_video = xyes; then + AC_DEFINE(USE_VIDEO, 1, [Define to 1 to enable Video support]) +fi +AM_CONDITIONAL(VIDEO, test x$with_video = xyes) +has_ogg=no +if test ! x$with_ogg = xno; then +PKG_CHECK_MODULES(OGG, [ogg >= 1.1.3],has_ogg=yes) +if test x$has_ogg = xyes; then + AC_DEFINE(USE_OGG, 1, [OGG]) +elif test ! x$with_ogg = xauto ; then + AC_MSG_ERROR([ + libogg is required to build this package! + please see http://www.xiph.org/ for how to + obtain a copy. + ]) +fi +fi +AM_CONDITIONAL(OGG, test x$has_ogg = xyes) + PKG_CHECK_MODULES(SPEEX, [speex >= 1.2],,AC_MSG_ERROR([ speex is required to build this package! please see http://www.xiph.org/ for how to obtain a copy. ])) -PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7],,AC_MSG_ERROR([ - libtheora is required to build this package! - please see http://www.xiph.org/ for how to - obtain a copy. -])) +has_teora=no +if test ! x$with_theora = xno; then +PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7],has_theora=yes) +if test x$has_theora = xyes; then + AC_DEFINE(USE_THEORA, 1, [THEORA]) +elif test ! x$with_theora = xauto ; then + AC_MSG_ERROR([ + libtheora is required to build this package! + please see http://www.xiph.org/ for how to + obtain a copy. + ]) +fi +fi +AM_CONDITIONAL(THEORA, test x$has_theora = xyes) PKG_CHECK_MODULES(SDL, [sdl >= 1.2], has_sdl=yes, has_sdl=no) PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0], has_gtk2=yes, has_gtk2=no) @@ -314,7 +352,7 @@ fi fi - if test x$has_sdl = xyes; then + if test x$has_sdl = xyes && test x$with_video = xyes; then clients="$clients vtestcall" fi @@ -334,8 +372,8 @@ CLIENTS="$CLIENTS $client";; vtestcall) - if ! test x$has_sdl = xyes; then - AC_MSG_ERROR([vtestcall requires SDL]) + if test ! x$has_sdl = xyes || test ! x$with_video = xyes ; then + AC_MSG_ERROR([vtestcall requires SDL and video]) fi CLIENTS="$CLIENTS $client";; Modified: trunk/lib/Makefile.am =================================================================== --- trunk/lib/Makefile.am 2007-08-28 19:55:45 UTC (rev 1111) +++ trunk/lib/Makefile.am 2007-09-03 19:05:46 UTC (rev 1112) @@ -6,11 +6,12 @@ libiaxclient_la_SOURCES = $(SRCS) nodist_libiaxclient_la_SOURCES = $(NODIST_SRCS) +AM_CPPFLAGS = \ + -I$(srcdir)/portmixer/px_common + AM_CFLAGS = \ - -I$(srcdir)/portmixer/px_common \ $(PTHREAD_CFLAGS) \ $(SPEEX_CFLAGS) \ - $(THEORA_CFLAGS) \ $(IAX2_CFLAGS) \ $(PORTAUDIO_CFLAGS) @@ -24,9 +25,7 @@ $(PTHREAD_LIBS) \ $(IAX2_LIBS) \ $(PORTAUDIO_LIBS) \ - $(SPEEX_LIBS) \ - $(THEORA_LIBS) \ - $(OGG_LIBS) + $(SPEEX_LIBS) AM_LDFLAGS = \ -no-undefined \ @@ -41,17 +40,33 @@ if WIN32 SRCS += $(SRCS_WIN32) libiaxclient_la_LIBADD += -lwinmm -lwsock32 + +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) +endif + if USE_LOCAL_GSM SRCS += $(SRCS_LIBGSM) endif @@ -72,6 +87,17 @@ AM_CFLAGS += $(GSM_CFLAGS) endif +if OGG +libiaxclient_la_LIBADD += $(OGG_LIBS) +AM_CFLAGS += $(OGG_CFLAGS) +endif + +if THEORA +SRCS += codec_theora.c codec_theora.h +libiaxclient_la_LIBADD += $(THEORA_LIBS) +AM_CFLAGS += $(THEORA_CFLAGS) +endif + SRCS_LIBGSM= \ gsm/src/add.c \ gsm/src/code.c \ @@ -107,8 +133,6 @@ codec_ilbc.h \ codec_speex.c \ codec_speex.h \ - codec_theora.c \ - codec_theora.h \ codec_ulaw.c \ codec_ulaw.h \ iaxclient_lib.c \ @@ -117,7 +141,9 @@ ringbuffer.h \ portmixer/px_common/portmixer.h \ spandsp/plc.c \ - spandsp/plc.h \ + spandsp/plc.h + +SRCS_VIDEO= \ video.c \ video.h \ videoLib/video_grab.c \ @@ -152,9 +178,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 \ + unixfuncs.c + +SRCS_LINUX_VIDEO= \ videoLib/linux/libfg/capture.c \ videoLib/linux/libfg/capture.h \ videoLib/linux/libfg/frame.c \ @@ -164,7 +195,9 @@ SRCS_MACOSX= \ portmixer/px_mac_core/px_mac_core.c \ - unixfuncs.c \ + unixfuncs.c + +SRCS_MACOSX_VIDEO= \ videoLib/macosx/macgrab.c \ videoLib/macosx/vdigGrab.c \ videoLib/macosx/vdigGrab.h Modified: trunk/lib/iaxclient_lib.c =================================================================== --- trunk/lib/iaxclient_lib.c 2007-08-28 19:55:45 UTC (rev 1111) +++ trunk/lib/iaxclient_lib.c 2007-09-03 19:05:46 UTC (rev 1112) @@ -34,7 +34,9 @@ #include "iaxclient_lib.h" #include "audio_portaudio.h" #include "audio_encode.h" +#ifdef USE_VIDEO #include "video.h" +#endif #include "iax-client.h" #include "jitterbuf.h" @@ -114,15 +116,21 @@ 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; @@ -634,11 +642,13 @@ IAXC_FORMAT_SPEEX; audio_format_preferred = IAXC_FORMAT_SPEEX; +#ifdef USE_VIDEO if ( video_initialize() ) { iaxci_usermsg(IAXC_ERROR, "iaxc_initialize: cannot initialize video!\n"); } +#endif return 0; } @@ -650,7 +660,9 @@ get_iaxc_lock(); audio_driver.destroy(&audio_driver); +#ifdef USE_VIDEO video_destroy(); +#endif put_iaxc_lock(); #ifdef WIN32 @@ -759,6 +771,7 @@ return ret; } +#ifdef USE_VIDEO #define VIDEO_STATS_INTERVAL 1000 // In ms static struct timeval video_stats_start; @@ -814,6 +827,7 @@ return 0; } +#endif /* USE_VIDEO */ EXPORT int iaxc_start_processing_thread() { @@ -823,11 +837,13 @@ 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; } @@ -840,11 +856,13 @@ 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; } @@ -1116,6 +1134,7 @@ } while ( total_consumed < e->datalen ); } +#ifdef USE_VIDEO static void handle_video_event(struct iax_event *e, int callNo) { struct iaxc_call *call; @@ -1148,6 +1167,7 @@ } } } +#endif /* USE_VIDEO */ static void iaxc_handle_network_event(struct iax_event *e, int callNo) { @@ -1203,6 +1223,7 @@ callNo); } break; +#ifdef USE_VIDEO case IAX_EVENT_VIDEO: // Mihai: why do we need to lower priority here? // TODO: investigate @@ -1210,6 +1231,7 @@ handle_video_event(e, callNo); //iaxci_prioboostbegin(); break; +#endif case IAX_EVENT_TEXT: handle_text_event(e, callNo); break; @@ -1317,8 +1339,8 @@ EXPORT int iaxc_call(const char * num) { - int video_format_capability; - int video_format_preferred; + int video_format_capability = 0; + int video_format_preferred = 0; int callNo = -1; struct iax_session *newsession; char *ext = strstr(num, "/"); @@ -1377,7 +1399,9 @@ iaxc_note_activity(callNo); calls[callNo].last_ping = calls[callNo].last_activity; +#ifdef USE_VIDEO iaxc_video_format_get_cap(&video_format_preferred, &video_format_capability); +#endif iaxci_usermsg(IAXC_NOTICE, "Originating an %s call", video_format_preferred ? "audio+video" : "audio only"); @@ -1573,8 +1597,10 @@ static void iaxc_handle_connect(struct iax_event * e) { +#ifdef USE_VIDEO int video_format_capability; int video_format_preferred; +#endif int video_format = 0; int format = 0; int callno; @@ -1620,6 +1646,7 @@ return; } +#ifdef USE_VIDEO iaxc_video_format_get_cap(&video_format_preferred, &video_format_capability); @@ -1662,6 +1689,7 @@ return; } } +#endif /* USE_VIDEO */ calls[callno].vformat = video_format; calls[callno].format = format; Modified: trunk/lib/video.c =================================================================== --- trunk/lib/video.c 2007-08-28 19:55:45 UTC (rev 1111) +++ trunk/lib/video.c 2007-09-03 19:05:46 UTC (rev 1112) @@ -23,7 +23,9 @@ #ifdef USE_FFMPEG #include "codec_ffmpeg.h" #endif +#ifdef USE_THEORA #include "codec_theora.h" +#endif #ifdef USE_H264_VSS #include "codec_h264_vss.h" #endif @@ -356,6 +358,7 @@ return NULL; #endif +#ifdef USE_THEORA case IAXC_FORMAT_THEORA: return codec_video_theora_new(format, iaxc_video_width, @@ -363,6 +366,9 @@ iaxc_video_framerate, iaxc_video_bitrate, iaxc_video_fragsize); +#else + return NULL; +#endif } // Must never happen... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |