diff options
author | elupus <elupus@xbmc.org> | 2011-02-06 16:08:59 +0100 |
---|---|---|
committer | spiff <spiff@xbmc.org> | 2011-02-06 22:57:02 +0100 |
commit | 43940eb8981a75848b11796117820298496c5848 (patch) | |
tree | a1118cbaf6286dabebf44220ef4bd1d766d0ec50 | |
parent | ee22f4d9e8832b7520ea948828e86225849af2f3 (diff) |
removed: libmms from win32 build
49 files changed, 9 insertions, 8568 deletions
diff --git a/lib/win32/libmms_win32/.cvsignore b/lib/win32/libmms_win32/.cvsignore deleted file mode 100644 index 25a7301e72..0000000000 --- a/lib/win32/libmms_win32/.cvsignore +++ /dev/null @@ -1,17 +0,0 @@ -prepare-ChangeLog.pl -Makefile -Makefile.in -aclocal.m4 -config.h -config.h.in -config.log -configure -semantic.cache -config.status -libtool -stamp-h -stamp-h.in -autom4te.cache -stamp-h1 -libmms.spec -autom4te.cache diff --git a/lib/win32/libmms_win32/AUTHORS b/lib/win32/libmms_win32/AUTHORS deleted file mode 100644 index 04a684313f..0000000000 --- a/lib/win32/libmms_win32/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -Original author of the MMS interface code was Major MMS of http://www.geocities.com/majormms/ -Enhanced and maintained by Xine project at http://xine.sf.net - -Current developers of libmms are: -Maciej Katafiasz (Mathrick) <mathrick@users.sourceforge.net> -Søren Hansen (shawarma) <sh@warma.dk> diff --git a/lib/win32/libmms_win32/COPYING.LIB b/lib/win32/libmms_win32/COPYING.LIB deleted file mode 100644 index b124cf5812..0000000000 --- a/lib/win32/libmms_win32/COPYING.LIB +++ /dev/null @@ -1,510 +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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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 - - 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.1 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! - - diff --git a/lib/win32/libmms_win32/ChangeLog b/lib/win32/libmms_win32/ChangeLog deleted file mode 100644 index 55e710dca4..0000000000 --- a/lib/win32/libmms_win32/ChangeLog +++ /dev/null @@ -1,329 +0,0 @@ -2009-11-03 Maxim Levitsky <maximlevitsky@gmail.com> - - * Rework URL handling - * Increase buffer size for very long URLS and handle buffer overflow - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Remove out of date (not working with recent autotools) autogen.sh, - use: "autoreconf -i -f -v" instead. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Better tracking of seekable state in mms.c, return immediately - from the seek functions when they gat called on a non seekable - stream. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Do some minimal sanity checks on the information parsed from the - asf header. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Add mmsx.c / .h, mmsx.c is a small wrapper around mms.c and mmsh.c - The mmsx functions provide transparent access to both protocols - so that programs who wish to support both can do so with a single - code path if desired. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Add an atrribute to the mms / mmsh structs to track if the - stream is seekable and export it. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Add support for both time and byte offset based mmsh seeking! - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Export (add get methods for) asf header- and packet-length. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Calculate length returned by mss_get_length() instead if returning - the filesize from the header. The filesize usually is bigger then - then the header + all packets because the end of the file contains - time->packet offset lookup tables, however these tables are not - accessible through mms. - -2007-12-11 Hans de Goede <j.w.r.degoede@hhs.nl> - - * Some off_t changes so that applications no longer need to be - have _FILE_OFFSET_BITS defined to 64 when compiling, when they - will be linked against a libmms which did have _FILE_OFFSET_BITS - defined to 64 during its compile (which gets defined by default - by configure on systems which support it). - -2007-09-10 Soren Hansen <shawarma@users.sourceforge.net> - - * Fix libmms to work with URL's that contain a query string. - Many thanks to Bob Richmond for discovering this and providing - a patch! - -2007-09-10 Soren Hansen <shawarma@users.sourceforge.net> - - * Fix hardcoded path in pkgconfig. Thanks to Ronald Bultje for - the patch! - -2007-09-09 Soren Hansen <shawarma@users.sourceforge.net> - - * Make libmms C89 compliant. Thanks to Jens Granseuer for the - patch! - -2007-09-09 Soren Hansen <shawarma@users.sourceforge.net> - - * Fix discarded first mmsh packet. Thanks to - azwemmer@users.sourceforge.net for the patch! - -2007-09-09 Soren Hansen <shawarma@users.sourceforge.net> - - * Fix URL handling. Thanks to Gabriel Velo for the patch! - -2007-09-09 Soren Hansen <shawarma@users.sourceforge.net> - - * Added seeking support. Many thanks to Anon Sricharoenchai - for this excellent work! - -2007-09-09 Soren Hansen <shawarma@users.sourceforge.net> - - * Fix stream ID > 23. Thanks to Fabrizio Gennari for the patch! - -2007-09-09 Soren Hansen <shawarma@users.sourceforge.net> - - * Double the acceptable size of ASF headers. Thanks to Sjoerd - Simons for the patch! - -2006-07-28 Soren Hansen <shawarma@users.sourceforge.net> - - * Apply security patches "stolen" from Debian. Thanks to Wesley J. - Landaker, Martin Pitt and Matthias Hopf. - * Applied patch from Daniel Rogers <daniel@phasevelocity.org> to - enable mms through proxies! - -2005-12-12 Christian Schaller <uraeus@gnome.org> - - * Add mmsh.h to Makefile for distribution/installation - * func mmsh_read, it doesnt return 0 even after it reaches the end. - Fix from Edgard Lima - -2005-11-30 Christian Schaller <uraeus@gnome.org> - - Merge changes to get mmsh support, patch from Akira TAGOH - * configure.in: - * libmms.spec.in: - * src/Makefile.am: - * src/asfheader.h: - * src/mms.c: (fallback_io_read), (send_command), - (interp_asf_header), (mms_choose_best_streams): - * src/mms.h: - * src/mmsh.c: (fallback_io_select), (fallback_io_read), - (fallback_io_write), (fallback_io_tcp_connect), (send_command), - (get_answer), (get_chunk_header), (get_header), (interp_header), - (mmsh_tcp_connect), (mmsh_connect_int), (mmsh_connect), - (get_media_packet), (mmsh_read), (mmsh_get_current_pos): - * src/mmsh.h: - -2005-03-15 mathrick <mathrick@users.sourcefourge.net> - - * src/mms.c: - Ahem. We should be able to handle EOF, instead of falling into infloop, shouldn't we? - -2005-03-06 mathrick <mathrick@users.sourcefourge.net> - - * src/mms.c: - Fix offets in live streams. Hope it doesn't break anything, - will need to redo probably when seeking gets in. - -2005-01-06 mathrick <mathrick@users.sourcefourge.net> - - * pkgconfig/libmms.pc.in: - Fix stupid mistake. Include dir should be $prefix/include, not - $prefix/include/libmms. - -2004-12-27 mathrick <mathrick@users.sourcefourge.net> - - * src/mms.c: - Fix compilation warning about comm unused in print_command(), wrong #defines used. - Thanks to Stephane Loeuillet for noticing that. - -2004-12-22 mathrick <mathrick@users.sourcefourge.net> - - * src/mms.c: - Kill printfs so that we aren't as verbose as we used to be. This time for real - - * Makefile.am, configure.in, src/Makefile.am: - yay! libmms now correctly works, fixed miscompilation wrt large file support that - caused gst-mms to trash offsets. Almost ready for first release, now only removing - stray printf()s is pending - - -2004-12-22 mathrick <mathrick@users.sourcefourge.net> - - * ChangeLog: - Add patches from Stephane and Ronald, hope we don't get - any conflicts from applying them twice (as it seems Christian - already commited Stephane's) - -2004-12-11 Christian Fredrik Kalager Schaller <uraeus@fluendo.com> - - * src/Makefile.am, src/mms.c, src/testconnect.c, ChangeLog, autogen.sh: - patch from Stephane to fix some build issues - -2004-12-11 Christian Fredrik Kalager Schaller <uraeus@fluendo.com> - - * src/Makefile.am, src/mms.c, src/testconnect.c, ChangeLog, autogen.sh: - patch from Stephane to fix some build issues - -2004-12-11 Stephane Loeuillet <stephane.loeuillet@tiscali.fr> - - * autogen.sh : use POSIX form of 'head' (-n 1, instead of deprecated GNU only -1) - * src/mms.c : fix 4 warnings related to missing casts - * src/testconnect.c : non-void function should return something - * src/Makefile.am : if we don't plan to build testconnect, don't make automake think it exists - * pkgconfig/libmms.pc.in : add 'glib-2.0' to 'Requires' in .pc file - -2004-12-09 Christian Fredrik Kalager Schaller <uraeus@fluendo.com> - - * .cvsignore: add some more files to be ignored - * COPYING: Remove this - * COPYING.LIB: Add this - * Makefile.am: Update to actually work - * autogen.sh: Completly replace with something nice - * configure.in: Update for latest changes - * src/Makefile.am: Update to install all we need - * pkgconfig: add directory with .pc file - -2004-10-26 shawarma <shawarma@users.sourceforge.net> - - * configure: New configure due to changes in configure.in - - * configure.in: Added a check for gnet-2.0 - - * src/Makefile.am: Added the different tests to the makefiles - - * src/mms.c: Added missing include - - * src/.cvsignore, .cvsignore: Adjusted .cvsignore - - * .cvsignore, src/.cvsignore: Tweaked .cvsignore - -2004-10-22 shawarma <shawarma@users.sourceforge.net> - - * autogen.sh: - Added libtoolize to the chain. Something changed between automake 1.4 and 1.7 that forces us to do this. - - * configure.in: Fixed a bug? - - * configure.in, src/Makefile.am, src/mms.c, TODO, autogen.sh, configure: - Everything should be wrapped in GNU autotools now - -2004-10-21 mathrick <mathrick@users.sourceforge.net> - - * ChangeLog, src/bswap.h, src/mms.c, src/mms.h, src/testconnect.c, src/testdownload.c, src/testswap.c: - Uhm, so basically now it works. Fixed funky bug in byteswapping (yay for meaningful - macros names!). Added test for that. Added tests for connection and basic - downloading (work). Removed some crufty bits from code, although there's still lots - xine-specific code that'll need to be removed/abstracted (TODO: how to do progress - reporting?) - -2004-10-21 mathrick <mathrick@users.sourcefourge.net> - - * src/testconnect.c: Test connection to mms:// host - - * src/testdownload.c: Test connection and basic download - - * src/testswap.c: Test byteswapping macros -- we don't want to screw it - up again, do we? - -2004-05-08 mathrick <mathrick@users.sourcefourge.net> - - * src/bswap.h, src/mms.c, src/mms.h: - Some initial commenting-out done in order to get it compiling w/o xine. Nothing working yet, though. - -2004-05-05 mathrick <mathrick@users.sourcefourge.net> - - * src/mms.c, src/mms.h: - Import new, overhauled mms.[ch] from xine's tree. Code is cleaner now. - -2004-03-01 mathrick <mathrick@users.sourcefourge.net> - - * ChangeLog: *** empty log message *** - - * TODO, src/README.AUX, src/asfheader.h, src/mms.c, src/mms.h, ChangeLog: - Slight changes in source files - added some non sources like TODO - imported asfheader.h - -2004-03-01 mathrick <mathrick@users.sourcefourge.net> - - * TODO, src/README.AUX, src/asfheader.h, src/libmms/TODO, src/libmms/src/README.AUX, src/libmms/src/asfheader.h, src/libmms/src/mms.c, src/libmms/src/mms.h, src/mms.c, src/mms.h, ChangeLog, src/libmms/ChangeLog: - Slight changes in source files - added some non sources like TODO - imported asfheader.h - -2004-02-20 mathrick <mathrick@users.sourcefourge.net> - - * AUTHORS, README, src/libmms/AUTHORS, src/libmms/README, README.LICENSE, src/libmms/README.LICENSE: - Filled in some info about project, corrected and enhanced details in AUTHORS - -2004-02-18 mathrick <mathrick@users.sourcefourge.net> - - * bswap.h, libmms/src/bswap.h: Done this incredibly creative - byteswapping work, by stealing GLib's code and massaging it into - file. It is no longer xine work, now it's fully LGPL licensed. - - * bswap.h, libmms/src/bswap.h, libmms/src/mms.c, libmms/src/mms.h, - mms.c, mms.h: Imported bswap.h from xine (it's temporary fix, only - to know what name are in there, no code is intended to be copied). - Removed trailing whitespace from mms.[ch] - -2004-02-17 shawarma <shawarma@users.sourcefourge.net> - - * libmms/AUTHORS: Created AUTHORS - - * Makefile.am, libmms/src/Makefile.am: Forgot to add the header - files to Makefile.am - -2004-02-15 mathrick <mathrick@users.sourcefourge.net> - - * libmms/src/mmsh.c, libmms/src/mmsh.h, mmsh.c, mmsh.h, - input_mms.c, libmms/src/input_mms.c, libmms/src/mms.c, - libmms/src/mms.h, mms.c, mms.h: Should be a little more sane now, - with code dating back to 2001 removed ;) - -2004-02-13 shawarma <shawarma@users.sourcefourge.net> - - * libmms/autom4te.cache/output.0, libmms/autom4te.cache/requests, - libmms/autom4te.cache/traces.0: These shouldn't have been imported - in the first place.. - - * Makefile.am, bswap.h, libmms/autom4te.cache/output.0, - libmms/autom4te.cache/traces.0, libmms/src/Makefile.am, - libmms/src/bswap.h, libmms/src/mms.c, libmms/src/mms.h, mms.c, - mms.h: Initial import of new source tree. Source files are from - xine-mms project. - - * Makefile.am, bswap.h, libmms/autom4te.cache/output.0, - libmms/autom4te.cache/traces.0, libmms/src/Makefile.am, - libmms/src/bswap.h, libmms/src/mms.c, libmms/src/mms.h, mms.c, - mms.h: New file. - - * libmms/AUTHORS, libmms/ChangeLog, libmms/NEWS, libmms/README, - libmms/autom4te.cache/requests, libmms/configure: Initial import - of new source tree. Source files are from xine-mms project. - - * libmms/AUTHORS, libmms/ChangeLog, libmms/NEWS, libmms/README, - libmms/autom4te.cache/requests, libmms/configure: New file. - - * libmms/COPYING: Initial import of new source tree. Source files - are from xine-mms project. - - * libmms/COPYING: New file. - - * libmms/INSTALL, libmms/Makefile.am, libmms/configure.in: Initial - import of new source tree. Source files are from xine-mms project. - - * libmms/INSTALL, libmms/Makefile.am, libmms/configure.in: New - file. - diff --git a/lib/win32/libmms_win32/INSTALL b/lib/win32/libmms_win32/INSTALL deleted file mode 100644 index 2550dab752..0000000000 --- a/lib/win32/libmms_win32/INSTALL +++ /dev/null @@ -1,302 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. - - 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 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. - - Running `configure' might take a while. 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. - - 6. Often, you can also type `make uninstall' to remove the installed - files again. - -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=c99 CFLAGS=-g 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 can use 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 `..'. - - With a non-GNU `make', it is safer 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. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' 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. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `<wchar.h>' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -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 option `--target=TYPE' 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 - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--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. - -`--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/lib/win32/libmms_win32/Makefile.am b/lib/win32/libmms_win32/Makefile.am deleted file mode 100644 index 30b28da12d..0000000000 --- a/lib/win32/libmms_win32/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -SUBDIRS=src \ - pkgconfig - -DIST_SUBDIRS=src \ - pkgconfig - -EXTRA_DIST=libmms.spec \ - AUTHORS COPYING.LIB NEWS README \ - ChangeLog autogen.sh INSTALL TODO README.LICENSE diff --git a/lib/win32/libmms_win32/NEWS b/lib/win32/libmms_win32/NEWS deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/win32/libmms_win32/NEWS +++ /dev/null diff --git a/lib/win32/libmms_win32/README b/lib/win32/libmms_win32/README deleted file mode 100644 index 8426d2cf77..0000000000 --- a/lib/win32/libmms_win32/README +++ /dev/null @@ -1,57 +0,0 @@ - LibMMS - - library for parsing - Microsoft Media Streaming - protocol - - -What is LibMMS? -=============== - -LibMMS is common library for parsing mms:// and mmsh:// type network -streams. These are commonly used to stream Windows Media Video content -over the web. LibMMS itself is only for receiving MMS stream, it -doesn't handle sending at all. If you need streaming functionality, -look for other protocol, such as RT(S)P. MMS is legacy thing, being -closed with no specs and abandoned even by its creator, the Microsoft Corp. - -Why LibMMS? -=========== - -LibMMS was created out of need for common library that would remedy -current situation where each Free Software project maintains its own -implementation of MMS protocol handling, creating unnecessary code and -effort duplication and introducing feature disparity as not every -bugfix gets into each of them. It also addresses need for LGPL -licensed code for that task, as every current implementation is -licensed as GPL, thus knocking out many projects that do not use GPL -themselves. - -Howto LibMMS? -============= - -LibMMS is intended to be small and simple, being useful for any -project that needs MMS handling functionality. It is constructed in -such a way that allows plugging custom I/O implementation, thus being -easy to integrate with custom framework, and providing a way to add -timeouted or cancelable I/O etc. - -Hmm, you said no specs? How so? -=============================== - -LibMMS code is based on amazing work done by SDP guys (http://get.to/sdp) -Without the specs they've reverse-engineered, there won't be any free -implementation of MMS handling today. - -How is LibMMS licensed? -======================= - -LibMMS is Free Software, licensed under GNU Library General Public -License. Original code comes from Xine project (http://xine.sf.net), -and it got separated for number of reasons, one of them being desire -to provide non GPL projects with library they could use. There's a -number of valuable LGPL projects locked out by GPL libraries, besides -we strongly feel that GPL is bad license for a library, as it's not -library thing to mess with its users licensing by vague interpretations -of wether linking makes binary derived work. We want libraries to be -used, and for that, we need to stay clean.
\ No newline at end of file diff --git a/lib/win32/libmms_win32/README.LICENSE b/lib/win32/libmms_win32/README.LICENSE deleted file mode 100644 index 15dfbd2531..0000000000 --- a/lib/win32/libmms_win32/README.LICENSE +++ /dev/null @@ -1,6 +0,0 @@ -Original GPL code was taken from Xine project -(http://xine.sf.net). Relicensed to LGPL with explicit approval from -all copyright holders, if you're interested, you can see thread at: - -<FIXME: add link to xine's mailing archives, import mails from my -local mailbox>
\ No newline at end of file diff --git a/lib/win32/libmms_win32/TODO b/lib/win32/libmms_win32/TODO deleted file mode 100644 index 8795d51392..0000000000 --- a/lib/win32/libmms_win32/TODO +++ /dev/null @@ -1,35 +0,0 @@ -TODO list for LibMMS --------------------- - -* mms.c: - - - remove dependency on xine_stream_t - - - resolve asfheader.h status - Ask xine maintainers if it's OK to just copy it (done, but no - reply yet) - - - get rid of xine_internal.h inclusion - There are lots of Xine internal vars and defines used, get rid - of them, and delete #include "xine_internal.h" - - - better log handling - Allow installing custom log handlers a'la GLib. Currently it is - done by #ifdef LOG printf(...), which is rather suboptimal and not - suitable for library - - - custom I/O functions provide sane default implementations - Allow installing custom I/O functions. Xine needs this to - provide cancellable I/O, as does probably anyone aiming to provide - usable app - - - sort out iconv() usage - I don't like the way it's currently used, especially I think - that source charset isn't obtained correctly - -* i18n: - - - gettextize - Gettextize source, currently there is some gettext used, - determine how much is done and what else needs to be gettextized - diff --git a/lib/win32/libmms_win32/autogen.sh b/lib/win32/libmms_win32/autogen.sh deleted file mode 100644 index f16cbb0b53..0000000000 --- a/lib/win32/libmms_win32/autogen.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec autoreconf -f -i -v diff --git a/lib/win32/libmms_win32/configure.in b/lib/win32/libmms_win32/configure.in deleted file mode 100644 index 1fb29e2329..0000000000 --- a/lib/win32/libmms_win32/configure.in +++ /dev/null @@ -1,54 +0,0 @@ -AC_INIT([libmms], [0.5], [sh@warma.dk]) -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) -AM_CONFIG_HEADER([config.h src/mms_config.h]) -AC_CONFIG_SRCDIR(configure.in) - -AC_ISC_POSIX -AC_PROG_CC -AC_STDC_HEADERS -AM_PROG_LIBTOOL -AC_PROG_LIBTOOL -AC_PROG_INSTALL - - -PKG_CHECK_MODULES(GLIB, glib-2.0) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - -dnl -dnl check for large file support -dnl hacky, copied from gstreamer's configure.ac - -AC_MSG_CHECKING(for large file support) -AC_TRY_RUN([ -#define _LARGEFILE_SOURCE -#define _FILE_OFFSET_BITS 64 -#include <sys/types.h> -int main () { return !(sizeof(off_t) == 8); } -], -[ - AC_MSG_RESULT(yes) - MMS_PKG_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" - echo "#define LIBMMS_HAVE_64BIT_OFF_T 1" >> confdefs.h -], -[ - AC_MSG_RESULT(no) -], -[ - AC_MSG_RESULT(no) -]) - -AC_SUBST(MMS_CFLAGS) -AC_SUBST(MMS_PKG_CFLAGS) -AC_SUBST(MMS_LIBS) - - -AC_CONFIG_FILES([ -Makefile -pkgconfig/Makefile -pkgconfig/libmms.pc -src/Makefile -libmms.spec]) -AC_OUTPUT - -echo "configure done" diff --git a/lib/win32/libmms_win32/doc/random/URLs.txt b/lib/win32/libmms_win32/doc/random/URLs.txt deleted file mode 100644 index 56ed82cffb..0000000000 --- a/lib/win32/libmms_win32/doc/random/URLs.txt +++ /dev/null @@ -1,9 +0,0 @@ -(This file contains various mms:// URLs available on 'net for our -pleasure and testing purposes :) - -- mms://sr-wm.qbrick.com/02038_srk-wm-High - Swedish classical music - radio - -- http://live.atlas.cz/pwf/default.asp - Czech news site, with many - mms:// video streams (requires some digging through html, though) - diff --git a/lib/win32/libmms_win32/libmms.spec.in b/lib/win32/libmms_win32/libmms.spec.in deleted file mode 100644 index ecfc0e8909..0000000000 --- a/lib/win32/libmms_win32/libmms.spec.in +++ /dev/null @@ -1,63 +0,0 @@ -Summary: mms stream protocol library -Name: libmms -Version: @VERSION@ -Release: 1 -License: LGPL -Group: Libraries/Multimedia -Source: libmms-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root -URL: http://libmms.sf.net - -%description -libmms is a library implementing the mms streaming protocol - -%package devel -Summary: Libraries and includefiles for developing with libmms -Group: Development/Libraries - -%description devel -This paackage provides the necessary development headers and libraries -to allow you to devel with libmms - -%prep -%setup - -%build -%configure -make - -%install -rm -rf $RPM_BUILD_ROOT - -%makeinstall - -# Clean out files that should not be part of the rpm. -# This is the recommended way of dealing with it for RH8 -rm -f $RPM_BUILD_ROOT%{_libdir}/*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la - -%clean -rm -rf $RPM_BUILD_ROOT - -%post -/sbin/ldconfig - -%postun -/sbin/ldconfig - -%files -%defattr(-, root, root) -%doc AUTHORS COPYING.LIB ChangeLog NEWS README TODO README.LICENSE -%{_libdir}/libmms.so.* - -%files devel -%{_includedir}/libmms/mms.h -%{_includedir}/libmms/bswap.h -%{_includedir}/libmms/mmsio.h -%{_includedir}/libmms/mmsh.h -%{_libdir}/libmms.so -%{_libdir}/pkgconfig/libmms.pc - -%changelog -* Thu Dec 9 2004 Christian Schaller <christian@fluendo.com> --first attempt at SPEC diff --git a/lib/win32/libmms_win32/msvc++/config.h b/lib/win32/libmms_win32/msvc++/config.h deleted file mode 100644 index 7808ff8afb..0000000000 --- a/lib/win32/libmms_win32/msvc++/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifdef WIN32 -#define close closesocket -#endif
\ No newline at end of file diff --git a/lib/win32/libmms_win32/msvc++/inttypes.h b/lib/win32/libmms_win32/msvc++/inttypes.h deleted file mode 100644 index 0e8af69cb0..0000000000 --- a/lib/win32/libmms_win32/msvc++/inttypes.h +++ /dev/null @@ -1,305 +0,0 @@ -// ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_INTTYPES_H_ // [ -#define _MSC_INTTYPES_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include <stdint.h> - -// 7.8 Format conversion of integer types - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -// 7.8.1 Macros for format specifiers - -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 - -// The fprintf macros for signed integers are: -#define PRId8 "d" -#define PRIi8 "i" -#define PRIdLEAST8 "d" -#define PRIiLEAST8 "i" -#define PRIdFAST8 "d" -#define PRIiFAST8 "i" - -#define PRId16 "hd" -#define PRIi16 "hi" -#define PRIdLEAST16 "hd" -#define PRIiLEAST16 "hi" -#define PRIdFAST16 "hd" -#define PRIiFAST16 "hi" - -#define PRId32 "I32d" -#define PRIi32 "I32i" -#define PRIdLEAST32 "I32d" -#define PRIiLEAST32 "I32i" -#define PRIdFAST32 "I32d" -#define PRIiFAST32 "I32i" - -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIdLEAST64 "I64d" -#define PRIiLEAST64 "I64i" -#define PRIdFAST64 "I64d" -#define PRIiFAST64 "I64i" - -#define PRIdMAX "I64d" -#define PRIiMAX "I64i" - -#define PRIdPTR "Id" -#define PRIiPTR "Ii" - -// The fprintf macros for unsigned integers are: -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRIoLEAST8 "o" -#define PRIuLEAST8 "u" -#define PRIxLEAST8 "x" -#define PRIXLEAST8 "X" -#define PRIoFAST8 "o" -#define PRIuFAST8 "u" -#define PRIxFAST8 "x" -#define PRIXFAST8 "X" - -#define PRIo16 "ho" -#define PRIu16 "hu" -#define PRIx16 "hx" -#define PRIX16 "hX" -#define PRIoLEAST16 "ho" -#define PRIuLEAST16 "hu" -#define PRIxLEAST16 "hx" -#define PRIXLEAST16 "hX" -#define PRIoFAST16 "ho" -#define PRIuFAST16 "hu" -#define PRIxFAST16 "hx" -#define PRIXFAST16 "hX" - -#define PRIo32 "I32o" -#define PRIu32 "I32u" -#define PRIx32 "I32x" -#define PRIX32 "I32X" -#define PRIoLEAST32 "I32o" -#define PRIuLEAST32 "I32u" -#define PRIxLEAST32 "I32x" -#define PRIXLEAST32 "I32X" -#define PRIoFAST32 "I32o" -#define PRIuFAST32 "I32u" -#define PRIxFAST32 "I32x" -#define PRIXFAST32 "I32X" - -#define PRIo64 "I64o" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#define PRIX64 "I64X" -#define PRIoLEAST64 "I64o" -#define PRIuLEAST64 "I64u" -#define PRIxLEAST64 "I64x" -#define PRIXLEAST64 "I64X" -#define PRIoFAST64 "I64o" -#define PRIuFAST64 "I64u" -#define PRIxFAST64 "I64x" -#define PRIXFAST64 "I64X" - -#define PRIoMAX "I64o" -#define PRIuMAX "I64u" -#define PRIxMAX "I64x" -#define PRIXMAX "I64X" - -#define PRIoPTR "Io" -#define PRIuPTR "Iu" -#define PRIxPTR "Ix" -#define PRIXPTR "IX" - -// The fscanf macros for signed integers are: -#define SCNd8 "d" -#define SCNi8 "i" -#define SCNdLEAST8 "d" -#define SCNiLEAST8 "i" -#define SCNdFAST8 "d" -#define SCNiFAST8 "i" - -#define SCNd16 "hd" -#define SCNi16 "hi" -#define SCNdLEAST16 "hd" -#define SCNiLEAST16 "hi" -#define SCNdFAST16 "hd" -#define SCNiFAST16 "hi" - -#define SCNd32 "ld" -#define SCNi32 "li" -#define SCNdLEAST32 "ld" -#define SCNiLEAST32 "li" -#define SCNdFAST32 "ld" -#define SCNiFAST32 "li" - -#define SCNd64 "I64d" -#define SCNi64 "I64i" -#define SCNdLEAST64 "I64d" -#define SCNiLEAST64 "I64i" -#define SCNdFAST64 "I64d" -#define SCNiFAST64 "I64i" - -#define SCNdMAX "I64d" -#define SCNiMAX "I64i" - -#ifdef _WIN64 // [ -# define SCNdPTR "I64d" -# define SCNiPTR "I64i" -#else // _WIN64 ][ -# define SCNdPTR "ld" -# define SCNiPTR "li" -#endif // _WIN64 ] - -// The fscanf macros for unsigned integers are: -#define SCNo8 "o" -#define SCNu8 "u" -#define SCNx8 "x" -#define SCNX8 "X" -#define SCNoLEAST8 "o" -#define SCNuLEAST8 "u" -#define SCNxLEAST8 "x" -#define SCNXLEAST8 "X" -#define SCNoFAST8 "o" -#define SCNuFAST8 "u" -#define SCNxFAST8 "x" -#define SCNXFAST8 "X" - -#define SCNo16 "ho" -#define SCNu16 "hu" -#define SCNx16 "hx" -#define SCNX16 "hX" -#define SCNoLEAST16 "ho" -#define SCNuLEAST16 "hu" -#define SCNxLEAST16 "hx" -#define SCNXLEAST16 "hX" -#define SCNoFAST16 "ho" -#define SCNuFAST16 "hu" -#define SCNxFAST16 "hx" -#define SCNXFAST16 "hX" - -#define SCNo32 "lo" -#define SCNu32 "lu" -#define SCNx32 "lx" -#define SCNX32 "lX" -#define SCNoLEAST32 "lo" -#define SCNuLEAST32 "lu" -#define SCNxLEAST32 "lx" -#define SCNXLEAST32 "lX" -#define SCNoFAST32 "lo" -#define SCNuFAST32 "lu" -#define SCNxFAST32 "lx" -#define SCNXFAST32 "lX" - -#define SCNo64 "I64o" -#define SCNu64 "I64u" -#define SCNx64 "I64x" -#define SCNX64 "I64X" -#define SCNoLEAST64 "I64o" -#define SCNuLEAST64 "I64u" -#define SCNxLEAST64 "I64x" -#define SCNXLEAST64 "I64X" -#define SCNoFAST64 "I64o" -#define SCNuFAST64 "I64u" -#define SCNxFAST64 "I64x" -#define SCNXFAST64 "I64X" - -#define SCNoMAX "I64o" -#define SCNuMAX "I64u" -#define SCNxMAX "I64x" -#define SCNXMAX "I64X" - -#ifdef _WIN64 // [ -# define SCNoPTR "I64o" -# define SCNuPTR "I64u" -# define SCNxPTR "I64x" -# define SCNXPTR "I64X" -#else // _WIN64 ][ -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" -# define SCNXPTR "lX" -#endif // _WIN64 ] - -#endif // __STDC_FORMAT_MACROS ] - -// 7.8.2 Functions for greatest-width integer types - -// 7.8.2.1 The imaxabs function -#define imaxabs _abs64 - -// 7.8.2.2 The imaxdiv function - -// This is modified version of div() function from Microsoft's div.c found -// in %MSVC.NET%\crt\src\div.c -#ifdef STATIC_IMAXDIV // [ -static -#else // STATIC_IMAXDIV ][ -_inline -#endif // STATIC_IMAXDIV ] -imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) -{ - imaxdiv_t result; - - result.quot = numer / denom; - result.rem = numer % denom; - - if (numer < 0 && result.rem > 0) { - // did division wrong; must fix up - ++result.quot; - result.rem -= denom; - } - - return result; -} - -// 7.8.2.3 The strtoimax and strtoumax functions -#define strtoimax _strtoi64 -#define strtoumax _strtoui64 - -// 7.8.2.4 The wcstoimax and wcstoumax functions -#define wcstoimax _wcstoi64 -#define wcstoumax _wcstoui64 - - -#endif // _MSC_INTTYPES_H_ ] diff --git a/lib/win32/libmms_win32/msvc++/libmms.sln b/lib/win32/libmms_win32/msvc++/libmms.sln deleted file mode 100644 index d0cb1de0d9..0000000000 --- a/lib/win32/libmms_win32/msvc++/libmms.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmms", "libmms.vcproj", "{3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}" - ProjectSection(ProjectDependencies) = postProject - {12BCA020-EABF-429E-876A-A476BC9C10C0} = {12BCA020-EABF-429E-876A-A476BC9C10C0} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\..\glib-2.20.4\build\win32\vs9\glib.vcproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Debug|Win32.ActiveCfg = Debug|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Debug|Win32.Build.0 = Debug|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Release|Win32.ActiveCfg = Release|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Release|Win32.Build.0 = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug|Win32.Build.0 = Debug|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.ActiveCfg = Release|Win32 - {12BCA020-EABF-429E-876A-A476BC9C10C0}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/lib/win32/libmms_win32/msvc++/libmms.vcproj b/lib/win32/libmms_win32/msvc++/libmms.vcproj deleted file mode 100644 index ac8e598348..0000000000 --- a/lib/win32/libmms_win32/msvc++/libmms.vcproj +++ /dev/null @@ -1,333 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9,00" - Name="libmms" - ProjectGUID="{3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}" - TargetFrameworkVersion="0" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(SolutionDir)libs\$(ProjectName)\$(ConfigurationName)\" - IntermediateDirectory="$(SolutionDir)objs\$(ProjectName)\$(ConfigurationName)\" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=".;../src;"..\..\glib-2.20.4";"..\..\glib-2.20.4\glib"" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - RuntimeTypeInfo="false" - PrecompiledHeaderFile=".\Debug/libmms.pch" - AssemblerListingLocation=".\Debug/" - ObjectFile=".\Debug/" - ProgramDataBaseFileName=".\Debug/" - WarningLevel="3" - SuppressStartupBanner="true" - DebugInformationFormat="4" - CompileAs="1" - DisableSpecificWarnings="4002;4018;4244;4996" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1042" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\libmms.lib" - SuppressStartupBanner="true" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - SuppressStartupBanner="true" - OutputFile=".\Debug/libmms.bsc" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="$(SolutionDir)libs\$(ProjectName)\$(ConfigurationName)\" - IntermediateDirectory="$(SolutionDir)objs\$(ProjectName)\$(ConfigurationName)\" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="3" - InlineFunctionExpansion="0" - FavorSizeOrSpeed="1" - AdditionalIncludeDirectories=".;../src;"..\..\glib-2.20.4";"..\..\glib-2.20.4\glib"" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" - StringPooling="true" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - RuntimeTypeInfo="false" - PrecompiledHeaderFile=".\Release/libmms.pch" - AssemblerListingLocation=".\Release/" - ObjectFile=".\Release/" - ProgramDataBaseFileName=".\Release/" - WarningLevel="3" - SuppressStartupBanner="true" - CompileAs="1" - DisableSpecificWarnings="4002;4018;4244;4996" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1042" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)\libmms.lib" - SuppressStartupBanner="true" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - SuppressStartupBanner="true" - OutputFile=".\Release/libmms.bsc" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" - > - <File - RelativePath="..\src\mms.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\src\mmsh.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\src\mmsx.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\src\uri.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\src\utils.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - /> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl" - > - <File - RelativePath="..\src\asfheader.h" - > - </File> - <File - RelativePath="..\src\bswap.h" - > - </File> - <File - RelativePath="..\src\mms.h" - > - </File> - <File - RelativePath="..\src\mmsh.h" - > - </File> - <File - RelativePath="..\src\mmsio.h" - > - </File> - <File - RelativePath="..\src\mmsx.h" - > - </File> - <File - RelativePath="..\src\uri.h" - > - </File> - <File - RelativePath="..\src\utils.h" - > - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/lib/win32/libmms_win32/msvc++/libmms.vcxproj b/lib/win32/libmms_win32/msvc++/libmms.vcxproj deleted file mode 100644 index 71e8543154..0000000000 --- a/lib/win32/libmms_win32/msvc++/libmms.vcxproj +++ /dev/null @@ -1,171 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}</ProjectGuid> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>StaticLibrary</ConfigurationType> - <UseOfMfc>false</UseOfMfc> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> - <Import Project="..\..\..\..\project\VS2010Express\XBMC for Windows.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> - <Import Project="..\..\..\..\project\VS2010Express\XBMC for Windows.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)libs\$(TargetName)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)objs\$(TargetName)\$(Configuration)\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)libs\$(TargetName)\$(Configuration)\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)objs\$(TargetName)\$(Configuration)\</IntDir> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <Optimization>Disabled</Optimization> - <AdditionalIncludeDirectories>.;../src;..\..\glib-2.20.4;..\..\glib-2.20.4\glib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> - <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <RuntimeTypeInfo>false</RuntimeTypeInfo> - <PrecompiledHeaderOutputFile>.\Debug/libmms.pch</PrecompiledHeaderOutputFile> - <AssemblerListingLocation>$(Configuration)\vs2010\</AssemblerListingLocation> - <ObjectFileName>$(Configuration)\vs2010\</ObjectFileName> - <ProgramDataBaseFileName>$(Configuration)\vs2010\</ProgramDataBaseFileName> - <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> - <DebugInformationFormat>EditAndContinue</DebugInformationFormat> - <CompileAs>CompileAsC</CompileAs> - <DisableSpecificWarnings>4002;4018;4244;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0412</Culture> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <Bscmake> - <SuppressStartupBanner>true</SuppressStartupBanner> - <OutputFile>.\Debug/libmms.bsc</OutputFile> - </Bscmake> - <ProjectReference> - <LinkLibraryDependencies>true</LinkLibraryDependencies> - </ProjectReference> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <Optimization>Full</Optimization> - <InlineFunctionExpansion>Default</InlineFunctionExpansion> - <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> - <AdditionalIncludeDirectories>.;../src;..\..\glib-2.20.4;..\..\glib-2.20.4\glib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <StringPooling>true</StringPooling> - <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <RuntimeTypeInfo>false</RuntimeTypeInfo> - <PrecompiledHeaderOutputFile>.\Release/libmms.pch</PrecompiledHeaderOutputFile> - <AssemblerListingLocation>$(Configuration)\vs2010\</AssemblerListingLocation> - <ObjectFileName>$(Configuration)\vs2010\</ObjectFileName> - <ProgramDataBaseFileName>$(Configuration)\vs2010\</ProgramDataBaseFileName> - <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> - <CompileAs>CompileAsC</CompileAs> - <DisableSpecificWarnings>4002;4018;4244;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings> - </ClCompile> - <ResourceCompile> - <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <Culture>0x0412</Culture> - </ResourceCompile> - <Lib> - <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> - <SuppressStartupBanner>true</SuppressStartupBanner> - </Lib> - <Bscmake> - <SuppressStartupBanner>true</SuppressStartupBanner> - <OutputFile>.\Release/libmms.bsc</OutputFile> - </Bscmake> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="..\src\mms.c"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\src\mmsh.c"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\src\mmsx.c"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\src\uri.c"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - <ClCompile Include="..\src\utils.c"> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\src\asfheader.h" /> - <ClInclude Include="..\src\bswap.h" /> - <ClInclude Include="..\src\mms.h" /> - <ClInclude Include="..\src\mmsh.h" /> - <ClInclude Include="..\src\mmsio.h" /> - <ClInclude Include="..\src\mmsx.h" /> - <ClInclude Include="..\src\uri.h" /> - <ClInclude Include="..\src\utils.h" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\glib-2.20.4\build\win32\vs10\glib.vcxproj"> - <Project>{12bca020-eabf-429e-876a-a476bc9c10c0}</Project> - <Private>true</Private> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies> - <LinkLibraryDependencies>true</LinkLibraryDependencies> - <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs> - </ProjectReference> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/lib/win32/libmms_win32/msvc++/libmms.vcxproj.filters b/lib/win32/libmms_win32/msvc++/libmms.vcxproj.filters deleted file mode 100644 index 6413202ffe..0000000000 --- a/lib/win32/libmms_win32/msvc++/libmms.vcxproj.filters +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{1a51a4fe-02f3-49e2-89d1-8affb88501e1}</UniqueIdentifier> - <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{2511eb49-8886-4756-96dc-f14a934fdbd0}</UniqueIdentifier> - <Extensions>h;hpp;hxx;hm;inl</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\src\mms.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\src\mmsh.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\src\mmsx.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\src\uri.c"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\src\utils.c"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> - <ItemGroup> - <ClInclude Include="..\src\asfheader.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\bswap.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\mms.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\mmsh.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\mmsio.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\mmsx.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\uri.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="..\src\utils.h"> - <Filter>Header Files</Filter> - </ClInclude> - </ItemGroup> -</Project>
\ No newline at end of file diff --git a/lib/win32/libmms_win32/msvc++/stdint.h b/lib/win32/libmms_win32/msvc++/stdint.h deleted file mode 100644 index b23840f1d5..0000000000 --- a/lib/win32/libmms_win32/msvc++/stdint.h +++ /dev/null @@ -1,222 +0,0 @@ -// ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include <limits.h> - -// For Visual Studio 6 in C++ mode wrap <wchar.h> include with 'extern "C++" {}' -// or compiler give many errors like this: -// error C2733: second C linkage of overloaded function 'wmemchr' not allowed -#if (_MSC_VER < 1300) && defined(__cplusplus) - extern "C++" { -#endif -# include <wchar.h> -#if (_MSC_VER < 1300) && defined(__cplusplus) - } -#endif - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types -typedef __int8 int8_t; -typedef __int16 int16_t; -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int64 uint64_t; - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -#ifdef _WIN64 // [ - typedef __int64 intptr_t; - typedef unsigned __int64 uintptr_t; -#else // _WIN64 ][ - typedef int intptr_t; - typedef unsigned int uintptr_t; -#endif // _WIN64 ] - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN ((int8_t)_I8_MIN) -#define INT8_MAX _I8_MAX -#define INT16_MIN ((int16_t)_I16_MIN) -#define INT16_MAX _I16_MAX -#define INT32_MIN ((int32_t)_I32_MIN) -#define INT32_MAX _I32_MAX -#define INT64_MIN ((int64_t)_I64_MIN) -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h> -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val##i8 -#define INT16_C(val) val##i16 -#define INT32_C(val) val##i32 -//#define INT64_C(val) val##i64 - -#define UINT8_C(val) val##ui8 -#define UINT16_C(val) val##ui16 -#define UINT32_C(val) val##ui32 -//#define UINT64_C(val) val##ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] diff --git a/lib/win32/libmms_win32/pkgconfig/.cvsignore b/lib/win32/libmms_win32/pkgconfig/.cvsignore deleted file mode 100644 index 97bc18c141..0000000000 --- a/lib/win32/libmms_win32/pkgconfig/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -libmms.pc diff --git a/lib/win32/libmms_win32/pkgconfig/Makefile.am b/lib/win32/libmms_win32/pkgconfig/Makefile.am deleted file mode 100644 index 658013913b..0000000000 --- a/lib/win32/libmms_win32/pkgconfig/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libmms.pc - -EXTRA_DIST=libmms.pc.in diff --git a/lib/win32/libmms_win32/pkgconfig/libmms.pc.in b/lib/win32/libmms_win32/pkgconfig/libmms.pc.in deleted file mode 100644 index 602c967210..0000000000 --- a/lib/win32/libmms_win32/pkgconfig/libmms.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@/ - -Name: libmms -Description: Library implementing the MMS protocol -Requires: glib-2.0 -Version: @VERSION@ -Libs: -L${libdir} -lmms -lm -Cflags: -I${includedir} diff --git a/lib/win32/libmms_win32/src/.cvsignore b/lib/win32/libmms_win32/src/.cvsignore deleted file mode 100644 index 9db9f89608..0000000000 --- a/lib/win32/libmms_win32/src/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -.cvsignore -.deps -.libs -Makefile -Makefile.in -libmms.la -mms.lo -testconnect -testdownload -testswap diff --git a/lib/win32/libmms_win32/src/Makefile.am b/lib/win32/libmms_win32/src/Makefile.am deleted file mode 100644 index 61de364647..0000000000 --- a/lib/win32/libmms_win32/src/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -# noinst_PROGRAMS = testconnect testdownload testswap - -lib_LTLIBRARIES = libmms.la - -libmms_la_SOURCES = \ - mmsio.h \ - mms.c \ - mms.h \ - mms_config.h \ - mmsh.c \ - mmsh.h \ - mmsx.c \ - mmsx.h \ - bswap.h \ - uri.c \ - uri.h \ - asfheader.h \ - mmsh.h - -# noinst_HEADERS = - -libmms_la_LDFLAGS = -version-info 0:2:0 -no-undefined -export-dynamic -libmms_la_LIBADD = $(GLIB_LIBS) - -libmmsincdir = $(includedir)/libmms - -libmmsinc_HEADERS = \ - mms.h \ - mms_config.h \ - bswap.h \ - mmsio.h \ - mmsx.h \ - mmsh.h - -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - $(MMS_PKG_CFLAGS) \ - $(GLIB_CFLAGS) - -DEPS = $(top_builddir)/src/libmms.la -LDADD = $(top_builddir)/src/libmms.la - -# libmms_test_SOURCES = testconnect.c testdownload.c testswap.c -# libmms_test_LDADD = $(LDADD) diff --git a/lib/win32/libmms_win32/src/README.AUX b/lib/win32/libmms_win32/src/README.AUX deleted file mode 100644 index e4a430c01d..0000000000 --- a/lib/win32/libmms_win32/src/README.AUX +++ /dev/null @@ -1,15 +0,0 @@ -Auxiliary files ---------------- - -Files listed here are auxiliary in sense they are _NOT_ part of libmms -source. Sometimes they are not meant to ever be, and are included -temporarily as reference for declarations not ported from Xine yet, -and sometimes their status isn't clear enough yet for them to be -considered libmms part. They don't fall under libmms' license, and -have their own distribution terms. - -* Files provided for porting reasons: - - input_mms.c - -* Files not included officially yet: - - asfheader.h
\ No newline at end of file diff --git a/lib/win32/libmms_win32/src/asfheader.h b/lib/win32/libmms_win32/src/asfheader.h deleted file mode 100644 index 09d94edfea..0000000000 --- a/lib/win32/libmms_win32/src/asfheader.h +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Copyright (C) 2000-2003 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: asfheader.h,v 1.2 2005/12/12 09:24:19 theuraeus Exp $ - * - * demultiplexer for asf streams - * - * based on ffmpeg's - * ASF compatible encoder and decoder. - * Copyright (c) 2000, 2001 Gerard Lantau. - * - * GUID list from avifile - * some other ideas from MPlayer - */ - -#ifndef ASFHEADER_H -#define ASFHEADER_H - -/* - * define asf GUIDs (list from avifile) - */ -#define GUID_ERROR 0 - - /* base ASF objects */ -#define GUID_ASF_HEADER 1 -#define GUID_ASF_DATA 2 -#define GUID_ASF_SIMPLE_INDEX 3 -#define GUID_INDEX 4 -#define GUID_MEDIA_OBJECT_INDEX 5 -#define GUID_TIMECODE_INDEX 6 - - /* header ASF objects */ -#define GUID_ASF_FILE_PROPERTIES 7 -#define GUID_ASF_STREAM_PROPERTIES 8 -#define GUID_ASF_HEADER_EXTENSION 9 -#define GUID_ASF_CODEC_LIST 10 -#define GUID_ASF_SCRIPT_COMMAND 11 -#define GUID_ASF_MARKER 12 -#define GUID_ASF_BITRATE_MUTUAL_EXCLUSION 13 -#define GUID_ASF_ERROR_CORRECTION 14 -#define GUID_ASF_CONTENT_DESCRIPTION 15 -#define GUID_ASF_EXTENDED_CONTENT_DESCRIPTION 16 -#define GUID_ASF_STREAM_BITRATE_PROPERTIES 17 -#define GUID_ASF_EXTENDED_CONTENT_ENCRYPTION 18 -#define GUID_ASF_PADDING 19 - - /* stream properties object stream type */ -#define GUID_ASF_AUDIO_MEDIA 20 -#define GUID_ASF_VIDEO_MEDIA 21 -#define GUID_ASF_COMMAND_MEDIA 22 -#define GUID_ASF_JFIF_MEDIA 23 -#define GUID_ASF_DEGRADABLE_JPEG_MEDIA 24 -#define GUID_ASF_FILE_TRANSFER_MEDIA 25 -#define GUID_ASF_BINARY_MEDIA 26 - - /* stream properties object error correction type */ -#define GUID_ASF_NO_ERROR_CORRECTION 27 -#define GUID_ASF_AUDIO_SPREAD 28 - - /* mutual exclusion object exlusion type */ -#define GUID_ASF_MUTEX_BITRATE 29 -#define GUID_ASF_MUTEX_UKNOWN 30 - - /* header extension */ -#define GUID_ASF_RESERVED_1 31 - - /* script command */ -#define GUID_ASF_RESERVED_SCRIPT_COMMNAND 32 - - /* marker object */ -#define GUID_ASF_RESERVED_MARKER 33 - - /* various */ -/* -#define GUID_ASF_HEAD2 27 -*/ -#define GUID_ASF_AUDIO_CONCEAL_NONE 34 -#define GUID_ASF_CODEC_COMMENT1_HEADER 35 -#define GUID_ASF_2_0_HEADER 36 - -#define GUID_END 37 - - -/* asf stream types */ -#define ASF_STREAM_TYPE_UNKNOWN 0 -#define ASF_STREAM_TYPE_AUDIO 1 -#define ASF_STREAM_TYPE_VIDEO 2 -#define ASF_STREAM_TYPE_CONTROL 3 -#define ASF_STREAM_TYPE_JFIF 4 -#define ASF_STREAM_TYPE_DEGRADABLE_JPEG 5 -#define ASF_STREAM_TYPE_FILE_TRANSFER 6 -#define ASF_STREAM_TYPE_BINARY 7 - -#define ASF_MAX_NUM_STREAMS 23 - -#ifndef GUID_DEFINED -#define GUID_DEFINED - -typedef struct _GUID { /* size is 16 */ - uint32_t Data1; - uint16_t Data2; - uint16_t Data3; - uint8_t Data4[8]; -} GUID; - -#endif /* !GUID_DEFINED */ - -static const struct -{ - const char* name; - const GUID guid; -} guids[] = -{ - { "error", - { 0x0,} }, - - - /* base ASF objects */ - { "header", - { 0x75b22630, 0x668e, 0x11cf, { 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c }} }, - - { "data", - { 0x75b22636, 0x668e, 0x11cf, { 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c }} }, - - { "simple index", - { 0x33000890, 0xe5b1, 0x11cf, { 0x89, 0xf4, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xcb }} }, - - { "index", - { 0xd6e229d3, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xbe }} }, - - { "media object index", - { 0xfeb103f8, 0x12ad, 0x4c64, { 0x84, 0x0f, 0x2a, 0x1d, 0x2f, 0x7a, 0xd4, 0x8c }} }, - - { "timecode index", - { 0x3cb73fd0, 0x0c4a, 0x4803, { 0x95, 0x3d, 0xed, 0xf7, 0xb6, 0x22, 0x8f, 0x0c }} }, - - /* header ASF objects */ - { "file properties", - { 0x8cabdca1, 0xa947, 0x11cf, { 0x8e, 0xe4, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }} }, - - { "stream header", - { 0xb7dc0791, 0xa9b7, 0x11cf, { 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }} }, - - { "header extension", - { 0x5fbf03b5, 0xa92e, 0x11cf, { 0x8e, 0xe3, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }} }, - - { "codec list", - { 0x86d15240, 0x311d, 0x11d0, { 0xa3, 0xa4, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6 }} }, - - { "script command", - { 0x1efb1a30, 0x0b62, 0x11d0, { 0xa3, 0x9b, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6 }} }, - - { "marker", - { 0xf487cd01, 0xa951, 0x11cf, { 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }} }, - - { "bitrate mutual exclusion", - { 0xd6e229dc, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xbe }} }, - - { "error correction", - { 0x75b22635, 0x668e, 0x11cf, { 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c }} }, - - { "content description", - { 0x75b22633, 0x668e, 0x11cf, { 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c }} }, - - { "extended content description", - { 0xd2d0a440, 0xe307, 0x11d2, { 0x97, 0xf0, 0x00, 0xa0, 0xc9, 0x5e, 0xa8, 0x50 }} }, - - { "stream bitrate properties", /* (http://get.to/sdp) */ - { 0x7bf875ce, 0x468d, 0x11d1, { 0x8d, 0x82, 0x00, 0x60, 0x97, 0xc9, 0xa2, 0xb2 }} }, - - { "extended content encryption", - { 0x298ae614, 0x2622, 0x4c17, { 0xb9, 0x35, 0xda, 0xe0, 0x7e, 0xe9, 0x28, 0x9c }} }, - - { "padding", - { 0x1806d474, 0xcadf, 0x4509, { 0xa4, 0xba, 0x9a, 0xab, 0xcb, 0x96, 0xaa, 0xe8 }} }, - - - /* stream properties object stream type */ - { "audio media", - { 0xf8699e40, 0x5b4d, 0x11cf, { 0xa8, 0xfd, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b }} }, - - { "video media", - { 0xbc19efc0, 0x5b4d, 0x11cf, { 0xa8, 0xfd, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b }} }, - - { "command media", - { 0x59dacfc0, 0x59e6, 0x11d0, { 0xa3, 0xac, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6 }} }, - - { "JFIF media (JPEG)", - { 0xb61be100, 0x5b4e, 0x11cf, { 0xa8, 0xfd, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b }} }, - - { "Degradable JPEG media", - { 0x35907de0, 0xe415, 0x11cf, { 0xa9, 0x17, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b }} }, - - { "File Transfer media", - { 0x91bd222c, 0xf21c, 0x497a, { 0x8b, 0x6d, 0x5a, 0xa8, 0x6b, 0xfc, 0x01, 0x85 }} }, - - { "Binary media", - { 0x3afb65e2, 0x47ef, 0x40f2, { 0xac, 0x2c, 0x70, 0xa9, 0x0d, 0x71, 0xd3, 0x43 }} }, - - /* stream properties object error correction */ - { "no error correction", - { 0x20fb5700, 0x5b55, 0x11cf, { 0xa8, 0xfd, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b }} }, - - { "audio spread", - { 0xbfc3cd50, 0x618f, 0x11cf, { 0x8b, 0xb2, 0x00, 0xaa, 0x00, 0xb4, 0xe2, 0x20 }} }, - - - /* mutual exclusion object exlusion type */ - { "mutex bitrate", - { 0xd6e22a01, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xbe }} }, - - { "mutex unknown", - { 0xd6e22a02, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xbe }} }, - - - /* header extension */ - { "reserved_1", - { 0xabd3d211, 0xa9ba, 0x11cf, { 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }} }, - - - /* script command */ - { "reserved script command", - { 0x4B1ACBE3, 0x100B, 0x11D0, { 0xA3, 0x9B, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6 }} }, - - /* marker object */ - { "reserved marker", - { 0x4CFEDB20, 0x75F6, 0x11CF, { 0x9C, 0x0F, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xCB }} }, - - /* various */ - /* Already defined (reserved_1) - { "head2", - { 0xabd3d211, 0xa9ba, 0x11cf, { 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }} }, - */ - { "audio conceal none", - { 0x49f1a440, 0x4ece, 0x11d0, { 0xa3, 0xac, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6 }} }, - - { "codec comment1 header", - { 0x86d15241, 0x311d, 0x11d0, { 0xa3, 0xa4, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6 }} }, - - { "asf 2.0 header", - { 0xd6e229d1, 0x35da, 0x11d1, { 0x90, 0x34, 0x00, 0xa0, 0xc9, 0x03, 0x49, 0xbe }} }, - -}; - -#endif diff --git a/lib/win32/libmms_win32/src/bswap.h b/lib/win32/libmms_win32/src/bswap.h deleted file mode 100644 index 5fde765406..0000000000 --- a/lib/win32/libmms_win32/src/bswap.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef BSWAP_H_INCLUDED -#define BSWAP_H_INCLUDED - -/* - * Copyright (C) 2004 Maciej Katafiasz <mathrick@users.sourceforge.net> - * - * - * This program 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 program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* Go cheap now, will rip out glib later. *Sigh* */ -#include <glib.h> - -/* NOTE: - * Now, to clear up confusion: LE_XX means "from LE to native, XX bits wide" - * I know it's not very clear naming (tell me about it, I - * misinterpreted in first version and caused bad nasty bug, *sigh*), - * but that's inherited code, will clean up as things go - * Oh, and one more thing -- they take *pointers*, not actual ints - */ - -#define LE_16(val) (GINT16_FROM_LE (*((guint16*)(val)))) -#define BE_16(val) (GINT16_FROM_BE (*((guint16*)(val)))) -#define LE_32(val) (GINT32_FROM_LE (*((guint32*)(val)))) -#define BE_32(val) (GINT32_FROM_BE (*((guint32*)(val)))) - -#define LE_64(val) (GINT64_FROM_LE (*((guint64*)(val)))) -#define BE_64(val) (GINT64_FROM_BE (*((guint64*)(val)))) - -#endif /* BSWAP_H_INCLUDED */ diff --git a/lib/win32/libmms_win32/src/input_mms.c b/lib/win32/libmms_win32/src/input_mms.c deleted file mode 100644 index fdfbbad8a2..0000000000 --- a/lib/win32/libmms_win32/src/input_mms.c +++ /dev/null @@ -1,451 +0,0 @@ -/* - * Copyright (C) 2002-2003 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: input_mms.c,v 1.1 2004/02/15 19:57:21 mathrick Exp $ - * - * mms input plugin based on work from major mms - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <unistd.h> -#include <stdio.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> - -#define LOG_MODULE "input_mms" -#define LOG_VERBOSE -/* -#define LOG -*/ - -#include "bswap.h" -#include "xine_internal.h" -#include "xineutils.h" -#include "input_plugin.h" - -#include "mms.h" -#include "mmsh.h" -#include "net_buf_ctrl.h" - -#define PROTOCOL_UNDEFINED 0 -#define PROTOCOL_MMST 1 -#define PROTOCOL_MMSH 2 - -#if !defined(NDELAY) && defined(O_NDELAY) -#define FNDELAY O_NDELAY -#endif - -/* network bandwidth */ -const uint32_t mms_bandwidths[]={14400,19200,28800,33600,34430,57600, - 115200,262200,393216,524300,1544000,10485800}; - -const char * mms_bandwidth_strs[]={"14.4 Kbps (Modem)", "19.2 Kbps (Modem)", - "28.8 Kbps (Modem)", "33.6 Kbps (Modem)", - "34.4 Kbps (Modem)", "57.6 Kbps (Modem)", - "115.2 Kbps (ISDN)", "262.2 Kbps (Cable/DSL)", - "393.2 Kbps (Cable/DSL)","524.3 Kbps (Cable/DSL)", - "1.5 Mbps (T1)", "10.5 Mbps (LAN)", NULL}; - -typedef struct { - input_plugin_t input_plugin; - - xine_stream_t *stream; - mms_t *mms; - mmsh_t *mmsh; - - char *mrl; - - off_t curpos; - - nbc_t *nbc; - - char scratch[1025]; - - int bandwidth; - int protocol; /* mmst or mmsh */ - -} mms_input_plugin_t; - -typedef struct { - - input_class_t input_class; - - mms_input_plugin_t *ip; - - xine_t *xine; -} mms_input_class_t; - -static off_t mms_plugin_read (input_plugin_t *this_gen, - char *buf, off_t len) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - off_t n = 0; - - lprintf ("mms_plugin_read: %lld bytes ...\n", len); - - nbc_check_buffers (this->nbc); - - switch (this->protocol) { - case PROTOCOL_MMST: - n = mms_read (this->mms, buf, len); - break; - case PROTOCOL_MMSH: - n = mmsh_read (this->mmsh, buf, len); - break; - } - - this->curpos += n; - - return n; -} - -static buf_element_t *mms_plugin_read_block (input_plugin_t *this_gen, - fifo_buffer_t *fifo, off_t todo) { - /*mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; */ - buf_element_t *buf = fifo->buffer_pool_alloc (fifo); - int total_bytes; - - lprintf ("mms_plugin_read_block: %lld bytes...\n", todo); - - buf->content = buf->mem; - buf->type = BUF_DEMUX_BLOCK; - - total_bytes = mms_plugin_read (this_gen, buf->content, todo); - - if (total_bytes != todo) { - buf->free_buffer (buf); - return NULL; - } - - buf->size = total_bytes; - - return buf; -} - -static off_t mms_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - off_t dest = this->curpos; - - lprintf ("mms_plugin_seek: %lld offset, %d origin...\n", offset, origin); - - switch (origin) { - case SEEK_SET: - dest = offset; - break; - case SEEK_CUR: - dest = this->curpos + offset; - break; - case SEEK_END: - printf ("input_mms: SEEK_END not implemented!\n"); - return this->curpos; - default: - printf ("input_mms: unknown origin in seek!\n"); - return this->curpos; - } - - if (this->curpos > dest) { - printf ("input_mms: cannot seek back!\n"); - return this->curpos; - } - - while (this->curpos<dest) { - int n = 0; - int diff; - - diff = dest - this->curpos; - - if (diff>1024) - diff = 1024; - - switch (this->protocol) { - case PROTOCOL_MMST: - n = mms_read (this->mms, this->scratch, diff); - break; - case PROTOCOL_MMSH: - n = mmsh_read (this->mmsh, this->scratch, diff); - break; - } - - this->curpos += n; - - if (n < diff) - return this->curpos; - - } - - return this->curpos; -} - -static off_t mms_plugin_get_length (input_plugin_t *this_gen) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - off_t length = 0; - - if (!this->mms) - return 0; - - switch (this->protocol) { - case PROTOCOL_MMST: - length = mms_get_length (this->mms); - break; - case PROTOCOL_MMSH: - length = mmsh_get_length (this->mmsh); - break; - } - - lprintf ("length is %lld\n", length); - - return length; - -} - -static uint32_t mms_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_PREVIEW; -} - -static uint32_t mms_plugin_get_blocksize (input_plugin_t *this_gen) { - return 0; -} - -static off_t mms_plugin_get_current_pos (input_plugin_t *this_gen){ - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - - /* - printf ("current pos is %lld\n", this->curpos); - */ - - return this->curpos; -} - -static void mms_plugin_dispose (input_plugin_t *this_gen) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - - if (this->mms) - mms_close (this->mms); - - if (this->mmsh) - mmsh_close (this->mmsh); - - this->mms = NULL; - this->mmsh = NULL; - - if (this->nbc) { - nbc_close (this->nbc); - this->nbc = NULL; - } - - if(this->mrl) - free(this->mrl); - - free (this); -} - -static char* mms_plugin_get_mrl (input_plugin_t *this_gen) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - - return this->mrl; -} - -static int mms_plugin_get_optional_data (input_plugin_t *this_gen, - void *data, int data_type) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - - switch (data_type) { - - case INPUT_OPTIONAL_DATA_PREVIEW: - switch (this->protocol) { - case PROTOCOL_MMST: - return mms_peek_header (this->mms, data, MAX_PREVIEW_SIZE); - break; - case PROTOCOL_MMSH: - return mmsh_peek_header (this->mmsh, data, MAX_PREVIEW_SIZE); - break; - } - break; - - default: - return INPUT_OPTIONAL_UNSUPPORTED; - break; - - } - - return INPUT_OPTIONAL_UNSUPPORTED; -} - -static void bandwidth_changed_cb (void *this_gen, xine_cfg_entry_t *entry) { - mms_input_class_t *class = (mms_input_class_t*) this_gen; - - lprintf ("bandwidth_changed_cb %d\n", entry->num_value); - - if(!class) - return; - - if(class->ip && ((entry->num_value >= 0) && (entry->num_value <= 11))) { - mms_input_plugin_t *this = class->ip; - - this->bandwidth = mms_bandwidths[entry->num_value]; - } -} - -static int mms_plugin_open (input_plugin_t *this_gen) { - mms_input_plugin_t *this = (mms_input_plugin_t *) this_gen; - mms_t *mms = NULL; - mmsh_t *mmsh = NULL; - - switch (this->protocol) { - case PROTOCOL_UNDEFINED: - mms = mms_connect (this->stream, this->mrl, this->bandwidth); - if (mms) { - this->protocol = PROTOCOL_MMST; - } else { - mmsh = mmsh_connect (this->stream, this->mrl, this->bandwidth); - this->protocol = PROTOCOL_MMSH; - } - break; - case PROTOCOL_MMST: - mms = mms_connect (this->stream, this->mrl, this->bandwidth); - break; - case PROTOCOL_MMSH: - mmsh = mmsh_connect (this->stream, this->mrl, this->bandwidth); - break; - } - - if (!mms && !mmsh) { - return 0; - } - - this->mms = mms; - this->mmsh = mmsh; - this->curpos = 0; - - return 1; -} - -static input_plugin_t *mms_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, - const char *data) { - - mms_input_class_t *cls = (mms_input_class_t *) cls_gen; - mms_input_plugin_t *this; - char *mrl = strdup(data); - xine_cfg_entry_t bandwidth_entry; - int protocol; - - lprintf ("trying to open '%s'\n", mrl); - - if (!strncasecmp (mrl, "mms://", 6)) { - protocol = PROTOCOL_UNDEFINED; - } else if (!strncasecmp (mrl, "mmst://", 7)) { - protocol = PROTOCOL_MMST; - } else if (!strncasecmp (mrl, "mmsh://", 7)) { - protocol = PROTOCOL_MMSH; - } else { - free (mrl); - return NULL; - } - - this = (mms_input_plugin_t *) xine_xmalloc (sizeof (mms_input_plugin_t)); - cls->ip = this; - this->stream = stream; - this->mms = NULL; - this->mmsh = NULL; - this->protocol = protocol; - this->mrl = mrl; - this->curpos = 0; - this->nbc = nbc_init (this->stream); - - if (xine_config_lookup_entry (stream->xine, "input.mms_network_bandwidth", - &bandwidth_entry)) { - bandwidth_changed_cb(cls, &bandwidth_entry); - } - - this->input_plugin.open = mms_plugin_open; - this->input_plugin.get_capabilities = mms_plugin_get_capabilities; - this->input_plugin.read = mms_plugin_read; - this->input_plugin.read_block = mms_plugin_read_block; - this->input_plugin.seek = mms_plugin_seek; - this->input_plugin.get_current_pos = mms_plugin_get_current_pos; - this->input_plugin.get_length = mms_plugin_get_length; - this->input_plugin.get_blocksize = mms_plugin_get_blocksize; - this->input_plugin.get_mrl = mms_plugin_get_mrl; - this->input_plugin.dispose = mms_plugin_dispose; - this->input_plugin.get_optional_data = mms_plugin_get_optional_data; - this->input_plugin.input_class = cls_gen; - - - return &this->input_plugin; -} - -/* - * mms input plugin class stuff - */ - -static char *mms_class_get_description (input_class_t *this_gen) { - return _("mms streaming input plugin"); -} - -static char *mms_class_get_identifier (input_class_t *this_gen) { - return "mms"; -} - -static void mms_class_dispose (input_class_t *this_gen) { - mms_input_class_t *this = (mms_input_class_t *) this_gen; - - free (this); -} - -static void *init_class (xine_t *xine, void *data) { - - mms_input_class_t *this; - - this = (mms_input_class_t *) xine_xmalloc (sizeof (mms_input_class_t)); - - this->xine = xine; - this->ip = NULL; - - this->input_class.get_instance = mms_class_get_instance; - this->input_class.get_identifier = mms_class_get_identifier; - this->input_class.get_description = mms_class_get_description; - this->input_class.get_dir = NULL; - this->input_class.get_autoplay_list = NULL; - this->input_class.dispose = mms_class_dispose; - this->input_class.eject_media = NULL; - - xine->config->register_enum(xine->config, "input.mms_network_bandwidth", 10, - (char **)mms_bandwidth_strs, - "Network bandwidth", - NULL, 0, bandwidth_changed_cb, (void*) this); - - return this; -} - -/* - * exported plugin catalog entry - */ - -plugin_info_t xine_plugin_info[] = { - /* type, API, "name", version, special_info, init_function */ - { PLUGIN_INPUT, 14, "mms", XINE_VERSION_CODE, NULL, init_class }, - { PLUGIN_NONE, 0, "", 0, NULL, NULL } -}; diff --git a/lib/win32/libmms_win32/src/mms.c b/lib/win32/libmms_win32/src/mms.c deleted file mode 100644 index 4c574d4a27..0000000000 --- a/lib/win32/libmms_win32/src/mms.c +++ /dev/null @@ -1,1981 +0,0 @@ -/* - * Copyright (C) 2002-2004 the xine project - * - * This file is part of LibMMS, an MMS protocol handling library. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the ree Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: mms.c,v 1.31 2007/12/11 20:35:01 jwrdegoede Exp $ - * - * MMS over TCP protocol - * based on work from major mms - * utility functions to handle communication with an mms server - * - * TODO: - * error messages - * enable seeking ! - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <glib.h> /* for G_OS_WIN32 */ - -#ifdef G_OS_WIN32 -#ifdef _MSC_VER -#include <Winsock2.h> -#endif -#include <ws2tcpip.h> -#else -#include <unistd.h> -#include <sys/socket.h> -#include <netdb.h> -#include <netinet/in.h> -#endif - -#include <stdio.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <errno.h> -#include <stdlib.h> -#include <time.h> - -#if defined(HAVE_ICONV) && defined(HAVE_LANGINFO_CODESET) -#define USE_ICONV -#include <iconv.h> -#include <locale.h> -#include <langinfo.h> -#endif - -/********** logging **********/ -#define LOG_MODULE "mms" -#define LOG_VERBOSE -#ifdef DEBUG -# define lprintf g_print -#else -# define lprintf(x) -#endif - -#define __MMS_C__ - -#include "bswap.h" -#include "mms.h" -#include "asfheader.h" -#include "uri.h" -#include "utils.h" - - -/* - * mms specific types - */ - -#define MMST_PORT 1755 - -#define BUF_SIZE 102400 - -#define CMD_HEADER_LEN 40 -#define CMD_PREFIX_LEN 8 -#define CMD_BODY_LEN 1024 * 16 /* FIXME: make this dynamic */ - -#define ASF_HEADER_LEN (8192 * 2) - - -#define MMS_PACKET_ERR 0 -#define MMS_PACKET_COMMAND 1 -#define MMS_PACKET_ASF_HEADER 2 -#define MMS_PACKET_ASF_PACKET 3 - -#define ASF_HEADER_PACKET_ID_TYPE 2 -#define ASF_MEDIA_PACKET_ID_TYPE 4 - - -typedef struct mms_buffer_s mms_buffer_t; -struct mms_buffer_s { - uint8_t *buffer; - int pos; -}; - -typedef struct mms_packet_header_s mms_packet_header_t; -struct mms_packet_header_s { - uint32_t packet_len; - uint8_t flags; - uint8_t packet_id_type; - uint32_t packet_seq; -}; - -typedef struct mms_stream_s mms_stream_t; -struct mms_stream_s { - int stream_id; - int stream_type; - uint32_t bitrate; - uint32_t bitrate_pos; -}; - -struct mms_s { - - /* FIXME: de-xine-ification */ - void *custom_data; - - int s; - - /* url parsing */ - char *url; - char *proto; - char *host; - int port; - char *user; - char *password; - char *uri; - - /* command to send */ - char scmd[CMD_HEADER_LEN + CMD_BODY_LEN]; - char *scmd_body; /* pointer to &scmd[CMD_HEADER_LEN] */ - int scmd_len; /* num bytes written in header */ - - char str[1024]; /* scratch buffer to built strings */ - - /* receive buffer */ - uint8_t buf[BUF_SIZE]; - int buf_size; - int buf_read; - off_t buf_packet_seq_offset; /* packet sequence offset residing in - buf */ - - uint8_t asf_header[ASF_HEADER_LEN]; - uint32_t asf_header_len; - uint32_t asf_header_read; - int seq_num; - int num_stream_ids; - mms_stream_t streams[ASF_MAX_NUM_STREAMS]; - uint8_t packet_id_type; - off_t start_packet_seq; /* for live streams != 0, need to keep it around */ - int need_discont; /* whether we need to set start_packet_seq */ - uint32_t asf_packet_len; - uint64_t file_len; - uint64_t time_len; /* playback time in 100 nanosecs (10^-7) */ - uint64_t preroll; - uint64_t asf_num_packets; - char guid[37]; - int bandwidth; - - int has_audio; - int has_video; - int live_flag; - int seekable; - off_t current_pos; - int eos; -}; - -/* required for MSVC 6.0 */ -static gdouble -guint64_to_gdouble (guint64 value) -{ - if (value & G_GINT64_CONSTANT (0x8000000000000000)) - return (gdouble) ((gint64) value) + (gdouble) 18446744073709551616.; - else - return (gdouble) ((gint64) value); -} - -static int fallback_io_select(void *data, int socket, int state, int timeout_msec) -{ - int ret; - fd_set set; - struct timeval tv = { timeout_msec / 1000, (timeout_msec % 1000) * 1000}; - FD_ZERO(&set); - FD_SET(socket, &set); - ret = select(1, (state == MMS_IO_READ_READY) ? &set : NULL, - (state == MMS_IO_WRITE_READY) ? &set : NULL, NULL, &tv); - -#ifdef G_OS_WIN32 - if (ret > 0) - return MMS_IO_STATUS_READY; - else if (ret == 0) - return MMS_IO_STATUS_TIMEOUT; - else -#endif - return ret; -} - -static off_t fallback_io_read(void *data, int socket, char *buf, off_t num) -{ - off_t len = 0, ret; -/* lprintf("%d\n", fallback_io_select(data, socket, MMS_IO_READ_READY, 1000)); */ - errno = 0; - while (len < num) - { - ret = (off_t)recv(socket, buf + len, num - len, 0); - if(ret == 0) - break; /* EOF */ - if(ret < 0) - switch(errno) - { - case EAGAIN: - lprintf("len == %lld\n", (gint64) len); - break; - default: - lprintf("len == %lld\n", (gint64) len); - perror(NULL); - /* if already read something, return it, we will fail next time */ - return len ? len : ret; - } - len += ret; - } - lprintf("ret len == %lld\nnum == %lld\n", (gint64) len, (gint64) num); - return len; -} - -static off_t fallback_io_write(void *data, int socket, char *buf, off_t num) -{ - return (off_t)send(socket, buf, num, 0); -} - -static int fallback_io_tcp_connect(void *data, const char *host, int port) -{ - - struct hostent *h; - int i, s; - - h = gethostbyname(host); - if (h == NULL) { -/* fprintf(stderr, "unable to resolve host: %s\n", host); */ - return -1; - } - - s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); - if (s == -1) { -/* fprintf(stderr, "failed to create socket: %s", strerror(errno)); */ - return -1; - } - -#ifndef G_OS_WIN32 - if (fcntl (s, F_SETFL, fcntl (s, F_GETFL) & ~O_NONBLOCK) == -1) { -/* _x_message(stream, XINE_MSG_CONNECTION_REFUSED, "can't put socket in non-blocking mode", strerror(errno), NULL); */ - return -1; - } -#endif - - for (i = 0; h->h_addr_list[i]; i++) { - struct in_addr ia; - struct sockaddr_in sin; - - memcpy (&ia, h->h_addr_list[i], 4); - sin.sin_family = AF_INET; - sin.sin_addr = ia; - sin.sin_port = htons(port); - -#ifdef G_OS_WIN32 - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) ==-1) { -#else - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) ==-1 && errno != EINPROGRESS) { -#endif - - /* FIXME: de-xine-ification */ -/* _x_message(stream, XINE_MSG_CONNECTION_REFUSED, strerror(errno), NULL); */ - close(s); - continue; - } - - return s; - } - return -1; -} - - -static mms_io_t fallback_io = - { - &fallback_io_select, - NULL, - &fallback_io_read, - NULL, - &fallback_io_write, - NULL, - &fallback_io_tcp_connect, - NULL, - }; - -static mms_io_t default_io = { - &fallback_io_select, - NULL, - &fallback_io_read, - NULL, - &fallback_io_write, - NULL, - &fallback_io_tcp_connect, - NULL, - }; - - -#define io_read(io, socket, buf, num) \ - ((io) ? (io)->read(io->read_data, socket, buf, num) \ - : default_io.read(NULL , socket, buf, num)) -#define io_write(io, socket, buf, num) \ - ((io) ? (io)->write(io->write_data, socket, buf, num) \ - : default_io.write(NULL , socket, buf, num)) -#define io_select(io, fd, state, timeout_msec) \ - ((io) ? (io)->select(io->select_data, fd, state, timeout_msec) \ - : default_io.select(NULL , fd, state, timeout_msec)) -#define io_connect(io, host, port) \ - ((io) ? (io)->connect(io->connect_data, host, port) \ - : default_io.connect(NULL , host, port)) - -const mms_io_t* mms_get_default_io_impl() -{ - return &default_io; -} - -void mms_set_default_io_impl(const mms_io_t *io) -{ - if(io->select) - { - default_io.select = io->select; - default_io.select_data = io->select_data; - } else - { - default_io.select = fallback_io.select; - default_io.select_data = fallback_io.select_data; - } - if(io->read) - { - default_io.read = io->read; - default_io.read_data = io->read_data; - } else - { - default_io.read = fallback_io.read; - default_io.read_data = fallback_io.read_data; - } - if(io->write) - { - default_io.write = io->write; - default_io.write_data = io->write_data; - } else - { - default_io.write = fallback_io.write; - default_io.write_data = fallback_io.write_data; - } - if(io->connect) - { - default_io.connect = io->connect; - default_io.connect_data = io->connect_data; - } else - { - default_io.connect = fallback_io.connect; - default_io.connect_data = fallback_io.connect_data; - } -} - -static void mms_buffer_init (mms_buffer_t *mms_buffer, uint8_t *buffer) { - mms_buffer->buffer = buffer; - mms_buffer->pos = 0; -} - -static void mms_buffer_put_8 (mms_buffer_t *mms_buffer, uint8_t value) { - - mms_buffer->buffer[mms_buffer->pos] = value & 0xff; - - mms_buffer->pos += 1; -} - -#if 0 -static void mms_buffer_put_16 (mms_buffer_t *mms_buffer, uint16_t value) { - - mms_buffer->buffer[mms_buffer->pos] = value & 0xff; - mms_buffer->buffer[mms_buffer->pos + 1] = (value >> 8) & 0xff; - - mms_buffer->pos += 2; -} -#endif - -static void mms_buffer_put_32 (mms_buffer_t *mms_buffer, uint32_t value) { - - mms_buffer->buffer[mms_buffer->pos] = value & 0xff; - mms_buffer->buffer[mms_buffer->pos + 1] = (value >> 8) & 0xff; - mms_buffer->buffer[mms_buffer->pos + 2] = (value >> 16) & 0xff; - mms_buffer->buffer[mms_buffer->pos + 3] = (value >> 24) & 0xff; - - mms_buffer->pos += 4; -} - -static int get_guid (unsigned char *buffer, int offset) { - int i; - GUID g; - - g.Data1 = LE_32(buffer + offset); - g.Data2 = LE_16(buffer + offset + 4); - g.Data3 = LE_16(buffer + offset + 6); - for(i = 0; i < 8; i++) { - g.Data4[i] = buffer[offset + 8 + i]; - } - - for (i = 1; i < GUID_END; i++) { - if (!memcmp(&g, &guids[i].guid, sizeof(GUID))) { - lprintf("GUID: %s\n", guids[i].name); - return i; - } - } - - lprintf("unknown GUID: 0x%x, 0x%x, 0x%x, " - "{ 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx }\n", - g.Data1, g.Data2, g.Data3, - g.Data4[0], g.Data4[1], g.Data4[2], g.Data4[3], - g.Data4[4], g.Data4[5], g.Data4[6], g.Data4[7]); - - return GUID_ERROR; -} - - -static void print_command (char *data, int len) { - -#ifdef DEBUG - int i; - int dir = LE_32 (data + 36) >> 16; - int comm = LE_32 (data + 36) & 0xFFFF; - - lprintf ("----------------------------------------------\n"); - if (dir == 3) { - lprintf ("send command 0x%02x, %d bytes\n", comm, len); - } else { - lprintf ("receive command 0x%02x, %d bytes\n", comm, len); - } - lprintf (" start sequence %08x\n", LE_32 (data + 0)); - lprintf (" command id %08x\n", LE_32 (data + 4)); - lprintf (" length %8x \n", LE_32 (data + 8)); - lprintf (" protocol %08x\n", LE_32 (data + 12)); - lprintf (" len8 %8x \n", LE_32 (data + 16)); - lprintf (" sequence # %08x\n", LE_32 (data + 20)); - lprintf (" len8 (II) %8x \n", LE_32 (data + 32)); - lprintf (" dir | comm %08x\n", LE_32 (data + 36)); - if (len >= 4) - lprintf (" prefix1 %08x\n", LE_32 (data + 40)); - if (len >= 8) - lprintf (" prefix2 %08x\n", LE_32 (data + 44)); - - for (i = (CMD_HEADER_LEN + CMD_PREFIX_LEN); i < (CMD_HEADER_LEN + CMD_PREFIX_LEN + len); i += 1) { - unsigned char c = data[i]; - - if ((c >= 32) && (c < 128)) - lprintf ("%c", c); - else - lprintf (" %02x ", c); - - } - if (len > CMD_HEADER_LEN) - lprintf ("\n"); - lprintf ("----------------------------------------------\n"); -#endif -} - - - -static int send_command (mms_io_t *io, mms_t *this, int command, - uint32_t prefix1, uint32_t prefix2, - int length) { - int len8; - off_t n; - mms_buffer_t command_buffer; - - len8 = (length + 7) / 8; - - this->scmd_len = 0; - - mms_buffer_init(&command_buffer, this->scmd); - mms_buffer_put_32 (&command_buffer, 0x00000001); /* start sequence */ - mms_buffer_put_32 (&command_buffer, 0xB00BFACE); /* #-)) */ - mms_buffer_put_32 (&command_buffer, len8 * 8 + 32); - mms_buffer_put_32 (&command_buffer, 0x20534d4d); /* protocol type "MMS " */ - mms_buffer_put_32 (&command_buffer, len8 + 4); - mms_buffer_put_32 (&command_buffer, this->seq_num); - this->seq_num++; - mms_buffer_put_32 (&command_buffer, 0x0); /* timestamp */ - mms_buffer_put_32 (&command_buffer, 0x0); - mms_buffer_put_32 (&command_buffer, len8 + 2); - mms_buffer_put_32 (&command_buffer, 0x00030000 | command); /* dir | command */ - /* end of the 40 byte command header */ - - mms_buffer_put_32 (&command_buffer, prefix1); - mms_buffer_put_32 (&command_buffer, prefix2); - - if (length & 7) - memset(this->scmd + length + CMD_HEADER_LEN + CMD_PREFIX_LEN, 0, 8 - (length & 7)); - - n = io_write(io, this->s, this->scmd, len8 * 8 + CMD_HEADER_LEN + CMD_PREFIX_LEN); - if (n != (len8 * 8 + CMD_HEADER_LEN + CMD_PREFIX_LEN)) { - return 0; - } - - print_command (this->scmd, length); - - return 1; -} - -#ifdef USE_ICONV -static iconv_t string_utf16_open() { - return iconv_open("UTF-16LE", nl_langinfo(CODESET)); -} - -static void string_utf16_close(iconv_t url_conv) { - if (url_conv != (iconv_t)-1) { - iconv_close(url_conv); - } -} - -static void string_utf16(iconv_t url_conv, char *dest, char *src, int len) { - memset(dest, 0, 2 * len); - - if (url_conv == (iconv_t)-1) { - int i; - - for (i = 0; i < len; i++) { - dest[i * 2] = src[i]; - dest[i * 2 + 1] = 0; - } - dest[i * 2] = 0; - dest[i * 2 + 1] = 0; - } - else { - size_t len1, len2; - char *ip, *op; - - len1 = len; len2 = 1000; - ip = src; op = dest; - iconv(url_conv, &ip, &len1, &op, &len2); - } -} - -#else -static void string_utf16(int unused, char *dest, char *src, int len) { - int i; - - memset (dest, 0, 2 * len); - - for (i = 0; i < len; i++) { - dest[i * 2] = src[i]; - dest[i * 2 + 1] = 0; - } - - dest[i * 2] = 0; - dest[i * 2 + 1] = 0; -} -#endif - - -/* - * return packet type - */ -static int get_packet_header (mms_io_t *io, mms_t *this, mms_packet_header_t *header) { - size_t len; - int packet_type; - - header->packet_len = 0; - header->packet_seq = 0; - header->flags = 0; - header->packet_id_type = 0; - len = io_read(io, this->s, this->buf, 8); - this->buf_packet_seq_offset = -1; - if (len != 8) - goto error; - - if (LE_32(this->buf + 4) == 0xb00bface) { - /* command packet */ - header->flags = this->buf[3]; - len = io_read(io, this->s, this->buf + 8, 4); - if (len != 4) - goto error; - - header->packet_len = LE_32(this->buf + 8) + 4; - if (header->packet_len > BUF_SIZE - 12) { - header->packet_len = 0; - goto error; - } - lprintf("mms command\n"); - packet_type = MMS_PACKET_COMMAND; - } else { - header->packet_seq = LE_32(this->buf); - header->packet_id_type = this->buf[4]; - header->flags = this->buf[5]; - header->packet_len = (LE_16(this->buf + 6) - 8) & 0xffff; - if (header->packet_id_type == ASF_HEADER_PACKET_ID_TYPE) { - lprintf("asf header\n"); - packet_type = MMS_PACKET_ASF_HEADER; - } else { - lprintf("asf packet\n"); - packet_type = MMS_PACKET_ASF_PACKET; - } - } - - return packet_type; - -error: - lprintf("read error, len=%d\n", len); - perror("Could not read packet header"); - return MMS_PACKET_ERR; -} - - -static int get_packet_command (mms_io_t *io, mms_t *this, uint32_t packet_len) { - - - int command = 0; - size_t len; - - /* always enter this loop */ - lprintf("packet_len: %d bytes\n", packet_len); - - len = io_read(io, this->s, this->buf + 12, packet_len) ; - //this->buf_packet_seq_offset = -1; // already set in get_packet_header - if (len != packet_len) { - return 0; - } - - print_command (this->buf, len); - - /* check protocol type ("MMS ") */ - if (LE_32(this->buf + 12) != 0x20534D4D) { - lprintf("unknown protocol type: %c%c%c%c (0x%08X)\n", - this->buf[12], this->buf[13], this->buf[14], this->buf[15], - LE_32(this->buf + 12)); - return 0; - } - - command = LE_32 (this->buf + 36) & 0xFFFF; - lprintf("command = 0x%2x\n", command); - - return command; -} - -static int get_answer (mms_io_t *io, mms_t *this) { - int command = 0; - mms_packet_header_t header; - - switch (get_packet_header (io, this, &header)) { - case MMS_PACKET_ERR: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to read mms packet header\n"); - break; - case MMS_PACKET_COMMAND: - command = get_packet_command (io, this, header.packet_len); - - if (command == 0x1b) { - - if (!send_command (io, this, 0x1b, 0, 0, 0)) { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to send command\n"); - return 0; - } - /* FIXME: limit recursion */ - command = get_answer (io, this); - } - break; - case MMS_PACKET_ASF_HEADER: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: unexpected asf header packet\n"); - break; - case MMS_PACKET_ASF_PACKET: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " -"libmms: unexpected asf packet\n"); - break; - } - - return command; -} - - -static int get_asf_header (mms_io_t *io, mms_t *this) { - - off_t len; - int stop = 0; - - this->asf_header_read = 0; - this->asf_header_len = 0; - - while (!stop) { - mms_packet_header_t header; - int command; - - switch (get_packet_header (io, this, &header)) { - case MMS_PACKET_ERR: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to read mms packet header\n"); - return 0; - break; - case MMS_PACKET_COMMAND: - command = get_packet_command (io, this, header.packet_len); - - if (command == 0x1b) { - - if (!send_command (io, this, 0x1b, 0, 0, 0)) { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to send command\n"); - return 0; - } - command = get_answer (io, this); - } else { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: unexpected command packet\n"); - } - break; - case MMS_PACKET_ASF_HEADER: - case MMS_PACKET_ASF_PACKET: - if (header.packet_len + this->asf_header_len > ASF_HEADER_LEN) { - lprintf( "***LOG:*** -- " - "libmms: asf packet too large: %d\n", - header.packet_len + this->asf_header_len); - return 0; - } - len = io_read(io, this->s, - this->asf_header + this->asf_header_len, header.packet_len); - if (len != header.packet_len) { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: get_asf_header failed\n"); - return 0; - } - this->asf_header_len += header.packet_len; - lprintf("header flags: %d\n", header.flags); - if ((header.flags == 0X08) || (header.flags == 0X0C)) - stop = 1; - break; - } - } - lprintf ("get header packet succ\n"); - return 1; -} - -static void interp_asf_header (mms_t *this) { - - int i; - - this->asf_packet_len = 0; - this->num_stream_ids = 0; - this->asf_num_packets = 0; - /* - * parse header - */ - - i = 30; - while (i < this->asf_header_len) { - - int guid; - uint64_t length; - - guid = get_guid(this->asf_header, i); - i += 16; - - length = LE_64(this->asf_header + i); - i += 8; - - switch (guid) { - - case GUID_ASF_FILE_PROPERTIES: - - this->asf_packet_len = LE_32(this->asf_header + i + 92 - 24); - if (this->asf_packet_len > BUF_SIZE) { - this->asf_packet_len = 0; - lprintf( "***LOG:*** -- " - "libmms: asf packet len too large\n"); - break; - } - this->file_len = LE_64(this->asf_header + i + 40 - 24); - this->time_len = LE_64(this->asf_header + i + 64 - 24); - //this->time_len = LE_64(this->asf_header + i + 72 - 24); - this->preroll = LE_64(this->asf_header + i + 80 - 24); - lprintf ("file object, packet length = %d (%d)\n", - this->asf_packet_len, LE_32(this->asf_header + i + 96 - 24)); - break; - - case GUID_ASF_STREAM_PROPERTIES: - { - uint16_t flags; - uint16_t stream_id; - int type; - int encrypted; - - guid = get_guid(this->asf_header, i); - switch (guid) { - case GUID_ASF_AUDIO_MEDIA: - type = ASF_STREAM_TYPE_AUDIO; - this->has_audio = 1; - break; - - case GUID_ASF_VIDEO_MEDIA: - case GUID_ASF_JFIF_MEDIA: - case GUID_ASF_DEGRADABLE_JPEG_MEDIA: - type = ASF_STREAM_TYPE_VIDEO; - this->has_video = 1; - break; - - case GUID_ASF_COMMAND_MEDIA: - type = ASF_STREAM_TYPE_CONTROL; - break; - - default: - type = ASF_STREAM_TYPE_UNKNOWN; - } - - flags = LE_16(this->asf_header + i + 48); - stream_id = flags & 0x7F; - encrypted = flags >> 15; - - lprintf ("stream object, stream id: %d, type: %d, encrypted: %d\n", - stream_id, type, encrypted); - - if (this->num_stream_ids < ASF_MAX_NUM_STREAMS) { - this->streams[this->num_stream_ids].stream_type = type; - this->streams[this->num_stream_ids].stream_id = stream_id; - this->num_stream_ids++; - } else { - lprintf ("too many streams, skipping\n"); - } - } - break; - - case GUID_ASF_STREAM_BITRATE_PROPERTIES: - { - uint16_t streams = LE_16(this->asf_header + i); - uint16_t stream_id; - int j; - - lprintf ("stream bitrate properties\n"); - lprintf ("streams %d\n", streams); - - for(j = 0; j < streams; j++) { - int stream_index; - stream_id = LE_16(this->asf_header + i + 2 + j * 6); - lprintf ("stream id %d\n", stream_id); - for(stream_index = 0; stream_index < this->num_stream_ids; stream_index++) { - if (this->streams[stream_index].stream_id == stream_id) - break; - } - if (stream_index < this->num_stream_ids) { - this->streams[stream_index].bitrate = LE_32(this->asf_header + i + 4 + j * 6); - this->streams[stream_index].bitrate_pos = i + 4 + j * 6; - lprintf ("stream id %d, bitrate %d\n", stream_id, - this->streams[stream_index].bitrate); - } - } - } - break; - - case GUID_ASF_DATA: - this->asf_num_packets = LE_64(this->asf_header + i + 40 - 24); - break; - - default: - lprintf ("unknown object\n"); - break; - } - - lprintf ("length : %lld\n", length); - - if (length > 24) { - i += length - 24; - } - } -} - -const static char *const mmst_proto_s[] = { "mms", "mmst", NULL }; - -static int mmst_valid_proto (char *proto) { - int i = 0; - - lprintf("mmst_valid_proto\n"); - - if (!proto) - return 0; - - while(mmst_proto_s[i]) { - if (!g_strcasecmp(proto, mmst_proto_s[i])) { - return 1; - } - i++; - } - return 0; -} - -/* FIXME: de-xine-ification */ - -/* static void report_progress (void *data, int p) { - - xine_event_t event; - xine_progress_data_t prg; - - prg.description = _("Connecting MMS server (over tcp)..."); - prg.percent = p; - - event.type = XINE_EVENT_PROGRESS; - event.data = &prg; - event.data_length = sizeof (xine_progress_data_t); - - xine_event_send (stream, &event); -} */ - - -/* - * returns 1 on error - */ -static int mms_tcp_connect(mms_io_t *io, mms_t *this) { - int progress, res; - - if (!this->port) this->port = MMST_PORT; - - /* - * try to connect - */ - lprintf("try to connect to %s on port %d \n", this->host, this->port); - this->s = io_connect(io, this->host, this->port); - if (this->s == -1) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "failed to connect '%s'\n", this->host); - return 1; - } - - /* connection timeout 15s */ - progress = 0; - do { - /*FIXME: de-xine-ification */ -/* report_progress(this->stream, progress); */ - res = io_select(io, this->s, MMS_IO_WRITE_READY, 500); - progress += 1; - } while ((res == MMS_IO_STATUS_TIMEOUT) && (progress < 30)); - if (res != MMS_IO_STATUS_READY) { - return 1; - } - lprintf ("connected\n"); - return 0; -} - -static void mms_gen_guid(char guid[]) { - static char digit[16] = "0123456789ABCDEF"; - int i = 0; - - srand(time(NULL)); - for (i = 0; i < 36; i++) { - guid[i] = digit[(int) ((16.0*rand())/(RAND_MAX+1.0))]; - } - guid[8] = '-'; guid[13] = '-'; guid[18] = '-'; guid[23] = '-'; - guid[36] = '\0'; -} - -/* - * return 0 on error - */ -int static mms_choose_best_streams(mms_io_t *io, mms_t *this) { - int i; - int video_stream = 0; - int audio_stream = 0; - int max_arate = 0; - int min_vrate = 0; - int min_bw_left = 0; - int bandwitdh_left; - int res; - - /* command 0x33 */ - /* choose the best quality for the audio stream */ - /* i've never seen more than one audio stream */ - lprintf("num_stream_ids=%d\n", this->num_stream_ids); - for (i = 0; i < this->num_stream_ids; i++) { - switch (this->streams[i].stream_type) { - case ASF_STREAM_TYPE_AUDIO: - if (this->streams[i].bitrate > max_arate) { - audio_stream = this->streams[i].stream_id; - max_arate = this->streams[i].bitrate; - } - break; - default: - break; - } - } - - /* choose a video stream adapted to the user bandwidth */ - bandwitdh_left = this->bandwidth - max_arate; - if (bandwitdh_left < 0) { - bandwitdh_left = 0; - } - lprintf("bandwitdh %d, left %d\n", this->bandwidth, bandwitdh_left); - - min_bw_left = bandwitdh_left; - for (i = 0; i < this->num_stream_ids; i++) { - switch (this->streams[i].stream_type) { - case ASF_STREAM_TYPE_VIDEO: - if (((bandwitdh_left - this->streams[i].bitrate) < min_bw_left) && - (bandwitdh_left >= this->streams[i].bitrate)) { - video_stream = this->streams[i].stream_id; - min_bw_left = bandwitdh_left - this->streams[i].bitrate; - } - break; - default: - break; - } - } - - /* choose the lower bitrate of */ - if (!video_stream && this->has_video) { - for (i = 0; i < this->num_stream_ids; i++) { - switch (this->streams[i].stream_type) { - case ASF_STREAM_TYPE_VIDEO: - if ((this->streams[i].bitrate < min_vrate) || - (!min_vrate)) { - video_stream = this->streams[i].stream_id; - min_vrate = this->streams[i].bitrate; - } - break; - default: - break; - } - } - } - - lprintf("selected streams: audio %d, video %d\n", audio_stream, video_stream); - lprintf("disabling other streams\n"); - memset (this->scmd_body, 0, 40); - for (i = 1; i < this->num_stream_ids; i++) { - this->scmd_body [ (i - 1) * 6 + 2 ] = 0xFF; - this->scmd_body [ (i - 1) * 6 + 3 ] = 0xFF; - this->scmd_body [ (i - 1) * 6 + 4 ] = this->streams[i].stream_id ; - this->scmd_body [ (i - 1) * 6 + 5 ] = this->streams[i].stream_id >> 8; - if ((this->streams[i].stream_id == audio_stream) || - (this->streams[i].stream_id == video_stream)) { - this->scmd_body [ (i - 1) * 6 + 6 ] = 0x00; - this->scmd_body [ (i - 1) * 6 + 7 ] = 0x00; - } else { - lprintf("disabling stream %d\n", this->streams[i].stream_id); - this->scmd_body [ (i - 1) * 6 + 6 ] = 0x02; - this->scmd_body [ (i - 1) * 6 + 7 ] = 0x00; - - /* forces the asf demuxer to not choose this stream */ - if (this->streams[i].bitrate_pos) { - if (this->streams[i].bitrate_pos+3 <= ASF_HEADER_LEN) { - this->asf_header[this->streams[i].bitrate_pos ] = 0; - this->asf_header[this->streams[i].bitrate_pos + 1] = 0; - this->asf_header[this->streams[i].bitrate_pos + 2] = 0; - this->asf_header[this->streams[i].bitrate_pos + 3] = 0; - } else { - lprintf("***LOG:*** -- " - "libmms: attempt to write beyond asf header limit"); - } - } - } - } - - if (!send_command (io, this, 0x33, this->num_stream_ids, - 0xFFFF | this->streams[0].stream_id << 16, - this->num_stream_ids * 6 + 2)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: mms_choose_best_streams failed\n"); - return 0; - } - - if ((res = get_answer (io, this)) != 0x21) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: unexpected response: %02x (0x21)\n", res); - } - - return 1; -} - -/* - * TODO: error messages - * network timing request - */ -/* FIXME: got somewhat broken during xine_stream_t->(void*) conversion */ -mms_t *mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth) { -#ifdef USE_ICONV - iconv_t url_conv; -#else - int url_conv = 0; -#endif - mms_t *this; - int res; - GURI *uri; - - if (!url) - return NULL; - - mms_sock_init(); - - /* FIXME: needs proper error-signalling work */ - this = (mms_t*) malloc (sizeof (mms_t)); - - this->custom_data = data; - this->url = strdup (url); - this->s = -1; - this->seq_num = 0; - this->scmd_body = this->scmd + CMD_HEADER_LEN + CMD_PREFIX_LEN; - this->asf_header_len = 0; - this->asf_header_read = 0; - this->num_stream_ids = 0; - this->asf_packet_len = 0; - this->start_packet_seq= 0; - this->need_discont = 1; - this->buf_size = 0; - this->buf_read = 0; - this->buf_packet_seq_offset = -1; - this->has_audio = 0; - this->has_video = 0; - this->bandwidth = bandwidth; - this->current_pos = 0; - this->eos = 0; - - /* FIXME de-xine-ification */ -/* report_progress (stream, 0); */ - - uri = gnet_uri_new(this->url); - if(!uri) { - lprintf ("invalid url\n"); - goto fail; - } - this->proto = uri->scheme; - this->user = uri->user; - this->host = uri->hostname; - this->port = uri->port; - this->password = uri->passwd; - this->uri = gnet_mms_helper(uri); - - if(!this->uri) - goto fail; - - if (!mmst_valid_proto(this->proto)) { - lprintf ("unsupported protocol\n"); - goto fail; - } - - if (mms_tcp_connect(io, this)) { - goto fail; - } - /* FIXME de-xine-ification */ -/* report_progress (stream, 30); */ - -#ifdef USE_ICONV - url_conv = string_utf16_open(); -#endif - /* - * let the negotiations begin... - */ - - /* command 0x1 */ - lprintf("send command 0x01\n"); - mms_gen_guid(this->guid); - sprintf (this->str, "\x1c\x03NSPlayer/7.0.0.1956; {%s}; Host: %s", - this->guid, this->host); - string_utf16 (url_conv, this->scmd_body, this->str, strlen(this->str) + 2); - - if (!send_command (io, this, 1, 0, 0x0004000b, strlen(this->str) * 2 + 8)) { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to send command 0x01\n"); - goto fail; - } - - if ((res = get_answer (io, this)) != 0x01) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: unexpected response: %02x (0x01)\n", res); - lprintf("answer: %d\n", res); - goto fail; - } - - /* FIXME de-xine-ification */ -/* report_progress (stream, 40); */ - - /* TODO: insert network timing request here */ - /* command 0x2 */ - lprintf("send command 0x02\n"); - string_utf16 (url_conv, &this->scmd_body[8], "\002\000\\\\192.168.0.129\\TCP\\1037\0000", 28); - memset (this->scmd_body, 0, 8); - if (!send_command (io, this, 2, 0, 0, 28 * 2 + 8)) { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to send command 0x02\n"); - - goto fail; - } - - switch (res = get_answer (io, this)) { - case 0x02: - /* protocol accepted */ - break; - case 0x03: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: protocol failed\n"); - goto fail; - break; - default: - lprintf("unexpected response: %02x (0x02 or 0x03)\n", res); - goto fail; - } - - /* FIXME de-xine-ification */ -/* report_progress (stream, 50); */ - - /* command 0x5 */ - { - mms_buffer_t command_buffer; - - lprintf("send command 0x05\n"); - mms_buffer_init(&command_buffer, this->scmd_body); - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - - /* FIXME: refuse to work with urls that are longer that buffer can hold - 64 is a precation */ - - if (strlen(this->uri) >= CMD_BODY_LEN - 64) - goto fail; - - string_utf16 (url_conv, this->scmd_body + command_buffer.pos, this->uri, strlen(this->uri)); - if (!send_command (io, this, 5, 1, 0xffffffff, strlen(this->uri) * 2 + 12)) - goto fail; - } - - switch (res = get_answer (io, this)) { - case 0x06: - { - int xx, yy; - /* no authentication required */ - - /* Warning: sdp is not right here */ - xx = this->buf[62]; - yy = this->buf[63]; - this->live_flag = ((xx == 0) && ((yy & 0xf) == 2)); - this->seekable = !this->live_flag; - lprintf("live: live_flag=%d, xx=%d, yy=%d\n", this->live_flag, xx, yy); - } - break; - case 0x1A: - /* authentication request, not yet supported */ - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: authentication request, not yet supported\n"); - goto fail; - break; - default: - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: unexpected response: %02x (0x06 or 0x1A)\n", res); - goto fail; - } - - /* FIXME de-xine-ification */ -/* report_progress (stream, 60); */ - - /* command 0x15 */ - lprintf("send command 0x15\n"); - { - mms_buffer_t command_buffer; - mms_buffer_init(&command_buffer, this->scmd_body); - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x00800000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0x40AC2000); /* ?? */ - mms_buffer_put_32 (&command_buffer, ASF_HEADER_PACKET_ID_TYPE); /* Header Packet ID type */ - mms_buffer_put_32 (&command_buffer, 0x00000000); /* ?? */ - if (!send_command (io, this, 0x15, 1, 0, command_buffer.pos)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: failed to send command 0x15\n"); - goto fail; - } - } - - if ((res = get_answer (io, this)) != 0x11) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: unexpected response: %02x (0x11)\n", res); - goto fail; - } - - this->num_stream_ids = 0; - - if (!get_asf_header (io, this)) - goto fail; - - interp_asf_header (this); - if (!this->asf_packet_len || !this->num_stream_ids) - goto fail; - - /* FIXME de-xine-ification */ -/* report_progress (stream, 70); */ - - if (!mms_choose_best_streams(io, this)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: mms_choose_best_streams failed"); - goto fail; - } - - /* FIXME de-xine-ification */ -/* report_progress (stream, 80); */ - - /* command 0x07 */ - this->packet_id_type = ASF_MEDIA_PACKET_ID_TYPE; - { - mms_buffer_t command_buffer; - mms_buffer_init(&command_buffer, this->scmd_body); - mms_buffer_put_32 (&command_buffer, 0x00000000); /* 64 byte float timestamp */ - mms_buffer_put_32 (&command_buffer, 0x00000000); - mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* first packet sequence */ - mms_buffer_put_8 (&command_buffer, 0xFF); /* max stream time limit (3 bytes) */ - mms_buffer_put_8 (&command_buffer, 0xFF); - mms_buffer_put_8 (&command_buffer, 0xFF); - mms_buffer_put_8 (&command_buffer, 0x00); /* stream time limit flag */ - mms_buffer_put_32 (&command_buffer, this->packet_id_type); /* asf media packet id type */ - if (!send_command (io, this, 0x07, 1, 0x0001FFFF, command_buffer.pos)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: failed to send command 0x07\n"); - goto fail; - } - } - -/* report_progress (stream, 100); */ - -#ifdef USE_ICONV - string_utf16_close(url_conv); -#endif - - lprintf("mms_connect: passed\n" ); - - return this; - -fail: - if (this->s != -1) - close (this->s); - if (this->url) - free(this->url); - if (this->proto) - free(this->proto); - if (this->host) - free(this->host); - if (this->user) - free(this->user); - if (this->password) - free(this->password); - if (this->uri) - free(this->uri); - - free (this); - return NULL; -} - -static int get_media_packet (mms_io_t *io, mms_t *this) { - mms_packet_header_t header; - off_t len; - - switch (get_packet_header (io, this, &header)) { - case MMS_PACKET_ERR: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to read mms packet header\n"); - return 0; - break; - - case MMS_PACKET_COMMAND: - { - int command; - command = get_packet_command (io, this, header.packet_len); - - switch (command) { - case 0x1e: - { - uint32_t error_code; - - /* Warning: sdp is incomplete. Do not stop if error_code==1 */ - error_code = LE_32(this->buf + CMD_HEADER_LEN); - lprintf ("End of the current stream. Continue=%d\n", error_code); - - if (error_code == 0) { - this->eos = 1; - return 0; - } - - } - break; - - case 0x20: - { - lprintf ("new stream.\n"); - /* asf header */ - if (!get_asf_header (io, this)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "failed to read new ASF header\n"); - return 0; - } - - interp_asf_header (this); - if (!this->asf_packet_len || !this->num_stream_ids) - return 0; - - if (!mms_choose_best_streams(io, this)) - return 0; - - /* send command 0x07 */ - /* TODO: ugly */ - /* command 0x07 */ - { - mms_buffer_t command_buffer; - mms_buffer_init(&command_buffer, this->scmd_body); - mms_buffer_put_32 (&command_buffer, 0x00000000); /* 64 byte float timestamp */ - mms_buffer_put_32 (&command_buffer, 0x00000000); - mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* ?? */ - mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* first packet sequence */ - mms_buffer_put_8 (&command_buffer, 0xFF); /* max stream time limit (3 bytes) */ - mms_buffer_put_8 (&command_buffer, 0xFF); - mms_buffer_put_8 (&command_buffer, 0xFF); - mms_buffer_put_8 (&command_buffer, 0x00); /* stream time limit flag */ - mms_buffer_put_32 (&command_buffer, ASF_MEDIA_PACKET_ID_TYPE); /* asf media packet id type */ - if (!send_command (io, this, 0x07, 1, 0x0001FFFF, command_buffer.pos)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: failed to send command 0x07\n"); - return 0; - } - } - this->current_pos = 0; - - /* I don't know if this ever happens with none live (and thus - seekable streams), but I do know that if it happens all bets - with regards to seeking are off */ - this->seekable = 0; - } - break; - - case 0x1b: - { - if (!send_command (io, this, 0x1b, 0, 0, 0)) { - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: failed to send command\n"); - return 0; - } - } - break; - - case 0x05: - break; - - default: - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "unexpected mms command %02x\n", command); - } - this->buf_size = 0; - } - break; - - case MMS_PACKET_ASF_HEADER: - /* FIXME: de-xine-ification */ - lprintf( "***LOG:*** -- " - "libmms: unexpected asf header packet\n"); - this->buf_size = 0; - break; - - case MMS_PACKET_ASF_PACKET: - { - /* media packet */ - - /* FIXME: probably needs some more sophisticated logic, but - until we do seeking, this should work */ - if(this->need_discont && - header.packet_id_type == ASF_MEDIA_PACKET_ID_TYPE) - { - this->need_discont = 0; - this->start_packet_seq = header.packet_seq; - } - - lprintf ("asf media packet detected, packet_len=%d, packet_seq=%d\n", - header.packet_len, header.packet_seq); - if (header.packet_len > this->asf_packet_len) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: invalid asf packet len: %d bytes\n", header.packet_len); - return 0; - } - - /* simulate a seek */ - this->current_pos = (off_t)this->asf_header_len + - ((off_t)header.packet_seq - this->start_packet_seq) * (off_t)this->asf_packet_len; - - len = io_read(io, this->s, this->buf, header.packet_len); - if (len != header.packet_len) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: read failed\n"); - return 0; - } - - /* explicit padding with 0 */ - lprintf("padding: %d bytes\n", this->asf_packet_len - header.packet_len); - { - char *base = (char *)(this->buf); - char *start = base + header.packet_len; - char *end = start + this->asf_packet_len - header.packet_len; - if ((start > base) && (start < (base+BUF_SIZE-1)) && - (start < end) && (end < (base+BUF_SIZE-1))) { - memset(this->buf + header.packet_len, 0, this->asf_packet_len - header.packet_len); - } - if (header.packet_id_type == this->packet_id_type) { - if (this->asf_packet_len > BUF_SIZE) { - this->buf_size = BUF_SIZE; - } else { - this->buf_size = this->asf_packet_len; - } - this->buf_packet_seq_offset = - header.packet_seq - this->start_packet_seq; - } else { - this->buf_size = 0; - // Don't set this packet sequence for reuse in seek(), since the - // subsequence packet may be discontinued. - //this->buf_packet_seq_offset = header.packet_seq; - // already set to -1 in get_packet_header - //this->buf_packet_seq_offset = -1; - } - } - } - break; - } - - lprintf ("get media packet succ\n"); - - return 1; -} - - -int mms_peek_header (mms_t *this, char *data, int maxsize) { - - int len; - - len = (this->asf_header_len < maxsize) ? this->asf_header_len : maxsize; - - memcpy(data, this->asf_header, len); - return len; -} - -int mms_read (mms_io_t *io, mms_t *this, char *data, int len) { - int total; - - total = 0; - while (total < len && !this->eos) { - - if (this->asf_header_read < this->asf_header_len) { - int n, bytes_left; - - bytes_left = this->asf_header_len - this->asf_header_read ; - - if ((len - total) < bytes_left) - n = len-total; - else - n = bytes_left; - - memcpy (&data[total], &this->asf_header[this->asf_header_read], n); - - this->asf_header_read += n; - total += n; - this->current_pos += n; - } else { - - int n, bytes_left; - - bytes_left = this->buf_size - this->buf_read; - if (bytes_left == 0) { - this->buf_size = this->buf_read = 0; - if (!get_media_packet (io, this)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: get_media_packet failed\n"); - return total; - } - bytes_left = this->buf_size; - } - - if ((len - total) < bytes_left) - n = len - total; - else - n = bytes_left; - - memcpy (&data[total], &this->buf[this->buf_read], n); - - this->buf_read += n; - total += n; - this->current_pos += n; - } - } - return total; -} - -// To be inline function? -static int mms_request_data_packet (mms_io_t *io, mms_t *this, - double time_sec, unsigned long first_packet, unsigned long time_msec_limit) { - /* command 0x07 */ - { - mms_buffer_t command_buffer; - //mms_buffer_init(&command_buffer, this->scmd_body); - //mms_buffer_put_32 (&command_buffer, 0x00000000); /* 64 byte float timestamp */ - //mms_buffer_put_32 (&command_buffer, 0x00000000); - memcpy(this->scmd_body, &time_sec, 8); - mms_buffer_init(&command_buffer, this->scmd_body+8); - mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* ?? */ - //mms_buffer_put_32 (&command_buffer, 0xFFFFFFFF); /* first packet sequence */ - mms_buffer_put_32 (&command_buffer, first_packet); /* first packet sequence */ - //mms_buffer_put_8 (&command_buffer, 0xFF); /* max stream time limit (3 bytes) */ - //mms_buffer_put_8 (&command_buffer, 0xFF); - //mms_buffer_put_8 (&command_buffer, 0xFF); - //mms_buffer_put_8 (&command_buffer, 0x00); /* stream time limit flag */ - mms_buffer_put_32 (&command_buffer, time_msec_limit & 0x00FFFFFF);/* max stream time limit (3 bytes) */ - mms_buffer_put_32 (&command_buffer, this->packet_id_type); /* asf media packet id type */ - if (!send_command (io, this, 0x07, 1, 0x0001FFFF, 8+command_buffer.pos)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: failed to send command 0x07\n"); - return 0; - } - } - /* TODO: adjust current_pos, considering asf_header_read */ - return 1; -} - -int mms_request_time_seek (mms_io_t *io, mms_t *this, double time_sec) { - if (++this->packet_id_type <= ASF_MEDIA_PACKET_ID_TYPE) - this->packet_id_type = ASF_MEDIA_PACKET_ID_TYPE+1; - //return mms_request_data_packet (io, this, time_sec, 0xFFFFFFFF, 0x00FFFFFF); - // also adjust time by preroll - return mms_request_data_packet (io, this, - time_sec+guint64_to_gdouble(this->preroll)/1000, - 0xFFFFFFFF, 0x00FFFFFF); -} - -// set current_pos to the first byte of the requested packet by peeking at -// the first packet. -// To be inline function? -static int peek_and_set_pos (mms_io_t *io, mms_t *this) { - uint8_t saved_buf[BUF_SIZE]; - int saved_buf_size; - off_t saved_buf_packet_seq_offset; - // save buf and buf_size that may be changed in get_media_packet() - memcpy(saved_buf, this->buf, this->buf_size); - saved_buf_size = this->buf_size; - saved_buf_packet_seq_offset = this->buf_packet_seq_offset; - //this->buf_size = this->buf_read = 0; // reset buf, only if success peeking - this->buf_size = 0; - while (!this->eos) { - // get_media_packet() will set current_pos if data packet is read. - if (!get_media_packet (io, this)) { - /* FIXME: de-xine-ification */ - lprintf ( "***LOG:*** -- " - "libmms: get_media_packet failed\n"); - // restore buf and buf_size that may be changed in get_media_packet() - memcpy(this->buf, saved_buf, saved_buf_size); - this->buf_size = saved_buf_size; - this->buf_packet_seq_offset = saved_buf_packet_seq_offset; - return 0; - } - if (this->buf_size > 0) break; - } - // flush header and reset buf_read, only if success peeking - this->asf_header_read = this->asf_header_len; - this->buf_read = 0; - return 1; - //return this->current_pos; -} - -// send time seek request, and update current_pos corresponding to the next -// requested packet -// Note that, the current_pos will always does not less than asf_header_len -int mms_time_seek (mms_io_t *io, mms_t *this, double time_sec) { - if (!this->seekable) - return 0; - - if (!mms_request_time_seek (io, this, time_sec)) return 0; - return peek_and_set_pos (io, this); -} - -// http://sdp.ppona.com/zipfiles/MMSprotocol_pdf.zip said that, this -// packet_seq value make no difference in version 9 servers. -// But from my experiment with -// mms://202.142.200.130/tltk/56k/tltkD2006-08-08ID-7209.wmv and -// mms://202.142.200.130/tltk/56k/tltkD2006-09-01ID-7467.wmv (the url may valid -// in only 2-3 months) whose server is version 9, it does response and return -// the requested packet. -int mms_request_packet_seek (mms_io_t *io, mms_t *this, - unsigned long packet_seq) { - if (++this->packet_id_type <= ASF_MEDIA_PACKET_ID_TYPE) - this->packet_id_type = ASF_MEDIA_PACKET_ID_TYPE+1; - return mms_request_data_packet (io, this, 0, packet_seq, 0x00FFFFFF); -} - -// send packet seek request, and update current_pos corresponding to the next -// requested packet -// Note that, the current_pos will always does not less than asf_header_len -// Not export this function. Let user use mms_seek() instead? -static int mms_packet_seek (mms_io_t *io, mms_t *this, - unsigned long packet_seq) { - if (!mms_request_packet_seek (io, this, packet_seq)) return 0; - return peek_and_set_pos (io, this); -} - -/* -TODO: To use this table to calculate buf_packet_seq_offset rather than store -and retrieve it from this->buf_packet_seq_offset? -current_packet_seq == (current_pos - asf_header_len) / asf_packet_len -current_packet_seq == -1 if current_pos < asf_header_len -buf_packet_seq_offset indicating which packet sequence are residing in the buf. -Possible status after read(), "last" means last value or unchange. -current_packet_seq | buf_read | buf_size | buf_packet_seq_offset --------------------+----------------+-----------+--------------- -<= 0 | 0 (last) | 0 (last) | none -<= 0 | 0 (last) | 0 (last) | eos at #0 -<= 0 | 0 (last) | 0 (last) | eos at > #0 -<= 0 | 0 (last) | > 0 (last)| #0 -<= 0 | buf_size (last)| > 0 (last)| > #0 -> 0 | 0 | 0 | eos at current_packet_seq -> 0 | 0(never happen)| > 0 | (never happen) -> 0 | buf_size | > 0 | current_packet_seq-1 -*/ -// TODO: How to handle seek() in multi stream source? -// The stream that follows 0x20 ("new stream") command. -off_t mms_seek (mms_io_t *io, mms_t *this, off_t offset, int origin) { - off_t dest; - off_t dest_packet_seq; - //off_t buf_packet_seq_offset; - - if (!this->seekable) - return this->current_pos; - - switch (origin) { - case SEEK_SET: - dest = offset; - break; - case SEEK_CUR: - dest = this->current_pos + offset; - break; - case SEEK_END: - //if (this->asf_num_packets == 0) { - // //printf ("input_mms: unknown end position in seek!\n"); - // return this->current_pos; - //} - dest = mms_get_length (this) + offset; - default: - printf ("input_mms: unknown origin in seek!\n"); - return this->current_pos; - } - - dest_packet_seq = dest - this->asf_header_len; - //if (dest_packet_seq > 0) dest_packet_seq /= this->asf_packet_len; - dest_packet_seq = dest_packet_seq >= 0 ? - dest_packet_seq / this->asf_packet_len : -1; -#if 0 - // buf_packet_seq_offset will identify which packet sequence are residing in - // the buf. -#if 1 /* To show both of the alternate styles :D */ - buf_packet_seq_offset = this->current_pos - this->asf_header_len; - //if (buf_packet_seq_offset > 0) buf_packet_seq_offset /= this->asf_packet_len; - buf_packet_seq_offset = buf_packet_seq_offset >= 0 ? - buf_packet_seq_offset / this->asf_packet_len : -1; - // Note: buf_read == buf_size == 0 may means that it is eos, - // eos means that the packet has been peek'ed. - if (this->buf_read >= this->buf_size && this->buf_size > 0 && - buf_packet_seq_offset >= 0 || - // assuming packet not peek'ed in the following condition - /*this->buf_read >= this->buf_size && */this->buf_size == 0 && - buf_packet_seq_offset == 0) - // The buf is all read but the packet has not been peek'ed. - --buf_packet_seq_offset; -#else - buf_packet_seq_offset = this->current_pos - this->asf_header_len - 1; - //if (buf_packet_seq_offset > 0) buf_packet_seq_offset /= this->asf_packet_len; - buf_packet_seq_offset = buf_packet_seq_offset >= 0 ? - buf_packet_seq_offset / this->asf_packet_len : -1; - // Note: buf_read == buf_size == 0 may means that it is eos, - // eos means that the packet has been peek'ed. - if (this->buf_read == 0/* && buf_packet_seq_offset >= 0*/) - // Since the packet has just been peek'ed. - ++buf_packet_seq_offset; -#endif -#endif - - if (dest_packet_seq < 0) { - if (this->buf_packet_seq_offset > 0) { - if (!mms_request_packet_seek (io, this, 0xFFFFFFFF)) - return this->current_pos; -#if 1 - // clear buf - this->buf_read = this->buf_size = 0; - this->buf_packet_seq_offset = -1; - } else { -#else - // clear buf - this->buf_read = this->buf_size; - // Set this packet sequence not to be reused, since the subsequence - // packet may be discontinued. - this->buf_packet_seq_offset = -1; - // don't reset buf_read if buf_packet_seq_offset < 0, since the previous - // buf may not be cleared. - } else if (this->buf_packet_seq_offset == 0) { -#endif - // reset buf_read - this->buf_read = 0; - } - this->asf_header_read = dest; - return this->current_pos = dest; - } - // dest_packet_seq >= 0 - if (this->asf_num_packets && dest == this->asf_header_len + - this->asf_num_packets*this->asf_packet_len) { - // Requesting the packet beyond the last packet, can cause the server to - // not return any packet or any eos command. This can cause - // mms_packet_seek() to hang. - // This is to allow seeking at end of stream, and avoid hanging. - --dest_packet_seq; - } - if (dest_packet_seq != this->buf_packet_seq_offset) { - if (this->asf_num_packets && dest_packet_seq >= this->asf_num_packets) { - // Do not seek beyond the last packet. - return this->current_pos; - } - if (!mms_packet_seek (io, this, this->start_packet_seq + dest_packet_seq)) - return this->current_pos; - // Check if current_pos is correct. - // This can happen if the server ignore packet seek command. - // If so, just return unchanged current_pos, rather than trying to - // mms_read() to reach the destination pos. - // It should let the caller to decide to choose the alternate method, such - // as, mms_time_seek() and/or mms_read() until the destination pos is - // reached. - if (dest_packet_seq != this->buf_packet_seq_offset) - return this->current_pos; - // This has already been set in mms_packet_seek(). - //if (current_packet_seq < 0) - // this->asf_header_read = this->asf_header_len; - //this->asf_header_read = this->asf_header_len; - } - // eos is reached ? - //if (this->buf_size <= 0) return this->current_pos; - //this->buf_read = (dest - this->asf_header_len) % this->asf_packet_len; - this->buf_read = dest - - (this->asf_header_len + dest_packet_seq*this->asf_packet_len); - // will never happen ? - //if (this->buf_size <= this->buf_read) return this->current_pos; - return this->current_pos = dest; -} - - -void mms_close (mms_t *this) { - - if (this->s != -1) - close (this->s); - if (this->url) - free(this->url); - if (this->proto) - free(this->proto); - if (this->host) - free(this->host); - if (this->user) - free(this->user); - if (this->password) - free(this->password); - if (this->uri) - free(this->uri); - - free (this); -} - -double mms_get_time_length (mms_t *this) { - return guint64_to_gdouble(this->time_len) / 1e7; -} - -uint64_t mms_get_raw_time_length (mms_t *this) { - return this->time_len; -} - -uint32_t mms_get_length (mms_t *this) { - /* we could / should return this->file_len here, but usually this->file_len - is longer then the calculation below, as usually an asf file contains an - asf index object after the data stream. However since we do not have a - (known) way to get to this index object through mms, we return a - calculated size of what we can get to when we know. */ - if (this->asf_num_packets) - return this->asf_header_len + this->asf_num_packets*this->asf_packet_len; - else - return this->file_len; -} - -off_t mms_get_current_pos (mms_t *this) { - return this->current_pos; -} - -uint32_t mms_get_asf_header_len (mms_t *this) { - return this->asf_header_len; -} - -uint64_t mms_get_asf_packet_len (mms_t *this) { - return this->asf_packet_len; -} - -int mms_get_seekable (mms_t *this) { - return this->seekable; -} - -/* If init_state is N where > 0, mms_init has been called N times; - * if == 0, library is not initialized; if < 0, library initialization - * has failed. */ -static int init_state = 0; - -int mms_sock_init(void) -{ -#ifdef G_OS_WIN32 - WORD wVersionRequested; - WSADATA wsaData; - int err; -#endif - - if (init_state > 0) { - init_state++; - return 0; - } - else if (init_state < 0) { - return -1; - } - -#ifdef G_OS_WIN32 - wVersionRequested = MAKEWORD(2, 2); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - return init_state = -1; - } -#endif - init_state = 1; - - return 0; -} - diff --git a/lib/win32/libmms_win32/src/mms.h b/lib/win32/libmms_win32/src/mms.h deleted file mode 100644 index c6cc6ed40f..0000000000 --- a/lib/win32/libmms_win32/src/mms.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2002-2003 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: mms.h,v 1.15 2007/12/11 20:24:48 jwrdegoede Exp $ - * - * libmms public header - */ - -/* TODO/dexineification: - * + functions needed: - * - _x_io_*() - * - xine_malloc() [?] - * - xine_fast_memcpy() [?] - */ - -#ifndef HAVE_MMS_H -#define HAVE_MMS_H - -#include <inttypes.h> -#include <stdio.h> -#include <sys/types.h> - -/* #include "xine_internal.h" */ - -#include "bswap.h" -#include "mmsio.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct mms_s mms_t; - -int mms_sock_init (void); -mms_t* mms_connect (mms_io_t *io, void *data, const char *url, int bandwidth); - -int mms_read (mms_io_t *io, mms_t *instance, char *data, int len); -int mms_request_time_seek (mms_io_t *io, mms_t *instance, double time_sec); -int mms_time_seek (mms_io_t *io, mms_t *instance, double time_sec); -int mms_request_packet_seek (mms_io_t *io, mms_t *instance, - unsigned long packet_seq); -/* - * mms_seek() will try to seek using mms_request_packet_seek(), if the server - * ignore the packet seek command, it will return unchanged current_pos, rather - * than trying to mms_read() until the destination pos is reached. This is to - * let the caller, by itself, to decide to choose the alternate method, such - * as, mms_time_seek() and/or mms_read() until the destination pos is reached. - * One can do binary search using time offset (mms_time_seek()) as a search - * index, to approach the desired byte offset. It is to systematically guess - * the time offset to reach for the byte offset. - */ -mms_off_t mms_seek (mms_io_t *io, mms_t *instance, mms_off_t offset, int origin); -/* return total playback time in seconds */ -double mms_get_time_length (mms_t *instance); -/* return raw total playback time in 100 nanosecs (10^-7) */ -uint64_t mms_get_raw_time_length (mms_t *instance); -uint32_t mms_get_length (mms_t *instance); -void mms_close (mms_t *instance); - -int mms_peek_header (mms_t *instance, char *data, int maxsize); - -mms_off_t mms_get_current_pos (mms_t *instance); - -uint32_t mms_get_asf_header_len (mms_t *instance); - -uint64_t mms_get_asf_packet_len (mms_t *instance); - -int mms_get_seekable (mms_t *instance); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/lib/win32/libmms_win32/src/mms_config.h b/lib/win32/libmms_win32/src/mms_config.h deleted file mode 100644 index 4e1045b819..0000000000 --- a/lib/win32/libmms_win32/src/mms_config.h +++ /dev/null @@ -1,4 +0,0 @@ -/* libmms public autoconf settings header file */ - -/* Define to 1 if libmms is compiled with 64 bit file offsets */ -#undef LIBMMS_HAVE_64BIT_OFF_T diff --git a/lib/win32/libmms_win32/src/mms_config.h.in b/lib/win32/libmms_win32/src/mms_config.h.in deleted file mode 100644 index 4e1045b819..0000000000 --- a/lib/win32/libmms_win32/src/mms_config.h.in +++ /dev/null @@ -1,4 +0,0 @@ -/* libmms public autoconf settings header file */ - -/* Define to 1 if libmms is compiled with 64 bit file offsets */ -#undef LIBMMS_HAVE_64BIT_OFF_T diff --git a/lib/win32/libmms_win32/src/mmsh.c b/lib/win32/libmms_win32/src/mmsh.c deleted file mode 100644 index 48690a2501..0000000000 --- a/lib/win32/libmms_win32/src/mmsh.c +++ /dev/null @@ -1,1558 +0,0 @@ -/* - * Copyright (C) 2002-2003 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: mmsh.c,v 1.16 2007/12/11 20:50:43 jwrdegoede Exp $ - * - * MMS over HTTP protocol - * written by Thibaut Mattern - * based on mms.c and specs from avifile - * (http://avifile.sourceforge.net/asf-1.0.htm) - * - * TODO: - * error messages - * http support cleanup, find a way to share code with input_http.c (http.h|c) - * http proxy support - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <glib.h> - -#ifdef G_OS_WIN32 -#ifdef _MSC_VER -#include <Winsock2.h> -#endif -#include <ws2tcpip.h> -#else -#include <unistd.h> -#include <sys/socket.h> -#include <netdb.h> -#include <netinet/in.h> -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <errno.h> -#include <stdlib.h> -#include <time.h> -#include <assert.h> - -#define LOG_MODULE "mmsh" -#define LOG_VERBOSE -#ifdef DEBUG -# define lprintf g_print -#else -# define lprintf(x) -#endif - -/* cheat a bit and call ourselves mms.c to keep the code in mmsio.h clean */ -#define __MMS_C__ - -#include "bswap.h" -#include "mmsh.h" -#include "asfheader.h" -#include "uri.h" -#include "utils.h" - -/* #define USERAGENT "User-Agent: NSPlayer/7.1.0.3055\r\n" */ -#define USERAGENT "User-Agent: NSPlayer/4.1.0.3856\r\n" -#define CLIENTGUID "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n" - - -#define MMSH_PORT 80 -#define MMSH_UNKNOWN 0 -#define MMSH_SEEKABLE 1 -#define MMSH_LIVE 2 - -#define CHUNK_HEADER_LENGTH 4 -#define EXT_HEADER_LENGTH 8 -#define CHUNK_TYPE_RESET 0x4324 -#define CHUNK_TYPE_DATA 0x4424 -#define CHUNK_TYPE_END 0x4524 -#define CHUNK_TYPE_ASF_HEADER 0x4824 -#define CHUNK_SIZE 65536 /* max chunk size */ -#define ASF_HEADER_SIZE (8192 * 2) /* max header size */ - -#define SCRATCH_SIZE 1024 - -static const char* mmsh_FirstRequest = - "GET %s HTTP/1.0\r\n" - "Accept: */*\r\n" - USERAGENT - "Host: %s:%d\r\n" - "Pragma: no-cache,rate=1.000000,stream-time=0,stream-offset=0:0,request-context=%u,max-duration=0\r\n" - CLIENTGUID - "Connection: Close\r\n\r\n"; - -static const char* mmsh_SeekableRequest = - "GET %s HTTP/1.0\r\n" - "Accept: */*\r\n" - USERAGENT - "Host: %s:%d\r\n" - "Pragma: no-cache,rate=1.000000,stream-time=%u,stream-offset=%u:%u,request-context=%u,max-duration=%u\r\n" - CLIENTGUID - "Pragma: xPlayStrm=1\r\n" - "Pragma: stream-switch-count=%d\r\n" - "Pragma: stream-switch-entry=%s\r\n" /* ffff:1:0 ffff:2:0 */ - "Connection: Close\r\n\r\n"; - -static const char* mmsh_LiveRequest = - "GET %s HTTP/1.0\r\n" - "Accept: */*\r\n" - USERAGENT - "Host: %s:%d\r\n" - "Pragma: no-cache,rate=1.000000,request-context=%u\r\n" - "Pragma: xPlayStrm=1\r\n" - CLIENTGUID - "Pragma: stream-switch-count=%d\r\n" - "Pragma: stream-switch-entry=%s\r\n" - "Connection: Close\r\n\r\n"; - - -#if 0 -/* Unused requests */ -static const char* mmsh_PostRequest = - "POST %s HTTP/1.0\r\n" - "Accept: */*\r\n" - USERAGENT - "Host: %s\r\n" - "Pragma: client-id=%u\r\n" -/* "Pragma: log-line=no-cache,rate=1.000000,stream-time=%u,stream-offset=%u:%u,request-context=2,max-duration=%u\r\n" */ - "Pragma: Content-Length: 0\r\n" - CLIENTGUID - "\r\n"; - -static const char* mmsh_RangeRequest = - "GET %s HTTP/1.0\r\n" - "Accept: */*\r\n" - USERAGENT - "Host: %s:%d\r\n" - "Range: bytes=%Lu-\r\n" - CLIENTGUID - "Connection: Close\r\n\r\n"; -#endif - - - -/* - * mmsh specific types - */ - - -struct mmsh_s { - - /* FIXME: de-xine-ification */ - void *custom_data; - - int s; - - /* url parsing */ - char *url; - char *proxy_url; - char *proto; - char *connect_host; - int connect_port; - char *http_host; - int http_port; - int http_request_number; - char *proxy_user; - char *proxy_password; - char *host_user; - char *host_password; - char *uri; - - char str[SCRATCH_SIZE]; /* scratch buffer to built strings */ - - int stream_type; /* seekable or broadcast */ - - /* receive buffer */ - - /* chunk */ - uint16_t chunk_type; - uint16_t chunk_length; - uint32_t chunk_seq_number; - uint8_t buf[CHUNK_SIZE]; - - int buf_size; - int buf_read; - - uint8_t asf_header[ASF_HEADER_SIZE]; - uint32_t asf_header_len; - uint32_t asf_header_read; - int num_stream_ids; - int stream_ids[ASF_MAX_NUM_STREAMS]; - int stream_types[ASF_MAX_NUM_STREAMS]; - uint32_t packet_length; - int64_t file_length; - uint64_t time_len; /* playback time in 100 nanosecs (10^-7) */ - uint64_t preroll; - uint64_t asf_num_packets; - char guid[37]; - uint32_t bitrates[ASF_MAX_NUM_STREAMS]; - uint32_t bitrates_pos[ASF_MAX_NUM_STREAMS]; - - int has_audio; - int has_video; - int seekable; - - off_t current_pos; - int user_bandwidth; -}; - -static int fallback_io_select(void *data, int socket, int state, int timeout_msec) -{ - int ret; - fd_set set; - struct timeval tv = { timeout_msec / 1000, (timeout_msec % 1000) * 1000}; - FD_ZERO(&set); - FD_SET(socket, &set); - ret = select(1, (state == MMS_IO_READ_READY) ? &set : NULL, - (state == MMS_IO_WRITE_READY) ? &set : NULL, NULL, &tv); - -#ifdef G_OS_WIN32 - if (ret > 0) - return MMS_IO_STATUS_READY; - else if (ret == 0) - return MMS_IO_STATUS_TIMEOUT; - else -#endif - return ret; -} - -static off_t fallback_io_read(void *data, int socket, char *buf, off_t num) -{ - off_t len = 0, ret; -/* lprintf("%d\n", fallback_io_select(data, socket, MMS_IO_READ_READY, 1000)); */ - errno = 0; - while (len < num) - { - ret = (off_t)recv(socket, buf + len, num - len, 0); - if(ret == 0) - break; /* EOF */ - if(ret < 0) - switch(errno) - { - case EAGAIN: - lprintf("len == %lld\n", (gint64) len); - break; - default: - lprintf("len == %lld\n", (gint64) len); - perror(NULL); - /* if already read something, return it, we will fail next time */ - return len ? len : ret; - } - len += ret; - } - lprintf("ret len == %lld\nnum == %lld\n", (gint64) len, (gint64) num); - lprintf("read\n"); - return len; -} - -static off_t fallback_io_write(void *data, int socket, char *buf, off_t num) -{ - return (off_t)send(socket, buf, num, 0); -} - -static int fallback_io_tcp_connect(void *data, const char *host, int port) -{ - - struct hostent *h; - int i, s; - - h = gethostbyname(host); - if (h == NULL) { -/* fprintf(stderr, "unable to resolve host: %s\n", host); */ - return -1; - } - - s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); - if (s == -1) { -/* fprintf(stderr, "failed to create socket: %s", strerror(errno)); */ - return -1; - } - -#ifndef G_OS_WIN32 - if (fcntl (s, F_SETFL, fcntl (s, F_GETFL) & ~O_NONBLOCK) == -1) { -/* _x_message(stream, XINE_MSG_CONNECTION_REFUSED, "can't put socket in non-blocking mode", strerror(errno), NULL); */ - return -1; - } -#endif - - for (i = 0; h->h_addr_list[i]; i++) { - struct in_addr ia; - struct sockaddr_in sin; - - memcpy (&ia, h->h_addr_list[i], 4); - sin.sin_family = AF_INET; - sin.sin_addr = ia; - sin.sin_port = htons(port); - -#ifdef G_OS_WIN32 - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) ==-1) { -#else - if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) ==-1 && errno != EINPROGRESS) { -#endif - - /* FIXME: de-xine-ification */ -/* _x_message(stream, XINE_MSG_CONNECTION_REFUSED, strerror(errno), NULL); */ - close(s); - continue; - } - - return s; - } - return -1; -} - - -static mms_io_t fallback_io = - { - &fallback_io_select, - NULL, - &fallback_io_read, - NULL, - &fallback_io_write, - NULL, - &fallback_io_tcp_connect, - NULL, - }; - -static mms_io_t default_io = { - &fallback_io_select, - NULL, - &fallback_io_read, - NULL, - &fallback_io_write, - NULL, - &fallback_io_tcp_connect, - NULL, - }; - - -#define io_read(io, socket, buf, num) \ - ((io) ? (io)->read(io->read_data, socket, buf, num) \ - : default_io.read(NULL , socket, buf, num)) -#define io_write(io, socket, buf, num) \ - ((io) ? (io)->write(io->write_data, socket, buf, num) \ - : default_io.write(NULL , socket, buf, num)) -#define io_select(io, fd, state, timeout_msec) \ - ((io) ? (io)->select(io->select_data, fd, state, timeout_msec) \ - : default_io.select(NULL , fd, state, timeout_msec)) -#define io_connect(io, host, port) \ - ((io) ? (io)->connect(io->connect_data, host, port) \ - : default_io.connect(NULL , host, port)) - - -static int get_guid (unsigned char *buffer, int offset) { - int i; - GUID g; - - g.Data1 = LE_32(buffer + offset); - g.Data2 = LE_16(buffer + offset + 4); - g.Data3 = LE_16(buffer + offset + 6); - for(i = 0; i < 8; i++) { - g.Data4[i] = buffer[offset + 8 + i]; - } - - for (i = 1; i < GUID_END; i++) { - if (!memcmp(&g, &guids[i].guid, sizeof(GUID))) { - lprintf ("GUID: %s\n", guids[i].name); - - return i; - } - } - - lprintf ("libmmsh: unknown GUID: 0x%x, 0x%x, 0x%x, " - "{ 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx, 0x%hx }\n", - g.Data1, g.Data2, g.Data3, - g.Data4[0], g.Data4[1], g.Data4[2], g.Data4[3], - g.Data4[4], g.Data4[5], g.Data4[6], g.Data4[7]); - return GUID_ERROR; -} - -static int send_command (mms_io_t *io, mmsh_t *this, char *cmd) { - int length; - - lprintf ("send_command:\n%s\n", cmd); - - length = strlen(cmd); - if (io_write(io, this->s, cmd, length) != length) { - lprintf ("mmsh: send error.\n"); - return 0; - } - return 1; -} - -static int get_answer (mms_io_t *io, mmsh_t *this) { - - int done, len, linenum; - char *features; - - lprintf ("get_answer\n"); - - done = 0; len = 0; linenum = 0; - this->stream_type = MMSH_UNKNOWN; - - while (!done) { - - if (io_read(io, this->s, &(this->buf[len]), 1) != 1) { - lprintf ("mmsh: alart: end of stream\n"); - return 0; - } - - if (this->buf[len] == '\012') { - - this->buf[len] = '\0'; - len--; - - if ((len >= 0) && (this->buf[len] == '\015')) { - this->buf[len] = '\0'; - len--; - } - - linenum++; - - lprintf ("answer: >%s<\n", this->buf); - - if (linenum == 1) { - int httpver, httpsub, httpcode; - char httpstatus[51]; - - if (sscanf(this->buf, "HTTP/%d.%d %d %50[^\015\012]", &httpver, &httpsub, - &httpcode, httpstatus) != 4) { - lprintf ("mmsh: bad response format\n"); - return 0; - } - - if (httpcode >= 300 && httpcode < 400) { - lprintf ("mmsh: 3xx redirection not implemented: >%d %s<\n", httpcode, httpstatus); - return 0; - } - - if (httpcode < 200 || httpcode >= 300) { - lprintf ("mmsh: http status not 2xx: >%d %s<\n", httpcode, httpstatus); - return 0; - } - } else { - - if (!g_strncasecmp(this->buf, "Location: ", 10)) { - lprintf ("mmsh: Location redirection not implemented.\n"); - return 0; - } - - if (!g_strncasecmp(this->buf, "Pragma:", 7)) { - features = strstr(this->buf + 7, "features="); - if (features) { - if (strstr(features, "seekable")) { - lprintf("seekable stream\n"); - this->stream_type = MMSH_SEEKABLE; - this->seekable = 1; - } else { - if (strstr(features, "broadcast")) { - lprintf("live stream\n"); - this->stream_type = MMSH_LIVE; - this->seekable = 0; - } - } - } - } - } - - if (len == -1) { - done = 1; - } else { - len = 0; - } - } else { - len ++; - } - } - if (this->stream_type == MMSH_UNKNOWN) { - lprintf ("mmsh: unknown stream type\n"); - this->stream_type = MMSH_SEEKABLE; /* FIXME ? */ - this->seekable = 1; - } - return 1; -} - -static int get_chunk_header (mms_io_t *io, mmsh_t *this) { - uint8_t chunk_header[CHUNK_HEADER_LENGTH]; - uint8_t ext_header[EXT_HEADER_LENGTH]; - int read_len; - int ext_header_len; - - lprintf ("get_chunk_header\n"); - - /* read chunk header */ - read_len = io_read(io, this->s, chunk_header, CHUNK_HEADER_LENGTH); - if (read_len != CHUNK_HEADER_LENGTH) { - lprintf ("chunk header read failed, %d != %d\n", read_len, CHUNK_HEADER_LENGTH); - return 0; - } - this->chunk_type = LE_16 (&chunk_header[0]); - this->chunk_length = LE_16 (&chunk_header[2]); - - switch (this->chunk_type) { - case CHUNK_TYPE_DATA: - ext_header_len = 8; - break; - case CHUNK_TYPE_END: - ext_header_len = 4; - break; - case CHUNK_TYPE_ASF_HEADER: - ext_header_len = 8; - break; - case CHUNK_TYPE_RESET: - ext_header_len = 4; - break; - default: - ext_header_len = 0; - } - /* read extended header */ - if (ext_header_len > 0) { - read_len = io_read (io, this->s, ext_header, ext_header_len); - if (read_len != ext_header_len) { - lprintf ("extended header read failed. %d != %d\n", read_len, ext_header_len); - return 0; - } - } - - if (this->chunk_type == CHUNK_TYPE_DATA || this->chunk_type == CHUNK_TYPE_END) - this->chunk_seq_number = LE_32 (&ext_header[0]); - - /* display debug infos */ -#ifdef DEBUG - switch (this->chunk_type) { - case CHUNK_TYPE_DATA: - lprintf ("chunk type: CHUNK_TYPE_DATA\n"); - lprintf ("chunk length: %d\n", this->chunk_length); - lprintf ("chunk seq: %d\n", this->chunk_seq_number); - lprintf ("unknown: %d\n", ext_header[4]); - lprintf ("mmsh seq: %d\n", ext_header[5]); - lprintf ("len2: %d\n", LE_16(&ext_header[6])); - break; - case CHUNK_TYPE_END: - lprintf ("chunk type: CHUNK_TYPE_END\n"); - lprintf ("continue: %d\n", this->chunk_seq_number); - break; - case CHUNK_TYPE_ASF_HEADER: - lprintf ("chunk type: CHUNK_TYPE_ASF_HEADER\n"); - lprintf ("chunk length: %d\n", this->chunk_length); - lprintf ("unknown: %2X %2X %2X %2X %2X %2X\n", - ext_header[0], ext_header[1], ext_header[2], ext_header[3], - ext_header[4], ext_header[5]); - lprintf ("len2: %d\n", LE_16(&ext_header[6])); - break; - case CHUNK_TYPE_RESET: - lprintf ("chunk type: CHUNK_TYPE_RESET\n"); - lprintf ("chunk seq: %d\n", this->chunk_seq_number); - lprintf ("unknown: %2X %2X %2X %2X\n", - ext_header[0], ext_header[1], ext_header[2], ext_header[3]); - break; - default: - lprintf ("unknown chunk: %4X\n", this->chunk_type); - } -#endif - - this->chunk_length -= ext_header_len; - return 1; -} - -static int get_header (mms_io_t *io, mmsh_t *this) { - int len = 0; - - lprintf("get_header\n"); - - this->asf_header_len = 0; - this->asf_header_read = 0; - - /* read chunk */ - while (1) { - if (get_chunk_header(io, this)) { - if (this->chunk_type == CHUNK_TYPE_ASF_HEADER) { - if ((this->asf_header_len + this->chunk_length) > ASF_HEADER_SIZE) { - lprintf ("mmsh: the asf header exceed %d bytes\n", ASF_HEADER_SIZE); - return 0; - } else { - len = io_read(io, this->s, this->asf_header + this->asf_header_len, - this->chunk_length); - this->asf_header_len += len; - if (len != this->chunk_length) { - return 0; - } - } - } else { - break; - } - } else { - lprintf("get_chunk_header failed\n"); - return 0; - } - } - - if (this->chunk_type == CHUNK_TYPE_DATA) { - /* read the first data chunk */ - len = io_read (io, this->s, this->buf, this->chunk_length); - - if (len != this->chunk_length) { - return 0; - } else { - /* check and 0 pad the first data chunk */ - if (this->chunk_length > this->packet_length) { - lprintf ("mmsh: chunk_length(%d) > packet_length(%d)\n", - this->chunk_length, this->packet_length); - return 0; - } - - /* explicit padding with 0 */ - if (this->chunk_length < this->packet_length) - memset(this->buf + this->chunk_length, 0, - this->packet_length - this->chunk_length); - - this->buf_size = this->packet_length; - - return 1; - } - } else { - /* unexpected packet type */ - return 0; - } -} - -static void interp_header (mms_io_t *io, mmsh_t *this) { - - int i; - - lprintf ("interp_header, header_len=%d\n", this->asf_header_len); - - this->packet_length = 0; - this->num_stream_ids = 0; - this->asf_num_packets = 0; - - /* - * parse asf header - */ - - i = 30; - while ((i + 24) < this->asf_header_len) { - - int guid; - uint64_t length; - - guid = get_guid(this->asf_header, i); - i += 16; - - length = LE_64(this->asf_header + i); - i += 8; - - if ((i + length) >= this->asf_header_len) return; - - switch (guid) { - - case GUID_ASF_FILE_PROPERTIES: - - this->packet_length = LE_32(this->asf_header + i + 92 - 24); - if (this->packet_length > CHUNK_SIZE) { - this->packet_length = 0; - break; - } - this->file_length = LE_64(this->asf_header + i + 40 - 24); - this->time_len = LE_64(this->asf_header + i + 64 - 24); - //this->time_len = LE_64(this->asf_header + i + 72 - 24); - this->preroll = LE_64(this->asf_header + i + 80 - 24); - lprintf ("file object, packet length = %d (%d)\n", - this->packet_length, LE_32(this->asf_header + i + 96 - 24)); - break; - - case GUID_ASF_STREAM_PROPERTIES: - { - uint16_t flags; - uint16_t stream_id; - int type; - int encrypted; - - guid = get_guid(this->asf_header, i); - switch (guid) { - case GUID_ASF_AUDIO_MEDIA: - type = ASF_STREAM_TYPE_AUDIO; - this->has_audio = 1; - break; - - case GUID_ASF_VIDEO_MEDIA: - case GUID_ASF_JFIF_MEDIA: - case GUID_ASF_DEGRADABLE_JPEG_MEDIA: - type = ASF_STREAM_TYPE_VIDEO; - this->has_video = 1; - break; - - case GUID_ASF_COMMAND_MEDIA: - type = ASF_STREAM_TYPE_CONTROL; - break; - - default: - type = ASF_STREAM_TYPE_UNKNOWN; - } - - flags = LE_16(this->asf_header + i + 48); - stream_id = flags & 0x7F; - encrypted = flags >> 15; - - lprintf ("stream object, stream id: %d, type: %d, encrypted: %d\n", - stream_id, type, encrypted); - - this->stream_types[stream_id] = type; - this->stream_ids[this->num_stream_ids] = stream_id; - this->num_stream_ids++; - - } - break; - - case GUID_ASF_STREAM_BITRATE_PROPERTIES: - { - uint16_t streams = LE_16(this->asf_header + i); - uint16_t stream_id; - int j; - - lprintf ("stream bitrate properties\n"); - lprintf ("streams %d\n", streams); - - for(j = 0; j < streams; j++) { - stream_id = LE_16(this->asf_header + i + 2 + j * 6); - - lprintf ("stream id %d\n", stream_id); - - this->bitrates[stream_id] = LE_32(this->asf_header + i + 4 + j * 6); - this->bitrates_pos[stream_id] = i + 4 + j * 6; - lprintf ("mmsh: stream id %d, bitrate %d\n", stream_id, this->bitrates[stream_id]); - } - } - break; - - case GUID_ASF_DATA: - this->asf_num_packets = LE_64(this->asf_header + i + 40 - 24); - lprintf("mmsh: num_packets: %d\n", (int)this->asf_num_packets); - break; - - default: - lprintf ("unknown object\n"); - break; - } - - lprintf ("length : %lld\n", length); - - if (length > 24) { - i += length - 24; - } - } -} - -const static char *const mmsh_proto_s[] = { "mms", "mmsh", NULL }; - -static int mmsh_valid_proto (char *proto) { - int i = 0; - - lprintf("mmsh_valid_proto\n"); - - if (!proto) - return 0; - - while(mmsh_proto_s[i]) { - if (!g_strcasecmp(proto, mmsh_proto_s[i])) { - return 1; - } - i++; - } - return 0; -} - -/* - * returns 1 on error - */ -static int mmsh_tcp_connect(mms_io_t *io, mmsh_t *this) { - int progress, res; - - if (!this->connect_port) this->connect_port = MMSH_PORT; - - /* - * try to connect - */ - lprintf("try to connect to %s on port %d \n", this->connect_host, this->connect_port); - - this->s = io_connect (io, this->connect_host, this->connect_port); - - if (this->s == -1) { - lprintf ("mmsh: failed to connect '%s'\n", this->connect_host); - return 1; - } - - /* connection timeout 15s */ - progress = 0; - do { -// report_progress(this->stream, progress); - res = io_select (io, this->s, MMS_IO_WRITE_READY, 500); - progress += 1; - } while ((res == MMS_IO_STATUS_TIMEOUT) && (progress < 30)); - if (res != MMS_IO_STATUS_READY) { - close (this->s); - this->s = -1; - return 1; - } - lprintf ("connected\n"); - - return 0; -} - -static int mmsh_connect_int (mms_io_t *io, mmsh_t *this, off_t seek, uint32_t time_seek) { - int i; - int video_stream = -1; - int audio_stream = -1; - int max_arate = -1; - int min_vrate = -1; - int min_bw_left = 0; - int stream_id; - int bandwitdh_left; - char stream_selection[10 * ASF_MAX_NUM_STREAMS]; /* 10 chars per stream */ - int offset; - - /* Close exisiting connection (if any) and connect */ - if (this->s != -1) - close(this->s); - - if (mmsh_tcp_connect(io, this)) { - return 0; - } -// report_progress (stream, 30); - - /* - * let the negotiations begin... - */ - this->num_stream_ids = 0; - - /* first request */ - lprintf("first http request\n"); - - g_snprintf (this->str, SCRATCH_SIZE, mmsh_FirstRequest, this->uri, - this->http_host, this->http_port, this->http_request_number++); - - if (!send_command (io, this, this->str)) - goto fail; - - if (!get_answer (io, this)) - goto fail; - - - get_header(io, this); - interp_header(io, this); - if (!this->packet_length || !this->num_stream_ids) - goto fail; - - close(this->s); -// report_progress (stream, 20); - - - /* choose the best quality for the audio stream */ - /* i've never seen more than one audio stream */ - for (i = 0; i < this->num_stream_ids; i++) { - stream_id = this->stream_ids[i]; - switch (this->stream_types[stream_id]) { - case ASF_STREAM_TYPE_AUDIO: - if ((audio_stream == -1) || (this->bitrates[stream_id] > max_arate)) { - audio_stream = stream_id; - max_arate = this->bitrates[stream_id]; - } - break; - default: - break; - } - } - - /* choose a video stream adapted to the user bandwidth */ - bandwitdh_left = this->user_bandwidth - max_arate; - if (bandwitdh_left < 0) { - bandwitdh_left = 0; - } - lprintf("bandwitdh %d, left %d\n", this->user_bandwidth, bandwitdh_left); - - min_bw_left = bandwitdh_left; - for (i = 0; i < this->num_stream_ids; i++) { - stream_id = this->stream_ids[i]; - switch (this->stream_types[stream_id]) { - case ASF_STREAM_TYPE_VIDEO: - if (((bandwitdh_left - this->bitrates[stream_id]) < min_bw_left) && - (bandwitdh_left >= this->bitrates[stream_id])) { - video_stream = stream_id; - min_bw_left = bandwitdh_left - this->bitrates[stream_id]; - } - break; - default: - break; - } - } - - /* choose the stream with the lower bitrate */ - if ((video_stream == -1) && this->has_video) { - for (i = 0; i < this->num_stream_ids; i++) { - stream_id = this->stream_ids[i]; - switch (this->stream_types[stream_id]) { - case ASF_STREAM_TYPE_VIDEO: - if ((video_stream == -1) || - (this->bitrates[stream_id] < min_vrate) || - (!min_vrate)) { - video_stream = stream_id; - min_vrate = this->bitrates[stream_id]; - } - break; - default: - break; - } - } - } - - lprintf("audio stream %d, video stream %d\n", audio_stream, video_stream); - - /* second request */ - lprintf("second http request\n"); - - if (mmsh_tcp_connect(io, this)) { - return 0; - } - - /* stream selection string */ - /* The same selection is done with mmst */ - /* 0 means selected */ - /* 2 means disabled */ - offset = 0; - for (i = 0; i < this->num_stream_ids; i++) { - int size; - if ((this->stream_ids[i] == audio_stream) || - (this->stream_ids[i] == video_stream)) { - size = g_snprintf(stream_selection + offset, sizeof(stream_selection) - offset, - "ffff:%d:0 ", this->stream_ids[i]); - } else { - lprintf ("disabling stream %d\n", this->stream_ids[i]); - size = g_snprintf(stream_selection + offset, sizeof(stream_selection) - offset, - "ffff:%d:2 ", this->stream_ids[i]); - } - if (size < 0) goto fail; - offset += size; - } - - switch (this->stream_type) { - case MMSH_SEEKABLE: - g_snprintf (this->str, SCRATCH_SIZE, mmsh_SeekableRequest, this->uri, - this->http_host, this->http_port, time_seek, - (unsigned int)(seek >> 32), - (unsigned int)seek, this->http_request_number++, 0, - this->num_stream_ids, stream_selection); - break; - case MMSH_LIVE: - g_snprintf (this->str, SCRATCH_SIZE, mmsh_LiveRequest, this->uri, - this->http_host, this->http_port, this->http_request_number++, - this->num_stream_ids, stream_selection); - break; - } - - if (!send_command (io, this, this->str)) - goto fail; - - lprintf("before read \n"); - - if (!get_answer (io, this)) - goto fail; - - if (!get_header(io, this)) - goto fail; - - interp_header(io, this); - if (!this->packet_length || !this->num_stream_ids) - goto fail; - - for (i = 0; i < this->num_stream_ids; i++) { - if ((this->stream_ids[i] != audio_stream) && - (this->stream_ids[i] != video_stream)) { - lprintf("disabling stream %d\n", this->stream_ids[i]); - - /* forces the asf demuxer to not choose this stream */ - if (this->bitrates_pos[this->stream_ids[i]]) { - this->asf_header[this->bitrates_pos[this->stream_ids[i]]] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 1] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 2] = 0; - this->asf_header[this->bitrates_pos[this->stream_ids[i]] + 3] = 0; - } - } - } - return 1; -fail: - close(this->s); - this->s = -1; - return 0; -} - -mmsh_t *mmsh_connect (mms_io_t *io, void *data, const char *url, int bandwidth) { - mmsh_t *this; - GURI *uri = NULL; - GURI *proxy_uri = NULL; - char *proxy_env; - if (!url) - return NULL; - - mms_sock_init(); - -// report_progress (stream, 0); - /* - * initializatoin is essential here. the fail: label depends - * on the various char * in our this structure to be - * NULL if they haven't been assigned yet. - */ - this = (mmsh_t*) malloc (sizeof (mmsh_t)); - this->url=NULL; - this->proxy_url = NULL; - this->proto = NULL; - this->connect_host = NULL; - this->http_host = NULL; - this->proxy_user = NULL; - this->proxy_password = NULL; - this->host_user = NULL; - this->host_password = NULL; - this->uri = NULL; - - this->custom_data = data; - this->url = strdup(url); - if ((proxy_env = getenv("http_proxy")) != NULL) - this->proxy_url = strdup(proxy_env); - else - this->proxy_url = NULL; - this->s = -1; - this->asf_header_len = 0; - this->asf_header_read = 0; - this->num_stream_ids = 0; - this->packet_length = 0; - this->buf_size = 0; - this->buf_read = 0; - this->has_audio = 0; - this->has_video = 0; - this->current_pos = 0; - this->user_bandwidth = bandwidth; - this->http_request_number = 1; - -// report_progress (stream, 0); - - if (this->proxy_url) { - proxy_uri = gnet_uri_new(this->proxy_url); - if (!proxy_uri) { - lprintf("invalid proxy url\n"); - goto fail; - } - if (! proxy_uri->port ) { - proxy_uri->port = 3128; //default squid port - } - } - uri = gnet_uri_new(this->url); - if (!uri) { - lprintf ("invalid url\n"); - goto fail; - } - if (! uri->port ) { - //checked in tcp_connect, but it's better to initialize it here - uri->port = MMSH_PORT; - } - if (this->proxy_url) { - char * uri_string; - this->proto = (uri->scheme) ? strdup(uri->scheme) : NULL; - this->connect_host = (proxy_uri->hostname) ? strdup(proxy_uri->hostname) : NULL; - this->connect_port = proxy_uri->port; - this->http_host = (uri->scheme) ? strdup(uri->hostname) : NULL; - this->http_port = uri->port; - this->proxy_user = (proxy_uri->user) ? strdup(proxy_uri->user) : NULL; - this->proxy_password = (proxy_uri->passwd) ? strdup(proxy_uri->passwd) : NULL; - this->host_user = (uri->user) ? strdup(uri->user) : NULL; - this->host_password = (uri->passwd) ? strdup(uri->passwd) : NULL; - gnet_uri_set_scheme(uri,"http"); - this->uri = gnet_mms_helper(uri); - g_free(uri_string); - } else { - this->proto = (uri->scheme) ? strdup(uri->scheme) : NULL; - this->connect_host = (uri->hostname) ? strdup(uri->hostname) : NULL; - this->connect_port = uri->port; - this->http_host = (uri->hostname) ? strdup(uri->hostname) : NULL; - this->http_port = uri->port; - this->proxy_user = NULL; - this->proxy_password = NULL; - this->host_user =(uri->user) ? strdup(uri->user) : NULL; - this->host_password = (uri->passwd) ? strdup(uri->passwd) : NULL; - this->uri = gnet_mms_helper(uri); - } - - if(!this->uri) - goto fail; - - if (proxy_uri) { - gnet_uri_delete(proxy_uri); - proxy_uri = NULL; - } - if (uri) { - gnet_uri_delete(uri); - uri = NULL; - } - if (!mmsh_valid_proto(this->proto)) { - lprintf ("unsupported protocol\n"); - goto fail; - } - - if (!mmsh_connect_int(io, this, 0, 0)) - goto fail; - -// report_progress (stream, 100); - - lprintf("mmsh_connect: passed\n" ); - - return this; - -fail: - lprintf("mmsh_connect: failed\n" ); - if (proxy_uri) - gnet_uri_delete(proxy_uri); - if (uri) - gnet_uri_delete(uri); - if (this->s != -1) - close(this->s); - if (this->url) - free(this->url); - if (this->proxy_url) - free(this->proxy_url); - if (this->proto) - free(this->proto); - if (this->connect_host) - free(this->connect_host); - if (this->http_host) - free(this->http_host); - if (this->proxy_user) - free(this->proxy_user); - if (this->proxy_password) - free(this->proxy_password); - if (this->host_user) - free(this->host_user); - if (this->host_password) - free(this->host_password); - if (this->uri) - free(this->uri); - - free(this); - - lprintf("mmsh_connect: failed return\n" ); - return NULL; -} - - -/* - * returned value: - * 0: error - * 1: data packet read - * 2: new header and data packet read - */ -static int get_media_packet (mms_io_t *io, mmsh_t *this) { - int len = 0; - - lprintf("get_media_packet: this->packet_length: %d\n", this->packet_length); - - if (get_chunk_header(io, this)) { - switch (this->chunk_type) { - case CHUNK_TYPE_END: - /* this->chunk_seq_number: - * 0: stop - * 1: a new stream follows - */ - if (this->chunk_seq_number == 0) - return 0; - - this->http_request_number = 1; - if (!mmsh_connect_int (io, this, 0, 0)) - return 0; - - /* What todo with: current_pos ?? - Also our chunk_seq_numbers will probably restart from 0! - If this happens with a seekable stream (does it ever?) - and we get a seek request after this were fscked! */ - this->seekable = 0; - - /* mmsh_connect_int reads the first data packet */ - /* this->buf_size is set by mmsh_connect_int */ - return 2; - - case CHUNK_TYPE_DATA: - /* nothing to do */ - break; - - case CHUNK_TYPE_RESET: - /* next chunk is an ASF header */ - - if (this->chunk_length != 0) { - /* that's strange, don't know what to do */ - return 0; - } - if (!get_header (io, this)) - return 0; - interp_header(io, this); - - /* What todo with: current_pos ?? - Also our chunk_seq_numbers might restart from 0! - If this happens with a seekable stream (does it ever?) - and we get a seek request after this were fscked! */ - this->seekable = 0; - - /* get_header reads the first data packet */ - /* this->buf_size is set by get_header */ - return 2; - - default: - lprintf ("mmsh: unexpected chunk type\n"); - return 0; - } - - len = io_read (io, this->s, this->buf, this->chunk_length); - - if (len == this->chunk_length) { - /* explicit padding with 0 */ - if (this->chunk_length > this->packet_length) { - lprintf ("mmsh: chunk_length(%d) > packet_length(%d)\n", - this->chunk_length, this->packet_length); - return 0; - } - - { - char *base = (char *)(this->buf); - char *start = base + this->chunk_length; - char *end = start + this->packet_length - this->chunk_length; - if ((start > base) && (start < (base+CHUNK_SIZE-1)) && - (start < end) && (end < (base+CHUNK_SIZE-1))) { - memset(start, 0, - this->packet_length - this->chunk_length); - } - if (this->packet_length > CHUNK_SIZE) { - this->buf_size = CHUNK_SIZE; - } else { - this->buf_size = this->packet_length; - } - } - return 1; - } else { - lprintf ("mmsh: read error, %d != %d\n", len, this->chunk_length); - return 0; - } - } else { - return 0; - } -} - -int mmsh_peek_header (mmsh_t *this, char *data, int maxsize) { - int len; - - lprintf("mmsh_peek_header\n"); - - len = (this->asf_header_len < maxsize) ? this->asf_header_len : maxsize; - - memcpy(data, this->asf_header, len); - return len; -} - -int mmsh_read (mms_io_t *io, mmsh_t *this, char *data, int len) { - int total; - - total = 0; - - lprintf ("mmsh_read: len: %d\n", len); - - /* Check if the stream didn't get closed because of previous errors */ - if (this->s == -1) - return total; - - while (total < len) { - - if (this->asf_header_read < this->asf_header_len) { - int n, bytes_left ; - - bytes_left = this->asf_header_len - this->asf_header_read ; - - if ((len-total) < bytes_left) - n = len-total; - else - n = bytes_left; - - memcpy (&data[total], &this->asf_header[this->asf_header_read], n); - - this->asf_header_read += n; - total += n; - this->current_pos += n; - } else { - - int n, bytes_left ; - - bytes_left = this->buf_size - this->buf_read; - - if (bytes_left == 0) { - int packet_type; - - this->buf_size=this ->buf_read = 0; - packet_type = get_media_packet (io, this); - - if (packet_type == 0) { - lprintf ("mmsh: get_media_packet failed\n"); - return total; - } else if (packet_type == 2) { - continue; - } - bytes_left = this->buf_size; - } - - if ((len-total) < bytes_left) - n = len-total; - else - n = bytes_left; - - memcpy (&data[total], &this->buf[this->buf_read], n); - - this->buf_read += n; - total += n; - this->current_pos += n; - } - } - return total; -} - -off_t mmsh_seek (mms_io_t *io, mmsh_t *this, off_t offset, int origin) { - off_t dest; - off_t dest_packet_seq; - uint32_t orig_asf_header_len = this->asf_header_len; - uint32_t orig_asf_packet_len = this->packet_length; - - if (!this->seekable) - return this->current_pos; - - switch (origin) { - case SEEK_SET: - dest = offset; - break; - case SEEK_CUR: - dest = this->current_pos + offset; - break; - case SEEK_END: - dest = mmsh_get_length (this) + offset; - default: - return this->current_pos; - } - - dest_packet_seq = dest - this->asf_header_len; - dest_packet_seq = dest_packet_seq >= 0 ? - dest_packet_seq / this->packet_length : -1; - - if (dest_packet_seq < 0) { - if (this->chunk_seq_number > 0) { - lprintf("mmsh: seek within header, already read beyond first packet, resetting connection\n"); - if (!mmsh_connect_int(io, this, 0, 0)) { - /* Oops no more connection let our caller know things are fscked up */ - return this->current_pos = -1; - } - /* Some what simple / naive check to check for changed headers - if the header was changed we are once more fscked up */ - if (this->asf_header_len != orig_asf_header_len || - this->packet_length != orig_asf_packet_len) { - lprintf("mmsh: AIIEEE asf header or packet length changed on re-open for seek\n"); - /* Its a different stream, so its useless! */ - close (this->s); - this->s = -1; - return this->current_pos = -1; - } - } else - lprintf("mmsh: seek within header, resetting buf_read\n"); - - // reset buf_read - this->buf_read = 0; - this->asf_header_read = dest; - return this->current_pos = dest; - } - - // dest_packet_seq >= 0 - if (this->asf_num_packets && dest == this->asf_header_len + - this->asf_num_packets*this->packet_length) { - // Requesting the packet beyond the last packet, can cause the server to - // not return any packet or any eos command. This can cause - // mms_packet_seek() to hang. - // This is to allow seeking at end of stream, and avoid hanging. - --dest_packet_seq; - lprintf("mmsh: seek to eos!\n"); - } - - if (dest_packet_seq != this->chunk_seq_number) { - - if (this->asf_num_packets && dest_packet_seq >= this->asf_num_packets) { - // Do not seek beyond the last packet. - return this->current_pos; - } - - lprintf("mmsh: seek to %d, packet: %d\n", (int)dest, (int)dest_packet_seq); - if (!mmsh_connect_int(io, this, (dest_packet_seq+1) * this->packet_length, 0)) { - /* Oops no more connection let our caller know things are fscked up */ - return this->current_pos = -1; - } - /* Some what simple / naive check to check for changed headers - if the header was changed we are once more fscked up */ - if (this->asf_header_len != orig_asf_header_len || - this->packet_length != orig_asf_packet_len) { - lprintf("mmsh: AIIEEE asf header or packet length changed on re-open for seek\n"); - /* Its a different stream, so its useless! */ - close (this->s); - this->s = -1; - return this->current_pos = -1; - } - } - else - lprintf("mmsh: seek within current packet, dest: %d, current pos: %d\n", - (int)dest, (int)this->current_pos); - - /* make sure asf_header is seen as fully read by mmsh_read() this is needed - in case our caller tries to seek over part of the header, or when we've - done an actual packet seek as get_header() resets asf_header_read then. */ - this->asf_header_read = this->asf_header_len; - - /* check we got what we want */ - if (dest_packet_seq == this->chunk_seq_number) { - this->buf_read = dest - - (this->asf_header_len + dest_packet_seq*this->packet_length); - this->current_pos = dest; - } else { - lprintf("Seek failed, wanted packet: %d, got packet: %d\n", - (int)dest_packet_seq, (int)this->chunk_seq_number); - this->buf_read = 0; - this->current_pos = this->asf_header_len + this->chunk_seq_number * - this->packet_length; - } - - lprintf("current_pos after seek to %d: %d (buf_read %d)\n", - (int)dest, (int)this->current_pos, (int)this->buf_read); - - return this->current_pos; -} - -int mmsh_time_seek (mms_io_t *io, mmsh_t *this, double time_sec) { - uint32_t orig_asf_header_len = this->asf_header_len; - uint32_t orig_asf_packet_len = this->packet_length; - - if (!this->seekable) - return 0; - - lprintf("mmsh: time seek to %f secs\n", time_sec); - if (!mmsh_connect_int(io, this, 0, time_sec * 1000 + guint64_to_gdouble(this->preroll))) { - /* Oops no more connection let our caller know things are fscked up */ - this->current_pos = -1; - return 0; - } - /* Some what simple / naive check to check for changed headers - if the header was changed we are once more fscked up */ - if (this->asf_header_len != orig_asf_header_len || - this->packet_length != orig_asf_packet_len) { - lprintf("mmsh: AIIEEE asf header or packet length changed on re-open for seek\n"); - /* Its a different stream, so its useless! */ - close (this->s); - this->s = -1; - this->current_pos = -1; - return 0; - } - - this->asf_header_read = this->asf_header_len; - this->buf_read = 0; - this->current_pos = this->asf_header_len + this->chunk_seq_number * - this->packet_length; - - lprintf("mmsh, current_pos after time_seek:%d\n", (int)this->current_pos); - - return 1; -} - -void mmsh_close (mmsh_t *this) { - - lprintf("mmsh_close\n"); - - if (this->s != -1) - close(this->s); - if (this->url) - free(this->url); - if (this->proxy_url) - free(this->proxy_url); - if (this->proto) - free(this->proto); - if (this->connect_host) - free(this->connect_host); - if (this->http_host) - free(this->http_host); - if (this->proxy_user) - free(this->proxy_user); - if (this->proxy_password) - free(this->proxy_password); - if (this->host_user) - free(this->host_user); - if (this->host_password) - free(this->host_password); - if (this->uri) - free(this->uri); - if (this) - free (this); -} - - -uint32_t mmsh_get_length (mmsh_t *this) { - /* we could / should return this->file_len here, but usually this->file_len - is longer then the calculation below, as usually an asf file contains an - asf index object after the data stream. However since we do not have a - (known) way to get to this index object through mms, we return a - calculated size of what we can get to when we know. */ - if (this->asf_num_packets) - return this->asf_header_len + this->asf_num_packets*this->packet_length; - else - return this->file_length; -} - -double mmsh_get_time_length (mmsh_t *this) { - return guint64_to_gdouble(this->time_len) / 1e7; -} - -uint64_t mmsh_get_raw_time_length (mmsh_t *this) { - return this->time_len; -} - -off_t mmsh_get_current_pos (mmsh_t *this) { - return this->current_pos; -} - -uint32_t mmsh_get_asf_header_len (mmsh_t *this) { - return this->asf_header_len; -} - -uint32_t mmsh_get_asf_packet_len (mmsh_t *this) { - return this->packet_length; -} - -int mmsh_get_seekable (mmsh_t *this) { - return this->seekable; -} diff --git a/lib/win32/libmms_win32/src/mmsh.h b/lib/win32/libmms_win32/src/mmsh.h deleted file mode 100644 index 6a33f0cbfc..0000000000 --- a/lib/win32/libmms_win32/src/mmsh.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2002-2003 the xine project - * - * This file is part of xine, a free video player. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: mmsh.h,v 1.8 2007/12/11 20:24:48 jwrdegoede Exp $ - * - * libmmsh public header - */ - -#ifndef HAVE_MMSH_H -#define HAVE_MMSH_H - -#include <inttypes.h> -#include <stdio.h> -#include <sys/types.h> -#include "mmsio.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct mmsh_s mmsh_t; - -char* mmsh_connect_common(int *s ,int *port, char *url, char **host, char **path, char **file); -mmsh_t* mmsh_connect (mms_io_t *io, void *data, const char *url_, int bandwidth); - -int mmsh_read (mms_io_t *io, mmsh_t *instance, char *data, int len); -int mmsh_time_seek (mms_io_t *io, mmsh_t *instance, double time_sec); -mms_off_t mmsh_seek (mms_io_t *io, mmsh_t *this, mms_off_t offset, int origin); -uint32_t mmsh_get_length (mmsh_t *instance); -double mmsh_get_time_length (mmsh_t *this); -uint64_t mmsh_get_raw_time_length (mmsh_t *this); -mms_off_t mmsh_get_current_pos (mmsh_t *instance); -void mmsh_close (mmsh_t *instance); - -int mmsh_peek_header (mmsh_t *instance, char *data, int maxsize); - -uint32_t mmsh_get_asf_header_len (mmsh_t *this); - -uint32_t mmsh_get_asf_packet_len (mmsh_t *this); - -int mmsh_get_seekable (mmsh_t *this); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif diff --git a/lib/win32/libmms_win32/src/mmsio.h b/lib/win32/libmms_win32/src/mmsio.h deleted file mode 100644 index 750d537c50..0000000000 --- a/lib/win32/libmms_win32/src/mmsio.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef __MMS_IO_H__ -#define __MMS_IO_H__ - -#include "mms_config.h" - -/* On 64 bit file offset capable systems, libmms' configure script adds - -D_FILE_OFFSET_BITS=64 to the CFLAGS. This causes off_t to be 64 bit, - When an app which includes this header file gets compiled without - -D_FILE_OFFSET_BITS=64, it should still expect / pass 64 bit ints for - off_t, this acomplishes this: */ -#if defined LIBMMS_HAVE_64BIT_OFF_T && !defined __MMS_C__ -#define mms_off_t int64_t -#else -#define mms_off_t off_t -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef mms_off_t (*mms_io_write_func)(void *data, int socket, char *buf, mms_off_t num); -typedef mms_off_t (*mms_io_read_func)(void *data, int socket, char *buf, mms_off_t num); - -/* select states */ -#define MMS_IO_READ_READY 1 -#define MMS_IO_WRITE_READY 2 - -enum - { - MMS_IO_STATUS_READY, /* IO can be safely performed */ - MMS_IO_STATUS_ERROR, /* There was IO error */ - MMS_IO_STATUS_ABORTED, /* IO command was (somehow) - aborted. This is not error, but invalidates IO for further operations*/ - MMS_IO_STATUS_TIMEOUT /* Timeout was exceeded */ - }; - -/* - * Waits for a file descriptor/socket to change status. - * - * users can use this handler to provide their own implementations, - * for example abortable ones - * - * params : - * data whatever parameter may be needed by implementation - * fd file/socket descriptor - * state MMS_IO_READ_READY, MMS_IO_WRITE_READY - * timeout_sec timeout in seconds - * - * - * return value : - * MMS_IO_READY the file descriptor is ready for cmd - * MMS_IO_ERROR an i/o error occured - * MMS_IO_ABORTED command aborted - * MMS_IO_TIMEOUT the file descriptor is not ready after timeout_msec milliseconds - * every other return value is interpreted same as MMS_IO_ABORTED - */ -typedef int (*mms_io_select_func)(void *data, int fd, int state, int timeout_msec); - -/* - * open a tcp connection - * - * params : - * stream needed for reporting errors but may be NULL - * host address of target - * port port on target - * - * returns a socket descriptor or -1 if an error occured - */ -typedef int (*mms_io_tcp_connect_func)(void *data, const char *host, int port); - -typedef struct -{ - mms_io_select_func select; - void *select_data; - mms_io_read_func read; - void *read_data; - mms_io_write_func write; - void *write_data; - mms_io_tcp_connect_func connect; - void *connect_data; -} mms_io_t; - -/* set default IO implementation, it will be used in absence of specific IO - parameter. Structure is referenced, not copied, must remain valid for entire - usage period. Passing NULL reverts to default, POSIX based implementation */ -void mms_set_default_io_impl(const mms_io_t *io); -const mms_io_t* mms_get_default_io_impl(); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __MMS_IO_H__ */ diff --git a/lib/win32/libmms_win32/src/mmsx.c b/lib/win32/libmms_win32/src/mmsx.c deleted file mode 100644 index 0618387462..0000000000 --- a/lib/win32/libmms_win32/src/mmsx.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2007 Hans de Goede <j.w.r.degoede@hhs.nl> - * - * This file is part of libmms a free mms protocol library - * - * libmms 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. - * - * libmss 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 General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -/* - * mmsx is a small wrapper around the mms and mmsh protocol implementations - * in libmms. The mmsx functions provide transparent access to both protocols - * so that programs who wish to support both can do so with a single code path - * if desired. - */ - -#include <stdlib.h> -#include "mmsx.h" -#include "mms.h" -#include "mmsh.h" - -struct mmsx_s { - mms_t *connection; - mmsh_t *connection_h; -}; - -mmsx_t *mmsx_connect(mms_io_t *io, void *data, const char *url, int bandwidth) -{ - mmsx_t *mmsx = calloc(1, sizeof(mmsx_t)); - - if (!mmsx) - return mmsx; - - mmsx->connection_h = mmsh_connect(io, data, url, bandwidth); - if (mmsx->connection_h) - return mmsx; - - mmsx->connection = mms_connect(io, data, url, bandwidth); - if (mmsx->connection) - return mmsx; - - free(mmsx); - return NULL; -} - -int mmsx_read (mms_io_t *io, mmsx_t *mmsx, char *data, int len) -{ - if(mmsx->connection) - return mms_read(io, mmsx->connection, data, len); - else - return mmsh_read(io, mmsx->connection_h, data, len); -} - -int mmsx_time_seek (mms_io_t *io, mmsx_t *mmsx, double time_sec) -{ - if(mmsx->connection) - return mms_time_seek(io, mmsx->connection, time_sec); - else - return mmsh_time_seek(io, mmsx->connection_h, time_sec); -} - -mms_off_t mmsx_seek (mms_io_t *io, mmsx_t *mmsx, mms_off_t offset, int origin) -{ - if(mmsx->connection) - return mms_seek(io, mmsx->connection, offset, origin); - else - return mmsh_seek(io, mmsx->connection_h, offset, origin); -} - -double mmsx_get_time_length (mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_time_length(mmsx->connection); - else - return mmsh_get_time_length(mmsx->connection_h); -} - -uint64_t mmsx_get_raw_time_length (mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_raw_time_length(mmsx->connection); - else - return mmsh_get_raw_time_length(mmsx->connection_h); -} - -uint32_t mmsx_get_length (mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_length(mmsx->connection); - else - return mmsh_get_length(mmsx->connection_h); -} - -void mmsx_close (mmsx_t *mmsx) -{ - if(mmsx->connection) - mms_close(mmsx->connection); - else - mmsh_close(mmsx->connection_h); - - free(mmsx); -} - -int mmsx_peek_header (mmsx_t *mmsx, char *data, int maxsize) -{ - if(mmsx->connection) - return mms_peek_header(mmsx->connection, data, maxsize); - else - return mmsh_peek_header(mmsx->connection_h, data, maxsize); -} - -mms_off_t mmsx_get_current_pos (mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_current_pos(mmsx->connection); - else - return mmsh_get_current_pos(mmsx->connection_h); -} - -uint32_t mmsx_get_asf_header_len(mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_asf_header_len(mmsx->connection); - else - return mmsh_get_asf_header_len(mmsx->connection_h); -} - -uint64_t mmsx_get_asf_packet_len (mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_asf_packet_len(mmsx->connection); - else - return mmsh_get_asf_packet_len(mmsx->connection_h); -} - -int mmsx_get_seekable (mmsx_t *mmsx) -{ - if(mmsx->connection) - return mms_get_seekable(mmsx->connection); - else - return mmsh_get_seekable(mmsx->connection_h); -} diff --git a/lib/win32/libmms_win32/src/mmsx.h b/lib/win32/libmms_win32/src/mmsx.h deleted file mode 100644 index df4adfce4c..0000000000 --- a/lib/win32/libmms_win32/src/mmsx.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2007 Hans de Goede <j.w.r.degoede@hhs.nl> - * - * This file is part of libmms a free mms protocol library - * - * libmms 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. - * - * libmss 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 General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * libmms public header - */ - -/* - * mmsx is a small wrapper around the mms and mmsh protocol implementations - * in libmms. The mmsx functions provide transparent access to both protocols - * so that programs who wish to support both can do so with a single code path - * if desired. - */ - -#ifndef HAVE_MMSX_H -#define HAVE_MMSX_H - -#include <inttypes.h> -#include "mmsio.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef struct mmsx_s mmsx_t; - -mmsx_t* mmsx_connect (mms_io_t *io, void *data, const char *url, int bandwidth); - -int mmsx_read (mms_io_t *io, mmsx_t *instance, char *data, int len); -int mmsx_time_seek (mms_io_t *io, mmsx_t *instance, double time_sec); -mms_off_t mmsx_seek (mms_io_t *io, mmsx_t *instance, mms_off_t offset, int origin); -/* return total playback time in seconds */ -double mmsx_get_time_length (mmsx_t *instance); -/* return raw total playback time in 100 nanosecs (10^-7) */ -uint64_t mmsx_get_raw_time_length (mmsx_t *instance); -uint32_t mmsx_get_length (mmsx_t *instance); -void mmsx_close (mmsx_t *instance); - -int mmsx_peek_header (mmsx_t *instance, char *data, int maxsize); - -mms_off_t mmsx_get_current_pos (mmsx_t *instance); - -uint32_t mmsx_get_asf_header_len (mmsx_t *instance); - -uint64_t mmsx_get_asf_packet_len (mmsx_t *instance); - -int mmsx_get_seekable (mmsx_t *instance); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif - diff --git a/lib/win32/libmms_win32/src/testconnect.c b/lib/win32/libmms_win32/src/testconnect.c deleted file mode 100644 index 9ed2f1a6fb..0000000000 --- a/lib/win32/libmms_win32/src/testconnect.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "mms.h" - -const char *url = "mms://od-msn.msn.com/3/mbr/apprentice_bts.wmv"; - -int main(int argc, char *argv[]) -{ - if(mms_connect(NULL, NULL, url, 1)) - printf("Connect OK\n"); - - return 0; -} diff --git a/lib/win32/libmms_win32/src/testdownload.c b/lib/win32/libmms_win32/src/testdownload.c deleted file mode 100644 index 21d2d566ec..0000000000 --- a/lib/win32/libmms_win32/src/testdownload.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <stdio.h> -#include "mms.h" - -const char *url = "mms://od-msn.msn.com/3/mbr/apprentice_bts.wmv"; - -int main(int argc, char *argv[]) -{ - mms_t *this = NULL; - char buf[1024]; - int i, res; - FILE* f; - - if((this = mms_connect(NULL, NULL, url, 1))) - printf("Connect OK\n"); - f = fopen("/tmp/mmsdownload.test", "w"); - for(i = 0; i < 10000; i++) - { - res = mms_read(NULL, this, buf, 1024); - if(!res) - break; - fwrite(buf, 1, res, f); - } - if(i > 0) - printf("OK, read %d times\n", i); - else - printf("Failed to read from stream\n"); - - -} diff --git a/lib/win32/libmms_win32/src/testswap.c b/lib/win32/libmms_win32/src/testswap.c deleted file mode 100644 index 22b201b922..0000000000 --- a/lib/win32/libmms_win32/src/testswap.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Test byteswapping functions for correct operation */ -/* FIXME: put some more extensive tests here */ - - -#include <sys/types.h> -#include "bswap.h" - - -int main(int argc, char *argv[]) -{ - unsigned char test_value32[5] = "\xFE\xDC\xBA\x10"; - u_int32_t le_uint32 = ((((u_int32_t)(test_value32[3])) << 24) | - (((u_int32_t)(test_value32[2])) << 16) | - (((u_int32_t)(test_value32[1])) << 8) | - (((u_int32_t)(test_value32[0])) << 0)); - - u_int32_t le_uint16 = ((((u_int32_t)(test_value32[1])) << 8) | - (((u_int32_t)(test_value32[0])) << 0)); - - u_int32_t be_uint32 = ((((u_int32_t)(test_value32[0])) << 24) | - (((u_int32_t)(test_value32[1])) << 16) | - (((u_int32_t)(test_value32[2])) << 8) | - (((u_int32_t)(test_value32[3])) << 0)); - - u_int32_t be_uint16 = ((((u_int32_t)(test_value32[0])) << 8) | - (((u_int32_t)(test_value32[1])) << 0)); - - printf("test_value32: %2hhx%2hhx%2hhx%2hhx\n", test_value32[0], - test_value32[1], test_value32[2], test_value32[3]); - printf("test_value32 as u_int32_t: %04x\n", *(u_int32_t*)test_value32); - printf("le_uint32: %04x\n", le_uint32); - printf ("LE_32(le_uint32): %08x\n", LE_32(&le_uint32)); - - printf("test_value16 as u_int16_t: %04x\n", *(u_int16_t*)test_value32); - printf("le_uint16: %04x\n", le_uint16); - printf ("LE_16(le_uint16): %04hx\n", LE_16(&le_uint16)); - - printf("be_uint32: %04x\n", be_uint32); - printf ("BE_32(be_uint32): %08x\n", BE_32(&be_uint32)); - - printf("test_value16 as u_int16_t: %04x\n", *(u_int16_t*)test_value32); - printf("be_uint16: %04x\n", be_uint16); - printf ("BE_16(be_uint16): %04hx\n", BE_16(&be_uint16)); - -} diff --git a/lib/win32/libmms_win32/src/uri.c b/lib/win32/libmms_win32/src/uri.c deleted file mode 100644 index 36710a5252..0000000000 --- a/lib/win32/libmms_win32/src/uri.c +++ /dev/null @@ -1,904 +0,0 @@ -/* GNet - Networking library - * Copyright (C) 2000-2003 David Helder, David Bolcsfoldi, Eric Williams - * - * 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. - */ - -/* FIXME: #include "gnet-private.h" */ -#include <glib.h> -#include <string.h> -#include <stdlib.h> -#include <ctype.h> - -#include "uri.h" -#include <string.h> - -static void field_unescape (char *str); -static char* field_escape (char* str, unsigned char mask); - -#define USERINFO_ESCAPE_MASK 0x01 -#define PATH_ESCAPE_MASK 0x02 -#define QUERY_ESCAPE_MASK 0x04 -#define FRAGMENT_ESCAPE_MASK 0x08 - -/* #define FALSE 0 */ -/* #define TRUE (!FALSE) */ - -static unsigned char neednt_escape_table[] = -{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0f, 0x00, 0x00, 0x0f, 0x00, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x00, 0x0f, 0x00, 0x0c, - 0x0e, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x00, 0x0f, 0x00, 0x00, 0x0f, - 0x00, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; - - -/* -Perl code to generate above table: - -#!/usr/bin/perl - -$ok = "abcdefghijklmnopqrstuvwxyz" . - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" . - "0123456789" . - "-_.!~*'()"; -$userinfo_ok = ';:&=+\$,'; -$path_ok = ':\@&=+\$,;/'; -$query_ok = ';/?:\@&=+\$,'; -$fragment_ok = ';/?:\@&=+\$,'; - -for ($i = 0; $i < 32; $i++) -{ - print " "; - for ($j = 0; $j < 8; $j++) - { - $num = 0; - $letter = chr(($i * 8) + $j); - - $num |= 0b0001 if (index($userinfo_ok, $letter) != -1); - $num |= 0b0010 if (index($path_ok, $letter) != -1); - $num |= 0b0100 if (index($query_ok, $letter) != -1); - $num |= 0b1000 if (index($fragment_ok, $letter) != -1); - $num |= 0b1111 if (index($ok, $letter) != -1); - - printf "0x%02x, ", $num; - } - print "\n"; -} -*/ - - -/* our own ISSPACE. ANSI isspace is local dependent */ -#define ISSPACE(C) (((C) >= 9 && (C) <= 13) || (C) == ' ') - - -static int split_user_passwd(const char* in, char** user, char** passwd) -{ - char *tmp = strdup(in); - - if(!tmp) - return 0; - *passwd = strchr(tmp, ':'); - if(!(*passwd)) - { - free(tmp); - return 0; - } - *((*passwd)++) = '\0'; // don't you love C? :) - - *user = strdup(tmp); - if(!*user) - return 0; - *passwd = strdup(*passwd); - if(!*passwd) - return 0; - - free(tmp); - return 1; -} - -/** - * gnet_uri_new - * @uri: URI string - * - * Creates a #GURI from a string. Empty fields are set to NULL. The - * parser does not validate the URI -- it will accept some malformed - * URI. URIs are usually in the form - * scheme://userinfo@hostname:port/path?query#fragment - * - * URIs created from user input are typically unescaped. URIs - * created from machine input (e.g. received over the internet) are - * typically escaped. - * - * Returns: a new #GURI, or NULL if there was a failure. - * - **/ -GURI* -gnet_uri_new (const char* uri) -{ - GURI* guri = NULL; - const char* p; - const char* temp; - - g_return_val_if_fail (uri, NULL); - - /* Skip initial whitespace */ - p = uri; - while (*p && ISSPACE((int)*p)) - ++p; - if (!*p) /* Error if it's just a string of space */ - return NULL; - - guri = g_new0 (GURI, 1); - - /* Scheme */ - temp = p; - while (*p && *p != ':' && *p != '/' && *p != '?' && *p != '#') - ++p; - if (*p == ':') - { - guri->scheme = g_strndup (temp, p - temp); - ++p; - } - else /* This char is NUL, /, ?, or # */ - p = temp; - - /* Authority */ - if (*p == '/' && p[1] == '/') - { - char *userinfo; - p += 2; - - /* Userinfo */ - temp = p; - while (*p && *p != '@' && *p != '/' ) /* Look for @ or / */ - ++p; - if (*p == '@') /* Found userinfo */ - { - userinfo = g_strndup (temp, p - temp); - if(!split_user_passwd(userinfo, &guri->user, &guri->passwd)) - { - free(userinfo); - goto error; - } - free(userinfo); - ++p; - } - else - p = temp; - - /* Hostname */ - - /* Check for IPv6 canonical hostname in brackets */ - if (*p == '[') - { - p++; /* Skip [ */ - temp = p; - while (*p && *p != ']') ++p; - if ((p - temp) == 0) - goto error; - guri->hostname = g_strndup (temp, p - temp); - if (*p) - p++; /* Skip ] (if there) */ - } - else - { - temp = p; - while (*p && *p != '/' && *p != '?' && *p != '#' && *p != ':') ++p; - if ((p - temp) == 0) - goto error; - guri->hostname = g_strndup (temp, p - temp); - } - - /* Port */ - if (*p == ':') - { - for (++p; isdigit((int)*p); ++p) - guri->port = guri->port * 10 + (*p - '0'); - } - - } - - /* Path (we are liberal and won't check if it starts with /) */ - temp = p; - while (*p && *p != '?' && *p != '#') - ++p; - if (p != temp) - guri->path = g_strndup(temp, p - temp); - - /* Query */ - if (*p == '?') - { - temp = p + 1; - while (*p && *p != '#') - ++p; - guri->query = g_strndup (temp, p - temp); - } - - /* Fragment */ - if (*p == '#') - { - ++p; - guri->fragment = g_strdup (p); - } - - return guri; - - error: - gnet_uri_delete (guri); - return NULL; -} - - -/** - * gnet_uri_new_fields - * @scheme: scheme - * @hostname: host name - * @port: port - * @path: path - * - * Creates a #GURI from the fields. This function uses the most - * common fields. Use gnet_uri_new_fields_all() to specify all - * fields. - * - * Returns: a new #GURI. - * - **/ -GURI* -gnet_uri_new_fields (const char* scheme, const char* hostname, - const gint port, const char* path) -{ - GURI* uri = NULL; - - uri = g_new0 (GURI, 1); - if (scheme) uri->scheme = g_strdup (scheme); - if (hostname) uri->hostname = g_strdup (hostname); - uri->port = port; - if (path) uri->path = g_strdup (path); - - return uri; -} - - -/** - * gnet_uri_new_fields_all - * @scheme: scheme - * @userinfo: user info - * @hostname: host name - * @port: port - * @path: path - * @query: query - * @fragment: fragment - * - * Creates a #GURI from all fields. - * - * Returns: a new #GURI. - * - **/ -GURI* -gnet_uri_new_fields_all (const char* scheme, const char* user, - const char* passwd, const char* hostname, - const gint port, const char* path, - const char* query, const char* fragment) -{ - GURI* uri = NULL; - - uri = g_new0 (GURI, 1); - if (scheme) uri->scheme = g_strdup (scheme); - if (user) uri->user = g_strdup (user); - if (passwd) uri->passwd = g_strdup (passwd); - if (hostname) uri->hostname = g_strdup (hostname); - uri->port = port; - if (path) uri->path = g_strdup (path); - if (query) uri->query = g_strdup (query); - if (fragment) uri->fragment = g_strdup (fragment); - - return uri; -} - - -/** - * gnet_uri_clone: - * @uri: a #GURI - * - * Copies a #GURI. - * - * Returns: a copy of @uri. - * - **/ -GURI* -gnet_uri_clone (const GURI* uri) -{ - GURI* uri2; - - g_return_val_if_fail (uri, NULL); - - uri2 = g_new0 (GURI, 1); - uri2->scheme = g_strdup (uri->scheme); - uri2->user = g_strdup (uri->user); - uri2->passwd = g_strdup (uri->passwd); - uri2->hostname = g_strdup (uri->hostname); - uri2->port = uri->port; - uri2->path = g_strdup (uri->path); - uri2->query = g_strdup (uri->query); - uri2->fragment = g_strdup (uri->fragment); - - return uri2; -} - - -/** - * gnet_uri_delete: - * @uri: a #GURI - * - * Deletes a #GURI. - * - **/ -void -gnet_uri_delete (GURI* uri) -{ - if (uri) - { - g_free (uri->scheme); - g_free (uri->user); - g_free (uri->passwd); - g_free (uri->hostname); - g_free (uri->path); - g_free (uri->query); - g_free (uri->fragment); - g_free (uri); - } -} - - - - -#define SAFESTRCMP(A,B) (((A)&&(B))?(strcmp((A),(B))):((A)||(B))) - -/** - * gnet_uri_equal - * @p1: a #GURI - * @p2: another #GURI - * - * Compares two #GURI's for equality. - * - * Returns: TRUE if they are equal; FALSE otherwise. - * - **/ -int -gnet_uri_equal (gconstpointer p1, gconstpointer p2) -{ - const GURI* uri1 = (const GURI*) p1; - const GURI* uri2 = (const GURI*) p2; - - g_return_val_if_fail (uri1, FALSE); - g_return_val_if_fail (uri2, FALSE); - - if (uri1->port == uri2->port && - !SAFESTRCMP(uri1->scheme, uri2->scheme) && - !SAFESTRCMP(uri1->user, uri2->user) && - !SAFESTRCMP(uri1->passwd, uri2->passwd) && - !SAFESTRCMP(uri1->hostname, uri2->hostname) && - !SAFESTRCMP(uri1->path, uri2->path) && - !SAFESTRCMP(uri1->query, uri2->query) && - !SAFESTRCMP(uri1->fragment, uri2->fragment)) - return TRUE; - - return FALSE; -} - - -/** - * gnet_uri_hash - * @p: a #GURI - * - * Creates a hash code for @p for use with GHashTable. - * - * Returns: hash code for @p. - * - **/ -guint -gnet_uri_hash (gconstpointer p) -{ - const GURI* uri = (const GURI*) p; - guint h = 0; - - g_return_val_if_fail (uri, 0); - - if (uri->scheme) h = g_str_hash (uri->scheme); - if (uri->user) h ^= g_str_hash (uri->user); - if (uri->passwd) h ^= g_str_hash (uri->passwd); - if (uri->hostname) h ^= g_str_hash (uri->hostname); - h ^= uri->port; - if (uri->path) h ^= g_str_hash (uri->path); - if (uri->query) h ^= g_str_hash (uri->query); - if (uri->fragment) h ^= g_str_hash (uri->fragment); - - return h; -} - - -/** - * gnet_uri_escape - * @uri: a #GURI - * - * Escapes the fields in a #GURI. Network protocols use escaped - * URIs. People use unescaped URIs. - * - **/ -void -gnet_uri_escape (GURI* uri) -{ - g_return_if_fail (uri); - - uri->user = field_escape (uri->user, USERINFO_ESCAPE_MASK); - uri->passwd = field_escape (uri->passwd, USERINFO_ESCAPE_MASK); - uri->path = field_escape (uri->path, PATH_ESCAPE_MASK); - uri->query = field_escape (uri->query, QUERY_ESCAPE_MASK); - uri->fragment = field_escape (uri->fragment, FRAGMENT_ESCAPE_MASK); -} - - -/** - * gnet_uri_unescape - * @uri: a #GURI - * - * Unescapes the fields in the URI. Network protocols use escaped - * URIs. People use unescaped URIs. - * - **/ -void -gnet_uri_unescape (GURI* uri) -{ - g_return_if_fail (uri); - - if (uri->user) - field_unescape (uri->user); - if (uri->passwd) - field_unescape (uri->passwd); - if (uri->path) - field_unescape (uri->path); - if (uri->query) - field_unescape (uri->query); - if (uri->fragment) - field_unescape (uri->fragment); -} - - -static char* -field_escape (char* str, unsigned char mask) -{ - gint len; - gint i; - int must_escape = FALSE; - char* dst; - gint j; - - if (str == NULL) - return NULL; - - /* Roughly calculate buffer size */ - len = 0; - for (i = 0; str[i]; i++) - { - if (neednt_escape_table[(guint) str[i]] & mask) - len++; - else - { - len += 3; - must_escape = TRUE; - } - } - - /* Don't escape if unnecessary */ - if (must_escape == FALSE) - return str; - - /* Allocate buffer */ - dst = (char*) g_malloc(len + 1); - - /* Copy */ - for (i = j = 0; str[i]; i++, j++) - { - /* Unescaped character */ - if (neednt_escape_table[(guint) str[i]] & mask) - { - dst[j] = str[i]; - } - - /* Escaped character */ - else - { - dst[j] = '%'; - - if (((str[i] & 0xf0) >> 4) < 10) - dst[j+1] = ((str[i] & 0xf0) >> 4) + '0'; - else - dst[j+1] = ((str[i] & 0xf0) >> 4) + 'a' - 10; - - if ((str[i] & 0x0f) < 10) - dst[j+2] = (str[i] & 0x0f) + '0'; - else - dst[j+2] = (str[i] & 0x0f) + 'a' - 10; - - j += 2; /* and j is incremented in loop too */ - } - } - dst[j] = '\0'; - - g_free (str); - return dst; -} - - - -static void -field_unescape (char* s) -{ - char* src; - char* dst; - - for (src = dst = s; *src; ++src, ++dst) - { - if (src[0] == '%' && src[1] != '\0' && src[2] != '\0') - { - gint high, low; - - if ('a' <= src[1] && src[1] <= 'f') - high = src[1] - 'a' + 10; - else if ('A' <= src[1] && src[1] <= 'F') - high = src[1] - 'A' + 10; - else if ('0' <= src[1] && src[1] <= '9') - high = src[1] - '0'; - else /* malformed */ - goto regular_copy; - - if ('a' <= src[2] && src[2] <= 'f') - low = src[2] - 'a' + 10; - else if ('A' <= src[2] && src[2] <= 'F') - low = src[2] - 'A' + 10; - else if ('0' <= src[2] && src[2] <= '9') - low = src[2] - '0'; - else /* malformed */ - goto regular_copy; - - *dst = (char)((high << 4) + low); - src += 2; - } - else - { - regular_copy: - *dst = *src; - } - } - - *dst = '\0'; -} - - - -/** - * gnet_uri_get_string - * @uri: a #GURI - * - * Gets a string representation of a #GURI. This function does not - * escape or unescape the fields first. Call gnet_uri_escape() or - * gnet_uri_unescape first if necessary. - * - * Returns: a string. - * - **/ -char* -gnet_uri_get_string (const GURI* uri) -{ - char* rv = NULL; - GString* buffer = NULL; - - g_return_val_if_fail (uri, NULL); - - buffer = g_string_sized_new (16); - - if (uri->scheme) - g_string_sprintfa (buffer, "%s:", uri->scheme); - - if (uri->user || uri->passwd || uri->hostname || uri->port) - g_string_append (buffer, "//"); - - if (uri->user) - { - buffer = g_string_append (buffer, uri->user); - buffer = g_string_append_c (buffer, '@'); - } - if (uri->passwd) - { - buffer = g_string_append (buffer, uri->passwd); - buffer = g_string_append_c (buffer, '@'); - } - - /* Add brackets around the hostname if it's IPv6 */ - if (uri->hostname) - { - if (strchr(uri->hostname, ':') == NULL) - buffer = g_string_append (buffer, uri->hostname); - else - g_string_sprintfa (buffer, "[%s]", uri->hostname); - } - - if (uri->port) - g_string_sprintfa (buffer, ":%d", uri->port); - - if (uri->path) - { - if (*uri->path == '/' || - !(uri->user || uri->passwd || uri->hostname || uri->port)) - g_string_append (buffer, uri->path); - else - g_string_sprintfa (buffer, "/%s", uri->path); - } - - if (uri->query) - g_string_sprintfa (buffer, "?%s", uri->query); - - if (uri->fragment) - g_string_sprintfa (buffer, "#%s", uri->fragment); - - /* Free only GString not data contained, return the data instead */ - rv = buffer->str; - g_string_free (buffer, FALSE); - return rv; -} - - -/** - * gnet_uri_set_scheme - * @uri: a #GURI - * @scheme: scheme - * - * Sets a #GURI's scheme. - * - **/ -void -gnet_uri_set_scheme (GURI* uri, const char* scheme) -{ - g_return_if_fail (uri); - - if (uri->scheme) - { - g_free (uri->scheme); - uri->scheme = NULL; - } - - if (scheme) - uri->scheme = g_strdup (scheme); -} - - -/** - * gnet_uri_set_userinfo - * @uri: a #GURI - * @userinfo: user info - * - * Sets a #GURI's user info. - * - **/ -void -gnet_uri_set_userinfo (GURI* uri, const char* user, const char* passwd) -{ - g_return_if_fail (uri); - - if (uri->user) - { - g_free (uri->user); - uri->user = NULL; - } - if (uri->passwd) - { - g_free (uri->passwd); - uri->passwd = NULL; - } - - if (user) - uri->user = g_strdup (user); - if (passwd) - uri->passwd = g_strdup (passwd); -} - - -/** - * gnet_uri_set_hostname - * @uri: a #GURI - * @hostname: host name - * - * Sets a #GURI's host name. - * - **/ -void -gnet_uri_set_hostname (GURI* uri, const char* hostname) -{ - g_return_if_fail (uri); - - if (uri->hostname) - { - g_free (uri->hostname); - uri->hostname = NULL; - } - - if (hostname) - uri->hostname = g_strdup (hostname); -} - - -/** - * gnet_uri_set_port - * @uri: a #GURI - * @port: port - * - * Set a #GURI's port. - * - **/ -void -gnet_uri_set_port (GURI* uri, gint port) -{ - uri->port = port; -} - - -/** - * gnet_uri_set_path - * @uri: a #GURI - * @path: path - * - * Set a #GURI's path. - * - **/ -void -gnet_uri_set_path (GURI* uri, const char* path) -{ - g_return_if_fail (uri); - - if (uri->path) - { - g_free (uri->path); - uri->path = NULL; - } - - if (path) - uri->path = g_strdup (path); -} - - - -/** - * gnet_uri_set_query - * @uri: a #GURI - * @query: query - * - * Set a #GURI's query. - * - **/ -void -gnet_uri_set_query (GURI* uri, const char* query) -{ - g_return_if_fail (uri); - - if (uri->query) - { - g_free (uri->query); - uri->query = NULL; - } - - if (query) - uri->query = g_strdup (query); -} - - -/** - * gnet_uri_set_fragment - * @uri: a #GURI - * @fragment: fragment - * - * Set a #GURI's fragment. - * - **/ -void -gnet_uri_set_fragment (GURI* uri, const char* fragment) -{ - g_return_if_fail (uri); - - if (uri->fragment) - { - g_free (uri->fragment); - uri->fragment = NULL; - } - - if (fragment) - uri->fragment = g_strdup (fragment); -} - - -/** - * gnet_mms_helper - * @uri: a #GURI - * - * returns char* representation of an uri that is sutable for - * using in mms protocol. - * '/path?query' - * - **/ - -char* gnet_mms_helper(const GURI* uri) -{ - size_t len = 0; - char *ret, *tmp = NULL; - - - /* Strip leading slashes and calculate the length of the path - * which might not be present in the URI */ - if (uri->path) { - tmp = uri->path; - while (*tmp == '/') - ++tmp; - len += strlen(tmp); - } - /* Append length of the query part */ - if (uri->query) - len += strlen(uri->query) + 1; /* + '?' */ - - if (!(ret = (char *) malloc(len + 2))) - return NULL; - - strcpy(ret, "/"); - - /* Copy the optional path */ - if (tmp) - strcat(ret, tmp); - - /* Copy the optional query */ - if (uri->query) { - strcat(ret, "?"); - strcat(ret, uri->query); - } - - return ret; -} diff --git a/lib/win32/libmms_win32/src/uri.h b/lib/win32/libmms_win32/src/uri.h deleted file mode 100644 index c7a93edfe9..0000000000 --- a/lib/win32/libmms_win32/src/uri.h +++ /dev/null @@ -1,94 +0,0 @@ -/* GNet - Networking library - * Copyright (C) 2000-2001 David Helder, David Bolcsfoldi - * - * 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. - */ - - -#ifndef _GNET_URI_H -#define _GNET_URI_H - -#include <glib.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** - * GURI: - * @scheme: Scheme (or protocol) - * @userinfo: User info - * @hostname: Host name - * @port: Port number - * @path: Path - * @query: Query - * @fragment: Fragment - * - * The #GURI structure represents a URI. All fields in this - * structure are publicly readable. - * - **/ -typedef struct _GURI GURI; - -struct _GURI -{ - char* scheme; - char* user; - char* passwd; - char* hostname; - gint port; - char* path; - char* query; - char* fragment; -}; - - - -GURI* gnet_uri_new (const char* uri); -GURI* gnet_uri_new_fields (const char* scheme, const char* hostname, - const gint port, const char* path); -GURI* -gnet_uri_new_fields_all (const char* scheme, const char* user, - const char* passwd, const char* hostname, - const gint port, const char* path, - const char* query, const char* fragment); -GURI* gnet_uri_clone (const GURI* uri); -void gnet_uri_delete (GURI* uri); - -gboolean gnet_uri_equal (gconstpointer p1, gconstpointer p2); -guint gnet_uri_hash (gconstpointer p); - -void gnet_uri_escape (GURI* uri); -void gnet_uri_unescape (GURI* uri); - -char* gnet_uri_get_string (const GURI* uri); - -void gnet_uri_set_scheme (GURI* uri, const char* scheme); -void gnet_uri_set_userinfo (GURI* uri, const char* user, const char* passwd); -void gnet_uri_set_hostname (GURI* uri, const char* hostname); -void gnet_uri_set_port (GURI* uri, gint port); -void gnet_uri_set_path (GURI* uri, const char* path); -void gnet_uri_set_query (GURI* uri, const char* query); -void gnet_uri_set_fragment (GURI* uri, const char* fragment); - -char* gnet_mms_helper(const GURI* uri); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _GNET_URI_H */ diff --git a/lib/win32/libmms_win32/src/utils.c b/lib/win32/libmms_win32/src/utils.c deleted file mode 100644 index 985dd58916..0000000000 --- a/lib/win32/libmms_win32/src/utils.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2008 the xine project - * - * This file is part of LibMMS, an MMS protocol handling library. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the ree Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: mms.c,v 1.31 2007/12/11 20:35:01 jwrdegoede Exp $ - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <glib.h> -#include "utils.h" - -gdouble util_guint64_to_gdouble (guint64 value) -{ - if (value & G_GINT64_CONSTANT (0x8000000000000000)) - return (gdouble) ((gint64) value) + (gdouble) 18446744073709551616.; - else - return (gdouble) ((gint64) value); -} - diff --git a/lib/win32/libmms_win32/src/utils.h b/lib/win32/libmms_win32/src/utils.h deleted file mode 100644 index 1823f76f75..0000000000 --- a/lib/win32/libmms_win32/src/utils.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2008 the xine project - * - * This file is part of LibMMS, an MMS protocol handling library. - * - * xine is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the ree Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * xine 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - * - * $Id: mms.c,v 1.31 2007/12/11 20:35:01 jwrdegoede Exp $ - */ - -#ifndef __UTILS_H__ -#define __UTILS_H__ - -#include <glib.h> - -G_BEGIN_DECLS - -gdouble util_guint64_to_gdouble (guint64 value); - -#ifdef WIN32 -#define guint64_to_gdouble(value) util_guint64_to_gdouble(value) -#else -#define guint64_to_gdouble(value) ((gdouble) (value)) -#endif - -G_END_DECLS - -#endif /* __UTILS_H__ */ diff --git a/project/VS2010Express/XBMC for Windows.sln b/project/VS2010Express/XBMC for Windows.sln index db9786d2e8..ed28b5c245 100644 --- a/project/VS2010Express/XBMC for Windows.sln +++ b/project/VS2010Express/XBMC for Windows.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 +# Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XBMC", "XBMC.vcxproj", "{3A68081D-E8F9-4523-9436-530DE9E5530A}" ProjectSection(ProjectDependencies) = postProject {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} @@ -11,8 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnrarXLib", "UnrarXLib.vcxp EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhts", "..\..\lib\libhts\Win32\libhts_2010.vcxproj", "{00700E12-A63B-4E54-B962-4011A90584BD}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmms", "..\..\lib\win32\libmms_win32\msvc++\libmms.vcxproj", "{3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glib", "..\..\lib\win32\glib-2.20.4\build\win32\vs10\glib.vcxproj", "{12BCA020-EABF-429E-876A-A476BC9C10C0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libass_dll", "..\..\lib\libass\xbmc\libass_win32\libass_win32_vs2010.vcxproj", "{BA5B08FC-2ECB-4571-9F25-F8054522FC65}" @@ -108,21 +106,21 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpluff", "..\..\lib\cpluff\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame_dll", "..\..\lib\liblame\vc_solution\vc10_libmp3lame_dll.vcxproj", "{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_make_versioninfo", "..\..\lib\Python\PCbuild\make_versioninfo.vcxproj", "{FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_make_versioninfo", "..\..\lib\python\PCbuild\make_versioninfo.vcxproj", "{FC7EBFE5-233C-4608-A4D9-5EF512BA96BF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore_dll", "..\..\lib\Python\PCbuild\pythoncore.vcxproj", "{9E417A6D-50DE-4969-8542-F58EA1163376}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore_dll", "..\..\lib\python\PCbuild\pythoncore.vcxproj", "{9E417A6D-50DE-4969-8542-F58EA1163376}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_zlib.pyd", "..\..\lib\Python\PCbuild\zlib_python.vcxproj", "{680CDC79-9CCA-4282-9A8D-927CB0DB55B2}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_zlib.pyd", "..\..\lib\python\PCbuild\zlib_python.vcxproj", "{680CDC79-9CCA-4282-9A8D-927CB0DB55B2}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python__socket.pyd", "..\..\lib\Python\PCbuild\_socket.vcxproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python__socket.pyd", "..\..\lib\python\PCbuild\_socket.vcxproj", "{324F66C2-44D0-4D50-B979-F9DAE7FD36DB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_pyexpat.pyd", "..\..\lib\Python\PCbuild\pyexpat.vcxproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_pyexpat.pyd", "..\..\lib\python\PCbuild\pyexpat.vcxproj", "{7E551393-3C43-47F8-9F3F-5BC368A6C487}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_select.pyd", "..\..\lib\Python\PCbuild\select.vcxproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_select.pyd", "..\..\lib\python\PCbuild\select.vcxproj", "{97239A56-DBC0-41D2-BC14-C87D9B97D63B}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_unicodedata.pyd", "..\..\lib\Python\PCbuild\unicodedata.vcxproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_unicodedata.pyd", "..\..\lib\python\PCbuild\unicodedata.vcxproj", "{FA5FC7EB-C72F-415F-AE42-91DD605ABDDA}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_bz2.pyd", "..\..\lib\Python\PCbuild\bz2.vcxproj", "{62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_bz2.pyd", "..\..\lib\python\PCbuild\bz2.vcxproj", "{62C61EDD-FDC6-4F2C-9ED6-0FEC3C07D616}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libhdhomerun_dll", "..\..\lib\libhdhomerun\hdhomerun\hdhomerun.vcxproj", "{1E2FB608-3DD2-4021-A598-90008FA6DE85}" EndProject @@ -166,14 +164,6 @@ Global {00700E12-A63B-4E54-B962-4011A90584BD}.Release (DirectX)|Win32.Build.0 = Release|Win32 {00700E12-A63B-4E54-B962-4011A90584BD}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32 {00700E12-A63B-4E54-B962-4011A90584BD}.Release (OpenGL)|Win32.Build.0 = Release|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Debug (DirectX)|Win32.ActiveCfg = Debug|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Debug (DirectX)|Win32.Build.0 = Debug|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Debug (OpenGL)|Win32.ActiveCfg = Debug|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Debug (OpenGL)|Win32.Build.0 = Debug|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Release (DirectX)|Win32.ActiveCfg = Release|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Release (DirectX)|Win32.Build.0 = Release|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Release (OpenGL)|Win32.ActiveCfg = Release|Win32 - {3A575CF0-45B3-41CC-85E2-9F9CE8C56B38}.Release (OpenGL)|Win32.Build.0 = Release|Win32 {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug (DirectX)|Win32.ActiveCfg = Debug|Win32 {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug (DirectX)|Win32.Build.0 = Debug|Win32 {12BCA020-EABF-429E-876A-A476BC9C10C0}.Debug (OpenGL)|Win32.ActiveCfg = Debug|Win32 diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index a81fa30da2..209d761afc 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -801,7 +801,6 @@ <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamHTSP.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamHttp.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMemory.cpp" /> - <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMMS.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamNavigator.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamRTMP.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDStateSerializer.cpp" /> @@ -1650,7 +1649,6 @@ <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamHTSP.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamHttp.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMemory.h" /> - <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMMS.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamNavigator.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamRTMP.h" /> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDStateSerializer.h" /> @@ -1960,10 +1958,6 @@ <Project>{00700e12-a63b-4e54-b962-4011a90584bd}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\..\lib\win32\libmms_win32\msvc++\libmms.vcxproj"> - <Project>{3a575cf0-45b3-41cc-85e2-9f9ce8c56b38}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> - </ProjectReference> <ProjectReference Include="..\..\lib\libRTV\libRTV.vcxproj"> <Project>{dd4818ae-7e35-40b7-a6a0-0ff83aa1c916}</Project> <Private>true</Private> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index 5ffb89e751..f070757d66 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -423,9 +423,6 @@ <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMemory.cpp"> <Filter>cores\dvdplayer\DVDInputStreams</Filter> </ClCompile> - <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMMS.cpp"> - <Filter>cores\dvdplayer\DVDInputStreams</Filter> - </ClCompile> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamNavigator.cpp"> <Filter>cores\dvdplayer\DVDInputStreams</Filter> </ClCompile> @@ -2704,9 +2701,6 @@ <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMemory.h"> <Filter>cores\dvdplayer\DVDInputStreams</Filter> </ClInclude> - <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamMMS.h"> - <Filter>cores\dvdplayer\DVDInputStreams</Filter> - </ClInclude> <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDInputStreams\DVDInputStreamNavigator.h"> <Filter>cores\dvdplayer\DVDInputStreams</Filter> </ClInclude> |