Projects
Multimedia
lxdvdrip
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
lxdvdrip.spec
Changed
@@ -12,8 +12,8 @@ Summary(de): Video-DVD Backup Programm License: GPL Group: Productivity/Multimedia/Video/Editors and Convertors -URL: http://lxdvdrip.berlios.de/ -Version: 1.76 +URL: http://sourceforge.net/p/lxdvdrip/home/Homepage/ +Version: 1.77 Release: 1 Source0: lxdvdrip-%{version}.tar.bz2 Patch0: lxdvdrip_conf.diff @@ -82,7 +82,7 @@ cd vamps && make && cd .. cd dvdbackup && make && cd .. cd requant && make && cd .. -cd buffer && make && cd .. +cd mbuffer && make && cd .. %install %{__rm} -rf CVS @@ -97,7 +97,7 @@ %{__install} -m 0755 vamps/play_cell_lxdvdrip %{buildroot}/%{_bindir}/ %{__install} -m 0755 dvdbackup/dvdbackup_lxdvdrip %{buildroot}/%{_bindir}/ %{__install} -m 0755 requant/requant_lxdvdrip %{buildroot}/%{_bindir}/ -%{__install} -m 0755 buffer/buffer %{buildroot}/%{_bindir}/buffer_lxdvdrip +%{__install} -m 0755 mbuffer/mbuffer_lxdvdrip %{buildroot}/%{_bindir}/ %{__install} -m 0644 doc-pak/lxdvdrip.conf.DE %{buildroot}%{_sysconfdir}/lxdvdrip.conf %{__install} -m 0644 lxdvdrip.wav %{buildroot}%{_datadir}/ %{__install} -m 0644 lxdvdrip.1 %{buildroot}%{_mandir}/man1/ @@ -115,6 +115,15 @@ %{_mandir}/man1/lxdvdrip.* %changelog +* Thu Nov 24 2011 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.77-0.pm.1 +update to 1.77: +- Bugfix mode "vamps_menu": DVD-structure from hardisk can be copied. +- wodim/genisoimage replaces cdrecord/mkisofs. +- Fix building on Ubuntu 11.10. +- Mbuffer replaces buffer (lxdvdrip -st=trans_par). +- Support for dvdauthor 0.7: Create file ~./config/video_format with content PAL/NTSC. +- Support for dvdauthor 0.7: Patches (against error "SCR moves backwards"). +- Bugfix vlc as streamtool: Use dvdsimple instead of dvd. Else vlc does not quit. * Wed Apr 14 2010 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.76-0.pm.1 - update to 1.76 * Thu Feb 18 2010 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 1.75-1.pm.3
View file
lxdvdrip_conf.diff
Changed
@@ -1,5 +1,5 @@ ---- doc-pak/lxdvdrip.conf.DE.orig 2010-02-20 17:37:42.000000000 +0100 -+++ doc-pak/lxdvdrip.conf.DE 2010-04-14 02:46:21.239015369 +0200 +--- doc-pak/lxdvdrip.conf.DE.orig 2011-10-21 20:51:44.000000000 +0200 ++++ doc-pak/lxdvdrip.conf.DE 2011-11-24 11:54:16.825663254 +0100 @@ -54,13 +54,13 @@ # Device fuer DVD-Leselaufwerk. @@ -9,7 +9,7 @@ # Device fuer DVD-Brenner. # Beim Brennen mit "growisofs" ist zumeist "/dev/sr0" die richtige Wahl. - # Bei "cdrecord" zumeist "0,0,0", testen mit "cdrecord -scanbus". + # Bei "wodim" zumeist "0,0,0", testen mit "wodim -scanbus". # Entspricht "-db=". -dvdbrenner=/dev/sr0 +dvdbrenner=/dev/dvdrecorder
View file
lxdvdrip_conf_new.diff
Changed
@@ -1,5 +1,5 @@ ---- doc-pak/lxdvdrip.conf.DE.orig 2010-02-20 17:37:42.000000000 +0100 -+++ doc-pak/lxdvdrip.conf.DE 2010-04-14 02:50:15.491015708 +0200 +--- doc-pak/lxdvdrip.conf.DE.orig 2011-10-21 20:51:44.000000000 +0200 ++++ doc-pak/lxdvdrip.conf.DE 2011-11-24 11:57:03.940463719 +0100 @@ -54,13 +54,13 @@ # Device fuer DVD-Leselaufwerk. @@ -9,7 +9,7 @@ # Device fuer DVD-Brenner. # Beim Brennen mit "growisofs" ist zumeist "/dev/sr0" die richtige Wahl. - # Bei "cdrecord" zumeist "0,0,0", testen mit "cdrecord -scanbus". + # Bei "wodim" zumeist "0,0,0", testen mit "wodim -scanbus". # Entspricht "-db=". -dvdbrenner=/dev/sr0 +dvdbrenner=/dev/dvd
View file
lxdvdrip-1.76.tar.bz2/buffer
Deleted
-(directory)
View file
lxdvdrip-1.76.tar.bz2/buffer/COPYING
Deleted
@@ -1,339 +0,0 @@ - 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
View file
lxdvdrip-1.76.tar.bz2/buffer/Makefile
Deleted
@@ -1,34 +0,0 @@ -# Make the buffer program - -# You might need to add the following to CGFLAGS: -# -# Add -DSYS5 for A System 5 (USG) version of Unix -# You should also add -DSYS5 for Ultrix, AIX, and Solaris. -# Add -DDEF_SHMEM=n if you can only have n bytes of shared memory -# (eg: -DDEF_SHMEM=524288 if you can only have half a meg.) -# Add -DAMPEX to change the default settings suitable for the high capacity -# Ampex drives, such as the DST 310. - -CC=gcc -CFLAGS=-Wall - -# Where to install buffer -INSTBIN=/usr/local/bin - -RM=/bin/rm -ALL=README Makefile buffer.c sem.c sem.h COPYING - -all: buffer - -buffer: buffer.o sem.o - $(CC) -o buffer $(CFLAGS) buffer.o sem.o - -clean: - $(RM) -f *.o core buffer .merrs - -install: buffer - cp buffer $(INSTBIN)/buffer_lxdvdrip - chmod 755 $(INSTBIN)/buffer_lxdvdrip - -uninstall: buffer - rm -f $(INSTBIN)/buffer_lxdvdrip
View file
lxdvdrip-1.76.tar.bz2/buffer/README
Deleted
@@ -1,51 +0,0 @@ -This is a program designed to speed up writing tapes on remote tape -drives. Requirements are shared memory and locks which normally -means that these are supported in your kernel. - -Buffer has been tested under SunOS 4.0.*, SunOS 4.1.*, Solarix, HP-UX 7.0, -and Gould UTX 2.1A (sv universe). - -The program splits itself into two processes. The first process reads -(and reblocks) from stdin into a shared memory buffer. The second -writes from the shared memory buffer to stdout. Doing it this way -means that the writing side effectly sits in a tight write loop and -doesn't have to wait for input. Similarly for the input side. It is -this waiting that slows down other reblocking processes, like dd. - -I run an archive and need to write large chunks out to tape regularly -with an ethernet in the way. Using 'buffer' in a command like: - - tar cvf - stuff | rsh somebox buffer -o /dev/rst8 - -is a factor of 5 faster than the best alternative, gnu tar with its -remote tape option: - - tar cvf somebox:/dev/rst8 stuff - -We have been using buffer here at Imperial for a couple of years now -for writing tar tapes and the main system dumps. - -Thanks to Kevin Twidle <kpt@doc.ic.ac.uk> for the -p and -B code. -Thanks to Bard Isley <brad@slammer.atl.ga.us> for fixes to the - read loop/SIGCHLD handling. -Thanks to PerSteinar.Iversen@fi.uib.no for the DEC Alpha patches. -Thanks to kargard@ampex.com (Erik L. Kargard) for the AMPEX enhancements. - -INSTALLATION: - Check that your kernel supports shared memory and semaphores. - A quick way to check is to build buffer and run it. - If it says "couldn't create shared memory segment" you probably - need to reconfigure and rebuild your kernel. - - To install edit the Makefile and tailor the variables to - your local systems. Then type make. - -DISCLAIMER: - This package is under the GNU GENERAL PUBLIC LICENSE! - In addtion under NO circumstances can I, or Imperial College, - be held liable for any event caused by the running or storing - of this program or its documentation. - -Lee McLoughlin. Phone: +44 171 594 8388 -IC-Parc, William Penney Lab, Fax: +44 171 594 8449 -Imperial College, London, SW7 2BZ, UK Email: L.McLoughlin@doc.ic.ac.uk
View file
lxdvdrip-1.76.tar.bz2/buffer/buffer.c
Deleted
@@ -1,1014 +0,0 @@ -/* - Buffer. Very fast reblocking filter speedy writing of tapes. - Copyright (C) 1990,1991 Lee McLoughlin - - 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 1, 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. - - Lee McLoughlin. - Dept of Computing, Imperial College, - 180 Queens Gate, London, SW7 2BZ, UK. - - Email: L.McLoughlin@doc.ic.ac.uk -*/ - -/* This is a reblocking process, designed to try and read from stdin - * and write to stdout - but to always try and keep the writing side - * busy. It is meant to try and stream tape writes. - * - * This program runs in two parts. The reader and the writer. They - * communicate using shared memory with semaphores locking the access. - * The shared memory implements a circular list of blocks of data. - * - * L.McLoughlin, Imperial College, 1990 - * - * $Log: buffer.c,v $ - * Revision 1.1.1.13 2010/01/10 15:40:05 stefanbecker - * Fix vlc-calls (dvdsimple=>dvd). - * - * Revision 1.1.1.12 2009/11/03 18:14:04 stefanbecker - * dvdbackup / libdvdread4. - * - * Revision 1.1.1.11 2009/08/08 11:42:07 stefanbecker - * Update to dvd95-1.50p3. - * - * Revision 1.1.1.10 2009/05/19 16:41:45 stefanbecker - * Update to dvd95 1.51. - * - * Revision 1.1.1.9 2009/04/19 19:10:28 stefanbecker - * Bugfix Copy Mode. - * - * Revision 1.1.1.8 2009/03/29 19:30:35 stefanbecker - * dvdbackup buxfix. - * - * Revision 1.1.1.7 2009/02/21 17:20:12 stefanbecker - * call requant_lxdvdrip like tcrequant. - * - * Revision 1.1.1.6 2009/02/18 15:08:38 stefanbecker - * dvdwizard / PAL / NTSC. - * - * Revision 1.1.1.5 2009/01/25 10:46:35 stefanbecker - * Set version to 1.73. - * - * Revision 1.1.1.4 2009/01/20 23:12:24 stefanbecker - * Replace tcrequant with requant_lxdvdrip. - * - * Revision 1.1.1.3 2008/08/06 17:36:41 stefanbecker - * Bugfix reading DVD Structure with Angles. - * - * Revision 1.1.1.2 2008/06/14 22:34:17 stefanbecker - * Fix Compiler Warnings on Suse11. - * - * Revision 1.19 1995/08/24 17:46:28 lmjm - * Be more careful abour EINTR errors - * Ingnore child processes dying. - * - * Revision 1.18 1993/08/25 19:07:31 lmjm - * Added Brad Isleys patchs to read/sigchld handling. - * - * Revision 1.17 1993/06/04 10:26:39 lmjm - * Cleaned up error reporting. - * Spot when the child terminating is not mine but inherited from via exec. - * Use only one semaphore group. - * Print out why writer died on error. - * - * Revision 1.16 1993/05/28 10:47:32 lmjm - * Debug shutdown sequence. - * - * Revision 1.15 1992/11/23 23:32:58 lmjm - * Oops! This should be outside the ifdef - * - * Revision 1.14 1992/11/23 23:29:58 lmjm - * allow MAX_BLOCKSIZE and DEF_SHMEM to be configured - * - * Revision 1.13 1992/11/23 23:22:29 lmjm - * Printf's use %lu where appropriate. - * - * Revision 1.12 1992/11/23 23:17:55 lmjm - * Got rid of floats and use Kbyte counters instead. - * - * Revision 1.11 1992/11/03 23:11:51 lmjm - * Forgot Andi Karrer on the patch list. - * - * Revision 1.10 1992/11/03 22:58:41 lmjm - * Cleaned up the debugging prints. - * - * Revision 1.9 1992/11/03 22:53:00 lmjm - * Corrected stdin, stout and showevery use. - * - * Revision 1.8 1992/11/03 22:41:34 lmjm - * Added 2Gig patches from: - * Andi Karrer <karrer@bernina.ethz.ch> - * Rumi Zahir <rumi@iis.ethz.ch> - * Christoph Wicki <wicki@iis.ethz.ch> - * - * Revision 1.7 1992/07/23 20:42:03 lmjm - * Added 't' option to print total writen at end. - * - * Revision 1.6 1992/04/07 19:57:30 lmjm - * Added Kevins -B and -p options. - * Turn off buffering to make -S output appear ok. - * Added GPL. - * - * Revision 1.5 90/07/22 18:46:38 lmjm - * Added system 5 support. - * - * Revision 1.4 90/07/22 18:29:48 lmjm - * Updated arg handling to be more consistent. - * Make sofar printing size an option. - * - * Revision 1.3 90/05/15 23:27:46 lmjm - * Added -S option (show how much has been writen). - * Added -m option to specify how much shared memory to grab. - * Now tries to fill this with blocks. - * reader waits for writer to terminate and then frees the shared mem and sems. - * - * Revision 1.2 90/01/20 21:37:59 lmjm - * Reset default number of blocks and blocksize for best thruput of - * standard tar 10K Allow. - * blocks number of blocks to be changed. - * Don't need a hole in the circular queue since the semaphores prevent block - * clash. - * - * Revision 1.1 90/01/17 11:30:23 lmjm - * Initial revision - * - */ -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <stdio.h> -#include <signal.h> -#include <fcntl.h> -#include <errno.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/ipc.h> -#include <sys/shm.h> -#include <sys/sem.h> -#include <sys/wait.h> -#include "sem.h" - - -/* General macros */ -#define TRUE 1 -#define FALSE 0 -#define K *1024 -#define M *1024*1024 - -/* Some forward declarations */ -void byee(int exit_val); -void start_reader_and_writer(); -void parse_args(int argc, char **argv); -void set_handlers(); -void buffer_allocate(); -void report_proc(); -int do_size(char *arg); -void get_buffer(); -void reader(); -void writer(); -void writer_end(); -void wait_for_writer_end(); -void get_next_free_block(); -void test_writer(); -int fill_block(); -void get_next_filled_block(); -int data_to_write(); -void write_blocks_to_stdout(int filled, int first_block); -void write_block_to_stdout(); -void pr_out(); -void end_writer(); - -/* When showing print a note every this many bytes writen */ -int showevery = 0; -#define PRINT_EVERY 10 K - -/* Pause after every write */ -unsigned write_pause; -
View file
lxdvdrip-1.76.tar.bz2/buffer/sem.c
Deleted
@@ -1,160 +0,0 @@ -/* - Buffer. Very fast reblocking filter speedy writing of tapes. - Copyright (C) 1990,1991 Lee McLoughlin - - 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 1, 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. - - Lee McLoughlin. - Dept of Computing, Imperial College, - 180 Queens Gate, London, SW7 2BZ, UK. - - Email: L.McLoughlin@doc.ic.ac.uk -*/ - -/* This is a simple module to provide an easier to understand interface to - * semaphores */ - -#include <stdio.h> -#include <sys/types.h> -#include <unistd.h> -#include <sys/stat.h> -#include <sys/ipc.h> -#include <sys/sem.h> -#include <errno.h> -#include "sem.h" - -#if defined(SYS5) || defined(ultrix) || defined(_AIX) || defined _SEM_SEMUN_UNDEFINED -union semun { - int val; - struct semid_ds *buf; - ushort *array; -}; -#endif - -/* IMPORTS */ - -/* Used to print error messages */ -extern void report_proc(); - -/* Used to end the program - on error */ -extern void byee(int exit_val); - - - -/* Set a semaphore to a particular value - meant to be used before - * first lock/unlock */ -void -sem_set( sem_id, semn, val ) - int sem_id; - int semn; - int val; -{ - union semun arg; - extern int errno; - - arg.val = val; - - errno = 0; - semctl( sem_id, semn, SETVAL, arg ); - if( errno != 0 ){ - report_proc(); - perror( "internal error, sem_set" ); - byee( -1 ); - } -} - -int -new_sems( nsems ) - int nsems; -{ - int sem; - int i; - - sem = semget( IPC_PRIVATE, nsems, IPC_CREAT|S_IREAD|S_IWRITE ); - if( sem < 0 ){ - report_proc(); - perror( "internal error, couldn't create semaphore" ); - byee( -1 ); - } - - for( i = 0; i < nsems; i++ ){ - sem_set( sem, i, 1 ); - } - - return sem; -} - -static void -do_sem( sem_id, pbuf, err ) - int sem_id; - struct sembuf *pbuf; - char *err; -{ - /* This just keeps us going in case of EINTR */ - while( 1 ){ - if( semop( sem_id, pbuf, 1 ) == -1 ){ - if( errno == EINTR ){ - continue; - } - report_proc(); - fprintf( stderr, "internal error pid %d, lock id %d\n", - getpid(), sem_id ); - perror( err ); - byee( -1 ); - } - return; - } -} - -void -lock( sem_id, semn ) - int sem_id; - int semn; -{ - struct sembuf sembuf; - - sembuf.sem_num = semn; - sembuf.sem_op = -1; - sembuf.sem_flg = 0; - - do_sem( sem_id, &sembuf, "lock error" ); -} - -void -unlock( sem_id, semn ) - int sem_id; - int semn; -{ - struct sembuf sembuf; - - sembuf.sem_num = semn; - sembuf.sem_op = 1; - sembuf.sem_flg = 0; - - do_sem( sem_id, &sembuf, "unlock error" ); -} - -void -remove_sems( sem_id ) - int sem_id; -{ - if( sem_id == -1 ) - return; - - if( semctl( sem_id, 0, IPC_RMID, (union semun) 0 ) == -1 ){ - report_proc(); - perror( "internal error, failed to remove semaphore" ); - } -}
View file
lxdvdrip-1.76.tar.bz2/buffer/sem.h
Deleted
@@ -1,37 +0,0 @@ -/* - Buffer. Very fast reblocking filter speedy writing of tapes. - Copyright (C) 1990,1991 Lee McLoughlin - - 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 1, 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. - - Lee McLoughlin. - Dept of Computing, Imperial College, - 180 Queens Gate, London, SW7 2BZ, UK. - - Email: L.McLoughlin@doc.ic.ac.uk -*/ - -/* This is a simple module to provide an easier to understand interface to - * semaphores */ - -/* Allocate new semaphores */ -int new_sems(int nsems); - -/* Perform actions on semaphores */ -void sem_set( int sem_id, int semn, int val ); - -void lock( int sem_id, int semn); -void unlock(int sem_id, int semn); -void remove_sems(int sem_id);
View file
lxdvdrip-1.76.tar.bz2/doc-pak/TODO
Deleted
@@ -1,1 +0,0 @@ -Full copy with Menu.
View file
lxdvdrip-1.76.tar.bz2/dvdauthor/0.6.14
Deleted
-(directory)
View file
lxdvdrip-1.76.tar.bz2/dvdauthor/0.6.14/dvdvob.c
Deleted
@@ -1,1796 +0,0 @@ -/* - * Copyright (C) 2002 Scott Smith (trckjunky@users.sourceforge.net) - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include "config.h" - -#include "compat.h" - -#include <assert.h> -#include <errno.h> -#include <fcntl.h> -#include <ctype.h> - -#include "dvdauthor.h" -#include "da-internal.h" - - - -struct colorremap { - int newcolors[16]; - int state,curoffs,maxlen,nextoffs,skip,ln_ctli; - struct colorinfo *origmap; -}; - -struct vscani { - int lastrefsect; - int firstgop,firsttemporal,lastadjust,adjustfields; -}; - -static pts_t timeline[19]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, - 20,60,120,240}; - -#define BIGWRITEBUFLEN (16*2048) -static unsigned char bigwritebuf[BIGWRITEBUFLEN]; -static int writebufpos=0; -static int writefile=-1; - -static unsigned char videoslidebuf[15]={255,255,255,255, 255,255,255, 0,0,0,0, 0,0,0,0}; - - -/* The following are variants for the ways I've seen DVD's encoded */ - -// Grosse Pointe Blank uses exactly 1/2 second for the FF/REW records -// Bullitt uses 1/2 video second (i.e. in NTSC, 45045 PTS) -#define DVD_FFREW_HALFSEC 45000 -// #define DVD_FFREW_HALFSEC (getratedenom(va)>>1) - -static pts_t calcpts(struct vobgroup *va,int cancomplain,int *didcomplain,pts_t *align,pts_t basepts,int nfields) -{ - // I assume pts should round down? That seems to be how mplex deals with it - // also see later comment - - pts_t fpts=getframepts(va); - int bpframe=(basepts*2-*align+fpts/2)/fpts; - if( (*align+bpframe*fpts)/2 != basepts ) { - if( !*didcomplain ) { - if( cancomplain ) - fprintf(stderr,"WARN: Video PTS does not line up on a multiple of a field.\n"); - *didcomplain=1; - } - *align=basepts*2; - } else - nfields += bpframe; - return (*align+nfields*fpts)/2; -} - -static int findnextvideo(struct vob *va, int cur, int dir) -{ - // find next (dir=1) or previous(dir=-1) vobu with video - int i, numvobus; - - numvobus = va->numvobus; - switch(dir){ - case 1: // forward - for(i = cur+1; i < numvobus; i++) if(va->vi[i].hasvideo) return i; - return -1; - case -1: // backward - for(i = cur-1; i > -1; i--) if(va->vi[i].hasvideo) return i; - return -1; - default: - // ?? - return -1; - } -} - -static int findaudsect(struct vob *va,int aind,pts_t pts0,pts_t pts1) -{ - struct audchannel *ach=&va->audch[aind]; - int l=0,h=ach->numaudpts-1; - - if( h<l ) - return -1; - while(h>l) { - int m=(l+h+1)/2; - if( pts0<ach->audpts[m].pts[0] ) - h=m-1; - else - l=m; - } - if( ach->audpts[l].pts[0] > pts1 ) - return -1; - return ach->audpts[l].sect; -} - -static int findvobubysect(struct vob *va,int sect) -{ - int l=0,h=va->numvobus-1; - - if( h<0 ) - return -1; - if( sect<va->vi[0].sector ) - return -1; - while(l<h) { - int m=(l+h+1)/2; - if( sect < va->vi[m].sector ) - h=m-1; - else - l=m; - } - return l; -} - -static int findspuidx(struct vob *va,int ach,pts_t pts0) -{ - int l=0,h=va->audch[ach].numaudpts-1; - - if( h<l ) - return -1; - while(h>l) { - int m=(l+h+1)/2; - if( pts0<va->audch[ach].audpts[m].pts[0] ) - h=m-1; - else - l=m; - } - return l; -} - -static unsigned int getsect(struct vob *va,int curvobnum,int jumpvobnum,int skip,unsigned notfound) -{ - if( skip ) { - int l,h,i; - - // only set skip bit if one of hte VOBU's from here to there contain video - if( curvobnum<jumpvobnum ) { - l=curvobnum+1; - h=jumpvobnum-1; - } else { - l=jumpvobnum+1; - h=curvobnum-1; - } - for( i=l; i<=h; i++ ) - if( va->vi[i].hasvideo ) - break; - if( i<=h ) - skip=0x40000000; - else - skip=0; - } - if( jumpvobnum < 0 || jumpvobnum >= va->numvobus || - va->vi[jumpvobnum].vobcellid != va->vi[curvobnum].vobcellid ) - return notfound|skip; - return abs(va->vi[jumpvobnum].sector-va->vi[curvobnum].sector) - |(va->vi[jumpvobnum].hasvideo?0x80000000:0) - |skip; -} - -static pts_t readscr(const unsigned char *buf) -{ - return (((pts_t)(buf[0]&0x38))<<27)| - ((buf[0]&3)<<28)| - (buf[1]<<20)| - ((buf[2]&0xf8)<<12)| - ((buf[2]&3)<<13)| - (buf[3]<<5)| - ((buf[4]&0xf8)>>3); -} - -static void writescr(unsigned char *buf,pts_t scr) -{ - buf[0]=((scr>>27)&0x38)|((scr>>28)&3)|68; - buf[1]=scr>>20; - buf[2]=((scr>>12)&0xf8)|((scr>>13)&3)|4; - buf[3]=scr>>5;
View file
lxdvdrip-1.76.tar.bz2/dvdauthor/0.6.14/spuunmux.c
Deleted
@@ -1,1171 +0,0 @@ -/* - * Copyright (C) 2002, 2003 Jan Panteltje <panteltje@yahoo.com>, - * - * Modified by Zachary Brewster-Geisz, 2003, to work on big-endian - * machines. - * - * Modified by Henry Mason, 2003, to use both PNG and BMP, and to use - * the dvdauthor submux format. - * - * Modified and copy right Jan Panteltje 2002 - * 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. - * - * With many changes by Scott Smith (trckjunky@users.sourceforge.net) - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include "config.h" - -#include "compat.h" - -#include <fcntl.h> - -#include <netinet/in.h> - -#include <png.h> - -#include "rgb.h" - -#define FALSE 0 -#define TRUE (!FALSE) - -#define CBUFSIZE 65536 -#define PSBUFSIZE 10 - - -static unsigned int add_offset; - -static int debug = 0; - -static int full_size = FALSE; -static unsigned int pts, spts, subi, subs, subno; -static int ofs, ofs1; -static unsigned char sub[65536]; -static unsigned char next_bits; -static char *base_name; -static int have_bits; -static FILE *fdo; - -typedef struct { - unsigned char r, g, b, t; -} palt; -static palt bpal[16]; - -struct spu { - unsigned char *img; - unsigned int x0, y0, xd, yd, pts[2], subno, force_display, nummap; - struct colormap *map; - struct spu *next; -}; - -static struct spu *spus=0; - -struct button { - char *name; - int autoaction; - int x1,y1,x2,y2; - char *up,*down,*left,*right; - int grp; -}; - -struct dispdetails { - int pts[2]; - int numpal; - uint32_t palette[16]; - int numcoli; - uint32_t coli[6]; - int numbuttons; - struct button *buttons; - struct dispdetails *next; -}; - -static struct dispdetails *dd=0; - -struct colormap { - uint16_t color; - uint16_t contrast; - int x1,y1,x2,y2; -}; - -static unsigned int read4(unsigned char *p) -{ - return (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3]; -} - -static unsigned int read2(unsigned char *p) -{ - return (p[0]<<8)|p[1]; -} - -static char *readpstr(char *b,int *i) -{ - char *s=strdup(b+i[0]); - i[0]+=strlen(s)+1; - return s; -} - -static unsigned char get_next_bits() -{ - if (!have_bits) { - next_bits = sub[ofs++]; - have_bits = TRUE; - return next_bits >> 4; - } - have_bits = FALSE; - return next_bits & 15; -} - -static unsigned int getpts(unsigned char *buf) -{ - if (!(buf[1] & 0xc0) || - (buf[2] < 4) || ((buf[3] & 0xe1) != 0x21) || - ((buf[5] & 1) != 1) || ((buf[7] & 1) != 1)) - return -1; - return (buf[7] >> 1) + ((unsigned int) buf[6] << 7) + - (((unsigned int) buf[5] & 254) << 14) + - ((unsigned int) buf[4] << 22) + - (((unsigned int) buf[3] & 14) << 29); -} - -static void addspu(struct spu *s) -{ - struct spu **f=&spus; - - while( *f ) - f=&(f[0]->next); - *f=s; -} - -static void adddd(struct dispdetails *d) -{ - struct dispdetails **dp=ⅆ - - while (*dp ) - dp=&(dp[0]->next); - *dp=d; -} - -static int dvddecode() -{ - unsigned int io; - uint16_t size, dsize, i, x, y, t; - unsigned char c; - struct spu *s; - - size = read2(sub); - dsize = read2(sub+2); - - ofs = -1; - - if (debug > 1) - fprintf(stderr, "packet: %d bytes, first block offset=%d\n", size, - dsize); - - s=malloc(sizeof(struct spu)); - memset(s,0,sizeof(struct spu)); - - s->subno=subno++; - - s->pts[0] = s->pts[1] = -1; - s->nummap=1; - s->map=malloc(sizeof(struct colormap)); - memset(s->map,0,sizeof(struct colormap)); - s->map[0].x2=0x7fffffff; - s->map[0].y2=0x7fffffff; - i = dsize + 4; - - t = read2(sub+dsize); - - if (debug > 2) - fprintf(stderr, "\tBLK(%5d): time offset: %d; next: %d\n", dsize, t, read2(sub+dsize+2)); - - while (i < size) { - c = sub[i]; - - switch (c) { - case 0x0: //force start display - if (debug > 4)
View file
lxdvdrip-1.76.tar.bz2/Makefile -> lxdvdrip-1.77.tar.bz2/Makefile
Changed
@@ -1,22 +1,40 @@ INSTALLDIR = /usr/local -HINWEIS0 = 'Bitte Konfigdatei in /etc mit Changelog abgleichen' +HINWEIS0 = 'Bitte Konfigurationsdatei in /etc mit Changelog abgleichen' HINWEIS1 = 'Check the configuration file in /etc with the Changelog' HINWEIS2 = 'Comparez le fichier de config. en /etc avec le Changelog' all: - gcc -g -lm -ldvdread -lpthread -o lxdvdrip lxdvdrip.c streamanalyze.c ifo.c dvdinfo.c dvdbackup.c dvdcell.c systools.c vaporize.c dvdtools.c dvdcopy.c requant.c cputest.c tcmemcpy.c dvdformat.c badsect.c mpeg2dec.c + if test -f badsect.o; then rm *.o; fi + gcc -g -c badsect.c + gcc -g -c cputest.c + gcc -g -c dvdbackup.c + gcc -g -c dvdcell.c + gcc -g -c dvdcopy.c + gcc -g -c dvdformat.c + gcc -g -c dvdinfo.c + gcc -g -c dvdtools.c + gcc -g -c ifo.c + gcc -g -c lxdvdrip.c + gcc -g -c mpeg2dec.c + gcc -g -c requant.c + gcc -g -c streamanalyze.c + gcc -g -c systools.c + gcc -g -c tcmemcpy.c + gcc -g -c vaporize.c + gcc -pthread -g -o lxdvdrip *o -ldvdread -lm + if test -f badsect.o; then rm *.o; fi gcc -g -lm -o lxac3scan lxac3scan.c cd vamps && make && cd .. cd dvdbackup && make && cd .. cd requant && make && cd .. - cd buffer && make && cd .. + cd mbuffer && make && cd .. clean: rm -f lxdvdrip lxac3scan *.o cd vamps && make clean && cd .. cd dvdbackup && make clean && cd .. cd requant && make clean && cd .. - cd buffer && make clean && cd .. + cd mbuffer && make clean && cd .. install: cp lxdvdrip $(INSTALLDIR)/bin @@ -26,7 +44,7 @@ cd vamps && make install && cd .. cd dvdbackup && make install && cd .. cd requant && make install && cd .. - cd buffer && make install && cd .. + cd mbuffer && make install && cd .. if test -f /etc/lxdvdrip.conf; then echo $(HINWEIS0); fi; if test -f /etc/lxdvdrip.conf; then echo $(HINWEIS1); fi; if test -f /etc/lxdvdrip.conf; then echo $(HINWEIS2); else cp lxdvdrip.conf /etc; fi; @@ -40,4 +58,4 @@ rm $(INSTALLDIR)/bin/play_cell_lxdvdrip rm $(INSTALLDIR)/bin/dvdbackup_lxdvdrip rm $(INSTALLDIR)/bin/requant_lxdvdrip - rm $(INSTALLDIR)/bin/buffer_lxdvdrip + rm $(INSTALLDIR)/bin/mbuffer_lxdvdrip
View file
lxdvdrip-1.76.tar.bz2/doc-pak/Changelog.de -> lxdvdrip-1.77.tar.bz2/doc-pak/Changelog.de
Changed
@@ -1,6 +1,15 @@ Aenderungen LXDVDRIP ==================== +Version 1.77 / 30.10.11: +- Bugfix Modus "vamps_menu": Auch DVD-Struktur von der Festplatte ist kopierbar. +- wodim/genisoimage ersetzen cdrecord/mkisofs. +- Buxfix compilieren unter Ubuntu 11.10. +- Mbuffer ersetzt buffer (lxdvdrip -st=trans_par). +- Unterstützung dvdauthor 0.7: Datei ~./config/video_format mit PAL/NTSC erstellen. +- Unterstützung dvdauthor 0.7: Patches (gegen Fehler "SCR moves backwards"). +- Bugfix vlc als Streamtool: Umstellung auf dvdsimple-Zugriff. Sonst beendet sich vlc nicht. + Version 1.76 / 11.04.10: - Anpassungen an aktuelle DVD95 Version (1.5p3/1.6p0). - Anpassungen fuer libdvdread4.
View file
lxdvdrip-1.76.tar.bz2/doc-pak/Changelog.en -> lxdvdrip-1.77.tar.bz2/doc-pak/Changelog.en
Changed
@@ -1,6 +1,15 @@ Changes LXDVDRIP ================ +Version 1.77 / 30.10.11: +- Bugfix mode "vamps_menu": DVD-structure from hardisk can be copied. +- wodim/genisoimage replaces cdrecord/mkisofs. +- Fix building on Ubuntu 11.10. +- Mbuffer replaces buffer (lxdvdrip -st=trans_par). +- Support for dvdauthor 0.7: Create file ~./config/video_format with content PAL/NTSC. +- Support for dvdauthor 0.7: Patches (against error "SCR moves backwards"). +- Bugfix vlc as streamtool: Use dvdsimple instead of dvd. Else vlc does not quit. + Version 1.76 / 11.04.10: - Changes from recent DVD95 Version (1.5p3/1.6p0). - Fixes for libdvdread4.
View file
lxdvdrip-1.76.tar.bz2/doc-pak/Changelog.fr -> lxdvdrip-1.77.tar.bz2/doc-pak/Changelog.fr
Changed
@@ -1,6 +1,14 @@ Changes LXDVDRIP ================ +Version 1.77 / 30.10.11: +- Correction "vamps_menu": Lecture d'une structure DVD sur disque dur. +- cdrecord/mkisofs => wodim/genisoimage. +- Correction Ubuntu 11.10 +- Replacement buffer => mbuffer (lxdvdrip -st=trans_par). +- Support dvdauthor 0.7: ~./config/video_format. +- Correction vlc/dvdsimple. + Version 1.76 / 11.04.10: - Modifications de DVD95 Version (1.5p3/1.6p0). - libdvdread4.
View file
lxdvdrip-1.76.tar.bz2/doc-pak/Credits -> lxdvdrip-1.77.tar.bz2/doc-pak/Credits
Changed
@@ -11,4 +11,6 @@ Requant Module is M2VRequant (Metakine). +Mbuffer source is from: http://www.maier-komor.de + French Translation is from Jean Luc Damnet.
View file
lxdvdrip-1.76.tar.bz2/doc-pak/README.dvdwizard.DE -> lxdvdrip-1.77.tar.bz2/doc-pak/README.dvdwizard.DE
Changed
@@ -6,7 +6,7 @@ mit Menü zur Titelauswahl und Start, Auswahl der Audiotracks, Untertitel und einer Kapitelübersicht. -Erforderlich ist mindestens die Version 0.5.0. +Erforderlich ist mindestens die Version 0.7.0. 1) Download der Original Version des dvdwizard @@ -45,19 +45,19 @@ 3) Zusätzliche Software installieren dvdwizard benötigt einige Programme. Eine Auflistung siehe in der Datei -"README.DE" des dvdwizards. Außerdem wird hier noch einiges erklärt: +"TOOLS" des dvdwizards. Außerdem wird hier noch einiges erklärt: -http://udrecsuite.sourceforge.net/doku_dvdwizard.html +http://dvdwizard.wershofen.net/ (Documentation) Zusätzlich wird ein True Type Font für das Menü gebraucht: /usr/share/fonts/default/TrueType/arial.ttf -(abhängig von der Distribution auch /usr/share/fonts/TrueType/arial.ttf) +(abhängig von der Distribution auch /usr/share/fonts/TrueType/arial.ttf oder /usr/share/fonts/truetype/arial.ttf) Verzeichnis anlegen, wenn nicht da. Den Zeichensatz von der Windows Partition dorthin kopieren. Oder den Font downloaden: -http://www.mplayerhq.hu/homepage/design7/dload.html +http://www.mplayerhq.hu/MPlayer/releases/fonts/ Weitere Option: @@ -142,11 +142,6 @@ 6) Bekannte Probleme -- Anzahl der Titel (nur im (part-)copy Modus) - -Das Menü wird bei mehr als 6 Titeln unübersichtlich, es gehts etwas über den Bildschirmrand hinaus. -Außerdem sind maximal 9 Titel möglich. Derzeit keine Lösung. - - dvdwizard meldet Fehler Im Verzeichnis, wo lxdvdrip aufgerufen wird, legt dvdwizard eine Logdatei "dvdwizard.log" an.
View file
lxdvdrip-1.76.tar.bz2/doc-pak/README.dvdwizard.EN -> lxdvdrip-1.77.tar.bz2/doc-pak/README.dvdwizard.EN
Changed
@@ -4,7 +4,7 @@ Since Version 1.40 lxdvdrip uses "dvdwizard" to make a Backup with a Menu for Selection of Titles, Audio Tracks, Subtitles and Chapters. -As a minimum you need Version 0.5.0. +As a minimum you need Version 0.7.0. 1) Download of the Original Version of dvdwizard @@ -43,23 +43,23 @@ 3) Install additional Software dvdwizard needs some Tools. Please read the Documentation in the File -"README" or "README.DE" (german). +"TOOLS". Please read this Page, too: -http://udrecsuite.sourceforge.net/doku_dvdwizard.html +http://dvdwizard.wershofen.net/ (Documentation) You need the following True Type Font for the Creation of Menus: /usr/share/fonts/default/TrueType/arial.ttf -(on other distributions /usr/share/fonts/TrueType/arial.ttf) +(on other distributions /usr/share/fonts/TrueType/arial.ttf or /usr/share/fonts/truetype/arial.ttf) Create the Directory, if it doesnt exist. The Font File you can copy from your Windows Partition. Else you can download the Font from: -http://www.mplayerhq.hu/homepage/design7/dload.html +http://www.mplayerhq.hu/MPlayer/releases/fonts/ Or: @@ -144,11 +144,6 @@ 6) Known Problems -- Title count (only in (part-)copy Mode) - -If there are more than 6 Titles, the Menu is bigger then the Screen. -There are 9 Titles possible. At this Time there is no Solution. - - dvdwizard fails In the Directory where you are calling lxdvdrip there will be a Logfile "dvdwizard.log".
View file
lxdvdrip-1.76.tar.bz2/doc-pak/README.dvdwizard.FR -> lxdvdrip-1.77.tar.bz2/doc-pak/README.dvdwizard.FR
Changed
@@ -4,7 +4,7 @@ A partir de la version 1.40 lxdvdrip utilise "dvdwizard" pour réaliser une sauvegarde avec des menus de élection des films, des pistes audio, sous-titres et des chapitres. -Vous aurez besoin d'une version 0.5.0 ou plus récente de dvdwizard. +Vous aurez besoin d'une version 0.7.0 ou plus récente de dvdwizard. 1) Téléchargez la version courante de dvdwizard depuis : @@ -37,13 +37,12 @@ 3) Installer les logiciels nécessaires -dvdwizard nécessite l'installation de quelques outils. Reportez-vous au fichier de documentation "README.FR" +dvdwizard nécessite l'installation de quelques outils. Reportez-vous au fichier de documentation "TOOLS" pour en avoir la liste détaillée. -(dans les versions plus anciennes n'existent que "README" en anglais ou "README.DE" en allemand) Une autre source d'informations importantes à lire se trouve à l'adresse: -http://udrecsuite.sourceforge.net/doku_dvdwizard.html +http://dvdwizard.wershofen.net/ (Documentation) Il vous faut aussi la police True Type arial pour la création des menus: @@ -53,10 +52,14 @@ /usr/share/fonts/TrueType/arial.ttf +ou + +/usr/share/fonts/truetype/arial.ttf + Créez le répertoire s'il n'existe pas. Vous pouvez utiliser les polices provenant d'une partition Windows, vous pouvez aussi aller voir sur: -http://www.mplayerhq.hu/homepage/design7/dload.html +http://www.mplayerhq.hu/MPlayer/releases/fonts/ Ou: @@ -137,11 +140,6 @@ 6) Problèmes connus -- Nombre de titres (seulement dans le mode Copie (partielle)) - -S'il y a plus de 6 titres, le menu devient plus grand que l'écran. -La limite est à 9 titres, pas de solution pour le moment. - - dvdwizard plante Dans le répertoire où vous appelez lxdvdrip vous trouverez le fichier de log "dvdwizard.log".
View file
lxdvdrip-1.76.tar.bz2/doc-pak/lxdvdrip.conf.DE -> lxdvdrip-1.77.tar.bz2/doc-pak/lxdvdrip.conf.DE
Changed
@@ -6,7 +6,7 @@ # Leerzeichen angegeben werden. # Version der Config-Datei -version=1.76 +version=1.77 # Auswahl des zu rippenden Titels, bestimmen mit "lsdvd". # Alternative: bei titel=0 bestimmt lxdvdrip den laengsten Titel der DVD @@ -58,7 +58,7 @@ # Device fuer DVD-Brenner. # Beim Brennen mit "growisofs" ist zumeist "/dev/sr0" die richtige Wahl. -# Bei "cdrecord" zumeist "0,0,0", testen mit "cdrecord -scanbus". +# Bei "wodim" zumeist "0,0,0", testen mit "wodim -scanbus". # Entspricht "-db=". dvdbrenner=/dev/sr0 @@ -75,9 +75,9 @@ # Entspricht "-file=". file=0 -# Brennprogramm. Bei "1" wird growisofs verwendet, bei "2" cdrecord. -# Bei "3" wird cdrecord mit mkisofs on the fly gestartet. -# "4"=ISO-Image "/tmp/dvdrip.img" durch mkisofs. +# Brennprogramm. Bei "1" wird growisofs verwendet, bei "2" wodim. +# Bei "3" wird wodim mit genisoimage on the fly gestartet. +# "4"=ISO-Image "/tmp/dvdrip.img" durch genisoimage. # "5"=ISO-Image mit "Volume-ID.img" (=Name der DVD) als Namen. # 0=kein Brennen. # Entspricht "-bp=". @@ -153,7 +153,7 @@ # Entspricht "-free=" free=1 -# Brenngeschwindigkeit fuer growisofs als auch cdrecord. +# Brenngeschwindigkeit fuer growisofs als auch wodim. # Bei speed=0 wird der Parameter beim Brennen nicht uebergeben. speed=4 @@ -162,16 +162,16 @@ # Beschreibung siehe "man growisofs". dvdcompat=1 -# Extra-Parameter fuer mkisofs. +# Extra-Parameter fuer genisoimage. # Parameter muss in Hochkommas stehen, z. B. -# mkisofs_param="-input-charset iso8859-1" -# Parameter werden beim Aufruf an mkisofs bzw. growisofs uebergeben. -mkisofs_param="" +# genisoimage_param="-input-charset iso8859-1" +# Parameter werden beim Aufruf an genisoimage bzw. growisofs uebergeben. +genisoimage_param="" -# Extra-Parameter fuer cdrecord/growisofs. +# Extra-Parameter fuer wodim/growisofs. # Parameter muss in Hochkommas stehen, z. B. # burn_param="-tao" -# Parameter werden beim Aufruf an cdrecord bzw. growisofs uebergeben. +# Parameter werden beim Aufruf an wodim bzw. growisofs uebergeben. burn_param="" # DVD nach Rippen auswerfen. @@ -187,9 +187,9 @@ # z. B. "dvdauthor=/usr/local/bin/dvdauthor", damit koennen z. B. # mehrere Versionen parallel auf dem Rechner liegen. dvdauthor_name=dvdauthor -buffer_name=buffer_lxdvdrip +#buffer_name=buffer #buffer_name=bfr -#buffer_name=mbuffer +buffer_name=mbuffer_lxdvdrip tccat_name=tccat tcextract_name=tcextract requant_name=requant_lxdvdrip @@ -201,8 +201,8 @@ spuunmux_name=spuunmux dvdbackup_name=dvdbackup_lxdvdrip # Alternative: dvdbackup_name=vobcopy -mkisofs_name=mkisofs -cdrecord_name=cdrecord +genisoimage_name=genisoimage +wodim_name=wodim growisofs_name=growisofs dvd+rw-format=dvd+rw-format dvdunauthor_name=dvdunauthor @@ -218,7 +218,7 @@ # Nice-Level fuer Programmgruppen # nice_rip fuer das Rippen (tccat, mplayer, spuunmux, vamps_play_cell) -# nice_burn fuer das Brennen (growisofs, cdrecord) +# nice_burn fuer das Brennen (growisofs, wodim) # Moegliche Werte von "-20" (hoch) bis "19" (niedrig), bei "off" ohne nice-Angaben nice_rip=off nice_burn=off
View file
lxdvdrip-1.76.tar.bz2/doc-pak/lxdvdrip.conf.EN -> lxdvdrip-1.77.tar.bz2/doc-pak/lxdvdrip.conf.EN
Changed
@@ -3,7 +3,7 @@ # All Parameters must be like "paramter=value" without blanks. # version of Config File -version=1.76 +version=1.77 # Selection of the ripping Title, look with "lsdvd". # With "titel=0" lxdvdrip selects automatically the longest Title. @@ -54,7 +54,7 @@ # Device for DVD-Burner. # growisofs: normally "/dev/sr0". -# cdrecord: normally "0,0,0", test with "cdrecord -scanbus". +# wodim: normally "0,0,0", test with "wodim -scanbus". # On the Commandline: "-db=". dvdbrenner=/dev/sr0 @@ -71,9 +71,9 @@ file=0 # Burning Program. -# "1": growisofs, "2": cdrecord, "3": cdrecord on the fly, -# "4": create ISO-Image "/tmp/dvdrip.img" with mkisofs. -# "5": create ISO-Image with Name "Volume-ID.img" (=Name of DVD) with mkisofs. +# "1": growisofs, "2": wodim, "3": wodim on the fly, +# "4": create ISO-Image "/tmp/dvdrip.img" with genisoimage. +# "5": create ISO-Image with Name "Volume-ID.img" (=Name of DVD) with genisoimage. # "0": no Burning. # On the Commandline: "-bp=". brennprogramm=1 @@ -148,7 +148,7 @@ # On the Commandline: "-free=" free=1 -# Burning Speed for growisofs and cdrecord. +# Burning Speed for growisofs and wodim. # speed=0: Start without "-speed=" speed=4 @@ -157,16 +157,16 @@ # For a Description see "man growisofs". dvdcompat=1 -# Extra-Parameter(s) for mkisofs. +# Extra-Parameter(s) for genisoimage. # Parameter must be marked with apostrophes "xxx", i. E.: -# mkisofs_param="-input-charset iso8859-1" -# Parameter would be set by calling mkisofs or growisofs. -mkisofs_param="" +# genisoimage_param="-input-charset iso8859-1" +# Parameter would be set by calling genisoimage or growisofs. +genisoimage_param="" -# Extra-Parameter(s) for cdrecord/growisofs. +# Extra-Parameter(s) for wodim/growisofs. # Parameter must be marked with apostrophes "xxx", i. E.: # burn_param="-tao" -# Parameter would be set by calling cdrecord or growisofs. +# Parameter would be set by calling wodim or growisofs. burn_param="" # Eject DVD after Ripping @@ -181,9 +181,9 @@ # Optional the full Path could be set, i. E. # "play_cell_name=/usr/local/bin/play_cell". dvdauthor_name=dvdauthor -buffer_name=buffer_lxdvdrip +#buffer_name=buffer #buffer_name=bfr -#buffer_name=mbuffer +buffer_name=mbuffer_lxdvdrip tccat_name=tccat tcextract_name=tcextract requant_name=requant_lxdvdrip @@ -195,8 +195,8 @@ spuunmux_name=spuunmux dvdbackup_name=dvdbackup_lxdvdrip # Alternative: dvdbackup_name=vobcopy -mkisofs_name=mkisofs -cdrecord_name=cdrecord +genisoimage_name=genisoimage +wodim_name=wodim growisofs_name=growisofs dvd+rw-format=dvd+rw-format dvdunauthor_name=dvdunauthor @@ -212,7 +212,7 @@ # Nice-Level for Programgroups # nice_rip for ripping (tccat, mplayer, spuunmux, vamps_play_cell) -# nice_burn for burning (growisofs, cdrecord) +# nice_burn for burning (growisofs, wodim) # Possible values from "-20" (high) to "19" (low), "off" without nice nice_rip=off nice_burn=off
View file
lxdvdrip-1.76.tar.bz2/doc-pak/lxdvdrip.conf.FR -> lxdvdrip-1.77.tar.bz2/doc-pak/lxdvdrip.conf.FR
Changed
@@ -4,7 +4,7 @@ # Toutes les entrées sont de la forme "option=valeur" sans espaces. # version du fichier de configuration -version=1.76 +version=1.77 # Choix du titre à ripper (vérifiez avec "lsdvd"). # Entrer "titel=0" pour choisir automatiquement le titre le plus long. @@ -54,7 +54,7 @@ # Graveur de DVD. # Pour growisofs, normalement de la forme "/dev/sr0". -# Pour cdrecord, normalement de la forme "0,0,0" (voir "cdrecord -scanbus"). +# Pour wodim, normalement de la forme "0,0,0" (voir "wodim -scanbus"). # Pour la ligne de commande: "-db=". dvdbrenner=/dev/sr0 @@ -72,10 +72,10 @@ # Programme à utiliser pour la gravure. # "1": growisofs -# "2": cdrecord -# "3": cdrecord à la volée -# "4": mkisofs (ISO-Image) "/tmp/dvdrip.img" -# "5": mkisofs (ISO-Image) "Volume-ID.img" +# "2": wodim +# "3": wodim à la volée +# "4": genisoimage (ISO-Image) "/tmp/dvdrip.img" +# "5": genisoimage (ISO-Image) "Volume-ID.img" # "0": gravure=non # Pour la ligne de commande: "-bp=". brennprogramm=1 @@ -165,7 +165,7 @@ # 0=pas Signal, 1=Signal. playsound=1 -# Vitesse de gravure (pour "growisofs" et "cdrecord"). +# Vitesse de gravure (pour "growisofs" et "wodim"). # Note: entrer la valeur "0" pour supprimer la commande "-speed=" speed=4 @@ -174,16 +174,16 @@ # Reportez-vous à "man growisofs" pour plus de détails. dvdcompat=1 -# Paramètre(s) additionnel(s) pour mkisofs. +# Paramètre(s) additionnel(s) pour genisoimage. # A encadrer par des guillemets, comme ceci: -# mkisofs_param="input-charset iso8859-1" -# Sera passé dans l'appel de mkisofs ou growisofs. -mkisofs_param="" +# genisoimage_param="input-charset iso8859-1" +# Sera passé dans l'appel de genisoimage ou growisofs. +genisoimage_param="" -# Option à passer à cdrecord/growisofs. +# Option à passer à wodim/growisofs. # Cette option doit être entre guillemets "xxx", p.ex.: # burn_param="-tao" -# Cette option sera utilisée lors de l'appel à cdrecord ou growisofs. +# Cette option sera utilisée lors de l'appel à wodim ou growisofs. burn_param="" # Ejection du DVD après extraction. @@ -203,9 +203,9 @@ # pour préciser le chemin: "mplayer_name=/usr/local/bin/mplayer" # et pourquoi pas: "mplayer_name=mon_propre_streamer". dvdauthor_name=dvdauthor -buffer_name=buffer_lxdvdrip +#buffer_name=buffer #buffer_name=bfr -#buffer_name=mbuffer +buffer_name=mbuffer_lxdvdrip tccat_name=tccat tcextract_name=tcextract requant_name=requant_lxdvdrip @@ -217,8 +217,8 @@ spuunmux_name=spuunmux dvdbackup_name=dvdbackup_lxdvdrip # Alternative: dvdbackup_name=vobcopy -mkisofs_name=mkisofs -cdrecord_name=cdrecord +genisoimage_name=genisoimage +wodim_name=wodim growisofs_name=growisofs dvd+rw-format=dvd+rw-format dvdunauthor_name=dvdunauthor @@ -234,7 +234,7 @@ # niveau Nice par groupes de programmes # nice_rip pour l'extraction (tccat, mplayer, spuunmux, vamps_play_cell) -# nice_burn pour la gravure (growisofs, cdrecord) +# nice_burn pour la gravure (growisofs, wodim) # Valeurs possibles de "-20" (haut) à "19" (bas), "off" sans nice nice_rip=off nice_burn=off
View file
lxdvdrip-1.77.tar.bz2/dvdauthor/0.7.0
Added
+(directory)
View file
lxdvdrip-1.77.tar.bz2/dvdauthor/0.7.0/dvdvob.c
Added
@@ -0,0 +1,2571 @@ +/* + dvdauthor -- generation of .VOB files +*/ +/* + * Copyright (C) 2002 Scott Smith (trckjunky@users.sourceforge.net) + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +#include "config.h" + +#include "compat.h" + +#include <assert.h> +#include <errno.h> +#include <fcntl.h> +#include <ctype.h> + +#include "dvdauthor.h" +#include "da-internal.h" + + + +struct colorremap /* for remapping colours to indexes into a common palette */ + { + int newcolors[16]; /* bottom 24 bits are YCbCr, bit 24 is set to indicate a colour needs remapping */ + int state,curoffs,maxlen,nextoffs,skip,ln_ctli; /* state of SPU parser machine (procremap) */ + struct colorinfo *origmap; /* colours merged into common indexes into this palette */ + }; + +struct vscani { + int lastrefsect; /* flag that last sector should be recorded as a reference sector */ + int firstgop; /* 1 => looking for first GOP, 2 => found first GOP, 0 => don't bother looking any more */ + int firsttemporal; /* first temporal sequence number seen in current sequence */ + int lastadjust; /* temporal sequence reset */ +}; + +static pts_t const timeline[19]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, + 20,60,120,240}; + /* various time steps for VOBU offsets needed in DSI packet, in units of half a second */ + +#define BIGWRITEBUFLEN (16*2048) +static unsigned char bigwritebuf[BIGWRITEBUFLEN]; +static int writebufpos=0; +static int writefile=-1; /* fd of output file */ + +static void flushclose(int fd) + /* ensures all data has been successfully written to disk before closing fd. */ + { + if + ( +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 + fdatasync(fd) +#else + fsync(fd) +#endif + ) + { + if (errno != EINVAL) + { + fprintf(stderr, "ERR: Error %d -- %s -- flushing output VOB\n", errno, strerror(errno)); + exit(1); + } + else + { + /* non-flushable output */ + errno = 0; + } /*if*/ + } /*if*/ + close(fd); + } /*flushclose*/ + +static unsigned char videoslidebuf[15]={255,255,255,255, 255,255,255, 0,0,0,0, 0,0,0,0}; + + +/* The following are variants for the ways I've seen DVD's encoded */ + +// Grosse Pointe Blank uses exactly 1/2 second for the FF/REW records +// Bullitt uses 1/2 video second (i.e. in NTSC, 45045 PTS) +#define DVD_FFREW_HALFSEC 45000 +// #define DVD_FFREW_HALFSEC (getratedenom(va)>>1) + +static pts_t calcpts + ( + const struct vobgroup *va, + int cancomplain, + int *didcomplain, + pts_t *align, + pts_t basepts, + int nfields /* count of prior fields */ + ) + /* returns basepts aligned to a whole number of fields, offset by *align. */ + { + // I assume pts should round down? That seems to be how mplex deals with it + // also see later comment + const pts_t fpts = getframepts(va); + const int bpframe = (basepts * 2 - *align + fpts / 2) / fpts; /* nearest whole field number */ + if ((*align + bpframe * fpts) / 2 != basepts) + { + if (!*didcomplain) + { + if (cancomplain) + fprintf(stderr, "WARN: Video PTS does not line up on a multiple of a field.\n"); + *didcomplain = 1; + } /*if*/ + *align = basepts * 2; /* assume this will avoid further warnings */ + } + else + nfields += bpframe; + return (*align + nfields * fpts) / 2; + } /*calcpts*/ + +static int findnextvideo(const struct vob *va, int cur, int dir) + // find next (dir=1) or previous(dir=-1) vobu with video + { + int i, numvobus; + numvobus = va->numvobus; + switch(dir) + { + case 1: // forward + for (i = cur+1; i < numvobus; i++) + if(va->vobu[i].hasvideo) + return i; + return -1; + case -1: // backward + for (i = cur-1; i > -1; i--) + if(va->vobu[i].hasvideo) + return i; + return -1; + default: + // ?? + return -1; + } /*switch*/ + } /*findnextvideo*/ + +static int findaudsect(const struct vob *va, int aind, pts_t pts0, pts_t pts1) + /* finds the audpts entry, starting from aind, that includes the time pts0 .. pts1, + or -1 if not found. */ + { + const struct audchannel * const ach = &va->audch[aind]; + int l = 0, h = ach->numaudpts - 1; + + if (h < l) + return -1; + while (h > l) + { + const int m =(l + h + 1) / 2; /* binary search */ + if (pts0 < ach->audpts[m].pts[0]) + h = m - 1; + else + l = m; + } /*while*/ + if (ach->audpts[l].pts[0] > pts1) + return -1; + return ach->audpts[l].asect; + } /*findaudsect*/ + +static int findvobubysect(const struct vob *va, int sect) + /* returns the index of the VOBU that spans the specified sector. */ + { + int l = 0, h = va->numvobus - 1; + if (h < 0) + return -1; + if (sect < va->vobu[0].sector) + return -1; + while (l < h) + { + const int m = (l + h + 1) / 2; /* binary search */ + if (sect < va->vobu[m].sector) + h = m - 1; + else + l = m; + } /*while*/ + return l; + } /*findvobubysect*/ + +static int findspuidx(const struct vob *va, int ach, pts_t pts0) + /* returns the index of the subpicture packet spanning the specified time. */ + { + int l = 0, h = va->audch[ach].numaudpts - 1; + if (h < l) + return -1; + while (h > l) + { + const int m = (l + h + 1) / 2; /* binary search */ + if (pts0 < va->audch[ach].audpts[m].pts[0])
View file
lxdvdrip-1.77.tar.bz2/dvdauthor/0.7.0/spuunmux.c
Added
@@ -0,0 +1,1598 @@ +/* + spuunmux mainline +*/ +/* + * Copyright (C) 2002, 2003 Jan Panteltje <panteltje@yahoo.com>, + * + * Modified by Zachary Brewster-Geisz, 2003, to work on big-endian + * machines. + * + * Modified by Henry Mason, 2003, to use both PNG and BMP, and to use + * the dvdauthor submux format. + * + * Modified and copy right Jan Panteltje 2002 + * 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. + * + * With many changes by Scott Smith (trckjunky@users.sourceforge.net) + * + * Svcd decoding by Giacomo Comes <encode2mpeg@users.sourceforge.net> + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +#include "config.h" +#include "compat.h" + +#include <fcntl.h> + +#include <netinet/in.h> + +#include <png.h> + +#include "rgb.h" +#include "common.h" +#include "conffile.h" + +#define CBUFSIZE 65536 /* big enough for any MPEG packet */ +#define PSBUFSIZE 10 + +static unsigned int add_offset; + +static int debug = 0; + +static int video_format = VF_NONE; +static bool full_size = false; +static unsigned int pts, spts, subi, subs, subno; +static int ofs, ofs1; + /* offsets from beginning of SPU to bottom and top field data set by last SPU_SET_DSPXA command */ +static unsigned char sub[65536]; +static unsigned char next_bits; +static const char *base_name; +static unsigned int have_bits; +static FILE *fdo; +static unsigned char svcd_adjust; + +static colorspec + current_palette[16]; /* current PGC colour table, alpha unused */ + +struct spu /* data for one subpicture unit (SPU) */ + { + unsigned char *img; /* image data */ + unsigned int x0, y0, xd, yd; /* display bounds */ + unsigned int pts[2]; /* start time, end time */ + unsigned int subno; /* index used for generating unique filenames */ + unsigned int force_display; + unsigned int nummap; /* length of map array */ + struct colormap *map; + /* array where entry 0 is for colours as specified in SPU, other entries + are for button colours as specified in PGC, so if they overlap, the + last entry takes precedence */ + struct spu *next; /* linked list */ + }; + +static struct spu + *pending_spus = 0; + +struct button /* information about a button */ + { + char *name; + bool autoaction; + int x1, y1, x2, y2; + char *up, *down, *left, *right; /* names of neighbouring buttons */ + int grp; /* which group button belongs to */ + }; + +struct dispdetails /* information about button grouping */ + { + int pts[2]; /* start time, end time */ + int numpal; /* nr used entries in palette */ + uint32_t palette[16]; /* RGB colours */ + int numcoli; /* nr of SL_COLI entries present, not checked! */ + uint32_t coli[6]; /* up to 3 8-byte SL_COLI entries */ + int numbuttons; /* length of buttons array */ + struct button *buttons; /* array */ + struct dispdetails *next; /* linked list */ + }; + +static struct dispdetails + *pending_buttons = 0; + +struct colormap /* for determining which colours take precedence in overlapping areas */ + { + uint16_t color; /* four 4-bit colour indexes */ + uint16_t contrast; /* four 4-bit contrast (transparency) values */ + int x1, y1, x2, y2; /* bounds of area over which entries are valid */ + }; + +static unsigned int read4(const unsigned char *p) + /* decodes 4 bytes as a big-endian integer starting at p. */ + { + return + p[0] << 24 + | + p[1] << 16 + | + p[2] << 8 + | + p[3]; + } /*read4*/ + +static unsigned int read2(const unsigned char *p) + /* decodes 2 bytes as a big-endian integer starting at p. */ + { + return + p[0] << 8 + | + p[1]; + } /*read2*/ + +static char *readpstr(const unsigned char *b, int *i) + /* extracts a null-terminated string beginning at b[*i], advances *i past it and returns + a copy of the string. */ + { + char * const s = strdup((const char *)b + i[0]); + i[0] += strlen(s) + 1; + return s; + } /*readpstr*/ + +static unsigned char get_next_bits() + /* returns next nibble from sub at offset ofs. */ + { + if (!have_bits) + { + next_bits = sub[ofs++]; + have_bits = true; + return next_bits >> 4; + } /*if*/ + have_bits = false; + return next_bits & 15; + } /*get_next_bits*/ + +static unsigned char get_next_svcdbits() + /* returns next two bits from sub at offset ofs. */ + { + switch (have_bits) + { + case 0: + ++have_bits; + return sub[++ofs] >> 6; + break; + case 1: + ++have_bits; + return (sub[ofs] & 0x30) >> 4; + break; + case 2: + ++have_bits; + return (sub[ofs] & 0x0c) >> 2; + break; + default: + have_bits = 0; + return sub[ofs] & 0x03; + break; + } /*switch*/ + } /*get_next_svcdbits*/ + +static unsigned int getpts(const unsigned char *buf) + /* decodes a presentation time stamp (PTS) beginning at location buf. */ + { + if + ( + !(buf[1] & 0xc0) + || + buf[2] < 4 + || + (buf[3] & 0xe1) != 0x21 + || + (buf[5] & 1) != 1 + || + (buf[7] & 1) != 1
View file
lxdvdrip-1.76.tar.bz2/dvdbackup.c -> lxdvdrip-1.77.tar.bz2/dvdbackup.c
Changed
@@ -125,6 +125,8 @@ MenuCopied[vts] = 1; + printf ("Funktion CopyMenu (%ld)\n", (long)vts); + if( NoMenuF ) return( 0 ); if( !vts ) { @@ -156,9 +158,6 @@ int size; res = MyDVDRead1Block( dvd_file, sector, buffer ); - if( res != 1 ) { - ret = -1; goto out; - } if( fwrite( buffer, 1, sizeof(buffer), fp ) != sizeof(buffer)) { ret = -1; goto out; } @@ -231,6 +230,7 @@ static int CopyEmptyPgc( Cell_t * cell ) { + uint32_t sector; char buffer[DVD_VIDEO_LB_LEN]; dvd_file_t * dvd_file; @@ -239,7 +239,7 @@ Vobu_t * v; int res; -// DBG('b',fprintf(stderr,"%s: startSector: %u vts: %d\n", __FUNCTION__, cell->startSector, cell->vts );); + printf("Copy Empty PGC: startSector: %u vts: %d\n", cell->startSector, cell->vts ); if( NoMenuF ) return( 0 ); @@ -248,7 +248,6 @@ sector = cell->startSector; res = MyDVDRead1Block( dvd_file, sector, buffer ); - if( res == -1 ) return( -1 ); if( !res || !isNavPack((unsigned char *)buffer) ) { /* Faulty sector */ CreateDummyNavPack( (unsigned char *)buffer, sector ); } @@ -276,7 +275,6 @@ nsectors = 1; res = MyDVDRead1Block( dvd_file, sector+1, buffer ); - if( res == -1 ) return( -1 ); if( !res ) { /* Faulty sector */ CreateDummyPack( (unsigned char *)buffer ); } @@ -1016,6 +1014,7 @@ int ret; + printf ("Copy Cell %ld - %ld\n", (long)c->vts, (long)CurVTS); if( c->vts != CurVTS ) { char vobFile[512]; int menuSize; @@ -1026,7 +1025,7 @@ OutFp = NULL; UpdateIfo( targetDir ); VobSize[CurVOB] = OutSize; - if( UpdateVobs( targetDir ) < 0 ) return( -1 ); + UpdateVobs( targetDir ); } menuSize = CopyMenu( c->vts, targetDir ); if( menuSize < 0 ) return( -1 ); @@ -1369,11 +1368,7 @@ /* Copy cells */ for( i = 0; i < CellArray.nbCells; i++ ) { Cell_t * c = CellArray.cells + i; - - if( CopyCell( c, targetDir ) < 0 ) { - ret = -1; - goto out; - } + CopyCell( c, targetDir ); if( c->selected ) { if( dynQual ) { double nFactor = ReCpuFactor( ); @@ -1403,8 +1398,7 @@ VobSize[CurVOB] = OutSize; UpdateIfo( targetDir ); UpdateMainIfo( targetDir, fullBackup ); -// if( UpdateVob( CurVTS, CurVOB, OutSize, targetDir ) < 0 ) return( -1 ); - if( UpdateVobs( targetDir ) < 0 ) return( -1 ); + UpdateVobs( targetDir ); }
View file
lxdvdrip-1.76.tar.bz2/dvdbackup/dvdbackup_lxdvdrip.c -> lxdvdrip-1.77.tar.bz2/dvdbackup/dvdbackup_lxdvdrip.c
Changed
@@ -707,7 +707,6 @@ /* Temp helpers */ int channels; - int temp; int found; int chapters_1; int chapters_2; @@ -914,7 +913,6 @@ /* Now lets see if we can find our candidate among the top most chapters */ found_chapter=6; - temp = chapter_chapter_array[0]; for (i=0 ; (i < titles) && (i < 4) ; i++ ) { if ( candidate == title_set_chapter_array[i] ) { found_chapter=i+1; @@ -982,7 +980,6 @@ /* Now lets see if we can find our candidate among the top most chapters */ found_chapter=5; - temp = chapter_chapter_array[0]; for (i=0 ; (i < titles) && (i < 4) ; i++ ) { if ( candidate == title_set_chapter_array[i] ) { found_chapter=i+1; @@ -2051,7 +2048,6 @@ int result; int chapters = 0; - int feature; int i, s; int spg, epg; int pgc; @@ -2080,7 +2076,6 @@ if(titles == 0) { fprintf(stderr, "No title specified for chapter extraction, will try to figure out main feature title\n"); - feature = titles_info->main_title_set; for (i=0; i < titles_info->number_of_titles ; i++ ) { if ( titles_info->titles[i].title_set == titles_info->main_title_set ) { if(chapters < titles_info->titles[i].chapters) {
View file
lxdvdrip-1.76.tar.bz2/dvdcell.c -> lxdvdrip-1.77.tar.bz2/dvdcell.c
Changed
@@ -197,13 +197,13 @@ int nrTS = Ifo_zero->vmgi_mat->vmg_nr_of_title_sets; /* Number of title sets */ int i,j,k; - DBG('b',fprintf(stderr,"%s: nrTS=%d noPisteVideo=%d\n", __FUNCTION__, nrTS, noPisteVideo );); + printf("nrTS=%d noPisteVideo=%d\n", nrTS, noPisteVideo ); for( k = 1; k <= nrTS; k++ ) { ifo_handle_t * ifo = Ifo[k]; int vts_ttn, title_set_nr; int nbChapter; - if( !ifo->vtsi_mat ) continue; + if( !ifo->vtsi_mat ) { continue; } DBG('b',fprintf(stderr,"VTS: %d PGCS: %d ifo: %p\n", k, ifo->vts_pgcit->nr_of_pgci_srp, ifo );); vts_ttn = Ifo_zero->tt_srpt->title[noPisteVideo].vts_ttn; /* Title number within VTS */ @@ -248,7 +248,7 @@ } if( lastF ) UnSelectLastCell( ca ); - DBG('b',fprintf(stderr,"NrCells: %d\n", ca->nbCells ); + printf("NrCells: %d\n", ca->nbCells ); long long tSize = 0; for( i = 0; i < ca->nbCells; i++ ) { Cell_t * c = ca->cells + i; @@ -262,8 +262,7 @@ fprintf(stderr,"size: %s ", LLSize2Giga( size ) ); fprintf(stderr,"selected: %d\n", c->selected ); } - fprintf(stderr,"Total size: %s\n", LLSize2Giga( tSize ) ); - ); + printf("Total size: %s\n", LLSize2Giga( tSize ) ); return( 0 ); }
View file
lxdvdrip-1.76.tar.bz2/lxdvdrip.c -> lxdvdrip-1.77.tar.bz2/lxdvdrip.c
Changed
@@ -300,10 +300,12 @@ * 19.04.2009, Stefan Becker, Bugfix copy Mode (subpicture tag) * 18.02.2010, Stefan Becker, dvd95 1.6p0, Parameter region-code/check (1.76) * 10.04.2010, Stefan Becker, dvdauthor 0.6.18 + * xx.05.2010, Stefan Becker, vamps_menu von platte, wodim/genisoimage statt cdrecord/mkisofs (version 1.77) + * 24.10.2011, Stefan Becker, Ubuntu 11.10, dvdauthor 0.7 * */ -#define VERSION "1.76" +#define VERSION "1.77" @@ -1552,7 +1554,7 @@ char szDVDNameOverwrite[128]; long lMitKapiteln; long lPALDvd = 0; - char szMkisofsParam[1024]; + char szgenisoimageParam[1024]; char szBurnParam[1024]; char szPreviewParam[1024]; @@ -1587,8 +1589,8 @@ char dvdunauthor_name[128]; char vamps_name[128]; char tcprobe_name[128]; - char mkisofs_name[128]; - char cdrecord_name[128]; + char genisoimage_name[128]; + char wodim_name[128]; char growisofs_name[128]; char eject_name[128]; char dvdformat_name[128]; @@ -1670,8 +1672,8 @@ strcpy (play_cell_name, "play_cell_lxdvdrip"); strcpy (vamps_name, "vamps_lxdvdrip"); strcpy (tcprobe_name, "tcprobe"); - strcpy (mkisofs_name, "mkisofs"); - strcpy (cdrecord_name, "cdrecord"); + strcpy (genisoimage_name, "genisoimage"); + strcpy (wodim_name, "wodim"); strcpy (growisofs_name, "growisofs"); strcpy (eject_name, "eject"); strcpy (dvdformat_name, "dvd+rw-format"); @@ -1720,8 +1722,8 @@ lRWFormat = 0; // RWs nicht formatieren vor dem Brennen strcpy (szVideoAngaben, ""); // Standard: ohne Videoangaben an dvdauthor lMitVideoAngaben = 0; - strcpy (szMkisofsParam, ""); // Keine Extra-Parameter fuer mkisofs - strcpy (szBurnParam, ""); // Keine Zusatz-Parameter fuer cdrecord + strcpy (szgenisoimageParam, ""); // Keine Extra-Parameter fuer genisoimage + strcpy (szBurnParam, ""); // Keine Zusatz-Parameter fuer wodim strcpy (szPreviewParam, ""); // Keine Zusatz-Parameter fuer Preview lHighQuality = 0; // Normal DVD 9 => 5 strcpy (szHQChapters, ""); // Kapitel von-bis im High Quality Modus @@ -1742,13 +1744,17 @@ // Auslesen der Parameter aus einer Datei // Zuerst lokal versuchen - j = strlen (getenv ("HOME")); - if (j > 7000) - j = 7000; - strncpy (szBefehl, getenv ("HOME"), j); - szBefehl[j] = 0; - strcat (szBefehl, "/.lxdvdrip.conf"); - fConf = fopen (szBefehl, "r"); + fConf = NULL; + if (getenv ("HOME") != NULL) + { + j = strlen (getenv ("HOME")); + if (j > 7000) + j = 7000; + strncpy (szBefehl, getenv ("HOME"), j); + szBefehl[j] = 0; + strcat (szBefehl, "/.lxdvdrip.conf"); + fConf = fopen (szBefehl, "r"); + } if (!fConf) { // Ausgabe in allen 3 Sprachen, weil Sprache noch nicht eingestellt ist (steht in Parameterdatei) @@ -2135,14 +2141,14 @@ strcpy (tcprobe_name, &szParameter[13]); continue; } - if (strstr (szParameter, "mkisofs_name=")) + if (strstr (szParameter, "genisoimage_name=")) { - strcpy (mkisofs_name, &szParameter[13]); + strcpy (genisoimage_name, &szParameter[17]); continue; } - if (strstr (szParameter, "cdrecord_name=")) + if (strstr (szParameter, "wodim_name=")) { - strcpy (cdrecord_name, &szParameter[14]); + strcpy (wodim_name, &szParameter[11]); continue; } if (strstr (szParameter, "growisofs_name=")) @@ -2222,30 +2228,30 @@ lRWFormat = atol (szDummy); continue; } - if (strstr (szParameter, "mkisofs_param=")) + if (strstr (szParameter, "genisoimage_param=")) { // Ueberlesen des ersten Zeichens, weil Hochkomma char cTmpChar; - strcpy (szMkisofsParam, &szParameter[14]); - if (szMkisofsParam[0] == '"' && szMkisofsParam[1] == '"') // leer? dann ignorieren und wieder leer setzen + strcpy (szgenisoimageParam, &szParameter[18]); + if (szgenisoimageParam[0] == '"' && szgenisoimageParam[1] == '"') // leer? dann ignorieren und wieder leer setzen { - strcpy (szMkisofsParam, ""); + strcpy (szgenisoimageParam, ""); continue; } - szMkisofsParam[0] = ' '; // erstes Hochkomma abschneiden - if (szMkisofsParam[strlen (szMkisofsParam) - 1] == '"') // " zum Abschluss => String ist vollstaendig + szgenisoimageParam[0] = ' '; // erstes Hochkomma abschneiden + if (szgenisoimageParam[strlen (szgenisoimageParam) - 1] == '"') // " zum Abschluss => String ist vollstaendig { - szMkisofsParam[strlen (szMkisofsParam) - 1] = ' '; + szgenisoimageParam[strlen (szgenisoimageParam) - 1] = ' '; continue; } - strcat (szMkisofsParam, " "); // 1 Blank anhaengen + strcat (szgenisoimageParam, " "); // 1 Blank anhaengen // Jetzt Zeichen fuer Zeichen lesen, bis das abschliessende Hochkomma kommt for (;;) { fscanf (fConf, "%c", &cTmpChar); if (cTmpChar == '"') break; - sprintf (szMkisofsParam + strlen (szMkisofsParam), "%c", + sprintf (szgenisoimageParam + strlen (szgenisoimageParam), "%c", cTmpChar); if (strlen (szBurnParam) == (sizeof (szBurnParam) - 1)) break; // wg. Bufferoverflow @@ -2658,8 +2664,8 @@ printf ("%s\n", play_cell_name); printf ("%s\n", vamps_name); printf ("%s\n", tcprobe_name); - printf ("%s\n", mkisofs_name); - printf ("%s\n", cdrecord_name); + printf ("%s\n", genisoimage_name); + printf ("%s\n", wodim_name); printf ("%s\n", growisofs_name); printf ("%s\n", dvdformat_name); printf ("%s\n", mpgtx_name); @@ -2718,9 +2724,9 @@ printf ("Die Voreinstellung steht in Klammern hintern jedem Parameter.\n\n"); printf - ("-st=Streamtool : vamps, mplayer, transcode, trans_par (Transcode\n"); + ("-st=Streamtool : vamps, vamps_menu, mplayer, transcode, trans_par,\n"); printf - (" parallel), vlc, vlc_par, copy, partcopy (Titel waehlen) (-st=trans_par)\n"); + (" vlc, vlc_par, copy, partcopy (Titel waehlen) (-st=trans_par)\n"); printf ("-mp=mplex : Multiplexer, nur bei -st=mplayer beruecksichtigt,\n"); printf @@ -2780,9 +2786,9 @@ printf ("\nSeite 3: Enter druecken"); eatToNL (stdin); printf - ("-bp=Brenn-Programm : 1=growisofs, 2=cdrecord, 3=cdrecord on the\n"); + ("-bp=Brenn-Programm : 1=growisofs, 2=wodim, 3=wodim on the\n"); printf - (" fly, 4=ISO-Image per mkisofs,5=ISO-\n"); + (" fly, 4=ISO-Image per genisoimage,5=ISO-\n"); printf (" Image mit Volume-ID als Name,0=kein Brennen (-bp=1)\n"); printf ("-mc=x : Mehrere Kopien (1=ja, 0=nein) (-mc=0)\n"); @@ -2836,9 +2842,9 @@ printf ("The default values are printed in brackets () behind the parameters.\n\n"); printf - ("-st=Streamtool : vamps, mplayer, transcode, trans_par (Transcode\n"); + ("-st=Streamtool : vamps, vamps_menu, mplayer, transcode, trans_par,\n"); printf - (" parallel), vlc, vlc_par, copy, partcopy (Select Titles) (-st=trans_par)\n"); + (" vlc, vlc_par, copy, partcopy (Select Titles) (-st=trans_par)\n"); printf ("-mp=mplex : Multiplexer, only with -st=mplayer, use mplex instead of\n"); printf @@ -2893,9 +2899,9 @@ printf ("-db=Burner-Device : Device of the Burner (-db=/dev/scd0)\n"); printf - ("-bp=Burn-Program : 1=growisofs, 2=cdrecord, 3=cdrecord on the fly,\n"); + ("-bp=Burn-Program : 1=growisofs, 2=wodim, 3=wodim on the fly,\n"); printf - (" 4=ISO-Image/mkisofs,5=ISO with VolumeID,0=no Burning (-bp=1)\n"); + (" 4=ISO-Image/genisoimage,5=ISO with VolumeID,0=no Burning (-bp=1)\n"); printf ("-mc=x : Multi Copies (1=yes, 0=no) (-mc=0)\n"); printf ("\nPage 3: Please press Enter\n"); eatToNL (stdin); @@ -2947,9 +2953,9 @@
View file
lxdvdrip-1.76.tar.bz2/lxdvdrip.conf -> lxdvdrip-1.77.tar.bz2/lxdvdrip.conf
Changed
@@ -6,7 +6,7 @@ # Leerzeichen angegeben werden. # Version der Config-Datei -version=1.76 +version=1.77 # Auswahl des zu rippenden Titels, bestimmen mit "lsdvd". # Alternative: bei titel=0 bestimmt lxdvdrip den laengsten Titel der DVD @@ -58,7 +58,7 @@ # Device fuer DVD-Brenner. # Beim Brennen mit "growisofs" ist zumeist "/dev/sr0" die richtige Wahl. -# Bei "cdrecord" zumeist "0,0,0", testen mit "cdrecord -scanbus". +# Bei "wodim" zumeist "0,0,0", testen mit "wodim -scanbus". # Entspricht "-db=". dvdbrenner=/dev/sr0 @@ -75,9 +75,9 @@ # Entspricht "-file=". file=0 -# Brennprogramm. Bei "1" wird growisofs verwendet, bei "2" cdrecord. -# Bei "3" wird cdrecord mit mkisofs on the fly gestartet. -# "4"=ISO-Image "/tmp/dvdrip.img" durch mkisofs. +# Brennprogramm. Bei "1" wird growisofs verwendet, bei "2" wodim. +# Bei "3" wird wodim mit genisoimage on the fly gestartet. +# "4"=ISO-Image "/tmp/dvdrip.img" durch genisoimage. # "5"=ISO-Image mit "Volume-ID.img" (=Name der DVD) als Namen. # 0=kein Brennen. # Entspricht "-bp=". @@ -153,7 +153,7 @@ # Entspricht "-free=" free=1 -# Brenngeschwindigkeit fuer growisofs als auch cdrecord. +# Brenngeschwindigkeit fuer growisofs als auch wodim. # Bei speed=0 wird der Parameter beim Brennen nicht uebergeben. speed=4 @@ -162,16 +162,16 @@ # Beschreibung siehe "man growisofs". dvdcompat=1 -# Extra-Parameter fuer mkisofs. +# Extra-Parameter fuer genisoimage. # Parameter muss in Hochkommas stehen, z. B. -# mkisofs_param="-input-charset iso8859-1" -# Parameter werden beim Aufruf an mkisofs bzw. growisofs uebergeben. -mkisofs_param="" +# genisoimage_param="-input-charset iso8859-1" +# Parameter werden beim Aufruf an genisoimage bzw. growisofs uebergeben. +genisoimage_param="" -# Extra-Parameter fuer cdrecord/growisofs. +# Extra-Parameter fuer wodim/growisofs. # Parameter muss in Hochkommas stehen, z. B. # burn_param="-tao" -# Parameter werden beim Aufruf an cdrecord bzw. growisofs uebergeben. +# Parameter werden beim Aufruf an wodim bzw. growisofs uebergeben. burn_param="" # DVD nach Rippen auswerfen. @@ -187,9 +187,9 @@ # z. B. "dvdauthor=/usr/local/bin/dvdauthor", damit koennen z. B. # mehrere Versionen parallel auf dem Rechner liegen. dvdauthor_name=dvdauthor -buffer_name=buffer_lxdvdrip +#buffer_name=buffer #buffer_name=bfr -#buffer_name=mbuffer +buffer_name=mbuffer_lxdvdrip tccat_name=tccat tcextract_name=tcextract requant_name=requant_lxdvdrip @@ -201,8 +201,8 @@ spuunmux_name=spuunmux dvdbackup_name=dvdbackup_lxdvdrip # Alternative: dvdbackup_name=vobcopy -mkisofs_name=mkisofs -cdrecord_name=cdrecord +genisoimage_name=genisoimage +wodim_name=wodim growisofs_name=growisofs dvd+rw-format=dvd+rw-format dvdunauthor_name=dvdunauthor @@ -218,7 +218,7 @@ # Nice-Level fuer Programmgruppen # nice_rip fuer das Rippen (tccat, mplayer, spuunmux, vamps_play_cell) -# nice_burn fuer das Brennen (growisofs, cdrecord) +# nice_burn fuer das Brennen (growisofs, wodim) # Moegliche Werte von "-20" (hoch) bis "19" (niedrig), bei "off" ohne nice-Angaben nice_rip=off nice_burn=off
View file
lxdvdrip-1.77.tar.bz2/mbuffer
Added
+(directory)
View file
lxdvdrip-1.77.tar.bz2/mbuffer/AUTHORS
Added
@@ -0,0 +1,2 @@ +Thomas Maier-Komor +e-mail: thomas@maier-komor.de
View file
lxdvdrip-1.77.tar.bz2/mbuffer/LICENSE
Added
@@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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;
View file
lxdvdrip-1.77.tar.bz2/mbuffer/Makefile
Added
@@ -0,0 +1,26 @@ + +# Where to install buffer +INSTBIN=/usr/local/bin + +RM=/bin/rm +ALL=Makefile log.c mbuffer.c network.c + +all: buffer + +buffer: log.c mbuffer.c network.c + if test -f log.o; then rm *.o; fi + gcc -g -O2 -c log.c -Wno-unused-result + gcc -g -O2 -c mbuffer.c -w + gcc -g -O2 -c network.c -Wno-unused-result + gcc -pthread -O2 -g -o mbuffer_lxdvdrip *o -lrt -lm + if test -f log.o; then rm *.o; fi + +clean: + $(RM) -f *.o core mbuffer_lxdvdrip .merrs + +install: buffer + cp mbuffer_lxdvdrip $(INSTBIN)/mbuffer_lxdvdrip + chmod 755 $(INSTBIN)/mbuffer_lxdvdrip + +uninstall: buffer + rm -f $(INSTBIN)/mbuffer_lxdvdrip
View file
lxdvdrip-1.77.tar.bz2/mbuffer/config.h
Added
@@ -0,0 +1,88 @@ +/* config.h. Generated from config.h.in by configure. */ +/* + * Copyright (C) 2000-2009, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef CONFIG_H +#define CONFIG_H + +/* package */ +#define PACKAGE "mbuffer" + +/* version of mbuffer */ +#define VERSION "20110724" + +/* Define if you want support for debugging messages. */ +#define DEBUG 1 + +/* Undefine if you want asserts enabled. */ +/* #undef NDEBUG */ + +/* md5hashing is enabled by default, + default is libmhash fallback is libmd5 */ +#undef HAVE_LIBMHASH +#undef HAVE_LIBMD5 +#undef HAVE_LIBCRYPTO + +/* Define if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Needed for thread safe compilation */ +#define _REENTRANT 1 + +/* Define if you have the hstrerror function. */ +#define HAVE_HSTRERROR 1 + +/* Define if you have the getaddrinfo function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use + `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ +#define HAVE_ST_BLKSIZE 1 + +/* Define if `st_blksize' is member of `struct stat'. */ +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 + +/* Define if you have libsendfile. */ +#define HAVE_SENDFILE 1 +#define HAVE_SENDFILE_H 1 + +/* seteuid ? */ +#define HAVE_SETEUID 1 + +/* atoll availble? */ +/* #undef HAVE_ATOLL */ + +/* alloca in alloca.h */ +#define HAVE_ALLOCA_H 1 + +/* largefile support */ +/* #undef _LARGE_FILE */ +/* #undef _LARGEFILE_SOURCE */ +/* #undef _LARGEFILE64_SOURCE */ +#define _FILE_OFFSET_BITS 64 + +#ifndef lint +#define restrict __restrict +/* #undef inline */ +#endif + +#endif
View file
lxdvdrip-1.77.tar.bz2/mbuffer/dest.h
Added
@@ -0,0 +1,33 @@ +/* + * Copyright (C) 2010, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef DEST_H +#define DEST_H + +#include <pthread.h> + +typedef struct destination { + struct destination *next; + const char *arg, *name, *port, *result; + int fd; + int mode; + pthread_t thread; +} dest_t; + +#endif
View file
lxdvdrip-1.77.tar.bz2/mbuffer/log.c
Added
@@ -0,0 +1,219 @@ +/* + * Copyright (C) 2000-2009, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#include "log.h" + +#if !(defined(__sun) || defined(__linux) || defined(__GLIBC__)) +#define NEED_IO_INTERLOCK +#endif + +#include <assert.h> +#include <limits.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#if defined(__linux) +#include <linux/limits.h> +#elif defined(__bsd) +#include <sys/syslimits.h> +#endif +#include <sys/types.h> +#include <unistd.h> + +int Verbose = 3, Log = STDERR_FILENO, ErrorOccurred = 0, ErrorsFatal = 0; +extern char *Prefix; +extern size_t PrefixLen; + +#ifdef NEED_IO_INTERLOCK +#include <pthread.h> +pthread_mutex_t + LogMut = PTHREAD_MUTEX_INITIALIZER; +#endif + + +#ifdef DEBUG +void logdebug(const char *msg, ...) +{ + va_list val; + char buf[256]; + size_t b = PrefixLen; + + va_start(val,msg); + (void) memcpy(buf,Prefix,b); + b += vsnprintf(buf + b,sizeof(buf)-b,msg,val); + assert(b < sizeof(buf)); +#ifdef NEED_IO_INTERLOCK + if (b <= PIPE_BUF) { + (void) write(Log,buf,b); + } else { + int err; + err = pthread_mutex_lock(&LogMut); + assert(err == 0); + (void) write(Log,buf,b); + err = pthread_mutex_unlock(&LogMut); + assert(err == 0); + } +#else + (void) write(Log,buf,b); +#endif + va_end(val); +} +#define debugmsg if (Verbose >= 5) logdebug +#else +#define debugmsg +#endif + + +void infomsg(const char *msg, ...) +{ + if (Verbose >= 4) { + va_list val; + char buf[256], *b = buf + PrefixLen; + size_t s; + + va_start(val,msg); + (void) memcpy(buf,Prefix,PrefixLen); + b += vsnprintf(b,sizeof(buf)-(b-buf),msg,val); + s = b - buf; + assert(s < sizeof(buf)); +#ifdef NEED_IO_INTERLOCK + if (s <= PIPE_BUF) { + (void) write(Log,buf,s); + } else { + int err; + err = pthread_mutex_lock(&LogMut); + assert(err == 0); + (void) write(Log,buf,s); + err = pthread_mutex_unlock(&LogMut); + assert(err == 0); + } +#else + (void) write(Log,buf,s); +#endif + va_end(val); + } +} + + +void warningmsg(const char *msg, ...) +{ + if (Verbose >= 3) { + va_list val; + char buf[256], *b = buf + PrefixLen; + size_t s; + + va_start(val,msg); + (void) memcpy(buf,Prefix,PrefixLen); + (void) memcpy(b,"warning: ",9); + b += 9; + b += vsnprintf(b,sizeof(buf)-(b-buf),msg,val); + s = b - buf; + assert(s < sizeof(buf)); +#ifdef NEED_IO_INTERLOCK + if (s <= PIPE_BUF) { + (void) write(Log,buf,s); + } else { + int err; + err = pthread_mutex_lock(&LogMut); + assert(err == 0); + (void) write(Log,buf,s); + err = pthread_mutex_unlock(&LogMut); + assert(err == 0); + } +#else + (void) write(Log,buf,s); +#endif + va_end(val); + } +} + + +void errormsg(const char *msg, ...) +{ + ErrorOccurred = 1; + if (Verbose >= 2) { + va_list val; + char buf[256], *b = buf + PrefixLen; + size_t s; + + va_start(val,msg); + (void) memcpy(buf,Prefix,PrefixLen); + (void) memcpy(b,"error: ",7); + b += 7; + b += vsnprintf(b,sizeof(buf)-(b-buf),msg,val); + s = b - buf; + assert(s < sizeof(buf)); +#ifdef NEED_IO_INTERLOCK + if (s <= PIPE_BUF) { + (void) write(Log,buf,s); + } else { + int err; + err = pthread_mutex_lock(&LogMut); + assert(err == 0); + (void) write(Log,buf,s); + err = pthread_mutex_unlock(&LogMut); + assert(err == 0); + } +#else + (void) write(Log,buf,s); +#endif + va_end(val); + } + if (ErrorsFatal) { + close(Log); + exit(EXIT_FAILURE); + } +} + + +void fatal(const char *msg, ...) +{ + if (Verbose >= 1) { + va_list val; + char buf[256], *b = buf + PrefixLen; + size_t s; + + va_start(val,msg); + (void) memcpy(buf,Prefix,PrefixLen); + (void) memcpy(b,"fatal: ",7); + b += 7; + b += vsnprintf(b,sizeof(buf)-(b-buf),msg,val); + s = b - buf; + assert(s < sizeof(buf));
View file
lxdvdrip-1.77.tar.bz2/mbuffer/log.h
Added
@@ -0,0 +1,51 @@ +/* + * Copyright (C) 2000-2009, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef LOG_H +#define LOG_H + +#include "config.h" + +#if !(defined(__sun) || defined(__linux)) +#define NEED_IO_INTERLOCK +#endif + +#ifdef NEED_IO_INTERLOCK +#include <pthread.h> +extern pthread_mutex_t LogMut; +#endif + +extern int Verbose, Log, ErrorOccurred, ErrorsFatal; + +#ifdef DEBUG +void logdebug(const char *msg, ...); +#define debugmsg if (Verbose >= 5) logdebug +#define debugiomsg if (Verbose >= 6) logdebug +#else +#define debugmsg +#define debugiomsg +#endif + +void infomsg(const char *msg, ...); +void warningmsg(const char *msg, ...); +void errormsg(const char *msg, ...); +void fatal(const char *msg, ...); + + +#endif
View file
lxdvdrip-1.77.tar.bz2/mbuffer/mbuffer.c
Added
@@ -0,0 +1,2227 @@ +/* + * Copyright (C) 2000-2011, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#include "config.h" + +#ifdef S_SPLINT_S +typedef int caddr_t; +#include <sys/_types.h> +#include <cygwin/types.h> +#include <cygwin/in.h> +#endif + +#define _GNU_SOURCE 1 /* needed for O_DIRECT */ +#include <assert.h> +#include <errno.h> +#include <fcntl.h> +#include <libgen.h> +#include <limits.h> +#include <math.h> +#include <netdb.h> +#include <pthread.h> +#include <semaphore.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <strings.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <termios.h> +#include <unistd.h> + + +#ifdef __FreeBSD__ +#include <sys/sysctl.h> +#endif + +#ifdef HAVE_SENDFILE +#ifdef HAVE_SENDFILE_H +#include <sys/sendfile.h> +#endif +/* if this sendfile implementation does not support sending from buffers, + disable sendfile support */ + #ifndef SFV_FD_SELF + #ifdef __GNUC__ + #warning sendfile is unable to send from buffers + #endif + #undef HAVE_SENDFILE + #endif +#endif + +#ifndef EBADRQC +#define EBADRQC EINVAL +#endif + +#ifdef HAVE_LIBMHASH +#include <mhash.h> +#define HAVE_MD5 1 +#elif defined HAVE_LIBMD5 +#include <md5.h> +static MD5_CTX MD5ctxt; +#define MD5_INIT(ctxt) MD5Init(&ctxt); +#define MD5_UPDATE(ctxt,at,num) MD5Update(&ctxt,(unsigned char *)(at),(unsigned int)(num)) +#define MD5_END(hash,ctxt) MD5Final(hash,&(ctxt)) +#define HAVE_MD5 1 +#elif defined HAVE_LIBCRYPTO +#include <openssl/md5.h> +static MD5_CTX MD5ctxt; +#define MD5_INIT(ctxt) MD5_Init(&ctxt); +#define MD5_UPDATE(ctxt,at,num) MD5_Update(&ctxt,at,num) +#define MD5_END(hash,ctxt) MD5_Final(hash,&(ctxt)) +#define HAVE_MD5 1 +#endif + +/* + * _POSIX_THREADS is only defined if full thread support is available. + * We don't need full thread support, so we skip this test... + * #ifndef _POSIX_THREADS + * #error posix threads are required + * #endif + */ + +#ifndef S_SPLINT_S +#ifndef _POSIX_SEMAPHORES +#error posix sempahores are required +#endif +#endif + +#ifdef O_LARGEFILE +#define LARGEFILE O_LARGEFILE +#else +#define LARGEFILE 0 +#endif + +#ifdef O_DIRECT +#define DIRECT O_DIRECT +#else +#define DIRECT 0 +#endif + + +#include "dest.h" +#include "network.h" +#include "log.h" + +char + *Prefix; +int + In = -1; +size_t + PrefixLen = 0; + +static pthread_t + Reader; +static long + Tmp = -1, Pause = 0, Memmap = 0, + Status = 1, Append = O_CREAT, Nooverwrite = O_EXCL, Outblocksize = 0, + Autoload_time = 0, OptSync = 0; +static unsigned long + Outsize = 10240; +static volatile int + Terminate = 0, /* abort execution, because of error or signal */ + EmptyCount = 0, /* counter incremented when buffer runs empty */ + FullCount = 0, /* counter incremented when buffer gets full */ + NumSenders = -1,/* number of sender threads */ + Done = 0, + MainOutOK = 1; /* is the main outputThread still writing or just coordinating senders */ +static unsigned long long + Blocksize = 10240, MaxReadSpeed = 0, MaxWriteSpeed = 0, OutVolsize = 0; +static volatile unsigned long long + Rest = 0, Numin = 0, Numout = 0; +static double + StartWrite = 0, StartRead = 1; +static char + *Tmpfile = 0, **Buffer; +static const char + *Infile = 0, *Autoload_cmd = 0; +static int + Memlock = 0, TermQ[2], + Hashers = 0, Direct = 0, SetOutsize = 0; +static long + NumVolumes = 1, /* number of input volumes, 0 for interactive prompting */ + Finish = -1, /* this is for graceful termination */ + Numblocks = 512; /* number of buffer blocks */ +static long long + TickTime = 0; + +static clockid_t + ClockSrc = CLOCK_REALTIME; + +#ifdef __sun +#include <synch.h> +#define sem_t sema_t +#define sem_init(a,b,c) sema_init(a,c,USYNC_THREAD,0) +#define sem_post sema_post +#define sem_getvalue(a,b) ((*(b) = (a)->count), 0) +#if defined(__SunOS_5_8) || defined(__SunOS_5_9) +#define sem_wait SemWait +int SemWait(sema_t *s) +{ + int err; + do { + err = sema_wait(s); + } while (err == EINTR); + return err; +} +#else +#define sem_wait sema_wait +#endif +#endif + +static sem_t Dev2Buf, Buf2Dev; +static pthread_cond_t + PercLow = PTHREAD_COND_INITIALIZER, /* low watermark */ + PercHigh = PTHREAD_COND_INITIALIZER, /* high watermark */ + SendCond = PTHREAD_COND_INITIALIZER; +static pthread_mutex_t + TermMut = PTHREAD_MUTEX_INITIALIZER, /* prevents statusThread from interfering with request*Volume */ + LowMut = PTHREAD_MUTEX_INITIALIZER, + HighMut = PTHREAD_MUTEX_INITIALIZER, + SendMut = PTHREAD_MUTEX_INITIALIZER;
View file
lxdvdrip-1.77.tar.bz2/mbuffer/network.c
Added
@@ -0,0 +1,414 @@ +/* + * Copyright (C) 2000-2009, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#include "config.h" + +#ifdef HAVE_ALLOCA_H +#include <alloca.h> +#elif defined __GNUC__ +#define alloca __builtin_alloca +#elif defined _AIX +#define alloca __alloca +#else +#include <stddef.h> +void *alloca(size_t); +#endif + + +#include <assert.h> +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <strings.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <unistd.h> +#include <netdb.h> +#include <netinet/in.h> +#include <arpa/inet.h> + +#include "dest.h" +#include "network.h" +#include "log.h" + +extern int In; +int32_t TCPBufSize = 1 << 20; +#if defined(PF_INET6) && defined(PF_UNSPEC) +int AddrFam = PF_UNSPEC; +#else +int AddrFam = PF_INET; +#endif + + +static void setTCPBufferSize(int sock, unsigned buffer) +{ + int err; + int32_t osize, size; + socklen_t bsize = sizeof(osize); + + assert(buffer == SO_RCVBUF || buffer == SO_SNDBUF); + err = getsockopt(sock,SOL_SOCKET,buffer,&osize,&bsize); + assert((err == 0) && (bsize == sizeof(osize))); + if (osize < TCPBufSize) { + size = TCPBufSize; + do { + err = setsockopt(sock,SOL_SOCKET,buffer,(void *)&size,sizeof(size)); + size >>= 1; + } while ((-1 == err) && (errno == ENOMEM) && (size > osize)); + if (err == -1) { + warningmsg("unable to set socket buffer size: %s\n",strerror(errno)); + return; + } + } + bsize = sizeof(size); + err = getsockopt(sock,SOL_SOCKET,buffer,&size,&bsize); + assert(err != -1); + if (buffer == SO_RCVBUF) + infomsg("set TCP receive buffer size to %d\n",size); + else + infomsg("set TCP send buffer size to %d\n",size); +} + + +#ifdef HAVE_GETADDRINFO + +void initNetworkInput(const char *addr) +{ + char *host, *port; + struct addrinfo hint, *pinfo = 0, *x, *cinfo = 0; + int err, sock = -1, l; + + debugmsg("initNetworkInput(\"%s\")\n",addr); + l = strlen(addr) + 1; + host = alloca(l); + memcpy(host,addr,l); + port = strrchr(host,':'); + if (port == 0) { + port = host; + host = 0; + } else if (port == host) { + port = host + 1; + host = 0; + } else { + *port = 0; + ++port; + bzero(&hint,sizeof(hint)); + hint.ai_family = AddrFam; + hint.ai_protocol = IPPROTO_TCP; + hint.ai_socktype = SOCK_STREAM; + hint.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED; + err = getaddrinfo(host,0,&hint,&cinfo); + if (err != 0) + fatal("unable to resolve address information for expected host '%s': %s\n",host,gai_strerror(err)); + } + bzero(&hint,sizeof(hint)); + hint.ai_family = AddrFam; + hint.ai_protocol = IPPROTO_TCP; + hint.ai_socktype = SOCK_STREAM; + hint.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; + err = getaddrinfo(0,port,&hint,&pinfo); + if (err != 0) + fatal("unable to get address information for port/service '%s': %s\n",port,gai_strerror(err)); + assert(pinfo); + for (x = pinfo; x; x = x->ai_next) { + int reuse_addr = 1; + debugmsg("creating socket for address familiy %d\n",x->ai_family); + sock = socket(x->ai_family, SOCK_STREAM, 0); + if (sock == -1) { + warningmsg("unable to create socket for input: %s\n",strerror(errno)); + continue; + } + if (-1 == setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse_addr, sizeof(reuse_addr))) + warningmsg("cannot set socket to reuse address: %s\n",strerror(errno)); + if (0 == bind(sock, x->ai_addr, x->ai_addrlen)) { + debugmsg("successfully bound socket - address length %d\n",x->ai_addrlen); + break; + } + warningmsg("could not bind to socket for network input: %s\n",strerror(errno)); + (void) close(sock); + } + if (x == 0) + fatal("Unable to initialize network input.\n"); + infomsg("listening on socket...\n"); + if (0 > listen(sock,0)) /* accept only 1 incoming connection */ + fatal("could not listen on socket for network input: %s\n",strerror(errno)); + for (;;) { + char chost[NI_MAXHOST], serv[NI_MAXSERV]; + struct sockaddr_in6 caddr; + struct addrinfo *c; + socklen_t len = sizeof(caddr); + int err; + + debugmsg("waiting for incoming connection\n"); + In = accept(sock, (struct sockaddr *) &caddr, &len); + if (0 > In) + fatal("Unable to accept connection for network input: %s\n",strerror(errno)); + err = getnameinfo((struct sockaddr *) &caddr,len,chost,sizeof(chost),serv,sizeof(serv),NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN); + if (0 != err) { + fatal("unable to get name information for hostname of incoming connection: %s\n",gai_strerror(err)); + } + infomsg("incoming connection from %s:%s\n",chost,serv); + if (host == 0) + break; + for (c = cinfo; c; c = c->ai_next) { + char xhost[NI_MAXHOST]; + if (0 == getnameinfo((struct sockaddr *)c->ai_addr,c->ai_addrlen,xhost,sizeof(xhost),0,0,NI_NUMERICHOST|NI_NOFQDN)) { + debugmsg("checking against host '%s'\n",xhost); + if (0 == strcmp(xhost,chost)) + break; + } + } + if (c) + break; + warningmsg("rejected connection from %s\n",chost); + if (-1 == close(In)) + warningmsg("error closing rejected input: %s\n",strerror(errno)); + } + freeaddrinfo(pinfo); + if (cinfo) + freeaddrinfo(cinfo); + debugmsg("input connection accepted\n"); + setTCPBufferSize(In,SO_RCVBUF); + (void) close(sock); +} + + +dest_t *createNetworkOutput(const char *addr) +{ + char *host, *port; + struct addrinfo hint, *ret = 0, *x; + int err, fd = -1; + dest_t *d;
View file
lxdvdrip-1.77.tar.bz2/mbuffer/network.h
Added
@@ -0,0 +1,31 @@ +/* + * Copyright (C) 2000-2009, Thomas Maier-Komor + * + * This is the source code of mbuffer. + * + * 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 3 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, see <http://www.gnu.org/licenses/>. + */ + +#ifndef NETWORK_H +#define NETWORK_H + +#include <sys/types.h> + +extern int32_t TCPBufSize; +extern int AddrFam; + +void initNetworkInput(const char *addr); +struct destination *createNetworkOutput(const char *addr); + +#endif
View file
lxdvdrip-1.76.tar.bz2/requant/Makefile -> lxdvdrip-1.77.tar.bz2/requant/Makefile
Changed
@@ -7,7 +7,7 @@ CC = gcc CFLAGS ?= -O2 -g -D_LARGEFILE_SOURCE -DLARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT -CFLAGS += -Wall +CFLAGS += -Wall -Wno-unused-result LDFLAGS += -s LOADLIBES += -lm
View file
lxdvdrip-1.76.tar.bz2/vamps/Makefile -> lxdvdrip-1.77.tar.bz2/vamps/Makefile
Changed
@@ -22,7 +22,7 @@ -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_REENTRANT CFLAGS += -Wall LDFLAGS += -s -LOADLIBES += -lm -lpthread -ldvdread +LOADLIBES += -lm -pthread -ldvdread INSTALL ?= install
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.