Changes of Revision 19
[-] [+] | Changed | vobcopy.spec |
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/FAQ ^ |
@@ -1,46 +0,0 @@ -Q1) I receive "Do you have libdvdread installed? I don't think so..." when I - try to compile vobcopy. -A) Did you install the -dev packages of libdvdread (and libdvdcss)? These - include the header files needed for compilation. - -Q2) When I call "vobcopy -i /dev/something" I receive strange errors. -A) Um, you have to mount the dvd and give the mount-point to -i, so - something like -i /cdrom, /dev files aren't allowed! - -Q3) It takes me ages to rip something. -A) Well, take a look into /var/log/messages. If you see something like this - Sep 29 04:02:03 some kernel: hdc: cdrom_decode_status: status=0x51 { - DriveReady SeekComplete Error } - Sep 29 04:02:03 some kernel: hdc: cdrom_decode_status: error=0x30 - Sep 29 04:02:04 some kernel: hdc: cdrom_decode_status: status=0x51 { - DriveReady SeekComplete Error } - Sep 29 04:02:04 some kernel: hdc: cdrom_decode_status: error=0x30 - Sep 29 04:02:04 some kernel: hdc: ATAPI reset complete - - you have found the reason. I cannot explain what this means, but I guess - that the dvd is kinda broken. Explanation by someone from TAG - (linuxgazette.com): - HD access is assumed to be fast. So many kernel drivers lock interrupts - for the moment of access. If the access suddenly takes seconds instead of - micro s the system gets temporarily hung. The access does take long because - the drive will try several accesses, resetting head alignment, reaccessing, - ..... then only reporting back with the error. This only allows the kernel - to go on with normal proceedure. - - -Q4) Can I rip something that already sits on my harddisk, either as a iso file or - as a directory? - -A) No, sorry. Libdvdread needs to figure out the title-keys. It might be able to - also do this on stuff already on the harddisk, but I don't know how and hence - vobcopy can't do it. If you know how, give me a hint! - - -Q5) Vobcopy stops copying in the middle. This is somewhat reproducibel. - -A) I've seen this too. It seems the movie studios implemented a new kind of copy - protection system (mostly by going against the rules set forth in the "red book" - standard). Vobcopy relies on libdvdread to read the dvd, and unfortunately develop- - ment on libdvdread has mostly ceased. So, libdvdread and therefore vobcopy can't - read it. Look into alternative-programs.txt to find a ripper that might do it. - \ No newline at end of file | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/THANKS ^ |
@@ -1,7 +0,0 @@ -Adam Blazczak for solaris 9 fixes -Dave Yeo for OS/2 fixes -Richard Handel for \40 -> Space fix -Nico Golde for off-by-one fix -Steven Birch for the debian packages -Götz Waschk for the rpm packages -and quite a lot of other people I forgot! | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian ^ |
-(directory) | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian/changelog ^ |
@@ -1,109 +0,0 @@ -vobcopy (1.0.2-1) unstable; urgency=low - - * Fix possible symlink attack caused by insecure temporary file - handling by using mkstemp (CVE-2007-5718; closes: #448319). - * Bump standards Version to 3.7.3, no changes needed - * Build dependency from "libdvdread3-dev | libdvdread2-dev" to libdvdread-dev - * Fix man page typo s/pipeing/piping/ (closes: #367142) - * Add upstream TODO file to docs - * Add upstream Release-Notes to docs - * Change to debhelper compatibility level 5 - * Tidy up rules file - * New upstream release (closes: #381553, #449534) - - wrong device name from /etc/fstab instead of /etc/mtab (closes: #345324) - - -L option documented in man page (closes: #451144) - - -F produces files that are too big (closes: #349682) - - inconsistent regarding default of -n (closes: #341742) - - checks for free space but it doesn't warn (closes: #341734) - - vobcopy: German manual page corrections (closes: #345326) - - -m and -n mutually exclusive (closes: #341735) - - Off by one error fixed (closes: #451145) - - Fix error when filenames end with ;? (closes: #319721) - - -- Stephen Birch <sgbirch@imsmail.org> Tue, 14 Dec 2007 16:23:25 +0000 - -vobcopy (0.5.14-2) unstable; urgency=low - - * Put libdvdread3 ahead of libdvdread2 in control file - * Change from native to non native Debian package - - -- Stephen Birch <sgbirch@imsmail.org> Sat, 27 Nov 2004 15:04:21 +0000 - -vobcopy (0.5.14-1) unstable; urgency=low - - * New upstream release - - -- Stephen Birch <sgbirch@imsmail.org> Thu, 18 Nov 2004 11:18:55 +0000 - -vobcopy (0.5.12-3) unstable; urgency=low - - * Set up vobcopy for backport into woody - - -- Stephen Birch <sgbirch@woody.uk.birch.ws> Tue, 9 Mar 2004 10:08:07 +0000 - -vobcopy (0.5.12-2) unstable; urgency=low - - * Add comment to control file per upstream request - - -- Stephen Birch <sgbirch@imsmail.org> Tue, 9 Mar 2004 06:36:36 +0000 - -vobcopy (0.5.12-1) unstable; urgency=low - - * New version from upstream - * Tidy up changelog files - * Added postinst and postrm files for dh_installmenu - - -- Stephen Birch <sgbirch@imsmail.org> Mon, 8 Mar 2004 11:10:54 +0000 - -vobcopy (0.5.11-2) unstable; urgency=low - - * Add -f to rm lines in Makefile - - -- Stephen Birch <sgbirch@imsmail.org> Mon, 8 Mar 2004 09:57:26 +0000 - -vobcopy (0.5.11-1) unstable; urgency=low - - * New version from upstream - * Use dh_installchangelogs -k ChangeLog to install changelogs - - -- Stephen Birch <sgbirch@imsmail.org> Mon, 1 Mar 2004 15:59:47 +0000 - -vobcopy (0.5.10-0) unstable; urgency=low - - * Converted Debian control files to policy 3.6.1 - * Created debian format changelog, old log is archived in changelog.archive - * Update vobcopy to use libdvdread3 instead of libdvd2 - * Clean up copying file a little, add reference to GPL file - - -- Stephen Birch <sgbirch@imsmail.org> Thu, 26 Feb 2004 15:12:31 +0000 - -vobcopy (0.5.7-1) unstable; urgency=low - - * New upstream release - - -- Robos <robos@muon.de> Fri, 15 Mar 2003 23:27:23 +0200 - -vobcopy (0.5.6-1) unstable; urgency=low - - * New upstream release - - -- Robos <robos@muon.de> Sun, 9 Feb 2003 23:27:23 +0200 - -vobcopy (0.5.5-1) unstable; urgency=low - - * New upstream relase. vobcopy now works under SunOS. - - -- Philippe Normand (phil) <sweafty@free.fr> Sun, 3 Nov 2002 19:20:37 +0100 - -vobcopy (0.5.1-1) unstable; urgency=low - - * New upstream release - - -- Philippe Normand (phil) <sweafty@free.fr> Wed, 17 Jul 2002 18:09:23 +0200 - -vobcopy (0.5.0-1) unstable; urgency=low - - * Initial Release. - - -- Philippe Normand (phil) <sweafty@free.fr> Mon, 15 Jul 2002 18:27:23 +0200 - | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian/compat ^ |
@@ -1 +0,0 @@ -5 | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian/control ^ |
@@ -1,18 +0,0 @@ -Source: vobcopy -Section: utils -Priority: optional -Maintainer: Stephen Birch <sgbirch@imsmail.org> -Build-Depends: debhelper (>= 5), libdvdread-dev -Standards-Version: 3.7.3 - -Package: vobcopy -Architecture: any -Depends: ${shlibs:Depends} -Description: A tool to copy DVD VOBs to hard disk - vobcopy copies DVD .vob files to harddisk and merges them into file(s) - with the name extracted from the DVD. It checks for enough free space - on the destination drive and compares the copied size to the size on DVD - (in case something went wrong during the copying). - . - You can also mirror the DVD movie content and copy single - files you specify. | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian/copyright ^ |
@@ -1,28 +0,0 @@ -This package was debianized by Philippe Normand (phil) <sweafty@free.fr> on -Mon, 15 Jul 2002 18:27:23 +0200. Debian maintenance of the package was taken -over on Feb 7, 2004 by Stephen Birch <sgbirch@imsmail.org>. - -Upstream location: http://vobcopy.org -Upstream Author: Robos <robos@muon.de> - -This software is copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Robos -<robos@muon.de>, Philippe Normand, Stephen Birch, and lots of contribution and -cleanup from rosenauer@users.sourceforge.net. - - This package 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; version 2 dated June, 1991. - - This package 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 package; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian/docs ^ |
@@ -1,4 +0,0 @@ -alternative_programs.txt -TODO -README -Release-Notes | ||
[-] [+] | Deleted | vobcopy-1.1.0.tar.bz2/debian/rules ^ |
@@ -1,62 +0,0 @@ -#!/usr/bin/make -f -# GNU copyright 1997 to 1999 by Joey Hess. - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - ./configure.sh - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - $(MAKE) PREFIX=/usr MANDIR=/usr/share/man - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - $(MAKE) install DESTDIR=$(CURDIR)/debian/vobcopy PREFIX=$(CURDIR)/debian/vobcopy/usr MANDIR=$(CURDIR)/debian/vobcopy/usr/share/man - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installmenu - dh_installman - dh_installchangelogs Changelog - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure | ||
Deleted | vobcopy-1.1.1.tar.bz2 ^ | |
Deleted | vobcopy-1.1.2.tar.bz2 ^ | |
[-] [+] | Added | vobcopy-1.2.0.tar.bz2/COPYING ^ |
@@ -0,0 +1,340 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, 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 or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +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 give any other recipients of the Program a copy of this License +along with the Program. + +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 Program or any portion +of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +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 Program, 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 Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) 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; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, 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 executable. However, as a +special exception, the source code 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. + +If distribution of executable or 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 counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program 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. + + 5. 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 Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program 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 to +this License. + + 7. 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 Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program 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 Program. + +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. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program 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. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 Program +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 Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, 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 + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), 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 Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. 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 program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program 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. + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/Changelog ^ |
@@ -1,5 +1,21 @@ Changelog for vobcopy: For more infos on the options see "man vobcopy" +1.2.0: Some new features! + -Progress bar and speed enhancements/system load reduction + coming with it - many thanks to Eric Kilfoil! + -Vobcopy can now "rip" from an iso image on hdd or a directory + containing a VIDEO_TS directory. People seem to need this for + streaming dvd content to a ps3 via fuppes. That part seem to + be buggy though, works 50/50. Will look further into that. + -Option -M to rip the title with the longest playing time. + -Other small corrections I think. + +1.1.2: German l12n in the program + added [x]overwrite all option + small fixes, e.g. for *bsd + +1.1.1: Apply patch by Petr Salinger for GNU/kFreeBSD + 1.1.0: Fixes debian bug #448319/CVE-2007-5718 MacOSX (at least 10.5) compiles again other small fixes | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/Makefile ^ |
@@ -2,6 +2,7 @@ #This is the makefile for vobcopy, mainly written by rosenauer. These things #below here are variable definitions. They get substituted in the (CC) and #stuff places. +DESTDIR = CC ?= gcc #PREFIX += /usr/local #BINDIR = ${PREFIX}/bin @@ -9,9 +10,10 @@ PREFIX += /usr/local BINDIR = ${PREFIX}/bin MANDIR = ${PREFIX}/man +DOCDIR = ${PREFIX}/share/doc/vobcopy LFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -CFLAGS += -I/usr//include -LDFLAGS += -ldvdread -L/usr//lib +CFLAGS += -I/usr/local//include +LDFLAGS += -ldvdread -L/usr/local//lib #This specifies the conversion from .c to .o .c.o: @@ -48,15 +50,22 @@ # mkdir -p $(MANDIR)/man1 # cp vobcopy $(BINDIR)/vobcopy # cp vobcopy.1 $(MANDIR)/man1/vobcopy.1 - install -d -m 755 $(BINDIR) - install -d -m 755 $(MANDIR)/man1 - install -d -m 755 $(MANDIR)/de/man1 - install -m 755 vobcopy $(BINDIR)/vobcopy - install -m 644 vobcopy.1 $(MANDIR)/man1/vobcopy.1 - install -m 644 vobcopy.1.de $(MANDIR)/de/man1/vobcopy.1 + install -d -m 755 $(DESTDIR)/$(BINDIR) + install -d -m 755 $(DESTDIR)/$(MANDIR)/man1 + install -d -m 755 $(DESTDIR)/$(MANDIR)/de/man1 + install -d -m 755 $(DESTDIR)/$(DOCDIR) + install -m 755 vobcopy $(DESTDIR)/$(BINDIR)/vobcopy + install -m 644 vobcopy.1 $(DESTDIR)/$(MANDIR)/man1/vobcopy.1 + install -m 644 vobcopy.1.de $(DESTDIR)/$(MANDIR)/de/man1/vobcopy.1 + install -m 644 COPYING Changelog README Release-Notes TODO $(DESTDIR)/$(DOCDIR) uninstall: - rm -f $(BINDIR)/vobcopy - rm -f $(MANDIR)/man1/vobcopy.1 - rm -f $(MANDIR)/de/man1/vobcopy.1 + rm -f $(DESTDIR)/$(BINDIR)/vobcopy + rm -f $(DESTDIR)/$(MANDIR)/man1/vobcopy.1 + rm -f $(DESTDIR)/$(MANDIR)/de/man1/vobcopy.1 + rm -f $(DESTDIR)/$(DOCDIR)/{COPYING,Changelog,README,Release-Notes,TODO} + rmdir --parents $(DESTDIR)/$(BINDIR) 2>/dev/null + rmdir --parents $(DESTDIR)/$(MANDIR)/man1 2>/dev/null + rmdir --parents $(DESTDIR)/$(MANDIR)/de/man1 2>/dev/null + rmdir --parents $(DESTDIR)/$(DOCDIR) 2>/dev/null | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/README ^ |
@@ -15,7 +15,7 @@ **IMPORTANT** I receive nearly NO bugreports, so either vobcopy (and therefore I) - are near-perfect (yeah, right) or your problems have a real slim chance + are near-perfect (yeah, right ;-) or your problems have a real slim chance of getting fixed. Bugreporting is *really* simple, add "-v -v" to your vobcopy call to have vobcopy create a bugreport file you can mail me at robos@muon.de along with a small description of your system (OS, @@ -45,11 +45,8 @@ Handling: -vobcopy (without any options) - should copy the correct /path/to/dvd/video_ts/vts_0x_01.vob to - vts_0x_yy.vob to the directory you are invoking vobcopy from. - (vobcopy takes the title with the most chapters by default if no title - is specified) +vobcopy (without _any_ options) + will copy the title with the most chapters to the current directory. The vobs will be merged up to 2 gigs and then a new file will be started. So what you get is: name-of-moviex-1.vob (2 gig size) name-of-moviex-2.vob ... @@ -60,6 +57,15 @@ For more infos on the options see "man vobcopy" Newest addition: + +vobcopy -M will rip the title with the longest playing time. Normal + mode without any options is with the most chapters. Both + methods can be wrong so please try both. I will implement a + message when the methods deliver different "main" titles shortly. + +vobcopy -x will not ask any questions if you want to overwrite + pre-existing files but will simply do so. + vobcopy -O <filename of single files you want to copy, more than one have to be separated by comma> e.g. -O video_ts.vob,vts_01_01.ifo,vts_01_01.vob @@ -123,6 +129,9 @@ directory instead of stderr. Good when you want to pipe the output of vobcopy to some other program, e.g. bbtools or mplayer. +vobcopy -x + overwrite all existing files without further question + The options can be combined and arranged as you like. It worked for me, hope for you too. Have fun! | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/Release-Notes ^ |
@@ -1,10 +1,20 @@ -Release-Notes for 1.1.0 (Su 13. Jan 23:24:00 CEST 2008) -This release fixes the debian bug #448319 which got retitled CVE-2007-5718. -Hey, my first CVE! Well, I consider this to be a relatively harmless bug. -Also, I fixed some stuff so vobcopy should now compile and work fine on -MacOSX, at least 10.5, since this is what I have right now. -Spaces in the name get changed/stepped over or so, don't recall. +Release-Notes for 1.2.0 (Mo 8. Jun 21:48:19 CEST 2009): +Progress bar and speed enhancements/system load reduction coming with it +- many thanks to Eric Kilfoil! Also vobcopy can now "rip" from an iso +image on hdd or a directory containing a VIDEO_TS directory. People seem +to need this for streaming dvd content to a ps3 via fuppes. That part seem +to be buggy though, works 50/50. Will look further into that. Added +another option: -M to rip the title with the longest playing time. +Both methods, choosing the main title by longest playing time and most +chapters, can be wrong - please try both if one fails. I will +implement a message indicating that the methods recommend different +"main" titles shortly. Other small corrections are also in I think. +Release-Notes for 1.1.2 (Mi 8. Okt 00:18:17 CEST 2008): +Added german l12n to the messages in vobcopy (if it works..., please +let me know if not). Also some small fixes for *bsd and other fixes. +And introduced in vobcopy to [x]overwrite all existing files or -x to +start that way from the command line. Release-Notes for 1.0.2 (Su 24. Jun 02:19:04 CEST 2007): Small fixes all in all: fix segfault with log file writing routine and | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/configure.sh ^ |
@@ -37,6 +37,12 @@ echo "with mandir here: $mandir" fi + if [ "$1" != "${1#--docdir=}" ]; then + docdir="${1#--docdir=}" + docdir_provided=true + echo "with docdir here: $docdir" + fi + if [ "$1" != "${1#--with-lfs}" ]; then echo "with large-file support" LFS="LFS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" @@ -53,6 +59,7 @@ echo "--prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]" echo "--bindir=DIR user executables in DIR [PREFIX/bin]" echo "--mandir=DIR man documentation in DIR [PREFIX/bin]" + echo "--docdir=DIR package documentation in DIR [PREFIX/share/doc/vobcopy]" echo "--with-dvdread-libs=DIR directory where dvdread lib (dvd_reader.h) is installed" echo "--with-lfs Enable large File System support" exit 1 @@ -71,6 +78,11 @@ mandir=\${PREFIX}/man fi +if [ -z $docdir_provided ] +then + docdir=\${PREFIX}/share/doc/vobcopy +fi + if [ -z $bindir_provided ] then bindir=\${PREFIX}/bin @@ -166,6 +178,7 @@ #This is the makefile for vobcopy, mainly written by rosenauer. These things #below here are variable definitions. They get substituted in the (CC) and #stuff places. +DESTDIR = CC ?= gcc #PREFIX += /usr/local #BINDIR = \${PREFIX}/bin @@ -173,6 +186,7 @@ PREFIX += $prefix BINDIR = $bindir MANDIR = $mandir +DOCDIR = $docdir $LFS CFLAGS += -I$libs_dir/include $LDFLAGS @@ -212,17 +226,24 @@ # mkdir -p \$(MANDIR)/man1 # cp vobcopy \$(BINDIR)/vobcopy # cp vobcopy.1 \$(MANDIR)/man1/vobcopy.1 - install -d -m 755 \$(BINDIR) - install -d -m 755 \$(MANDIR)/man1 - install -d -m 755 \$(MANDIR)/de/man1 - install -m 755 vobcopy \$(BINDIR)/vobcopy - install -m 644 vobcopy.1 \$(MANDIR)/man1/vobcopy.1 - install -m 644 vobcopy.1.de \$(MANDIR)/de/man1/vobcopy.1 + install -d -m 755 \$(DESTDIR)/\$(BINDIR) + install -d -m 755 \$(DESTDIR)/\$(MANDIR)/man1 + install -d -m 755 \$(DESTDIR)/\$(MANDIR)/de/man1 + install -d -m 755 \$(DESTDIR)/\$(DOCDIR) + install -m 755 vobcopy \$(DESTDIR)/\$(BINDIR)/vobcopy + install -m 644 vobcopy.1 \$(DESTDIR)/\$(MANDIR)/man1/vobcopy.1 + install -m 644 vobcopy.1.de \$(DESTDIR)/\$(MANDIR)/de/man1/vobcopy.1 + install -m 644 COPYING Changelog README Release-Notes TODO \$(DESTDIR)/\$(DOCDIR) uninstall: - rm -f \$(BINDIR)/vobcopy - rm -f \$(MANDIR)/man1/vobcopy.1 - rm -f \$(MANDIR)/de/man1/vobcopy.1 + rm -f \$(DESTDIR)/\$(BINDIR)/vobcopy + rm -f \$(DESTDIR)/\$(MANDIR)/man1/vobcopy.1 + rm -f \$(DESTDIR)/\$(MANDIR)/de/man1/vobcopy.1 + rm -f \$(DESTDIR)/\$(DOCDIR)/{COPYING,Changelog,README,Release-Notes,TODO} + rmdir --parents \$(DESTDIR)/\$(BINDIR) 2>/dev/null + rmdir --parents \$(DESTDIR)/\$(MANDIR)/man1 2>/dev/null + rmdir --parents \$(DESTDIR)/\$(MANDIR)/de/man1 2>/dev/null + rmdir --parents \$(DESTDIR)/\$(DOCDIR) 2>/dev/null " > Makefile echo "Next thing type \"make\" and then \"make install\"" | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/dvd.c ^ |
@@ -11,11 +11,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with vobcopy; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * along with vobcopy; if not, see <http://www.gnu.org/licenses/>. */ #include "vobcopy.h" +#include <dvdread/ifo_read.h> /* included from cdtitle.c (thx nils *g) * get the Title @@ -41,9 +41,9 @@ if ( !(filehandle = open(device, O_RDONLY, 0)) ) { /* open failed */ - fprintf( stderr, "[Error] Something went wrong while getting the dvd name - please specify path as /cdrom or /dvd (mount point) or use -t\n"); - fprintf( stderr, "[Error] Opening of the device failed\n"); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Something went wrong while getting the dvd name - please specify path as /cdrom or /dvd (mount point) or use -t\n")); + fprintf( stderr, _("[Error] Opening of the device failed\n")); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); return -1; } @@ -52,9 +52,9 @@ { /* seek failed */ close( filehandle ); - fprintf( stderr, "[Error] Something went wrong while getting the dvd name - please specify path as /cdrom or /dvd (mount point) or use -t\n"); - fprintf( stderr, "[Error] Couldn't seek into the drive\n"); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Something went wrong while getting the dvd name - please specify path as /cdrom or /dvd (mount point) or use -t\n")); + fprintf( stderr, _("[Error] Couldn't seek into the drive\n")); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); return -1; } @@ -62,9 +62,9 @@ if ( (bytes_read = read(filehandle, tmp_buf, 2048)) != 2048 ) { close(filehandle); - fprintf( stderr, "[Error] something wrong in dvd_name getting - please specify path as /cdrom or /dvd (mount point) or use -t\n" ); - fprintf( stderr, "[Error] only read %d bytes instead of 2048\n", bytes_read); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] something wrong in dvd_name getting - please specify path as /cdrom or /dvd (mount point) or use -t\n") ); + fprintf( stderr, _("[Error] only read %d bytes instead of 2048\n"), bytes_read); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); return -1; } @@ -82,13 +82,20 @@ } if( 0 == last ) { - fprintf( stderr, "[Hint] The dvd has no name, will choose a nice one ;-), else use -t\n" ); + fprintf( stderr, _("[Hint] The dvd has no name, will choose a nice one ;-), else use -t\n") ); strcpy( title, "insert_name_here\0" ); } else title[ last + 1 ] = '\0'; #endif + + for( i=0; i< strlen(title);i++ ) + { + if( title[i] == ' ') + title[i] = '_'; + } + return 0; } @@ -178,7 +185,7 @@ } else { - fprintf( stderr, "[Error] Error while reading filesystem info" ); + fprintf( stderr, _("[Error] Error while reading filesystem info") ); return -1; } #elif ( defined( __sun ) ) @@ -188,8 +195,8 @@ if ( ( mnttab_fp = fopen( "/etc/mnttab", "r" ) ) == NULL ) { - fprintf( stderr, " [Error] Could not open mnttab for searching!\n" ); - fprintf( stderr, " [Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _(" [Error] Could not open mnttab for searching!\n") ); + fprintf( stderr, _(" [Error] error: %s\n"), strerror( errno ) ); return -1; } @@ -201,7 +208,7 @@ char *new_device, *mnt_special; if ( strstr( mount_entry.mnt_special, "/dsk/" ) == NULL ) { - fprintf( stderr, "[Error] %s doesn't look like a disk device to me", + fprintf( stderr, _("[Error] %s doesn't look like a disk device to me"), mount_entry.mnt_special ); return -1; } @@ -224,13 +231,13 @@ } if ( mntcheck > 0 ) { - fprintf( stderr, "[Error] Encountered error in reading mnttab file\n" ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Encountered error in reading mnttab file\n") ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); return -1; } else if ( mntcheck == -1 ) { - fprintf( stderr, "[Error] Did not find mount %s in mnttab!\n", path ); + fprintf( stderr, _("[Error] Did not find mount %s in mnttab!\n"), path ); return -1; } #else @@ -243,8 +250,7 @@ while ((lmount_entry = getmntent(tmp_streamin))){ if (strcmp(lmount_entry->mnt_dir, path) == 0){ /* Found the mount point */ - fprintf ( stderr, "[Info] Device %s mount on %s\n", lmount_entry->mnt_dir, - lmount_entry->mnt_fsname); + fprintf ( stderr, "[Info] Device %s mounted on %s\n", lmount_entry->mnt_fsname, lmount_entry->mnt_dir); strcpy(device, lmount_entry->mnt_fsname); mounted = TRUE; break; @@ -280,8 +286,8 @@ } else { - fprintf( stderr, "[Error] Could not read /etc/mtab!\n" ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Could not read /etc/mtab!\n") ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); return -1; } #endif @@ -313,7 +319,7 @@ if( ( k = strstr( tmp_bufferin, "/dev/" ) ) == NULL ) { - fprintf( stderr, "[Error] Weird, no /dev/ entry found in the line where iso9660 or udf gets mentioned in /etc/fstab\n" ); + fprintf( stderr, _("[Error] Weird, no /dev/ entry found in the line where iso9660 or udf gets mentioned in /etc/fstab\n") ); return -1; } l=0; @@ -329,7 +335,7 @@ if( isdigit( ( int) device[l-1] ) ) { if( strstr( device, "hd" ) ) - fprintf(stderr, "[Hint] Hmm, the last char in the device path (%s) that gets mounted to %s is a number.\n", device, path); + fprintf( stderr, _("[Hint] Hmm, the last char in the device path (%s) that gets mounted to %s is a number.\n"), device, path); } device[l] = '\0'; } @@ -338,15 +344,15 @@ fclose( tmp_streamin ); if( !strstr( device, "/dev" ) ) { - fprintf(stderr, "[Error] Could not find the provided path (%s), typo?\n",path); + fprintf( stderr, _("[Error] Could not find the provided path (%s), typo?\n"),path); device[0] = '\0'; return -1; } } else { - fprintf( stderr, "[Error] Could not read /etc/fstab!" ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Could not read /etc/fstab!") ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); device[0] = '\0'; return -1; } @@ -389,13 +395,13 @@ } if(dvd_count == 0) { /* no cd found? Then user should mount it */ - fprintf(stderr, "[Error] There seems to be no cd/dvd mounted. Please do that..\n"); + fprintf( stderr, _("[Error] There seems to be no cd/dvd mounted. Please do that..\n")); return -1; } } else { - fprintf(stderr, "[Error] An error occured while getting mounted file system information\n"); + fprintf( stderr, _("[Error] An error occured while getting mounted file system information\n")); return -1; } @@ -426,8 +432,8 @@ /* Try to open the mnttab info */ if (( mnttab_fp = fopen( "/etc/mnttab", "r" ) ) == NULL) { - fprintf( stderr, "[Error] Could not open mnttab for searching!\n" ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Could not open mnttab for searching!\n") ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); return -1; } @@ -443,7 +449,7 @@ /* no cd found? Then user should mount it */ if (dvd_count == 0) { - fprintf(stderr, "[Error] There seems to be no cd/dvd mounted. Please do that..\n"); + fprintf( stderr, _("[Error] There seems to be no cd/dvd mounted. Please do that..\n")); return -1; } @@ -481,8 +487,9 @@ if( ( k = strstr( tmp_bufferin, "/dev/" ) ) == NULL ) { - fprintf( stderr, "[Error] Weird, no /dev/ entry found in the line where iso9660, udf or cdrom gets mentioned in /etc/mtab\n" ); - return -1; + fprintf( stderr, _("[Error] Weird, no /dev/ entry found in the line where iso9660, udf or cdrom gets mentioned in /etc/mtab\n") ); + dvd_count--; + continue; } while(isgraph( (int) *(k) )) @@ -497,7 +504,7 @@ if(isdigit((int)device[l-1])) { if( strstr( device, "hd" ) ) - fprintf(stderr, "[Hint] Hmm, the last char in the device path %s is a number.\n", device ); + fprintf( stderr, _("[Hint] Hmm, the last char in the device path %s is a number.\n"), device ); } /*The syntax of /etc/fstab and mtab seems to be something like this: @@ -553,14 +560,14 @@ if(dvd_count == 0) { /* no cd found? Then user should mount it */ - fprintf(stderr, "[Error] There seems to be no cd/dvd mounted. Please do that..\n"); + fprintf( stderr, _("[Error] There seems to be no cd/dvd mounted. Please do that..\n")); return -1; } } else { - fprintf(stderr, "[Error] Could not read /etc/mtab!"); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("[Error] Could not read /etc/mtab!")); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); return -1; } #endif @@ -667,3 +674,107 @@ also defined as off_t */ } +/*dvdtime2msec, converttime and get_longest_title are copy-paste'd from lsdvd*/ + +int dvdtime2msec(dvd_time_t *dt) +{ + double frames_per_s[4] = {-1.0, 25.00, -1.0, 29.97}; + double fps = frames_per_s[(dt->frame_u & 0xc0) >> 6]; + long ms; + ms = (((dt->hour & 0xf0) >> 3) * 5 + (dt->hour & 0x0f)) * 3600000; + ms += (((dt->minute & 0xf0) >> 3) * 5 + (dt->minute & 0x0f)) * 60000; + ms += (((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f)) * 1000; + + if(fps > 0) + ms += ((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f) * 1000.0 / fps; + + return ms; +} + + +void converttime(playback_time_t *pt, dvd_time_t *dt) +{ + double frames_per_s[4] = {-1.0, 25.00, -1.0, 29.97}; + double fps = frames_per_s[(dt->frame_u & 0xc0) >> 6]; + + pt->usec = pt->usec + ((dt->frame_u & 0x30) >> 3) * 5 + (dt->frame_u & 0x0f) * 1000.0 / fps; + pt->second = pt->second + ((dt->second & 0xf0) >> 3) * 5 + (dt->second & 0x0f); + pt->minute = pt->minute + ((dt->minute & 0xf0) >> 3) * 5 + (dt->minute & 0x0f); + pt->hour = pt->hour + ((dt->hour & 0xf0) >> 3) * 5 + (dt->hour & 0x0f); + + if ( pt->usec >= 1000 ) { pt->usec -= 1000; pt->second++; } + if ( pt->second >= 60 ) { pt->second -= 60; pt->minute++; } + if ( pt->minute > 59 ) { pt->minute -= 60; pt->hour++; } +} + + +int get_longest_title( dvd_reader_t *dvd ) +{ +/* dvd_reader_t *dvd; */ + ifo_handle_t *ifo_zero, **ifo; + pgcit_t *vts_pgcit; + vtsi_mat_t *vtsi_mat; + vmgi_mat_t *vmgi_mat; + video_attr_t *video_attr; + pgc_t *pgc; + int i, j, titles, vts_ttn, title_set_nr; + int max_length = 0, max_track = 0; + struct dvd_info dvd_info; + + + ifo_zero = ifoOpen(dvd, 0); + if ( !ifo_zero ) { + fprintf( stderr, "Can't open main ifo!\n"); + return 3; + } + + ifo = (ifo_handle_t **)malloc((ifo_zero->vts_atrt->nr_of_vtss + 1) * sizeof(ifo_handle_t *)); + + for (i=1; i <= ifo_zero->vts_atrt->nr_of_vtss; i++) { + ifo[i] = ifoOpen(dvd, i); + if ( !ifo[i] ) { + fprintf( stderr, "Can't open ifo %d!\n", i); + return 4; + } + } + + + titles = ifo_zero->tt_srpt->nr_of_srpts; + + vmgi_mat = ifo_zero->vmgi_mat; + + +/* dvd_info.discinfo.device = dvd_device; */ +/* dvd_info.discinfo.disc_title = has_title ? "unknown" : title; */ + dvd_info.discinfo.vmg_id = vmgi_mat->vmg_identifier; + dvd_info.discinfo.provider_id = vmgi_mat->provider_identifier; + + dvd_info.title_count = titles; + dvd_info.titles = calloc(titles, sizeof(*dvd_info.titles)); + + for (j=0; j < titles; j++) + { + +/* GENERAL */ + if (ifo[ifo_zero->tt_srpt->title[j].title_set_nr]->vtsi_mat) { + + vtsi_mat = ifo[ifo_zero->tt_srpt->title[j].title_set_nr]->vtsi_mat; + vts_pgcit = ifo[ifo_zero->tt_srpt->title[j].title_set_nr]->vts_pgcit; + video_attr = &vtsi_mat->vts_video_attr; + vts_ttn = ifo_zero->tt_srpt->title[j].vts_ttn; + vmgi_mat = ifo_zero->vmgi_mat; + title_set_nr = ifo_zero->tt_srpt->title[j].title_set_nr; + pgc = vts_pgcit->pgci_srp[ifo[title_set_nr]->vts_ptt_srpt->title[vts_ttn - 1].ptt[0].pgcn - 1].pgc; + + dvd_info.titles[j].general.length = dvdtime2msec(&pgc->playback_time)/1000.0; + converttime(&dvd_info.titles[j].general.playback_time, &pgc->playback_time); + dvd_info.titles[j].general.vts_id = vtsi_mat->vts_identifier; + + if (dvdtime2msec(&pgc->playback_time) > max_length) { + max_length = dvdtime2msec(&pgc->playback_time); + max_track = j+1; + } + } + } + return max_track; +} | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/dvd.h ^ |
@@ -3,4 +3,76 @@ int get_dvd_name(const char *, char *); int get_device(char *, char *); int get_device_on_your_own(char *, char *); -off_t get_vob_size(int , char *); +off_t get_vob_size(int , char *); +/* int dvdtime2msec(dvd_time_t *); */ +/* void converttime(playback_time_t *, dvd_time_t *); */ +int get_longest_title( dvd_reader_t * ); +typedef struct { + int hour; + int minute; + int second; + int usec; +} playback_time_t; + + +struct dvd_info { + struct { + char *device; + char *disc_title; + char *vmg_id; + char *provider_id; + } discinfo; + int title_count; + struct { + int enabled; + struct { + float length; + playback_time_t playback_time; + char *vts_id; + } general; + struct { + int vts; + int ttn; + float fps; + char *format; + char *aspect; + char *width; + char *height; + char *df; + } parameter; + int angle_count; /* no real angle detail is available... but hey. */ + int audiostream_count; + struct { + char *langcode; + char *language; + char *format; + char *frequency; + char *quantization; + int channels; + int ap_mode; + char *content; + int streamid; + } *audiostreams; + int chapter_count_reported; /* This value is sometimes wrong */ + int chapter_count; /* This value is real */ + struct { + float length; + playback_time_t playback_time; + int startcell; + } *chapters; + int cell_count; + struct { + float length; + playback_time_t playback_time; + } *cells; + int subtitle_count; + struct { + char *langcode; + char *language; + char *content; + int streamid; + } *subtitles; + int *palette; + } *titles; + int longest_track; +}; | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/vobcopy.1 ^ |
@@ -1,7 +1,7 @@ .\" Process this file with .\" groff -man -Tascii vobcopy.1 .\" -.TH VOBCOPY 1 "Jan 2008" Linux "User Manuals" +.TH VOBCOPY 1 "Jun 2009" Linux "User Manuals" .SH NAME vobcopy \- copy (rip) files from a dvd to the harddisk .SH SYNOPSIS @@ -13,7 +13,7 @@ .I fast_factor .B ] [-h] [-i .I input-dir -.B ] [-l] [-m] [-n +.B ] [-l] [-m] [-M][-n .I title-number .B ] [-o .I output-dir @@ -21,7 +21,7 @@ .I single_file(s)_to_rip .B ] [-t .I name -.B ] [-v [-v]] [-I] [-V] [-L +.B ] [-v [-v]] [-x] [-I] [-V] [-L .I logfile-path .B ] [-1 .I aux_output_dir1 @@ -49,7 +49,7 @@ Some people have hacked CSS decryption routines, and one of those is available as a libdvdread counterpart. So if you have such a DVD, have a look at the libdvdread page. If you are positive that it's allowed -where you live, you can just install the library and make decrypted +where you live, you can just install that mentioned library and make decrypted backups of all your DVDs... .BR vobcopy @@ -71,6 +71,8 @@ provide vobcopy with the path to the mounted dvd drive .IP "-l, --large-file" write data into one file (needs large file support (LFS)) +.IP "-M, --longest" +choose the title with the longest playing time. With some DVDs this gets the main title better than the most chapter method, with others it's worse. .IP "-m, --mirror" mirrors the whole dvd to harddisk. It will create a directory named after the dvd and copy the ifo, bup and vob files there. The title-vobs are decrypted during this. .IP "-n, --title-number TITLE-NUMBER" @@ -91,6 +93,8 @@ .IP "-v -v" prints the information given on command line into a log-file in the current directory for inclusion into a bugreport. +.IP "-x" +overwrite all existing files without further questions. .IP "-L LOGFILE-PATH" tells vobcopy where to put the logfile instead of the default. .IP "-I, --info" | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/vobcopy.1.de ^ |
@@ -2,7 +2,7 @@ .\" groff -man -Tascii vobcopy.1 .\" verarbeiten .\" -.TH VOBCOPY 1 "Jan 2007" Linux "User Manuals" +.TH VOBCOPY 1 "Jun 2009" Linux "User Manuals" .SH NAME vobcopy \- kopiert (rippt) Dateien von einer (Video-) DVD auf die Festplatte .SH SYNTAX @@ -14,7 +14,7 @@ .I Beschleunigungsfaktor .B ] [-h] [-i .I Eingabeverzeichnis -.B ] [-l] [-m] [-n +.B ] [-l] [-m] [-m][-n .I Titel-Nummer .B ] [-o .I Ausgabeverzeichnis @@ -22,7 +22,7 @@ .I einzelne zu kopierende Datei .B ] [-t .I Name -.B ] [-v [-v]] [-I] [-V] [-L +.B ] [-v [-v]] [-x] [-I] [-V] [-L .I Logdatei-Pfad .B ] [-1 .I zusätzliches Ausgabeverzeichnis 1 @@ -48,9 +48,9 @@ angepriesen, wobei es sich eher um einen "Anschauschutz" handelt, da es DVD Material unanschaubar auf unlizensierten Abspielgeräten macht. Einige Leute haben jedoch diese CSS Entschlüsselungs-Routinen geknackt und eine dieser -Routinen ist als Erweiterung zu libdvdread (siehe Seite) erhältlich. +Routinen ist als Erweiterung zu libdvdread (siehe deren Webseite) erhältlich. .BR vobcopy -Bei Aufruf ohne Optionen wird der Titel mit den meisten Kapiteln in Dateien +Beim Aufruf ohne jegliche Optionen wird der Titel mit den meisten Kapiteln in Dateien von 2GB Größe in das aktuelle Verzeichnis kopiert. .SH OPTIONEN .IP "-b, --begin GRÖSSE[bkmg]" @@ -75,6 +75,8 @@ gemountet ist). .IP "-l, --large-file" schreibt alle Daten in eine große Datei ( > 2GB, benötigt Unterstützung für große Dateien (LFS)) +.IP "-M, --longest" +wählt den Titel mit der längsten Spielzeit. Bei manchen DVDs wird der Hauptfilm besser gefunden als mit der Methode der meisten Kapitel, bei manchen schlechter. .IP "-m, --mirror" Spiegelt die gesamte DVD auf die Festplatte. Es wird ein Unterverzeichnis mit dem DVD-Namen erzeugt und die gesamte Dateistruktur des Videoteils wird darunter @@ -105,7 +107,9 @@ schreibt noch mehr Informationen aus. .IP "-v -v" schreibt die Ausschriften in eine Logdatei im aktuellen Verzeichis um einen Fehlerreport -zu erzeugen. +zu erzeugen. +.IP "-x" +überschreibt alle existierenden Dateien ohne weitere Rückfragen. .IP "-L LOGDATEI-PFAD" weist vobcopy an die Logdatei statt in den Standardpfad in den LOGDATEI-PFAD zu legen. .IP "-I, --info" | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/vobcopy.c ^ |
@@ -1,6 +1,6 @@ -/* vobcopy 1.1.0 +/* vobcopy 1.2.0 * - * Copyright (c) 2001 - 2007 robos@muon.de + * Copyright (c) 2001 - 2009 robos@muon.de * Lots of contribution and cleanup from rosenauer@users.sourceforge.net * Critical bug-fix from Bas van den Heuvel * Takeshi HIYAMA made lots of changes to get it to run on FreeBSD @@ -18,8 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with vobcopy; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with vobcopy; if not, see <http://www.gnu.org/licenses/>. */ /* CONTRIBUTORS (direct or through source "borrowing") @@ -56,7 +55,8 @@ extern int errno; char name[300]; bool overwrite_flag = FALSE; - +bool overwrite_all_flag = FALSE; +int overall_skipped_blocks = 0; /* --------------------------------------------------------------------------*/ /* MAIN */ @@ -65,7 +65,7 @@ int main ( int argc, char *argv[] ) { int streamout, block_count, blocks, file_block_count; - char op; + int op; char dvd_path[255], logfile_name[20],logfile_path[280]="\0"; /* TODO: fill logfile_path with all zeros so that " if strncpy() finds the source too long IT DOES NOT TERMINATE the sink, so the following strcat() is undefined and potentially fatal." - Thanks Leigh!*/ @@ -74,7 +74,7 @@ char pwd[255],provided_output_dir[255],provided_input_dir[255]; char alternate_output_dir[4][255], onefile[255]; unsigned char bufferin[ DVD_VIDEO_LB_LEN * BLOCK_COUNT ]; - int i = 0,j = 0, l = 0, argc_i = 0, alternate_dir_count = 0; + int i = 0,j = 0, argc_i = 0, alternate_dir_count = 0; int partcount = 0, get_dvd_name_return, options_char = 0; int dvd_count = 0, verbosity_level = 0, paths_taken = 0, fast_factor = 1; int watchdog_minutes = 0; @@ -91,8 +91,10 @@ bool mirror_flag = FALSE, provided_dvd_name_flag = FALSE; bool stdout_flag = FALSE, space_greater_2gb_flag = TRUE; bool fast_switch = FALSE, onefile_flag = FALSE; - bool quiet_flag = FALSE; + bool quiet_flag = FALSE, longest_title_flag = FALSE; struct stat buf; + float lastpos = 0; + int starttime; dvd_reader_t *dvd = NULL; dvd_file_t *dvd_file = NULL; @@ -139,6 +141,7 @@ {"input-dir", 1, 0, 'i'}, {"info", 0, 0, 'I'}, {"large-file", 0, 0, 'l'}, + {"longest", 0, 0, 'M'}, {"mirror", 0, 0, 'm'}, {"title-number", 1, 0, 'n'}, {"output-dir", 1, 0, 'o'}, @@ -148,12 +151,20 @@ {"verbose", 0, 0, 'v'}, {"version", 0, 0, 'V'}, {"watchdog", 1, 0, 'w'}, - /* {"test", 1, 0, 'test'}, */ + {"overwrite-all", 0, 0, 'x'}, {0, 0, 0, 0} }; #endif + /*for gettext - i18n */ +#if defined( __gettext__ ) + setlocale(LC_ALL, ""); + textdomain("vobcopy"); + bindtextdomain("vobcopy", "/usr/share/locale"); +#endif + /* initialize string */ + dvd_path[0] = '\0'; /* * the getopt part (getting the options from command line) @@ -162,33 +173,28 @@ { #ifdef HAVE_GETOPT_LONG options_char = getopt_long( argc, argv, - "1:2:3:4:a:b:c:e:i:n:o:qO:t:vfF:lmhL:Vw:I", + "1:2:3:4:a:b:c:e:i:n:o:qO:t:vfF:lmMhL:Vw:Ix", long_options ,&option_index); #else - options_char = getopt( argc, argv, "1:2:3:4:a:b:c:e:i:n:o:qO:t:vfF:lmhL:Vw:I-" ); + options_char = getopt( argc, argv, "1:2:3:4:a:b:c:e:i:n:o:qO:t:vfF:lmMhL:Vw:Ix-" ); #endif if ( options_char == -1 ) break; switch( options_char ) { - /* debug */ - /* case'test': */ - /* fprintf( stderr, "%s aufruf %s\n", long_options[option_index].name ,optarg ); */ - /* exit(0); */ - /* break; */ case'a': /*angle*/ if ( !isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] The thing behind -a has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -a has to be a number! \n") ); exit(1); } sscanf( optarg, "%i", &angle ); angle--;/*in the ifo they start at zero */ if (angle < 0) { - fprintf( stderr, "[Hint] Um, you set angle to 0, try 1 instead ;-)\n" ); + fprintf( stderr, _("[Hint] Um, you set angle to 0, try 1 instead ;-)\n") ); exit(1); } break; @@ -196,14 +202,14 @@ case'b': /*size to skip from the beginning (beginning-offset) */ if ( !isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] The thing behind -b has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -b has to be a number! \n") ); exit(1); } temp_var = atol( optarg ); size_suffix = strpbrk( optarg, "bkmgBKMG" ); if( !size_suffix) { - fprintf( stderr, "[Error] Wrong suffix behind -b, only b,k,m or g \n" ); + fprintf( stderr, _("[Error] Wrong suffix behind -b, only b,k,m or g \n") ); exit(1); } @@ -226,7 +232,7 @@ temp_var *= ( 1024 * 1024 * 1024 );/*wow, giga *g */ break; case'?': - fprintf( stderr, "[Error] Wrong suffix behind -b, only b,k,m or g \n" ); + fprintf( stderr, _("[Error] Wrong suffix behind -b, only b,k,m or g \n") ); exit(1); break; } @@ -240,7 +246,7 @@ case'c': /*chapter*/ /*NOT WORKING!!*/ if ( !isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] The thing behind -c has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -c has to be a number! \n") ); exit(1); } sscanf( optarg, "%i", &chapid ); @@ -250,14 +256,14 @@ case'e': /*size to stop from the end (end-offset) */ if ( !isdigit( (int) optarg[0] ) ) { - fprintf( stderr, "[Error] The thing behind -e has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -e has to be a number! \n") ); exit(1); } temp_var = atol( optarg ); size_suffix = strpbrk( optarg, "bkmgBKMG" ); if( !size_suffix) { - fprintf( stderr, "[Error] Wrong suffix behind -b, only b,k,m or g \n" ); + fprintf( stderr, _("[Error] Wrong suffix behind -b, only b,k,m or g \n") ); exit(1); } switch( *size_suffix ) @@ -279,7 +285,7 @@ temp_var *= ( 1024 * 1024 * 1024 );/*wow, giga *g */ break; case'?': - fprintf( stderr, "[Error] Wrong suffix behind -b, only b,k,m or g \n" ); + fprintf( stderr, _("[Error] Wrong suffix behind -b, only b,k,m or g \n") ); exit(1); break; } @@ -302,21 +308,21 @@ case'i': /*input dir, if the automatic needs to be overridden */ if ( isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] Erm, the number comes behind -n ... \n" ); + fprintf( stderr, _("[Error] Erm, the number comes behind -n ... \n") ); exit(1); } - fprintf( stderr, "[Hint] You use -i. Normally this is not necessary, vobcopy finds the input dir by itself. This option is only there if vobcopy makes trouble.\n" ); - fprintf( stderr, "[Hint] If vobcopy makes trouble, please mail me so that I can fix this (robos@muon.de). Thanks\n" ); + fprintf( stderr, _("[Hint] You use -i. Normally this is not necessary, vobcopy finds the input dir by itself. This option is only there if vobcopy makes trouble.\n") ); + fprintf( stderr, _("[Hint] If vobcopy makes trouble, please mail me so that I can fix this (robos@muon.de). Thanks\n") ); safestrncpy( provided_input_dir, optarg, sizeof(provided_input_dir)-1 ); if( strstr( provided_input_dir, "/dev" ) ) { - fprintf( stderr, "[Error] Please don't use -i /dev/something in this version, only the next version will support this again.\n" ); - fprintf( stderr, "[Hint] Please use the mount point instead (/cdrom, /dvd, /mnt/dvd or something)\n" ); + fprintf( stderr, _("[Error] Please don't use -i /dev/something in this version, only the next version will support this again.\n") ); + fprintf( stderr, _("[Hint] Please use the mount point instead (/cdrom, /dvd, /mnt/dvd or something)\n") ); } provided_input_dir_flag = TRUE; break; -#if defined( HAS_LARGEFILE ) +#if defined( HAS_LARGEFILE ) || defined( MAC_LARGEFILE ) case'l': /*large file output*/ max_filesize_in_blocks = 8388608; /*16 GB /2048 (block) */ /* 2^63 / 2048 (not exactly) */ @@ -329,10 +335,15 @@ info_flag = TRUE; break; + case'M':/*Main track - i.e. the longest track on the dvd*/ + titleid_flag = TRUE; + longest_title_flag = TRUE; + break; + case'n': /*title number*/ if ( !isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] The thing behind -n has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -n has to be a number! \n") ); exit(1); } sscanf( optarg, "%i", &titleid ); @@ -342,7 +353,7 @@ case'o': /*output destination */ if ( isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Hint] Erm, the number comes behind -n ... \n" ); + fprintf( stderr, _("[Hint] Erm, the number comes behind -n ... \n") ); } safestrncpy( provided_output_dir, optarg, sizeof(provided_output_dir)-1 ); if ( !strcasecmp( provided_output_dir, "stdout" ) || !strcasecmp( provided_output_dir, "-" ) ) @@ -368,13 +379,13 @@ case'4': if( alternate_dir_count < options_char - 48 ) { - fprintf( stderr, "[Error] Please specify output dirs in this order: -o -1 -2 -3 -4 \n" ); + fprintf( stderr, _("[Error] Please specify output dirs in this order: -o -1 -2 -3 -4 \n") ); exit( 1 ); } if ( isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Hint] Erm, the number comes behind -n ... \n" ); + fprintf( stderr, _("[Hint] Erm, the number comes behind -n ... \n") ); } safestrncpy( alternate_output_dir[ options_char-49 ], optarg, sizeof(alternate_output_dir[ options_char-49 ])-1 ); provided_output_dir_flag = TRUE; @@ -393,41 +404,52 @@ stdout_flag = TRUE; force_flag = TRUE; } + for( i=0; i< strlen(provided_dvd_name);i++ ) + { + if( provided_dvd_name[i] == ' ') + provided_dvd_name[i] = '_'; + } + break; case'v': /*verbosity level, can be called multiple times*/ verbose_flag = TRUE; verbosity_level++; break; - case'F': /*Fast-switch*/ + + case'w': /*sets a watchdog timer to cap the amount of time spent + grunging about on a heavily protected disc */ if ( !isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] The thing behind -F has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -w has to be a number! \n") ); exit(1); } - sscanf( optarg, "%i", &fast_factor ); - if( fast_factor > BLOCK_COUNT ) /*atm is BLOCK_COUNT == 64 */ + sscanf( optarg, "%i", &watchdog_minutes ); + if( watchdog_minutes < 1 ) { - fprintf( stderr, "[Hint] The largest value for -F is %d at the moment - used that one...\n", BLOCK_COUNT ); - fast_factor = BLOCK_COUNT; + fprintf( stderr, _("[Hint] Negative minutes aren't allowed - disabling watchdog.\n") ); + watchdog_minutes = 0; } + break; - fast_switch = TRUE; + case'x': /*overwrite all existing files without (further) question */ + overwrite_all_flag = TRUE; break; - case'w': /*sets a watchdog timer to cap the amount of time spent - grunging about on a heavily protected disc */ + case'F': /*Fast-switch*/ if ( !isdigit( (int) *optarg ) ) { - fprintf( stderr, "[Error] The thing behind -w has to be a number! \n" ); + fprintf( stderr, _("[Error] The thing behind -F has to be a number! \n") ); exit(1); } - sscanf( optarg, "%i", &watchdog_minutes ); - if( watchdog_minutes < 1 ) + sscanf( optarg, "%i", &fast_factor ); + if( fast_factor > BLOCK_COUNT ) /*atm is BLOCK_COUNT == 64 */ { - fprintf( stderr, "[Hint] Negative minutes aren't allowed - disabling watchdog.\n" ); - watchdog_minutes = 0; + fprintf( stderr, _("[Hint] The largest value for -F is %d at the moment - used that one...\n"), BLOCK_COUNT ); + fast_factor = BLOCK_COUNT; } + + fast_switch = TRUE; break; case'I': /*info, doesn't do anything, but simply prints some infos @@ -466,33 +488,33 @@ i = 0; break; case'V': /*version number output */ - printf( "Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2007 robos@muon.de\n" ); + printf( "Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n" ); exit( 0 ); break; case'?': /*probably never gets here, the others should catch it */ - fprintf( stderr, "[Error] Wrong option.\n" ); + fprintf( stderr, _("[Error] Wrong option.\n") ); usage( argv[0] ); exit( 1 ); break; #ifndef HAVE_GETOPT_LONG case'-': /* no getopt, complain */ - fprintf( stderr, "[Error] %s was compiled without support for long options.\n", argv[0] ); + fprintf( stderr, _("[Error] %s was compiled without support for long options.\n"), argv[0] ); usage( argv[0] ); exit( 1 ); break; #endif default: /*probably never gets here, the others should catch it */ - fprintf( stderr, "[Error] Wrong option.\n" ); + fprintf( stderr, _("[Error] Wrong option.\n") ); usage( argv[0] ); exit( 1 ); } } - fprintf( stderr, "Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2007 robos@muon.de\n" ); - fprintf( stderr, "[Hint] All lines starting with \"libdvdread:\" are not from vobcopy but from the libdvdread-library\n" ); + fprintf( stderr, _("Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n") ); + fprintf( stderr, _("[Hint] All lines starting with \"libdvdread:\" are not from vobcopy but from the libdvdread-library\n") ); /*get the current working directory*/ if ( provided_output_dir_flag ) @@ -503,14 +525,15 @@ { if ( getcwd( pwd, 255 ) == NULL ) { - fprintf( stderr, "\n[Error] Hmm, the path length of your current directory is really large (>255)\n" ); - fprintf( stderr, "[Hint] Change to a path with shorter path length pleeeease ;-)\n" ); + fprintf( stderr, _("\n[Error] Hmm, the path length of your current directory is really large (>255)\n") ); + fprintf( stderr, _("[Hint] Change to a path with shorter path length pleeeease ;-)\n") ); exit( 1 ); } } add_end_slash( pwd ); + if( quiet_flag ) { int temp; @@ -518,16 +541,22 @@ strcpy( tmp_path, pwd ); strcat( tmp_path, "vobcopy.bla" ); - fprintf( stderr, "[Hint] Quiet mode - All messages will now end up in %s\n", tmp_path ); - if ( ( temp = open( tmp_path , O_CREAT | O_EXCL ) ) == -1 ) + fprintf( stderr, _("[Hint] Quiet mode - All messages will now end up in %s\n"), tmp_path ); + if ( ( temp = open( tmp_path , O_RDWR | O_CREAT | O_EXCL, 0666 ) ) == -1 ) { - printf( "[Error] Error: %s\n", strerror( errno ) ); if ( errno == EEXIST ) { - printf( "\n[Error] The file %s already exists. Since overwriting it can be seen as a security problem I stop here.\n", tmp_path ); - printf( "[Hint] Use -f to override or simply delete that file\n" ); if ( !force_flag ) - exit( 1 ); + { + printf( "[Error] Error: %s\n", strerror( errno ) ); + printf( "\n[Error] The file %s already exists. Since overwriting it can be seen as a security problem I stop here.\n", tmp_path ); + printf( "[Hint] Use -f to override or simply delete that file\n" ); + exit( 1 ); + } + else + { + printf( "[Warning] Overwriting %s as requested with -f\n", tmp_path ); + } } else { @@ -567,7 +596,7 @@ if( verbosity_level > 1 ) /* this here starts writing the logfile */ { int temp; - fprintf( stderr, "[Info] Uhu, super-verbose\n" ); + fprintf( stderr, _("[Info] Uhu, super-verbose\n") ); if( strlen( logfile_path ) < 3 ) strcpy( logfile_path, pwd ); @@ -575,7 +604,7 @@ strcat( logfile_name, VERSION ); strcat( logfile_name, ".log" ); strcat( logfile_path, logfile_name ); - if ( ( temp = open ( logfile_path , O_CREAT | O_EXCL ) ) == -1 ) + if ( ( temp = open ( logfile_path , O_RDWR | O_CREAT | O_EXCL, 0666 ) ) == -1 ) { printf( "[Error] Error: %s\n", strerror( errno ) ); if ( errno == EEXIST ) @@ -607,9 +636,9 @@ } - fprintf( stderr, "[Info] The log-file is written to %s\n", logfile_path ); - fprintf( stderr, "[Hint] Make sure that vobcopy doesn't have to ask questions (like overwriting of old files), these questions end up in the log file so you don't see them...\n" ); - fprintf( stderr, "[Hint] If you don't like that position, use -L /path/to/logfile/ instead of -v -v\n" ); + fprintf( stderr, _("[Info] The log-file is written to %s\n"), logfile_path ); + fprintf( stderr, _("[Hint] Make sure that vobcopy doesn't have to ask questions (like overwriting of old files), these questions end up in the log file so you don't see them...\n") ); + fprintf( stderr, _("[Hint] If you don't like that position, use -L /path/to/logfile/ instead of -v -v\n") ); if ( freopen( logfile_path, "a" , stderr ) == NULL ) { @@ -625,14 +654,14 @@ strcat( vobcopy_call, " " ); strcat( vobcopy_call, argv[argc_i] ); } - fprintf( stderr, "--------------------------------------------------------------------------------\n" ); - fprintf( stderr, "[Info] Called: %s\n", vobcopy_call ); + fprintf( stderr, _("--------------------------------------------------------------------------------\n") ); + fprintf( stderr, _("[Info] Called: %s\n"), vobcopy_call ); } /*sanity check: -m and -n are mutually exclusive... */ if( titleid_flag && mirror_flag ) { - fprintf( stderr, "\n[Error] There can be only one: either -m or -n...'\n" ); + fprintf( stderr, _("\n[Error] There can be only one: either -m or -n...'\n") ); exit( 1 ); } @@ -645,7 +674,7 @@ provided_input_dir_flag = TRUE; if ( strlen( argv[optind] ) >= 255 ) { - fprintf( stderr, "\n[Error] Bloody path to long '%s'\n", argv[optind] ); + fprintf( stderr, _("\n[Error] Bloody path to long '%s'\n"), argv[optind] ); exit( 1 ); } safestrncpy( provided_input_dir, argv[optind],sizeof(provided_input_dir)-1 ); @@ -657,8 +686,9 @@ /* 'mounted' is an enum, it should not get assigned an int -- lb */ if ( ( result = get_device( provided_input_dir, dvd_path ) ) < 0 ) { - fprintf( stderr, "[Error] Could not get the device which belongs to the given path!\n" ); - exit( 1 ); + fprintf( stderr, _("[Error] Could not get the device which belongs to the given path!\n") ); + fprintf( stderr, _("[Hint] Will try to open it as a directory/image file\n") ); + /* exit( 1 ); */ } if (result == 0) mounted = FALSE; @@ -670,24 +700,33 @@ { if ( ( dvd_count = get_device_on_your_own( provided_input_dir, dvd_path ) ) <= 0 ) { - fprintf( stderr, "[Error] Could not get the device and path! Maybe not mounted the dvd?\n" ); - exit( 1 ); + fprintf( stderr, _("[Warning] Could not get the device and path! Maybe not mounted the dvd?\n") ); + fprintf( stderr, _("[Hint] Will try to open it as a directory/image file\n") ); + /* exit( 1 ); */ } if( dvd_count > 0 ) mounted = TRUE; + else + mounted = FALSE; + } + + if (! mounted ) + { + /*see if the path given is a iso file or a VIDEO_TS dir */ + safestrncpy( dvd_path, provided_input_dir, sizeof(dvd_path)-1 ); } /* * Is the path correct */ - fprintf( stderr, "\n[Info] Path to dvd: %s\n", dvd_path ); + fprintf( stderr, _("\n[Info] Path to dvd: %s\n"), dvd_path ); if( !( dvd = DVDOpen( dvd_path ) ) ) { - fprintf( stderr, "\n[Error] Path thingy didn't work '%s'\n", dvd_path); - fprintf( stderr, "[Error] Try something like -i /cdrom, /dvd or /mnt/dvd \n" ); + fprintf( stderr, _("\n[Error] Path thingy didn't work '%s'\n"), dvd_path); + fprintf( stderr, _("[Error] Try something like -i /cdrom, /dvd or /mnt/dvd \n") ); if( dvd_count > 1 ) - fprintf( stderr, "[Hint] By the way, you have %i cdroms|dvds mounted, that probably caused the problem\n", dvd_count ); + fprintf( stderr, _("[Hint] By the way, you have %i cdroms|dvds mounted, that probably caused the problem\n"), dvd_count ); DVDClose( dvd ); exit( 1 ); } @@ -695,15 +734,11 @@ /* * this here gets the dvd name */ - if( !provided_dvd_name_flag ) - { - get_dvd_name_return = get_dvd_name( dvd_path, dvd_name ); - fprintf( stderr, "[Info] Name of the dvd: %s\n", dvd_name ); - } + if ( provided_dvd_name_flag ) + safestrncpy( dvd_name, provided_dvd_name, sizeof(dvd_name)-1 ); else - { - safestrncpy( dvd_name, provided_dvd_name, sizeof(dvd_name)-1 ); - } + get_dvd_name_return = get_dvd_name( dvd_path, dvd_name ); + fprintf( stderr, _("[Info] Name of the dvd: %s\n"), dvd_name ); /* The new part taken from play-title.c*/ @@ -714,7 +749,7 @@ vmg_file = ifoOpen( dvd, 0 ); if( !vmg_file ) { - fprintf( stderr, "[Error] Can't open VMG info.\n" ); + fprintf( stderr, _("[Error] Can't open VMG info.\n") ); DVDClose( dvd ); return -1; } @@ -736,6 +771,11 @@ } + if( longest_title_flag ) /*no title specified (-n ) */ + { + titleid = get_longest_title( &dvd ); + fprintf( stderr, _("[Info] longest title %d.\n"), titleid ); + } if( !titleid_flag ) /*no title specified (-n ) */ { @@ -746,11 +786,11 @@ /** * Make sure our title number is valid. */ - fprintf( stderr, "[Info] There are %d titles on this DVD.\n", + fprintf( stderr, _("[Info] There are %d titles on this DVD.\n"), tt_srpt->nr_of_srpts ); if( titleid <= 0 || ( titleid-1 ) >= tt_srpt->nr_of_srpts ) { - fprintf( stderr, "[Error] Invalid title %d.\n", titleid ); + fprintf( stderr, _("[Error] Invalid title %d.\n"), titleid ); ifoClose( vmg_file ); DVDClose( dvd ); return -1; @@ -761,21 +801,21 @@ * Make sure the chapter number is valid for this title. */ - fprintf( stderr, "[Info] There are %i chapters on the dvd.\n", sum_chapters ); - fprintf( stderr, "[Info] Most chapters has title %i with %d chapters.\n", + fprintf( stderr, _("[Info] There are %i chapters on the dvd.\n"), sum_chapters ); + fprintf( stderr, _("[Info] Most chapters has title %i with %d chapters.\n"), ( most_chapters + 1 ), tt_srpt->title[ most_chapters ].nr_of_ptts ); if( info_flag ) { - fprintf( stderr, "[Info] All titles:\n" ); + fprintf( stderr, _("[Info] All titles:\n") ); for( i = 0;i < tt_srpt->nr_of_srpts;i++ ) { int chapters = tt_srpt->title[ i ].nr_of_ptts; if( chapters > 1 ) - fprintf( stderr, "[Info] Title %i has %d chapters.\n", + fprintf( stderr, _("[Info] Title %i has %d chapters.\n"), ( i+1 ), chapters ); else - fprintf( stderr, "[Info] Title %i has %d chapter.\n", + fprintf( stderr, _("[Info] Title %i has %d chapter.\n"), ( i+1 ), chapters ); } @@ -785,7 +825,7 @@ if( chapid < 0 || chapid >= tt_srpt->title[ titleid-1 ].nr_of_ptts ) { - fprintf( stderr, "[Error] Invalid chapter %d\n", chapid + 1 ); + fprintf( stderr, _("[Error] Invalid chapter %d\n"), chapid + 1 ); ifoClose( vmg_file ); DVDClose( dvd ); return -1; @@ -799,10 +839,10 @@ sum_angles += tt_srpt->title[ i ].nr_of_angles; } - fprintf( stderr, "\n[Info] There are %d angles on this dvd.\n", sum_angles ); + fprintf( stderr, _("\n[Info] There are %d angles on this dvd.\n"), sum_angles ); if( angle < 0 || angle >= tt_srpt->title[ titleid-1 ].nr_of_angles ) { - fprintf( stderr, "[Error] Invalid angle %d\n", angle + 1 ); + fprintf( stderr, _("[Error] Invalid angle %d\n"), angle + 1 ); ifoClose( vmg_file ); DVDClose( dvd ); return -1; @@ -810,15 +850,15 @@ if( info_flag ) { - fprintf( stderr, "[Info] All titles:\n" ); + fprintf( stderr, _("[Info] All titles:\n") ); for(i = 0;i < tt_srpt->nr_of_srpts;i++ ) { int angles = tt_srpt->title[ i ].nr_of_angles; if( angles > 1 ) - fprintf( stderr, "[Info] Title %i has %d angles.\n", + fprintf( stderr, _("[Info] Title %i has %d angles.\n"), ( i+1 ), angles ); else - fprintf( stderr, "[Info] Title %i has %d angle.\n", + fprintf( stderr, _("[Info] Title %i has %d angle.\n"), ( i+1 ), angles ); } @@ -836,8 +876,8 @@ ( seek_start * 2048 ) - ( stop_before_end * 2048 ); if( vob_size == 0 || vob_size > 9663676416LL) /*9663676416 equals 9GB */ { - fprintf( stderr, "\n[Error] Something went wrong during the size detection of the" ); - fprintf( stderr, "\n[Error] vobs, size check at the end won't work (probably), but I continue anyway\n\n" ); + fprintf( stderr, _("\n[Error] Something went wrong during the size detection of the") ); + fprintf( stderr, _("\n[Error] vobs, size check at the end won't work (probably), but I continue anyway\n\n") ); vob_size = 0; } } @@ -866,7 +906,7 @@ if( watchdog_minutes ) { - fprintf( stderr, "\n[Info] Setting watchdog timer to %d minutes\n", watchdog_minutes ); + fprintf( stderr, _("\n[Info] Setting watchdog timer to %d minutes\n"), watchdog_minutes ); alarm( watchdog_minutes * 60 ); } @@ -876,9 +916,14 @@ if( mirror_flag ) {/*mirror beginning*/ - fprintf( stderr,"\n[Info] DVD-name: %s\n", dvd_name ); - fprintf( stderr, "[Info] Disk free: %.0f MB\n", (float) pwd_free / ( 1024*1024 ) ); - fprintf( stderr, "[Info] Vobs size: %.0f MB\n", (float) disk_vob_size / ( 1024*1024 ) ); + fprintf( stderr, _("\n[Info] DVD-name: %s\n"), dvd_name ); + if( provided_dvd_name_flag ) + { + fprintf( stderr, _("\n[Info] Your name for the dvd: %s\n"), provided_dvd_name ); + safestrncpy( dvd_name, provided_dvd_name, sizeof(dvd_name)-1 ); + } + fprintf( stderr, _("[Info] Disk free: %.0f MB\n"), (float) pwd_free / ( 1024*1024 ) ); + fprintf( stderr, _("[Info] Vobs size: %.0f MB\n"), (float) disk_vob_size / ( 1024*1024 ) ); if( ( force_flag || pwd_free > disk_vob_size ) && alternate_dir_count < 2 ) /* no dirs behind -1, -2 ... since its all in one dir */ { @@ -888,7 +933,7 @@ char output_file[255]; int i, start, title_nr = 0; off_t file_size; - double percent = 0, tmp_i = 0, tmp_file_size = 0; + double tmp_i = 0, tmp_file_size = 0; int k = 0; char d_name[256]; @@ -903,7 +948,7 @@ makedir ( name ); - fprintf( stderr,"[Info] Writing files to this dir: %s\n", name ); + fprintf( stderr, _("[Info] Writing files to this dir: %s\n"), name ); } /*TODO: substitute with open_dir function */ strcpy( video_ts_dir, provided_input_dir ); @@ -916,9 +961,9 @@ dir = opendir( video_ts_dir ); if ( dir == NULL ) { - fprintf( stderr, "[Error] Hmm, weird, the dir video_ts|VIDEO_TS on the dvd couldn't be opened\n"); - fprintf( stderr, "[Error] The dir to be opened was: %s\n", video_ts_dir ); - fprintf( stderr, "[Hint] Please mail me what your vobcopy call plus -v -v spits out\n"); + fprintf( stderr, _("[Error] Hmm, weird, the dir video_ts|VIDEO_TS on the dvd couldn't be opened\n")); + fprintf( stderr, _("[Error] The dir to be opened was: %s\n"), video_ts_dir ); + fprintf( stderr, _("[Hint] Please mail me what your vobcopy call plus -v -v spits out\n")); exit( 1 ); } } @@ -958,12 +1003,9 @@ { /*this parses every token without modifying the onefile var */ int len_begin; len_begin = tokenpos1 - tokenpos; - /* printf(" debug: len = %d tokenpos = %d tokenpos1 = %d\n", len_begin, tokenpos, tokenpos1 ); */ safestrncpy( tmp, tokenpos, len_begin ); tokenpos = tokenpos1 + 1; - /* printf(" debug: tokenpos = %d tokenpos1 = %d\n", tokenpos, tokenpos1 ); */ tmp[ len_begin ] = '\0'; - /* printf(" debug: token = %s\n", tmp ); */ if( strstr( d_name, tmp ) ) goto next; /*if the token is found in the d_name copy */ else @@ -973,7 +1015,6 @@ } else { - /* printf(" debug: onefile = %s\n", onefile ); */ if( !strstr( d_name, onefile ) ) /*maybe other way around */ { continue; @@ -993,7 +1034,7 @@ { if( strstr( d_name, ";?" ) ) { - fprintf( stderr, "\n[Hint] File on dvd ends in \";?\" (%s)\n", d_name ); + fprintf( stderr, _("\n[Hint] File on dvd ends in \";?\" (%s)\n"), d_name ); strncat( output_file, d_name, strlen( d_name ) - 2 ); } else @@ -1001,30 +1042,39 @@ strcat( output_file, d_name ); } - fprintf(stderr, "[Info] \nWriting to %s \n", output_file); + fprintf( stderr, _("[Info] Writing to %s \n"), output_file); if( open( output_file, O_RDONLY ) >= 0 ) { bool bSkip = FALSE; - fprintf( stderr,"\n[Error] File '%s' already exists, [o]verwrite, [s]kip or [q]uit? \n", output_file ); + + if ( overwrite_all_flag == FALSE ) + fprintf( stderr, _("\n[Error] File '%s' already exists, [o]verwrite, [x]overwrite all, [s]kip or [q]uit? "), output_file ); /*TODO: add [a]ppend and seek thought stream till point of append is there */ while ( 1 ) { - while ((op = fgetc (stdin)) == EOF) - usleep (1); - fgetc ( stdin ); /* probably need to do this for second - time it comes around this loop */ - if( op == 'o' ) + /* process a single character from stdin, ignore EOF bytes & newlines*/ + if ( overwrite_all_flag == TRUE ) + op = 'o'; + else + do { + op = fgetc (stdin); + } while(op == EOF || op == '\n'); + if( op == 'o' || op == 'x' ) { if( ( streamout = open( output_file, O_WRONLY | O_TRUNC ) ) < 0 ) { - fprintf( stderr, "\n[Error] Error opening file %s\n", output_file ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), output_file ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit ( 1 ); } else close (streamout); overwrite_flag = TRUE; + if( op == 'x' ) + { + overwrite_all_flag = TRUE; + } break; } else if( op == 'q' ) @@ -1040,7 +1090,7 @@ } else { - fprintf( stderr, "\n[Hint] Please choose [o]verwrite or [q]uit the next time ;-)\n" ); + fprintf( stderr, _("\n[Hint] Please choose [o]verwrite, [x]overwrite all, [s]kip, or [q]uit the next time ;-)\n") ); } } if( bSkip ) @@ -1051,25 +1101,35 @@ if( open( output_file, O_RDONLY ) >= 0 ) { - fprintf( stderr,"\n[Error] File '%s' already exists, [o]verwrite or [q]uit? \n", output_file ); + if ( overwrite_all_flag == FALSE ) + fprintf( stderr, _("\n[Error] File '%s' already exists, [o]verwrite, [x]overwrite all or [q]uit? \n"), output_file ); /*TODO: add [a]ppend and seek thought stream till point of append is there */ while ( 1 ) { - while ((op = fgetc (stdin)) == EOF) - usleep (1); - fgetc ( stdin ); /* probably need to do this for second - time it comes around this loop */ - if( op == 'o' ) + if ( overwrite_all_flag == TRUE ) + op = 'o'; + else + { + while ((op = fgetc (stdin)) == EOF) + usleep (1); + fgetc ( stdin ); /* probably need to do this for second + time it comes around this loop */ + } + if( op == 'o' || op == 'x' ) { if( ( streamout = open( output_file, O_WRONLY | O_TRUNC ) ) < 0 ) { - fprintf( stderr, "\n[Error] Error opening file %s\n", output_file ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), output_file ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit ( 1 ); } - else - close( streamout ); + /* else + close( streamout ); */ overwrite_flag = TRUE; + if ( op == 'x' ) + { + overwrite_all_flag = TRUE; + } break; } else if( op == 'q' ) @@ -1080,7 +1140,7 @@ } else { - fprintf( stderr, "\n[Hint] Please choose [o]verwrite or [q]uit the next time ;-)\n" ); + fprintf( stderr, _("\n[Hint] Please choose [o]verwrite, [x]overwrite all or [q]uit the next time ;-)\n") ); } } } @@ -1089,8 +1149,8 @@ /*assign the stream */ if( ( streamout = open( output_file, O_WRONLY | O_CREAT, 0644 ) ) < 0 ) { - fprintf( stderr, "\n[Error] Error opening file %s\n", output_file ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), output_file ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit ( 1 ); } } @@ -1132,22 +1192,22 @@ DVDReadBytes( dvd_file, bufferin, DVD_VIDEO_LB_LEN ); if( write( streamout, bufferin, DVD_VIDEO_LB_LEN ) < 0 ) { - fprintf( stderr, "\n[Error] Error writing to %s \n", output_file ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Error writing to %s \n"), output_file ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit( 1 ); } /* progress indicator */ tmp_i = i; - fprintf( stderr, "%4.0fkB of %4.0fkB written\r", + fprintf( stderr, _("%4.0fkB of %4.0fkB written\r"), ( tmp_i+1 )*( DVD_VIDEO_LB_LEN/1024 ), tmp_file_size/1024 ); } - fprintf( stderr, "\n"); + fprintf( stderr, _("\n")); if( !stdout_flag ) { if( fdatasync( streamout ) < 0 ) { - fprintf( stderr, "\n[Error] error writing to %s \n", output_file ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] error writing to %s \n"), output_file ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); exit( 1 ); } @@ -1167,22 +1227,22 @@ DVDReadBytes( dvd_file, bufferin, DVD_VIDEO_LB_LEN ); if( write( streamout, bufferin, DVD_VIDEO_LB_LEN ) < 0 ) { - fprintf( stderr, "\n[Error] Error writing to %s \n", output_file ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Error writing to %s \n"), output_file ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit( 1 ); } /* progress indicator */ tmp_i = i; - fprintf( stderr, "%4.0fkB of %4.0fkB written\r", + fprintf( stderr, _("%4.0fkB of %4.0fkB written\r"), ( tmp_i+1 )*( DVD_VIDEO_LB_LEN/1024 ), tmp_file_size/1024 ); } - fprintf( stderr, "\n"); + fprintf( stderr, _("\n")); if( !stdout_flag ) { if( fdatasync( streamout ) < 0 ) { - fprintf( stderr, "\n[Error] error writing to %s \n", output_file ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] error writing to %s \n"), output_file ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); exit( 1 ); } @@ -1194,7 +1254,6 @@ if( strstr( directory->d_name, ".vob" ) || strstr( directory->d_name, ".VOB" ) ) { - int l=0; if( directory->d_name[7] == 48 || title_nr == 0 ) { /*this is vts_xx_0.vob or video_ts.vob, a menu vob*/ @@ -1214,10 +1273,8 @@ { off_t culm_single_vob_size = 0; int a, subvob; -/* printf( "debug: title = %d \n", title_nr ); */ subvob = ( directory->d_name[7] - 48 ); -/* printf( "debug: subvob = %d \n", subvob ); */ for( a = 1; a < subvob; a++ ) { @@ -1229,13 +1286,13 @@ /* input_file[ strlen( input_file ) - 5 ] = ( a + 48 );*/ if( stat( input_file, &buf ) < 0 ) { - fprintf( stderr, "[Info] Can't stat() %s.\n", input_file ); + fprintf( stderr, _("[Info] Can't stat() %s.\n"), input_file ); exit( 1 ); } culm_single_vob_size += buf.st_size; if( verbosity_level > 1 ) - fprintf( stderr, "[Info] Vob %d %d (%s) has a size of %lli\n", title_nr, subvob, input_file, buf.st_size ); + fprintf( stderr, _("[Info] Vob %d %d (%s) has a size of %lli\n"), title_nr, subvob, input_file, buf.st_size ); } start = ( culm_single_vob_size / DVD_VIDEO_LB_LEN ); @@ -1249,8 +1306,9 @@ /*this copies the data to the new file*/ if( verbosity_level > 1) - fprintf( stderr, "[Info] Start of %s at %d blocks \n", output_file, start ); + fprintf( stderr, _("[Info] Start of %s at %d blocks \n"), output_file, start ); file_block_count = block_count; + starttime = time(NULL); for( i = start; ( i - start ) * DVD_VIDEO_LB_LEN < file_size; i += file_block_count) { int tries = 0, skipped_blocks = 0; @@ -1268,54 +1326,60 @@ { i += file_block_count; skipped_blocks +=1; + overall_skipped_blocks +=1; tries=0; } - if( verbosity_level >= 1 ) - fprintf( stderr, "[Warn] Had to skip %d blocks! ", skipped_blocks ); -/* fprintf( stderr, "[Debug] tries=%d\n", tries ); */ + /* if( verbosity_level >= 1 ) + fprintf( stderr, _("[Warn] Had to skip %d blocks (reading block %d)! \n "), skipped_blocks, i ); */ tries++; } + if( verbosity_level >= 1 && skipped_blocks > 0 ) + fprintf( stderr, _("[Warn] Had to skip (couldn't read) %d blocks (before block %d)! \n "), skipped_blocks, i ); +/*TODO: this skipping here writes too few bytes to the output */ + if( write( streamout, bufferin, DVD_VIDEO_LB_LEN * blocks ) < 0 ) { - fprintf( stderr, "\n[Error] Error writing to %s \n", output_file ); - fprintf( stderr, "[Error] Error: %s, errno: %d \n", strerror( errno ), errno ); + fprintf( stderr, _("\n[Error] Error writing to %s \n"), output_file ); + fprintf( stderr, _("[Error] Error: %s, errno: %d \n"), strerror( errno ), errno ); exit( 1 ); } - l += blocks; /*progression bar*/ /*this here doesn't work with -F 10 */ /* if( !( ( ( ( i-start )+1 )*DVD_VIDEO_LB_LEN )%( 1024*1024 ) ) ) */ - if( l > 100 ) + progressUpdate(starttime, (int)(( ( i-start+1 )*DVD_VIDEO_LB_LEN )), (int)(tmp_file_size+2048), FALSE); + /* + if( check_progress() ) { tmp_i = ( i-start ); percent = ( ( ( ( tmp_i+1 )*DVD_VIDEO_LB_LEN )*100 )/tmp_file_size ); - fprintf( stderr, "%4.0fMB of %4.0fMB written ", + fprintf( stderr, _("\r%4.0fMB of %4.0fMB written "), ( ( tmp_i+1 )*DVD_VIDEO_LB_LEN )/( 1024*1024 ), ( tmp_file_size+2048 )/( 1024*1024 ) ); - fprintf( stderr,"( %3.1f %% ) \r", percent ); - l = 0; + fprintf( stderr, _("( %3.1f %% ) "), percent ); } - + */ } /*this is just so that at the end it actually says 100.0% all the time... */ /*TODO: if it is correct to always assume it's 100% is a good question.... */ - fprintf( stderr, "%4.0fMB of %4.0fMB written ", +/* fprintf( stderr, _("\r%4.0fMB of %4.0fMB written "), ( ( tmp_i+1 )*DVD_VIDEO_LB_LEN )/( 1024*1024 ), ( tmp_file_size+2048 )/( 1024*1024 ) ); - fprintf( stderr,"( 100.0%% ) \r" ); - + fprintf( stderr, _("( 100.0%% ) ") ); +*/ + lastpos = 0; + progressUpdate(starttime, (int)(( ( i-start+1 )*DVD_VIDEO_LB_LEN )), (int)(tmp_file_size+2048), TRUE); start=i; - fprintf( stderr, "\n" ); + fprintf( stderr, _("\n") ); if( !stdout_flag ) { if( fdatasync( streamout ) < 0 ) { - fprintf( stderr, "\n[Error] error writing to %s \n", output_file ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] error writing to %s \n"), output_file ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); exit( 1 ); } @@ -1328,12 +1392,14 @@ ifoClose( vmg_file ); DVDCloseFile( dvd_file ); DVDClose( dvd ); + if ( overall_skipped_blocks > 0 ) + fprintf( stderr, _("[Info] %d blocks had to be skipped, be warned.\n"), overall_skipped_blocks ); exit( 0 ); } else { - fprintf( stderr, "[Error] Not enough free space on the destination dir. Please choose another one or -f\n" ); - fprintf( stderr, "[Error] or dirs behind -1, -2 ... are NOT allowed with -m!\n" ); + fprintf( stderr, _("[Error] Not enough free space on the destination dir. Please choose another one or -f\n") ); + fprintf( stderr, _("[Error] or dirs behind -1, -2 ... are NOT allowed with -m!\n") ); exit( 1 ); } } @@ -1348,17 +1414,17 @@ * they come from libdvdread merged together under the given title number * (thx again for the great library) */ - fprintf( stderr,"[Info] Using Title: %i\n", titleid ); - fprintf( stderr,"[Info] Title has %d chapters and %d angles\n",tt_srpt->title[ titleid - 1 ].nr_of_ptts,tt_srpt->title[ titleid - 1 ].nr_of_angles ); - fprintf( stderr,"[Info] Using Chapter: %i\n", chapid + 1 ); - fprintf( stderr,"[Info] Using Angle: %i\n", angle + 1 ); + fprintf( stderr, _("[Info] Using Title: %i\n"), titleid ); + fprintf( stderr, _("[Info] Title has %d chapters and %d angles\n"),tt_srpt->title[ titleid - 1 ].nr_of_ptts,tt_srpt->title[ titleid - 1 ].nr_of_angles ); + fprintf( stderr, _("[Info] Using Chapter: %i\n"), chapid + 1 ); + fprintf( stderr, _("[Info] Using Angle: %i\n"), angle + 1 ); if( info_flag && vob_size != 0 ) { - fprintf( stderr,"\n[Info] DVD-name: %s\n", dvd_name ); - fprintf( stderr, "[Info] Disk free: %f MB\n", (double) (pwd_free / ( 1024.0*1024.0 )) ); - fprintf( stderr, "[Info] Vobs size: %f MB\n", (double) vob_size / ( 1024.0*1024.0 ) ); + fprintf( stderr, _("\n[Info] DVD-name: %s\n"), dvd_name ); + fprintf( stderr, _("[Info] Disk free: %f MB\n"), (double) (pwd_free / ( 1024.0*1024.0 )) ); + fprintf( stderr, _("[Info] Vobs size: %f MB\n"), (double) vob_size / ( 1024.0*1024.0 ) ); ifoClose( vmg_file ); DVDCloseFile( dvd_file ); DVDClose( dvd ); @@ -1373,7 +1439,7 @@ vts_file = ifoOpen( dvd, tt_srpt->title[ titleid-1 ].title_set_nr ); if( !vts_file ) { - fprintf( stderr, "[Error] Can't open the title %d info file.\n", + fprintf( stderr, _("[Error] Can't open the title %d info file.\n"), tt_srpt->title[ titleid-1 ].title_set_nr ); ifoClose( vmg_file ); DVDClose( dvd ); @@ -1400,7 +1466,7 @@ DVD_READ_TITLE_VOBS ); if( !dvd_file ) { - fprintf( stderr, "[Error] Can't open title VOBS (VTS_%02d_1.VOB).\n", + fprintf( stderr, _("[Error] Can't open title VOBS (VTS_%02d_1.VOB).\n"), tt_srpt->title[ titleid-1 ].title_set_nr ); ifoClose( vts_file ); ifoClose( vmg_file ); @@ -1417,29 +1483,29 @@ vob_size = ( ( off_t ) ( file_size_in_blocks ) * ( off_t ) DVD_VIDEO_LB_LEN ) - ( seek_start * 2048 ) - ( stop_before_end * 2048 ); if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] Vob_size was 0\n" ); + fprintf( stderr, _("[Info] Vob_size was 0\n") ); } /*debug-output: difference between vobsize read from cd and size returned from libdvdread */ if ( mounted && verbose_flag ) { - fprintf( stderr,"\n[Info] Difference between vobsize read from cd and size returned from libdvdread:\n" ); - /* fprintf( stderr,"vob_size (stat) = %lu\nlibdvdsize = %lu\ndiff = %lu\n", //TODO:the diff returns only crap... + fprintf( stderr, _("\n[Info] Difference between vobsize read from cd and size returned from libdvdread:\n") ); + /* fprintf( stderr, _("vob_size (stat) = %lu\nlibdvdsize = %lu\ndiff = %lu\n"), TODO:the diff returns only crap... vob_size, ( off_t ) ( file_size_in_blocks ) * ( off_t ) DVD_VIDEO_LB_LEN, ( off_t ) vob_size - ( off_t ) ( ( off_t )( file_size_in_blocks ) * ( off_t ) ( DVD_VIDEO_LB_LEN ) ) ); */ - fprintf( stderr,"[Info] Vob_size (stat) = %lu\n[Info] libdvdsize = %lu\n", - vob_size, - ( off_t ) ( file_size_in_blocks ) * ( off_t ) DVD_VIDEO_LB_LEN ); + fprintf( stderr, _("[Info] Vob_size (stat) = %lu\n[Info] libdvdsize = %lu\n"), + (long unsigned int) vob_size, + (long unsigned int)(( off_t ) ( file_size_in_blocks ) * ( off_t ) DVD_VIDEO_LB_LEN )); } if( info_flag ) { - fprintf( stderr,"\n[Info] DVD-name: %s\n", dvd_name ); - fprintf( stderr, "[Info] Disk free: %.0f MB\n", ( float ) (pwd_free / (1024 * 1024)) ); + fprintf( stderr, _("\n[Info] DVD-name: %s\n"), dvd_name ); + fprintf( stderr, _("[Info] Disk free: %.0f MB\n"), ( float ) (pwd_free / (1024 * 1024)) ); /* Should be the *disk* size here, right? -- lb */ - fprintf( stderr, "[Info] Vobs size: %.0f MB\n", ( float ) (disk_vob_size / (1024 * 1024 )) ); + fprintf( stderr, _("[Info] Vobs size: %.0f MB\n"), ( float ) (disk_vob_size / (1024 * 1024 )) ); ifoClose( vts_file ); ifoClose( vmg_file ); @@ -1453,17 +1519,17 @@ /* now the actual check if enough space is free*/ if ( pwd_free < vob_size ) { - fprintf( stderr, "\n[Info] Disk free: %.0f MB", (float) pwd_free / ( 1024*1024 ) ); - fprintf( stderr, "\n[Info] Vobs size: %.0f MB", (float) vob_size / ( 1024*1024 ) ); + fprintf( stderr, _("\n[Info] Disk free: %.0f MB"), (float) pwd_free / ( 1024*1024 ) ); + fprintf( stderr, _("\n[Info] Vobs size: %.0f MB"), (float) vob_size / ( 1024*1024 ) ); if( !force_flag ) - fprintf( stderr, "\n[Error] Hmm, better change to a dir with enough space left or call with -f (force) \n" ); + fprintf( stderr, _("\n[Error] Hmm, better change to a dir with enough space left or call with -f (force) \n") ); if( pwd_free == 0 && !force_flag ) { if( verbosity_level > 1 ) - fprintf( stderr,"[Error] Hmm, statfs (statvfs) seems not to work on that directory. \n" ); - fprintf( stderr, "[Error] Hmm, statfs (statvfs) seems not to work on that directory. \n" ); - fprintf( stderr, "[Hint] Nevertheless, do you want vobcopy to continue [y] or do you want to check for \n" ); - fprintf( stderr, "[Hint] enough space first [q]?\n" ); + fprintf( stderr, _("[Error] Hmm, statfs (statvfs) seems not to work on that directory. \n") ); + fprintf( stderr, _("[Error] Hmm, statfs (statvfs) seems not to work on that directory. \n") ); + fprintf( stderr, _("[Hint] Nevertheless, do you want vobcopy to continue [y] or do you want to check for \n") ); + fprintf( stderr, _("[Hint] enough space first [q]?\n") ); while ( 1 ) { @@ -1473,19 +1539,19 @@ { force_flag = TRUE; if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] y pressed - force write\n" ); + fprintf( stderr, _("[Info] y pressed - force write\n") ); break; } else if( op == 'n' || op =='q' ) { if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] n/q pressed\n" ); + fprintf( stderr, _("[Info] n/q pressed\n") ); exit( 1 ); break; } else { - fprintf( stderr, "[Error] Please choose [y] to continue or [n] to quit\n" ); + fprintf( stderr, _("[Error] Please choose [y] to continue or [n] to quit\n") ); } } } @@ -1494,24 +1560,27 @@ } /* -from bash.org +from alt.tasteless.jokes: + +A farmer walks into his bedroom with a sheep under his arm. +"Honey, this pig is what I fuck when you don't feel well." + +The wife looks up from the magazine she's reading and says, +"That's not a pig, it's a sheep." -#464444 +(878)- [X] +The man replies, "I was talking to the sheep." -<Phryss> Sometimes, I sit back and think about what my father used to tell -me about the birds and the bees: "Stop fucking the dog. The neighbors are -watching, and it's their dog." */ /********************* * this is the main read and copy loop *********************/ - fprintf( stderr,"\n[Info] DVD-name: %s\n", dvd_name ); + fprintf( stderr, _("\n[Info] DVD-name: %s\n"), dvd_name ); if( provided_dvd_name_flag && !stdout_flag ) /*if the user has given a name for the file */ { - fprintf( stderr, "\n[Info] Your-name for the dvd: %s\n", provided_dvd_name ); - strcpy( dvd_name, provided_dvd_name ); + fprintf( stderr, _("\n[Info] Your name for the dvd: %s\n"), provided_dvd_name ); + safestrncpy( dvd_name, provided_dvd_name, sizeof(dvd_name)-1 ); } while( offset < ( file_size_in_blocks - seek_start - stop_before_end ) ) @@ -1526,7 +1595,7 @@ add_end_slash( pwd ); free_space = get_free_space( pwd, verbosity_level ); if( verbosity_level > 1 ) - fprintf( stderr,"[Info] Free space for -o dir: %.0f\n", ( float ) free_space ); + fprintf( stderr, _("[Info] Free space for -o dir: %.0f\n"), ( float ) free_space ); if( large_file_flag ) make_output_path( pwd,name,get_dvd_name_return,dvd_name,titleid, -1 ); else @@ -1534,19 +1603,6 @@ } else { - /* if( alternate_dir_count == 1 && !space_greater_2gb_flag ) */ - /*shouldn't come to this only if some data is still there but - no free space left... */ - /* { */ - /* fprintf( stderr, */ - /* "\nHmm, looks like there wasn't enough space in the provided dirs ...\n" */ - /* "Did you use -1, -2, -3 or even up to -4 to specify alternate dirs?\n" ); */ - /* exit( 1 ); */ - /* } */ - /* for( i = 1; i < 5; i++ ) */ - /* { */ - /* if( paths_taken == i && alternate_dir_count > 1 ) */ - for( i = 1; i < alternate_dir_count; i++ ) { if( paths_taken == i ) @@ -1555,7 +1611,7 @@ free_space = get_free_space( alternate_output_dir[ i-1 ],verbosity_level ); if( verbosity_level > 1 ) - fprintf( stderr,"[Info] Free space for -%i dir: %.0f\n", i, ( float ) free_space ); + fprintf( stderr, _("[Info] Free space for -%i dir: %.0f\n"), i, ( float ) free_space ); if ( large_file_flag ) make_output_path( alternate_output_dir[ i-1 ], name, get_dvd_name_return, dvd_name, titleid, -1 ); else @@ -1571,7 +1627,7 @@ space_greater_2gb_flag = FALSE; max_filesize_in_blocks = ( ( free_space - 2097152 ) / 2048 ); /* - 2 MB */ if( verbosity_level > 1 ) - fprintf( stderr, "[Info] Taken max_filesize_in_blocks(2GB version): %.0f\n", ( float ) max_filesize_in_blocks ); + fprintf( stderr, _("[Info] Taken max_filesize_in_blocks(2GB version): %.0f\n"), ( float ) max_filesize_in_blocks ); paths_taken++; } else if( large_file_flag && force_flag) /*lfs version */ @@ -1579,7 +1635,7 @@ space_greater_2gb_flag = FALSE; max_filesize_in_blocks = ( ( free_space - 2097152) / 2048);/* - 2 MB */ if( verbosity_level > 1) - fprintf( stderr,"[Info] Taken max_filesize_in_blocks(lfs version): %.0f\n", ( float ) max_filesize_in_blocks ); + fprintf( stderr, _("[Info] Taken max_filesize_in_blocks(lfs version): %.0f\n"), ( float ) max_filesize_in_blocks ); paths_taken++; } else if( !large_file_flag ) @@ -1591,24 +1647,34 @@ if( open( name, O_RDONLY ) >= 0 ) { - fprintf( stderr,"\n[Error] File '%s' already exists, [o]verwrite or [q]uit? \n", name ); + if ( overwrite_all_flag == FALSE ) + fprintf( stderr, _("\n[Error] File '%s' already exists, [o]verwrite, [x]overwrite all or [q]uit? \n"), name ); /*TODO: add [a]ppend and seek thought stream till point of append is there */ while ( 1 ) { - while ((op = fgetc (stdin)) == EOF) - usleep (1); - fgetc ( stdin ); /* probably need to do this for second time it comes around this loop */ - if( op == 'o' ) + if ( overwrite_all_flag == TRUE ) + op = 'o'; + else + { + while ((op = fgetc (stdin)) == EOF) + usleep (1); + fgetc ( stdin ); /* probably need to do this for second time it comes around this loop */ + } + if( op == 'o' || op == 'x' ) { if( ( streamout = open( name, O_WRONLY | O_TRUNC ) ) < 0 ) { - fprintf( stderr, "\n[Error] Error opening file %s\n", name ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit ( 1 ); } else close( streamout ); overwrite_flag = TRUE; + if ( op == 'x' ) + { + overwrite_all_flag = TRUE; + } break; } else if( op == 'q' ) @@ -1619,7 +1685,7 @@ } else { - fprintf( stderr, "\n[Hint] please choose [o]verwrite or [q]uit the next time ;-)\n" ); + fprintf( stderr, _("\n[Hint] please choose [o]verwrite, [x]overwrite all or [q]uit the next time ;-)\n") ); } } } @@ -1635,17 +1701,23 @@ if ( get_free_space( name, verbosity_level ) < 2097152 ) /* it might come here when the platter is full after a -f */ { - fprintf( stderr, "[Error] Seems your platter is full...\n"); + fprintf( stderr, _("[Error] Seems your platter is full...\n")); exit ( 1 ); } - fprintf( stderr, "\n[Error] File '%s' already exists, [o]verwrite, [a]ppend, [q]uit? \n", name ); + if ( overwrite_all_flag == FALSE ) + fprintf( stderr, _("\n[Error] File '%s' already exists, [o]verwrite, [x]overwrite all, [a]ppend, [q]uit? \n"), name ); while ( 1 ) { - while ((op = fgetc (stdin)) == EOF) - usleep (1); - fgetc ( stdin ); /* probably need to do this for second time it - comes around this loop */ - if( op == 'o' ) + if ( overwrite_all_flag == TRUE ) + op = 'o'; + else + { + while ((op = fgetc (stdin)) == EOF) + usleep (1); + fgetc ( stdin ); /* probably need to do this for second time it + comes around this loop */ + } + if( op == 'o' || op == 'x' ) { #if defined( HAS_LARGEFILE ) if( ( streamout = open( name, O_WRONLY | O_TRUNC | O_LARGEFILE ) ) < 0 ) @@ -1653,12 +1725,16 @@ if( ( streamout = open( name, O_WRONLY | O_TRUNC ) ) < 0 ) #endif { - fprintf( stderr, "\n[Error] Error opening file %s\n", name ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); exit ( 1 ); } - else - close (streamout); + /* else + close (streamout); */ overwrite_flag = TRUE; + if ( op == 'x' ) + { + overwrite_all_flag = TRUE; + } break; } else if( op == 'a' ) @@ -1669,13 +1745,13 @@ if( ( streamout = open( name, O_WRONLY | O_APPEND ) ) < 0 ) #endif { - fprintf( stderr, "\n[Error] Error opening file %s\n", name ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); exit ( 1 ); } - else - close( streamout ); + /* else + close( streamout ); */ if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] User chose append\n" ); + fprintf( stderr, _("[Info] User chose append\n") ); break; } else if( op == 'q' ) @@ -1686,7 +1762,7 @@ } else { - fprintf( stderr, "\n[Hint] Please choose [o]verwrite, [a]ppend, [q]uit the next time ;-)\n" ); + fprintf( stderr, _("\n[Hint] Please choose [o]verwrite, [x]overwrite all, [a]ppend, [q]uit the next time ;-)\n") ); } } } @@ -1699,7 +1775,7 @@ if( ( streamout = open( name, O_WRONLY | O_CREAT, 0644 ) ) < 0 ) #endif { - fprintf( stderr, "\n[Error] Error opening file %s\n", name ); + fprintf( stderr, _("\n[Error] Error opening file %s\n"), name ); exit ( 1 ); } } @@ -1712,19 +1788,16 @@ /* this here is the main copy part */ - fprintf( stderr, "\n" ); + fprintf( stderr, _("\n") ); memset( bufferin, 0, BLOCK_COUNT * DVD_VIDEO_LB_LEN * sizeof( unsigned char ) ); - /* for ( ; ( offset + ( off_t ) seek_start ) < ( ( off_t ) file_size_in_blocks - ( off_t ) stop_before_end ) */ - /* && offset - ( off_t )max_filesize_in_blocks_summed < max_filesize_in_blocks; */ - /* offset++ ) */ - /* { */ - file_block_count = block_count; + starttime = time(NULL); for ( ; ( offset + ( off_t ) seek_start ) < ( ( off_t ) file_size_in_blocks - ( off_t ) stop_before_end ) && offset - ( off_t )max_filesize_in_blocks_summed - (off_t)angle_blocks_skipped < max_filesize_in_blocks; offset += file_block_count ) { + int tries = 0, skipped_blocks = 0; /* Only read and write as many blocks as there are left in the file */ if ( ( offset + file_block_count + ( off_t ) seek_start ) > ( ( off_t ) file_size_in_blocks - ( off_t ) stop_before_end ) ) { @@ -1735,52 +1808,60 @@ file_block_count = max_filesize_in_blocks - ( offset + file_block_count - ( off_t )max_filesize_in_blocks_summed - (off_t)angle_blocks_skipped ); } - blocks = DVDReadBlocks( dvd_file,( offset + seek_start ), file_block_count, bufferin ); + /* blocks = DVDReadBlocks( dvd_file,( offset + seek_start ), file_block_count, bufferin ); */ + + while( ( blocks = DVDReadBlocks( dvd_file,( offset + seek_start ), file_block_count, bufferin ) ) <= 0 && tries < 10 ) + { + if( tries == 9 ) + { + offset += file_block_count; + skipped_blocks +=1; + overall_skipped_blocks +=1; + tries=0; + } + /* if( verbosity_level >= 1 ) + fprintf( stderr, _("[Warn] Had to skip %d blocks (reading block %d)! \n "), skipped_blocks, i ); */ + tries++; + } + + if( verbosity_level >= 1 && skipped_blocks > 0 ) + fprintf( stderr, _("[Warn] Had to skip (couldn't read) %d blocks (before block %d)! \n "), skipped_blocks, offset ); + +/*TODO: this skipping here writes too few bytes to the output */ + + if( write( streamout, bufferin, DVD_VIDEO_LB_LEN * blocks ) < 0 ) { - fprintf( stderr, "\n[Error] Write() error\n" - "[Error] It's possible that you try to write files\n" - "[Error] greater than 2GB to filesystem which\n" - "[Error] doesn't support it? (try without -l)\n" ); - fprintf( stderr, "[Error] Error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] Write() error\n") ); + fprintf( stderr, _("[Error] It's possible that you try to write files\n") ); + fprintf( stderr, _("[Error] greater than 2GB to filesystem which\n") ); + fprintf( stderr, _("[Error] doesn't support it? (try without -l)\n") ); + fprintf( stderr, _("[Error] Error: %s\n"), strerror( errno ) ); exit( 1 ); } - l += blocks; /*this is for people who report that it takes vobcopy ages to copy something */ /* TODO */ - - - if( l > 100 ) - { - /*this is the progress indicator*/ - fprintf( stderr, "%4.0fMB of %4.0fMB written (%.0f %%)\r", - ( float ) offset/512, - ( float ) ( file_size_in_blocks - seek_start - stop_before_end )/512 , - ( float ) ( offset*100 )/( file_size_in_blocks - seek_start - stop_before_end ) ); - l=0; - } + + progressUpdate(starttime, (int)offset/512, (int)( file_size_in_blocks - seek_start - stop_before_end )/512, FALSE); } if( !stdout_flag ) { if( fdatasync( streamout ) < 0 ) { - fprintf( stderr, "\n[Error] error writing to %s \n", name ); - fprintf( stderr, "[Error] error: %s\n", strerror( errno ) ); + fprintf( stderr, _("\n[Error] error writing to %s \n"), name ); + fprintf( stderr, _("[Error] error: %s\n"), strerror( errno ) ); exit( 1 ); } - /*this is just so that it says 100% at the end. Dirty.... */ - fprintf( stderr, "%4.0fMB of %4.0fMB written ( 100.0 %%)\r", - ( float ) offset/512, - ( float ) ( file_size_in_blocks - seek_start - stop_before_end )/512 ); + progressUpdate(starttime, (int)offset/512, (int)( file_size_in_blocks - seek_start - stop_before_end )/512, TRUE); close( streamout ); if( verbosity_level >= 1 ) { - fprintf( stderr,"[Info] max_filesize_in_blocks %8.0f \n", ( float ) max_filesize_in_blocks ); - fprintf( stderr,"[Info] offset at the end %8.0f \n", ( float ) offset ); - fprintf( stderr,"[Info] file_size_in_blocks %8.0f \n",( float ) file_size_in_blocks ); + fprintf( stderr, _("[Info] max_filesize_in_blocks %8.0f \n"), ( float ) max_filesize_in_blocks ); + fprintf( stderr, _("[Info] offset at the end %8.0f \n"), ( float ) offset ); + fprintf( stderr, _("[Info] file_size_in_blocks %8.0f \n"),( float ) file_size_in_blocks ); } /* now lets see whats the size of this file in bytes */ stat( name, &buf ); @@ -1795,21 +1876,12 @@ } else { - fprintf( stderr, "\n[Error] File size (%.0f) of %s differs largely from that on dvd, therefore keeps it's .partial\n", ( float ) buf.st_size, name ); + fprintf( stderr, _("\n[Error] File size (%.0f) of %s differs largely from that on dvd, therefore keeps it's .partial\n"), ( float ) buf.st_size, name ); } } else if( !cut_flag ) { re_name( name ); - /* TODO: this check should go in again - if( ( ( 1048571 * 2048 ) - disk_vob_size ) < MAX_DIFFER ) - { - re_name( name ); - } - else - { - fprintf( stderr, "\n[Error]File size (%.0f) of %s differs largely from 2GB, therefore keeps it's .partial\n", ( float ) buf.st_size, name ); - } */ } else if( cut_flag ) @@ -1819,19 +1891,19 @@ if( verbosity_level >= 1 ) { - fprintf( stderr, "[Info] Single file size (of copied file %s ) %.0f\n", name, ( float ) buf.st_size ); - fprintf( stderr, "[Info] Cumulated size %.0f\n", ( float ) disk_vob_size ); + fprintf( stderr, _("[Info] Single file size (of copied file %s ) %.0f\n"), name, ( float ) buf.st_size ); + fprintf( stderr, _("[Info] Cumulated size %.0f\n"), ( float ) disk_vob_size ); } } max_filesize_in_blocks_summed += max_filesize_in_blocks; - fprintf( stderr, "[Info] Successfully copied file %s\n", name ); + fprintf( stderr, _("[Info] Successfully copied file %s\n"), name ); j++; /* # of seperate files we have written */ } /*end of main copy loop*/ if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] # of separate files: %i\n", j ); + fprintf( stderr, _("[Info] # of separate files: %i\n"), j ); /* * clean up and close everything @@ -1841,19 +1913,18 @@ ifoClose( vmg_file ); DVDCloseFile( dvd_file ); DVDClose( dvd ); - fprintf( stderr,"\n[Info] Copying finished! Let's see if the sizes match (roughly)\n" ); - fprintf( stderr,"[Info] Combined size of title-vobs: %.0f (%.0f MB)\n", ( float ) vob_size, ( float ) vob_size / ( 1024*1024 ) ); - fprintf( stderr,"[Info] Copied size (size on disk): %.0f (%.0f MB)\n", ( float ) disk_vob_size, ( float ) disk_vob_size / ( 1024*1024 ) ); - + fprintf( stderr, _("\n[Info] Copying finished! Let's see if the sizes match (roughly)\n") ); + fprintf( stderr, _("[Info] Combined size of title-vobs: %.0f (%.0f MB)\n"), ( float ) vob_size, ( float ) vob_size / ( 1024*1024 ) ); + fprintf( stderr, _("[Info] Copied size (size on disk): %.0f (%.0f MB)\n"), ( float ) disk_vob_size, ( float ) disk_vob_size / ( 1024*1024 ) ); if ( ( vob_size - disk_vob_size ) > MAX_DIFFER ) { - fprintf( stderr, "[Error] Hmm, the sizes differ by more than %d\n", MAX_DIFFER ); - fprintf( stderr, "[Hint] Take a look with MPlayer if the output is ok\n" ); + fprintf( stderr, _("[Error] Hmm, the sizes differ by more than %d\n"), MAX_DIFFER ); + fprintf( stderr, _("[Hint] Take a look with MPlayer if the output is ok\n") ); } else { - fprintf( stderr, "[Info] Everything seems to be fine, the sizes match pretty good ;-)\n" ); - fprintf( stderr, "[Hint] Have a lot of fun!\n" ); + fprintf( stderr, _("[Info] Everything seems to be fine, the sizes match pretty good ;-)\n") ); + fprintf( stderr, _("[Hint] Have a lot of fun!\n") ); } return 0; @@ -1902,11 +1973,11 @@ #ifdef USE_STATFS statfs( path, &buf1 ); if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] Used the linux statfs\n" ); + fprintf( stderr, _("[Info] Used the linux statfs\n") ); #else statvfs( path, &buf1 ); if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] Used statvfs\n" ); + fprintf( stderr, _("[Info] Used statvfs\n") ); #endif temp1 = buf1.f_bavail; /* On Solaris at least, f_bsize is not the actual block size -- lb */ @@ -1920,8 +1991,8 @@ sum = ( ( off_t )temp1 * ( off_t )temp2 ); if( verbosity_level >= 1 ) { - fprintf( stderr, "[Info] In freespace_getter:for %s : %.0f free\n", path, ( float ) sum ); - fprintf( stderr, "[Info] In freespace_getter:bavail %ld * bsize %ld = above\n", temp1, temp2 ); + fprintf( stderr, _("[Info] In freespace_getter:for %s : %.0f free\n"), path, ( float ) sum ); + fprintf( stderr, _("[Info] In freespace_getter:bavail %ld * bsize %ld = above\n"), temp1, temp2 ); } /* return ( buf1.f_bavail * buf1.f_bsize ); */ return sum; @@ -1946,11 +2017,11 @@ #ifdef USE_STATFS statfs( path, &buf2 ); if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] Used the linux statfs\n" ); + fprintf( stderr, _("[Info] Used the linux statfs\n") ); #else statvfs( path, &buf2 ); if( verbosity_level >= 1 ) - fprintf( stderr, "[Info] Used statvfs\n" ); + fprintf( stderr, _("[Info] Used statvfs\n") ); #endif temp1 = buf2.f_blocks; /* On Solaris at least, f_bsize is not the actual block size -- lb */ @@ -1964,8 +2035,8 @@ sum = ( ( off_t )temp1 * ( off_t )temp2 ); if( verbosity_level >= 1 ) { - fprintf( stderr, "[Info] In usedspace_getter:for %s : %.0f used\n", path, ( float ) sum ); - fprintf( stderr, "[Info] In usedspace_getter:part1 %ld, part2 %ld\n", temp1, temp2 ); + fprintf( stderr, _("[Info] In usedspace_getter:for %s : %.0f used\n"), path, ( float ) sum ); + fprintf( stderr, _("[Info] In usedspace_getter:part1 %ld, part2 %ld\n"), temp1, temp2 ); } /* return ( buf1.f_blocks * buf1.f_bsize ); */ return sum; @@ -1978,14 +2049,8 @@ int make_output_path( char *pwd,char *name,int get_dvd_name_return, char *dvd_name,int titleid, int partcount ) { char temp[5]; - int i; strcpy( name, pwd ); - if( !get_dvd_name_return ) - { - strcat( name, dvd_name ); - } - else - strcat( name, "the_video_you_wanted" ); + strcat( name, dvd_name ); sprintf( temp, "%d", titleid ); strcat( name, temp ); @@ -1997,14 +2062,7 @@ } strcat( name, ".vob" ); - for( i=0; i< strlen(name);i++ ) - { - if( name[i] == ' ') - name[i] = '_'; - } - - - fprintf( stderr, "\n[Info] Outputting to %s", name ); + fprintf( stderr, _("\n[Info] Outputting to %s"), name ); return 0; } @@ -2014,29 +2072,33 @@ void usage( char *program_name ) { - fprintf( stderr, "Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2007 robos@muon.de\n" - "\nUsage: %s \n" - "[-m (mirror)] \n" - "[-i /path/to/the/mounted/dvd/]\n" - "[-n title-number] \n" - "[-t <your name for the dvd>] \n" - "[-o /path/to/output-dir/ (can be \"stdout\" or \"-\")] \n" - "[-f (force output)]\n" - "[-V (version)]\n" - "[-v (verbose)]\n" - "[-v -v (create log-file)]\n" - "[-h (this here ;-)] \n" - "[-I (infos about title, chapters and angles on the dvd)]\n" - "[-1/path/to/second/output/dir/] [-2/.../third/..] [-3/../] [-4 /../]\n" - "[-b <skip-size-at-beginning[bkmg]>] \n" - "[-e <skip-size-at-end[bkmg]>]\n" - "[-O <single_file_name1,single_file_name2, ...>] \n" - "[-q (quiet)]\n" - "[-w <watchdog-minutes>]\n" - "[-F <fast-factor:1..64>]\n", program_name ); + fprintf( stderr, _("Vobcopy "VERSION" - GPL Copyright (c) 2001 - 2009 robos@muon.de\n") ); + fprintf( stderr, _("\nUsage: %s \n"), program_name ); + fprintf( stderr, _("if you want the main feature (title with most chapters) you don't need _any_ options!\n") ); + fprintf( stderr, _("Options:\n") ); + fprintf( stderr, _("[-m (mirror the whole dvd)] \n") ); + fprintf( stderr, _("[-M (Main title - i.e. the longest (playing time) title on the dvd)] \n") ); + fprintf( stderr, _("[-i /path/to/the/mounted/dvd/]\n") ); + fprintf( stderr, _("[-n title-number] \n") ); + fprintf( stderr, _("[-t <your name for the dvd>] \n") ); + fprintf( stderr, _("[-o /path/to/output-dir/ (can be \"stdout\" or \"-\")] \n") ); + fprintf( stderr, _("[-f (force output)]\n") ); + fprintf( stderr, _("[-V (version)]\n") ); + fprintf( stderr, _("[-v (verbose)]\n") ); + fprintf( stderr, _("[-v -v (create log-file)]\n") ); + fprintf( stderr, _("[-h (this here ;-)] \n") ); + fprintf( stderr, _("[-I (infos about title, chapters and angles on the dvd)]\n") ); + fprintf( stderr, _("[-1 /path/to/second/output/dir/] [-2 /.../third/..] [-3 /../] [-4 /../]\n") ); + fprintf( stderr, _("[-b <skip-size-at-beginning[bkmg]>] \n") ); + fprintf( stderr, _("[-e <skip-size-at-end[bkmg]>]\n") ); + fprintf( stderr, _("[-O <single_file_name1,single_file_name2, ...>] \n") ); + fprintf( stderr, _("[-q (quiet)]\n") ); + fprintf( stderr, _("[-w <watchdog-minutes>]\n" ) ); + fprintf( stderr, _("[-x (overwrite all)]\n" ) ); + fprintf( stderr, _("[-F <fast-factor:1..64>]\n") ); -#if defined( HAS_LARGEFILE ) - fprintf( stderr, "[-l (large-file support for files > 2GB)] \n" ); +#if defined( HAS_LARGEFILE ) || defined ( MAC_LARGEFILE ) + fprintf( stderr, _("[-l (large-file support for files > 2GB)] \n") ); #endif exit( 1 ); } @@ -2067,17 +2129,17 @@ { if( unlink( output_file ) ) { - fprintf( stderr, "[Error] Could not remove old filename: %s \n", output_file ); - fprintf( stderr, "[Hint] This: %s is a hardlink to %s. Dunno what to do... \n", new_output_file, output_file ); + fprintf( stderr, _("[Error] Could not remove old filename: %s \n"), output_file ); + fprintf( stderr, _("[Hint] This: %s is a hardlink to %s. Dunno what to do... \n"), new_output_file, output_file ); } /* else - fprintf( stderr, "[Info] Removed \".partial\" from %s since it got copied in full \n", output_file ); */ + fprintf( stderr, _("[Info] Removed \".partial\" from %s since it got copied in full \n"), output_file ); */ } else { if( errno == EEXIST && ! overwrite_flag ) { - fprintf( stderr, "[Error] File %s already exists! Gonna name the new one %s.dupe \n", new_output_file, new_output_file ); + fprintf( stderr, _("[Error] File %s already exists! Gonna name the new one %s.dupe \n"), new_output_file, new_output_file ); strcat( new_output_file, ".dupe" ); rename( output_file, new_output_file ); } @@ -2090,7 +2152,7 @@ { /*this here is a stdio function which simply overwrites an existing file. Bad but I don't want to include another test...*/ rename( output_file, new_output_file ); - /* fprintf( stderr, "[Info] Removed \".partial\" from %s since it got copied in full \n", output_file ); */ + /* fprintf( stderr, _("[Info] Removed \".partial\" from %s since it got copied in full \n"), output_file ); */ } } if( strstr( name, ".partial" ) ) @@ -2109,17 +2171,29 @@ { if( errno == EEXIST ) { - fprintf( stderr, "[Error] The directory %s\n already exists! \n", name ); - fprintf( stderr, "[Hint] You can either [c]ontinue writing to it or you can [q]uit: " ); + if( ! overwrite_all_flag ) + { + fprintf( stderr, _("[Error] The directory %s already exists!\n"), name ); + fprintf( stderr, _("[Hint] You can either [c]ontinue writing to it, [x]overwrite all or you can [q]uit: ") ); + } while ( 1 ) { - char op; - while ((op = fgetc (stdin)) == EOF) - usleep (1); - fgetc ( stdin ); /* probably need to do this for second time it - comes around this loop */ - if( op == 'c' ) - { + int op; + if( overwrite_all_flag == TRUE ) + op = 'c'; + else + { + while ((op = fgetc (stdin)) == EOF) + usleep (1); + fgetc ( stdin ); /* probably need to do this for second time it + comes around this loop */ + } + if( op == 'c' || op == 'x' ) + { + if( op == 'x' ) + { + overwrite_all_flag = TRUE; + } return 0; } else if( op == 'q' ) @@ -2128,21 +2202,78 @@ } else { - fprintf( stderr, "\n[Hint] please choose [c]ontinue or [q]uit the next time ;-)\n" ); + fprintf( stderr, _("\n[Hint] please choose [c]ontinue, [x]overwrite all or [q]uit the next time ;-)\n") ); } } } else /*most probably the user has no right to create dir or space if full or something */ { - fprintf( stderr, "[Error] Creating of directory %s\n failed! \n", name ); - fprintf( stderr, "[Error] error: %s\n",strerror( errno ) ); + fprintf( stderr, _("[Error] Creating of directory %s\n failed! \n"), name ); + fprintf( stderr, _("[Error] error: %s\n"),strerror( errno ) ); exit( 1 ); } } return 0; } +/* +* Check the time determine whether a new progress line should be output (once per second) +*/ + +int progressUpdate(int starttime, int cur, int tot, int force) +{ + static int progress_time = 0; + + if (progress_time == 0 || progress_time != time(NULL) || force) + { + int barLen, barChar, numChars, timeSoFar, minsLeft, secsLeft, ctr, cols; + float percentComplete, percentLeft, timePerPercent; + int curtime, timeLeft; + struct winsize ws; + + ioctl(0, TIOCGWINSZ, &ws); + cols = ws.ws_col - 1; + + progress_time = time(NULL); + curtime = time(NULL); + + printf("\r"); +/* calc it this way so it's easy to change later */ +/* 2 for brackets, 1 for space, 5 for percent complete, 1 for space, 6 for time left, 1 for space */ + barLen = cols - 2 - 1 - 5 - 1 - 6 - 1; + barChar = tot / barLen; + percentComplete = (float)((float)cur / (float)tot * 100.0); + percentLeft = 100 - percentComplete; + numChars = cur / barChar; + +/* guess remaining time */ + timeSoFar = curtime - starttime; + if (percentComplete == 0) { + timePerPercent = 0; + } else { + timePerPercent = (float)(timeSoFar / percentComplete); + } + timeLeft = timePerPercent * percentLeft; + minsLeft = (int)(timeLeft / 60); + secsLeft = (int)(timeLeft % 60); + + printf("["); + for (ctr = 0; ctr < numChars-1; ctr++) { + printf("="); + } + printf("|"); + for (ctr = numChars; ctr < barLen; ctr++) { + printf(" "); + } + printf("] "); + printf("%5.1f%% %02d:%02d ", percentComplete, minsLeft, secsLeft); + fflush(stdout); + } + return(0); +} + + void install_signal_handlers() { struct sigaction action; @@ -2160,13 +2291,13 @@ void watchdog_handler( int signal ) { - fprintf( stderr, "\n[Info] Timer expired - shooting myself in the head.\n" ); + fprintf( stderr, _("\n[Info] Timer expired - shooting myself in the head.\n") ); kill( getpid(), SIGTERM ); } void shutdown_handler( int signal ) { - fprintf( stderr, "\n[Info] Terminate signal received, exiting.\n" ); + fprintf( stderr, _("\n[Info] Terminate signal received, exiting.\n") ); _exit( 2 ); } @@ -2177,9 +2308,26 @@ return strncpy(dest, src, n-1); } -#if defined(__APPLE__) && defined(__GNUC__) +#if defined(__APPLE__) && defined(__GNUC__) || defined(OpenBSD) int fdatasync( int value ) { return 0; } #endif + + +/* +* Check the time determine whether a new progress line should be output (once per second) +*/ + +int check_progress() +{ + static int progress_time = 0; + + if ( progress_time == 0 || progress_time != time(NULL) ) + { + progress_time = time(NULL); + return( 1 ); + } + return( 0 ); +} | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/vobcopy.h ^ |
@@ -1,4 +1,12 @@ -#define VERSION "1.1.0" +#define VERSION "1.2.0" + +#if defined( __gettext__ ) +#include <locale.h> +#include <libintl.h> +#define _(Text) gettext(Text) +#else +#define _(Text) Text +#endif #define DVDCSS_VERBOSE 1 #define BLOCK_COUNT 64 @@ -17,6 +25,9 @@ #include <dirent.h> /*for readdir*/ #include <errno.h> #include <signal.h> +#include <time.h> +#include <sys/ioctl.h> +#include <termios.h> #if ( defined( __unix__ ) || defined( unix )) && !defined( USG ) #include <sys/param.h> @@ -29,7 +40,7 @@ /* FreeBSD 4.10 and OpenBSD 3.2 has not <stdint.h> */ /* by some bugreport:*/ -#if !( defined( BSD ) && ( BSD >= 199306 ) ) && !defined( sun ) +#if !( defined( BSD ) && ( BSD >= 199306 ) ) && !defined( sun ) || defined(OpenBSD) #include <stdint.h> #endif @@ -58,18 +69,20 @@ /* ////////// *BSD ////////// */ #if ( defined( BSD ) && ( BSD >= 199306 ) ) -# if !defined( __NetBSD__ ) ) || \ +#if !defined( __NetBSD__ ) || \ ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) #include <sys/mount.h> #define USE_STATFS 1 +#endif -# else - +#if defined(__FreeBSD__) +#define USE_STATFS_FOR_DEV #include <sys/statvfs.h> +#else +#include <sys/statvfs.h> +#endif -# endif - -# if defined(NetBSD) +# if defined(NetBSD) || defined (OpenBSD) #include <sys/param.h> @@ -87,14 +100,18 @@ #define GETMNTINFO_USES_STATVFS # endif +#endif -# else - +#if defined(__FreeBSD__) +#define USE_STATFS_FOR_DEV +#include <sys/statvfs.h> +#else #include <sys/vfs.h> +#endif -# endif - +# if !defined(OpenBSD) #define HAS_LARGEFILE 1 +#endif typedef enum { FALSE=0, TRUE=1 } bool; @@ -129,6 +146,7 @@ /*#include <unistd.h> #include <sys/vfs.h> #include <sys/statvfs.h> */ +#define MAC_LARGEFILE 1 # endif @@ -147,7 +165,18 @@ typedef enum { FALSE=0, TRUE=1 } bool; -#else /* GNU/Linux */ +#elif defined( __GLIBC__ ) + +#include <mntent.h> +#include <sys/vfs.h> +#include <sys/statvfs.h> + +#define HAVE_GETOPT_LONG 1 +#define HAS_LARGEFILE 1 + + typedef enum { FALSE=0, TRUE=1 } bool; + +#else /* ////////// For other cases ////////// */ @@ -200,6 +229,8 @@ void watchdog_handler( int signal ); void shutdown_handler( int signal ); char *safestrncpy(char *dest, const char *src, size_t n); +int check_progress( void ); /* this can be removed because the one below supersedes it */ +int progressUpdate( int starttime, int cur, int tot, int force ); #if defined(__APPLE__) && defined(__GNUC__) int fdatasync( int value ); | ||
Added | vobcopy-1.2.0.tar.bz2/vobcopy.mo ^ | |
[-] [+] | Added | vobcopy-1.2.0.tar.bz2/vobcopy.pot ^ |
@@ -0,0 +1,873 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-03-31 23:48+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: vobcopy.c:189 +#, c-format +msgid "[Error] The thing behind -a has to be a number! \n" +msgstr "" + +#: vobcopy.c:196 +#, c-format +msgid "[Hint] Um, you set angle to 0, try 1 instead ;-)\n" +msgstr "" + +#: vobcopy.c:204 +#, c-format +msgid "[Error] The thing behind -b has to be a number! \n" +msgstr "" + +#: vobcopy.c:211 vobcopy.c:234 vobcopy.c:265 vobcopy.c:287 +#, c-format +msgid "[Error] Wrong suffix behind -b, only b,k,m or g \n" +msgstr "" + +#: vobcopy.c:248 +#, c-format +msgid "[Error] The thing behind -c has to be a number! \n" +msgstr "" + +#: vobcopy.c:258 +#, c-format +msgid "[Error] The thing behind -e has to be a number! \n" +msgstr "" + +#: vobcopy.c:310 +#, c-format +msgid "[Error] Erm, the number comes behind -n ... \n" +msgstr "" + +#: vobcopy.c:313 +#, c-format +msgid "" +"[Hint] You use -i. Normally this is not necessary, vobcopy finds the input " +"dir by itself. This option is only there if vobcopy makes trouble.\n" +msgstr "" + +#: vobcopy.c:314 +#, c-format +msgid "" +"[Hint] If vobcopy makes trouble, please mail me so that I can fix this " +"(robos@muon.de). Thanks\n" +msgstr "" + +#: vobcopy.c:318 +#, c-format +msgid "" +"[Error] Please don't use -i /dev/something in this version, only the next " +"version will support this again.\n" +msgstr "" + +#: vobcopy.c:319 +#, c-format +msgid "" +"[Hint] Please use the mount point instead (/cdrom, /dvd, /mnt/dvd or " +"something)\n" +msgstr "" + +#: vobcopy.c:340 +#, c-format +msgid "[Error] The thing behind -n has to be a number! \n" +msgstr "" + +#: vobcopy.c:350 vobcopy.c:382 +#, c-format +msgid "[Hint] Erm, the number comes behind -n ... \n" +msgstr "" + +#: vobcopy.c:376 +#, c-format +msgid "[Error] Please specify output dirs in this order: -o -1 -2 -3 -4 \n" +msgstr "" + +#: vobcopy.c:410 +#, c-format +msgid "[Error] The thing behind -F has to be a number! \n" +msgstr "" + +#: vobcopy.c:416 +#, c-format +msgid "" +"[Hint] The largest value for -F is %d at the moment - used that one...\n" +msgstr "" + +#: vobcopy.c:427 +#, c-format +msgid "[Error] The thing behind -w has to be a number! \n" +msgstr "" + +#: vobcopy.c:433 +#, c-format +msgid "[Hint] Negative minutes aren't allowed - disabling watchdog.\n" +msgstr "" + +#: vobcopy.c:479 vobcopy.c:493 +#, c-format +msgid "[Error] Wrong option.\n" +msgstr "" + +#: vobcopy.c:486 +#, c-format +msgid "[Error] %s was compiled without support for long options.\n" +msgstr "" + +#: vobcopy.c:499 vobcopy.c:2022 +#, c-format +msgid "Vobcopy " +msgstr "" + +#: vobcopy.c:500 +#, c-format +msgid "" +"[Hint] All lines starting with \"libdvdread:\" are not from vobcopy but from " +"the libdvdread-library\n" +msgstr "" + +#: vobcopy.c:511 +#, c-format +msgid "" +"\n" +"[Error] Hmm, the path length of your current directory is really large " +"(>255)\n" +msgstr "" + +#: vobcopy.c:512 +#, c-format +msgid "[Hint] Change to a path with shorter path length pleeeease ;-)\n" +msgstr "" + +#: vobcopy.c:526 +#, c-format +msgid "[Hint] Quiet mode - All messages will now end up in %s\n" +msgstr "" + +#: vobcopy.c:575 +#, c-format +msgid "[Info] Uhu, super-verbose\n" +msgstr "" + +#: vobcopy.c:615 +#, c-format +msgid "[Info] The log-file is written to %s\n" +msgstr "" + +#: vobcopy.c:616 +#, c-format +msgid "" +"[Hint] Make sure that vobcopy doesn't have to ask questions (like " +"overwriting of old files), these questions end up in the log file so you " +"don't see them...\n" +msgstr "" + +#: vobcopy.c:617 +#, c-format +msgid "" +"[Hint] If you don't like that position, use -L /path/to/logfile/ instead of -" +"v -v\n" +msgstr "" + +#: vobcopy.c:633 +#, c-format +msgid "--------------------------------------------------------------------------------\n" +msgstr "" + +#: vobcopy.c:634 +#, c-format +msgid "[Info] Called: %s\n" +msgstr "" + +#: vobcopy.c:640 +#, c-format +msgid "" +"\n" +"[Error] There can be only one: either -m or -n...'\n" +msgstr "" + +#: vobcopy.c:653 +#, c-format +msgid "" +"\n" +"[Error] Bloody path to long '%s'\n" +msgstr "" + +#: vobcopy.c:665 +#, c-format +msgid "[Error] Could not get the device which belongs to the given path!\n" +msgstr "" + +#: vobcopy.c:678 +#, c-format +msgid "[Error] Could not get the device and path! Maybe not mounted the dvd?\n" +msgstr "" + +#: vobcopy.c:688 +#, c-format +msgid "" +"\n" +"[Info] Path to dvd: %s\n" +msgstr "" + +#: vobcopy.c:692 +#, c-format +msgid "" +"\n" +"[Error] Path thingy didn't work '%s'\n" +msgstr "" + +#: vobcopy.c:693 +#, c-format +msgid "[Error] Try something like -i /cdrom, /dvd or /mnt/dvd \n" +msgstr "" + +#: vobcopy.c:695 +#, c-format +msgid "" +"[Hint] By the way, you have %i cdroms|dvds mounted, that probably caused the " +"problem\n" +msgstr "" + +#: vobcopy.c:706 +#, c-format +msgid "[Info] Name of the dvd: %s\n" +msgstr "" + +#: vobcopy.c:722 +#, c-format +msgid "[Error] Can't open VMG info.\n" +msgstr "" + +#: vobcopy.c:754 +#, c-format +msgid "[Info] There are %d titles on this DVD.\n" +msgstr "" + +#: vobcopy.c:758 +#, c-format +msgid "[Error] Invalid title %d.\n" +msgstr "" + +#: vobcopy.c:769 +#, c-format +msgid "[Info] There are %i chapters on the dvd.\n" +msgstr "" + +#: vobcopy.c:770 +#, c-format +msgid "[Info] Most chapters has title %i with %d chapters.\n" +msgstr "" + +#: vobcopy.c:775 vobcopy.c:818 +#, c-format +msgid "[Info] All titles:\n" +msgstr "" + +#: vobcopy.c:780 +#, c-format +msgid "[Info] Title %i has %d chapters.\n" +msgstr "" + +#: vobcopy.c:783 +#, c-format +msgid "[Info] Title %i has %d chapter.\n" +msgstr "" + +#: vobcopy.c:793 +#, c-format +msgid "[Error] Invalid chapter %d\n" +msgstr "" + +#: vobcopy.c:807 +#, c-format +msgid "" +"\n" +"[Info] There are %d angles on this dvd.\n" +msgstr "" + +#: vobcopy.c:810 +#, c-format +msgid "[Error] Invalid angle %d\n" +msgstr "" + +#: vobcopy.c:823 +#, c-format +msgid "[Info] Title %i has %d angles.\n" +msgstr "" + +#: vobcopy.c:826 +#, c-format +msgid "[Info] Title %i has %d angle.\n" +msgstr "" + +#: vobcopy.c:844 +#, c-format +msgid "" +"\n" +"[Error] Something went wrong during the size detection of the" +msgstr "" + +#: vobcopy.c:845 +#, c-format +msgid "" +"\n" +"[Error] vobs, size check at the end won't work (probably), but I continue " +"anyway\n" +"\n" +msgstr "" + +#: vobcopy.c:874 +#, c-format +msgid "" +"\n" +"[Info] Setting watchdog timer to %d minutes\n" +msgstr "" + +#: vobcopy.c:884 vobcopy.c:1364 vobcopy.c:1444 vobcopy.c:1514 +#, c-format +msgid "" +"\n" +"[Info] DVD-name: %s\n" +msgstr "" + +#: vobcopy.c:885 vobcopy.c:1445 +#, c-format +msgid "[Info] Disk free: %.0f MB\n" +msgstr "" + +#: vobcopy.c:886 vobcopy.c:1447 +#, c-format +msgid "[Info] Vobs size: %.0f MB\n" +msgstr "" + +#: vobcopy.c:911 +#, c-format +msgid "[Info] Writing files to this dir: %s\n" +msgstr "" + +#: vobcopy.c:924 +#, c-format +msgid "" +"[Error] Hmm, weird, the dir video_ts|VIDEO_TS on the dvd couldn't be opened\n" +msgstr "" + +#: vobcopy.c:925 +#, c-format +msgid "[Error] The dir to be opened was: %s\n" +msgstr "" + +#: vobcopy.c:926 +#, c-format +msgid "[Hint] Please mail me what your vobcopy call plus -v -v spits out\n" +msgstr "" + +#: vobcopy.c:1001 +#, c-format +msgid "" +"\n" +"[Hint] File on dvd ends in \";?\" (%s)\n" +msgstr "" + +#: vobcopy.c:1009 +#, c-format +msgid "[Info] Writing to %s \n" +msgstr "" + +#: vobcopy.c:1014 +#, c-format +msgid "" +"\n" +"[Error] File '%s' already exists, [o]verwrite, [s]kip or [q]uit? " +msgstr "" + +#: vobcopy.c:1026 vobcopy.c:1071 vobcopy.c:1097 vobcopy.c:1610 vobcopy.c:1661 +#: vobcopy.c:1677 vobcopy.c:1707 +#, c-format +msgid "" +"\n" +"[Error] Error opening file %s\n" +msgstr "" + +#: vobcopy.c:1027 vobcopy.c:1072 vobcopy.c:1098 vobcopy.c:1141 vobcopy.c:1176 +#: vobcopy.c:1611 vobcopy.c:1750 +#, c-format +msgid "[Error] Error: %s\n" +msgstr "" + +#: vobcopy.c:1048 +#, c-format +msgid "" +"\n" +"[Hint] Please choose [o]verwrite, [s]kip, or [q]uit the next time ;-)\n" +msgstr "" + +#: vobcopy.c:1059 vobcopy.c:1599 +#, c-format +msgid "" +"\n" +"[Error] File '%s' already exists, [o]verwrite or [q]uit? \n" +msgstr "" + +#: vobcopy.c:1088 +#, c-format +msgid "" +"\n" +"[Hint] Please choose [o]verwrite or [q]uit the next time ;-)\n" +msgstr "" + +#: vobcopy.c:1140 vobcopy.c:1175 vobcopy.c:1287 +#, c-format +msgid "" +"\n" +"[Error] Error writing to %s \n" +msgstr "" + +#: vobcopy.c:1146 vobcopy.c:1181 +#, c-format +msgid "%4.0fkB of %4.0fkB written\r" +msgstr "" + +#: vobcopy.c:1149 vobcopy.c:1184 vobcopy.c:1317 vobcopy.c:1720 +#, c-format +msgid "\n" +msgstr "" + +#: vobcopy.c:1154 vobcopy.c:1189 vobcopy.c:1322 vobcopy.c:1773 +#, c-format +msgid "" +"\n" +"[Error] error writing to %s \n" +msgstr "" + +#: vobcopy.c:1155 vobcopy.c:1190 vobcopy.c:1323 vobcopy.c:1774 vobcopy.c:2144 +#, c-format +msgid "[Error] error: %s\n" +msgstr "" + +#: vobcopy.c:1237 +#, c-format +msgid "[Info] Can't stat() %s.\n" +msgstr "" + +#: vobcopy.c:1243 +#, c-format +msgid "[Info] Vob %d %d (%s) has a size of %lli\n" +msgstr "" + +#: vobcopy.c:1257 +#, c-format +msgid "[Info] Start of %s at %d blocks \n" +msgstr "" + +#: vobcopy.c:1279 +#, c-format +msgid "[Warn] Had to skip %d blocks! " +msgstr "" + +#: vobcopy.c:1288 +#, c-format +msgid "[Error] Error: %s, errno: %d \n" +msgstr "" + +#: vobcopy.c:1301 vobcopy.c:1311 +#, c-format +msgid "%4.0fMB of %4.0fMB written " +msgstr "" + +#: vobcopy.c:1304 +#, c-format +msgid "( %3.1f %% ) \r" +msgstr "" + +#: vobcopy.c:1314 +#, c-format +msgid "( 100.0%% ) \r" +msgstr "" + +#: vobcopy.c:1340 +#, c-format +msgid "" +"[Error] Not enough free space on the destination dir. Please choose another " +"one or -f\n" +msgstr "" + +#: vobcopy.c:1341 +#, c-format +msgid "[Error] or dirs behind -1, -2 ... are NOT allowed with -m!\n" +msgstr "" + +#: vobcopy.c:1356 +#, c-format +msgid "[Info] Using Title: %i\n" +msgstr "" + +#: vobcopy.c:1357 +#, c-format +msgid "[Info] Title has %d chapters and %d angles\n" +msgstr "" + +#: vobcopy.c:1358 +#, c-format +msgid "[Info] Using Chapter: %i\n" +msgstr "" + +#: vobcopy.c:1359 +#, c-format +msgid "[Info] Using Angle: %i\n" +msgstr "" + +#: vobcopy.c:1365 +#, c-format +msgid "[Info] Disk free: %f MB\n" +msgstr "" + +#: vobcopy.c:1366 +#, c-format +msgid "[Info] Vobs size: %f MB\n" +msgstr "" + +#: vobcopy.c:1381 +#, c-format +msgid "[Error] Can't open the title %d info file.\n" +msgstr "" + +#: vobcopy.c:1408 +#, c-format +msgid "[Error] Can't open title VOBS (VTS_%02d_1.VOB).\n" +msgstr "" + +#: vobcopy.c:1425 +#, c-format +msgid "[Info] Vob_size was 0\n" +msgstr "" + +#: vobcopy.c:1432 +#, c-format +msgid "" +"\n" +"[Info] Difference between vobsize read from cd and size returned from " +"libdvdread:\n" +msgstr "" + +#: vobcopy.c:1437 +#, c-format +msgid "" +"[Info] Vob_size (stat) = %lu\n" +"[Info] libdvdsize = %lu\n" +msgstr "" + +#: vobcopy.c:1461 +#, c-format +msgid "" +"\n" +"[Info] Disk free: %.0f MB" +msgstr "" + +#: vobcopy.c:1462 +#, c-format +msgid "" +"\n" +"[Info] Vobs size: %.0f MB" +msgstr "" + +#: vobcopy.c:1464 +#, c-format +msgid "" +"\n" +"[Error] Hmm, better change to a dir with enough space left or call with -f " +"(force) \n" +msgstr "" + +#: vobcopy.c:1468 vobcopy.c:1469 +#, c-format +msgid "[Error] Hmm, statfs (statvfs) seems not to work on that directory. \n" +msgstr "" + +#: vobcopy.c:1470 +#, c-format +msgid "" +"[Hint] Nevertheless, do you want vobcopy to continue [y] or do you want to " +"check for \n" +msgstr "" + +#: vobcopy.c:1471 +#, c-format +msgid "[Hint] enough space first [q]?\n" +msgstr "" + +#: vobcopy.c:1481 +#, c-format +msgid "[Info] y pressed - force write\n" +msgstr "" + +#: vobcopy.c:1487 +#, c-format +msgid "[Info] n/q pressed\n" +msgstr "" + +#: vobcopy.c:1493 +#, c-format +msgid "[Error] Please choose [y] to continue or [n] to quit\n" +msgstr "" + +#: vobcopy.c:1518 +#, c-format +msgid "" +"\n" +"[Info] Your-name for the dvd: %s\n" +msgstr "" + +#: vobcopy.c:1534 +#, c-format +msgid "[Info] Free space for -o dir: %.0f\n" +msgstr "" + +#: vobcopy.c:1563 +#, c-format +msgid "[Info] Free space for -%i dir: %.0f\n" +msgstr "" + +#: vobcopy.c:1579 +#, c-format +msgid "[Info] Taken max_filesize_in_blocks(2GB version): %.0f\n" +msgstr "" + +#: vobcopy.c:1587 +#, c-format +msgid "[Info] Taken max_filesize_in_blocks(lfs version): %.0f\n" +msgstr "" + +#: vobcopy.c:1627 +#, c-format +msgid "" +"\n" +"[Hint] please choose [o]verwrite or [q]uit the next time ;-)\n" +msgstr "" + +#: vobcopy.c:1643 +#, c-format +msgid "[Error] Seems your platter is full...\n" +msgstr "" + +#: vobcopy.c:1646 +#, c-format +msgid "" +"\n" +"[Error] File '%s' already exists, [o]verwrite, [a]ppend, [q]uit? \n" +msgstr "" + +#: vobcopy.c:1683 +#, c-format +msgid "[Info] User chose append\n" +msgstr "" + +#: vobcopy.c:1694 +#, c-format +msgid "" +"\n" +"[Hint] Please choose [o]verwrite, [a]ppend, [q]uit the next time ;-)\n" +msgstr "" + +#: vobcopy.c:1746 +#, c-format +msgid "" +"\n" +"[Error] Write() error\n" +msgstr "" + +#: vobcopy.c:1762 +#, c-format +msgid "%4.0fMB of %4.0fMB written (%.0f %%)\r" +msgstr "" + +#: vobcopy.c:1778 +#, c-format +msgid "%4.0fMB of %4.0fMB written ( 100.0 %%)\r" +msgstr "" + +#: vobcopy.c:1786 +#, c-format +msgid "[Info] max_filesize_in_blocks %8.0f \n" +msgstr "" + +#: vobcopy.c:1787 +#, c-format +msgid "[Info] offset at the end %8.0f \n" +msgstr "" + +#: vobcopy.c:1788 +#, c-format +msgid "[Info] file_size_in_blocks %8.0f \n" +msgstr "" + +#: vobcopy.c:1803 +#, c-format +msgid "" +"\n" +"[Error] File size (%.0f) of %s differs largely from that on dvd, therefore " +"keeps it's .partial\n" +msgstr "" + +#: vobcopy.c:1827 +#, c-format +msgid "[Info] Single file size (of copied file %s ) %.0f\n" +msgstr "" + +#: vobcopy.c:1828 +#, c-format +msgid "[Info] Cumulated size %.0f\n" +msgstr "" + +#: vobcopy.c:1832 +#, c-format +msgid "[Info] Successfully copied file %s\n" +msgstr "" + +#: vobcopy.c:1839 +#, c-format +msgid "[Info] # of separate files: %i\n" +msgstr "" + +#: vobcopy.c:1849 +#, c-format +msgid "" +"\n" +"[Info] Copying finished! Let's see if the sizes match (roughly)\n" +msgstr "" + +#: vobcopy.c:1850 +#, c-format +msgid "[Info] Combined size of title-vobs: %.0f (%.0f MB)\n" +msgstr "" + +#: vobcopy.c:1851 +#, c-format +msgid "[Info] Copied size (size on disk): %.0f (%.0f MB)\n" +msgstr "" + +#: vobcopy.c:1855 +#, c-format +msgid "[Error] Hmm, the sizes differ by more than %d\n" +msgstr "" + +#: vobcopy.c:1856 +#, c-format +msgid "[Hint] Take a look with MPlayer if the output is ok\n" +msgstr "" + +#: vobcopy.c:1860 +#, c-format +msgid "[Info] Everything seems to be fine, the sizes match pretty good ;-)\n" +msgstr "" + +#: vobcopy.c:1861 +#, c-format +msgid "[Hint] Have a lot of fun!\n" +msgstr "" + +#: vobcopy.c:1910 vobcopy.c:1954 +#, c-format +msgid "[Info] Used the linux statfs\n" +msgstr "" + +#: vobcopy.c:1914 vobcopy.c:1958 +#, c-format +msgid "[Info] Used statvfs\n" +msgstr "" + +#: vobcopy.c:1928 +#, c-format +msgid "[Info] In freespace_getter:for %s : %.0f free\n" +msgstr "" + +#: vobcopy.c:1929 +#, c-format +msgid "[Info] In freespace_getter:bavail %ld * bsize %ld = above\n" +msgstr "" + +#: vobcopy.c:1972 +#, c-format +msgid "[Info] In usedspace_getter:for %s : %.0f used\n" +msgstr "" + +#: vobcopy.c:1973 +#, c-format +msgid "[Info] In usedspace_getter:part1 %ld, part2 %ld\n" +msgstr "" + +#: vobcopy.c:2012 +#, c-format +msgid "" +"\n" +"[Info] Outputting to %s" +msgstr "" + +#: vobcopy.c:2044 +#, c-format +msgid "[-l (large-file support for files > 2GB)] \n" +msgstr "" + +#: vobcopy.c:2075 +#, c-format +msgid "[Error] Could not remove old filename: %s \n" +msgstr "" + +#: vobcopy.c:2076 +#, c-format +msgid "[Hint] This: %s is a hardlink to %s. Dunno what to do... \n" +msgstr "" + +#: vobcopy.c:2085 +#, c-format +msgid "[Error] File %s already exists! Gonna name the new one %s.dupe \n" +msgstr "" + +#: vobcopy.c:2117 +#, c-format +msgid "[Error] The directory %s already exists!\n" +msgstr "" + +#: vobcopy.c:2118 +#, c-format +msgid "[Hint] You can either [c]ontinue writing to it or you can [q]uit: " +msgstr "" + +#: vobcopy.c:2136 +#, c-format +msgid "" +"\n" +"[Hint] please choose [c]ontinue or [q]uit the next time ;-)\n" +msgstr "" + +#: vobcopy.c:2143 +#, c-format +msgid "" +"[Error] Creating of directory %s\n" +" failed! \n" +msgstr "" + +#: vobcopy.c:2168 +#, c-format +msgid "" +"\n" +"[Info] Timer expired - shooting myself in the head.\n" +msgstr "" + +#: vobcopy.c:2174 +#, c-format +msgid "" +"\n" +"[Info] Terminate signal received, exiting.\n" +msgstr "" | ||
[-] [+] | Changed | vobcopy-1.2.0.tar.bz2/vobcopy.spec ^ |
@@ -1,6 +1,6 @@ Name: vobcopy Summary: vobcopy copies DVD .vob files to harddisk -Version: 1.0.2 +Version: 1.2.0 Release: 1 License: GPL Group: Applications/Multimedia @@ -48,6 +48,15 @@ %doc Changelog COPYING README Release-Notes TODO alternative_programs.txt %changelog +* Mon Jun 8 2009 Robos <robos@muon.de> +- 1.2.0: - guess what - see changelog :-) + +* Wed Oct 8 2008 Robos <robos@muon.de> +- 1.1.2: - guess what - see changelog :-) + +* Sun Mar 3 2008 Robos <robos@muon.de> +- 1.1.1: -see changelog + * Sun Jan 13 2008 Robos <robos@muon.de> - 1.1.0: -see changelog |