dvdrip
2 years agodvd-sector-copy.c: Fold `report_bad_blocks_progress' into `recovered'.
Mark Wooding [Fri, 8 Apr 2022 16:07:55 +0000 (17:07 +0100)]
dvd-sector-copy.c: Fold `report_bad_blocks_progress' into `recovered'.

It's not very complicated; it's only used once; and it saves a call to
`store_filename'.

2 years agodvd-sector-copy.c (recovery_read_sectors): Cross-check POS and OFF.
Mark Wooding [Fri, 8 Apr 2022 15:50:15 +0000 (16:50 +0100)]
dvd-sector-copy.c (recovery_read_sectors): Cross-check POS and OFF.

2 years agodvd-sector-copy.c (read_sectors): Force `errno' to zero even if WANT = 0.
Mark Wooding [Fri, 8 Apr 2022 15:45:03 +0000 (16:45 +0100)]
dvd-sector-copy.c (read_sectors): Force `errno' to zero even if WANT = 0.

Otherwise we'd get confused at the end.  I don't think anything actually
tries to call `read_sectors' with WANT = 0, but it's better not to leave
a booby trap here.

2 years agodvd-sector-copy.c: Fix broken indentation.
Mark Wooding [Fri, 8 Apr 2022 14:47:20 +0000 (15:47 +0100)]
dvd-sector-copy.c: Fix broken indentation.

2 years agolib.[ch], *.c: Have `open_dvd' return errors rather than bailing.
Mark Wooding [Fri, 8 Apr 2022 14:40:49 +0000 (15:40 +0100)]
lib.[ch], *.c: Have `open_dvd' return errors rather than bailing.

In particular, this means that `dvd-id' can report on all of the other
discs.

2 years agochkdvdimg.c: Factor out `set_status' subroutine.
Mark Wooding [Fri, 8 Apr 2022 14:38:45 +0000 (15:38 +0100)]
chkdvdimg.c: Factor out `set_status' subroutine.

2 years agolib.[ch], dvd-sector-copy.c: Publish `read_line'.
Mark Wooding [Fri, 8 Apr 2022 14:35:28 +0000 (15:35 +0100)]
lib.[ch], dvd-sector-copy.c: Publish `read_line'.

2 years agolib.[ch], dvd-sector-copy.c: Publish the `buf' machinery as inline functions.
Mark Wooding [Fri, 8 Apr 2022 14:31:24 +0000 (15:31 +0100)]
lib.[ch], dvd-sector-copy.c: Publish the `buf' machinery as inline functions.

Translate the macros into inline functions, and export them from
`lib.h', with some minor tweaking.

  * I've added `buf_putz', and fixed `buf_putc' to advance the output
    pointer as one would expect.

  * I've pulled the actual buffer extension into an out-of-line
    function.

2 years agolib.[ch]: Move the memory allocation out-of-line.
Mark Wooding [Fri, 8 Apr 2022 14:29:13 +0000 (15:29 +0100)]
lib.[ch]: Move the memory allocation out-of-line.

2 years agolib.h: Add missing documentation of FILE argument to `device_size'.
Mark Wooding [Fri, 8 Apr 2022 14:27:17 +0000 (15:27 +0100)]
lib.h: Add missing documentation of FILE argument to `device_size'.

2 years agodvd-sector-copy.c: Sit for the bad-blocks delay if we get an actual hit.
Mark Wooding [Sat, 26 Mar 2022 14:13:12 +0000 (14:13 +0000)]
dvd-sector-copy.c: Sit for the bad-blocks delay if we get an actual hit.

2 years agolib.[ch], dvd-sector-copy.c: Publish a couple of generally handy utilities.
Mark Wooding [Fri, 25 Mar 2022 19:56:41 +0000 (19:56 +0000)]
lib.[ch], dvd-sector-copy.c: Publish a couple of generally handy utilities.

2 years agolib.h: Disable magic attributes if the compiler doesn't understand them.
Mark Wooding [Fri, 25 Mar 2022 19:01:15 +0000 (19:01 +0000)]
lib.h: Disable magic attributes if the compiler doesn't understand them.

2 years agolib.[ch]: Add documentation and commentary.
Mark Wooding [Fri, 25 Mar 2022 19:00:24 +0000 (19:00 +0000)]
lib.[ch]: Add documentation and commentary.

2 years agolib.h: Make `MAXIDSZ' clearer about where the value comes from.
Mark Wooding [Fri, 25 Mar 2022 18:58:39 +0000 (18:58 +0000)]
lib.h: Make `MAXIDSZ' clearer about where the value comes from.

The number 99 is just a bit too round to believe that it's actually
carefully calculated rather than chosen arbitrarily.

2 years agolib.[ch]: Rearrange the toplevel definitions into a more sensible order.
Mark Wooding [Fri, 25 Mar 2022 18:56:44 +0000 (18:56 +0000)]
lib.[ch]: Rearrange the toplevel definitions into a more sensible order.

No code changes.

2 years agomultiprogress.h: Use a macro to mark `printf'-like functions.
Mark Wooding [Fri, 25 Mar 2022 18:52:31 +0000 (18:52 +0000)]
multiprogress.h: Use a macro to mark `printf'-like functions.

Rather than using `__attribute__' directly.

2 years agomultiprogress.[ch]: Add commentary.
Mark Wooding [Fri, 25 Mar 2022 01:41:10 +0000 (01:41 +0000)]
multiprogress.[ch]: Add commentary.

Also some light layout changes.

2 years agomultiprogress.c (progress_shownotice): Remove pointless guard.
Mark Wooding [Fri, 25 Mar 2022 01:34:17 +0000 (01:34 +0000)]
multiprogress.c (progress_shownotice): Remove pointless guard.

The `progress_put_sequence' function already does the right thing here.

2 years agomultiprogress.c: Set the terminal stream to be fully buffered.
Mark Wooding [Fri, 25 Mar 2022 01:32:37 +0000 (01:32 +0000)]
multiprogress.c: Set the terminal stream to be fully buffered.

The `free_render_state' function correctly forces output when we're done.

2 years agomultiprogress.c (clear_progress): Don't check for output errors.
Mark Wooding [Fri, 25 Mar 2022 01:31:51 +0000 (01:31 +0000)]
multiprogress.c (clear_progress): Don't check for output errors.

Nobody's watching to see if we found any.  Indeed, we might as well not
return anything at all.  So, err, don't.

2 years agomultiprogress.c (clear_progress): Don't check `tty->fp': the caller did it.
Mark Wooding [Fri, 25 Mar 2022 01:29:54 +0000 (01:29 +0000)]
multiprogress.c (clear_progress): Don't check `tty->fp': the caller did it.

2 years agomultiprogress.[ch]: Publish the terminal-sequence output functions.
Mark Wooding [Fri, 25 Mar 2022 01:23:51 +0000 (01:23 +0000)]
multiprogress.[ch]: Publish the terminal-sequence output functions.

Otherwise externally-defined renderers don't have a good way to do this.

2 years agomultiprogress.c (clear_progress): Write the `n - 1' loops in a better way.
Mark Wooding [Fri, 25 Mar 2022 01:19:01 +0000 (01:19 +0000)]
multiprogress.c (clear_progress): Write the `n - 1' loops in a better way.

2 years agomultiprogress.c: Don't copy the contents of the temporary buffer.
Mark Wooding [Fri, 25 Mar 2022 01:16:39 +0000 (01:16 +0000)]
multiprogress.c: Don't copy the contents of the temporary buffer.

Nothing relies on the temporary buffer's contents being preserved.

2 years agomultiprogress.c: Fix `split_string' to overestimate.
Mark Wooding [Fri, 25 Mar 2022 01:12:56 +0000 (01:12 +0000)]
multiprogress.c: Fix `split_string' to overestimate.

Doing the right thing in `advance_measure' is much harder if
`split_string' sometimes falls short of the requested bound because of
wide characters.  On the other hand, overestimating is a little tricky
because we must remember to include all of the following zero-
width (e.g., combining) characters or the prefix will just be wrong.
But it's better to do this than come up with some kludge to make
`advance_measure' sometimes advance the state even when we've not
actually reached the right position.

2 years agomultiprogress.c: Remove pointless return value from `setup_render_state'.
Mark Wooding [Fri, 25 Mar 2022 01:02:33 +0000 (01:02 +0000)]
multiprogress.c: Remove pointless return value from `setup_render_state'.

It's being checked, and, indeed, passed on.  But it didn't actually do
very much other than prevent the terminal-width fallback logic from
being useful.  So delete it.

2 years agomultiprogress.[ch]: Rearrange the toplevel definitions more sensibly.
Mark Wooding [Fri, 25 Mar 2022 00:57:21 +0000 (00:57 +0000)]
multiprogress.[ch]: Rearrange the toplevel definitions more sensibly.

2 years agomultiprogress.c: Pair calls to `free' with zeroing the points.
Mark Wooding [Fri, 25 Mar 2022 00:51:40 +0000 (00:51 +0000)]
multiprogress.c: Pair calls to `free' with zeroing the points.

2 years agomultiprogress.[ch]: Save and restore `PC' in the render state.
Mark Wooding [Fri, 25 Mar 2022 00:42:44 +0000 (00:42 +0000)]
multiprogress.[ch]: Save and restore `PC' in the render state.

2 years agomultiprogress.h: Add the right number of zeros to `PROGRESS_TTYINFO_INIT'.
Mark Wooding [Fri, 25 Mar 2022 00:49:59 +0000 (00:49 +0000)]
multiprogress.h: Add the right number of zeros to `PROGRESS_TTYINFO_INIT'.

2 years agomultiprogress.c: Get the `termcap' string after allocating the buffers.
Mark Wooding [Fri, 25 Mar 2022 00:39:47 +0000 (00:39 +0000)]
multiprogress.c: Get the `termcap' string after allocating the buffers.

It works better that way, except with GNU `termcap'.

2 years agomultiprogress.h: Fix an erroneously indented line.
Mark Wooding [Fri, 25 Mar 2022 00:48:22 +0000 (00:48 +0000)]
multiprogress.h: Fix an erroneously indented line.

2 years agoMerge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip master
Mark Wooding [Tue, 22 Mar 2022 21:38:19 +0000 (21:38 +0000)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip

* 'master' of git.distorted.org.uk:~mdw/publish/public-git/dvdrip:
  dvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.
  dvd-info.c: Don't forget to dump the last titleset.
  dvd-info.c: Add missing `\' in output banner.

2 years agochkdvdimg.c: Open the image file with `open_dvd'.
Mark Wooding [Tue, 22 Mar 2022 21:37:27 +0000 (21:37 +0000)]
chkdvdimg.c: Open the image file with `open_dvd'.

This means that it will wait until we actually insert a disc.  Yay!

2 years agolib.c, and knock-on: Add MODE argument to `open_dvd'.
Mark Wooding [Tue, 22 Mar 2022 21:34:37 +0000 (21:34 +0000)]
lib.c, and knock-on: Add MODE argument to `open_dvd'.

Everyone wants read-only for now.

2 years agodvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.
Mark Wooding [Tue, 22 Mar 2022 21:30:10 +0000 (21:30 +0000)]
dvd-info.c: Trigger the easy lookup if explicit chapter bounds aren't given.

2 years agodvd-info.c: Don't forget to dump the last titleset.
Mark Wooding [Tue, 22 Mar 2022 21:29:51 +0000 (21:29 +0000)]
dvd-info.c: Don't forget to dump the last titleset.

2 years agodvd-info.c: Add missing `\' in output banner.
Mark Wooding [Tue, 22 Mar 2022 21:29:11 +0000 (21:29 +0000)]
dvd-info.c: Add missing `\' in output banner.

2 years agoAdd a new program `dvd-info' to report on interesting things.
Mark Wooding [Sat, 19 Mar 2022 14:10:30 +0000 (14:10 +0000)]
Add a new program `dvd-info' to report on interesting things.

I'm getting deeper in here, I know.

2 years agocheckimg: Don't complain about every mismatch.
Mark Wooding [Sat, 19 Mar 2022 14:09:49 +0000 (14:09 +0000)]
checkimg: Don't complain about every mismatch.

We can tell from the summary.

2 years agodvd-sector-copy.c: Use `bad_hi' consistently for the upper bound when done.
Mark Wooding [Sat, 19 Mar 2022 14:08:43 +0000 (14:08 +0000)]
dvd-sector-copy.c: Use `bad_hi' consistently for the upper bound when done.

It's just conceivable that `good' is less than `bad_hi' at this point,
which screws everything up.  It's essential to pick a consistent upper
bound here.

2 years agodvd-sector-copy.c, lib.[ch]: Improve and publish the number parsing functions.
Mark Wooding [Sat, 19 Mar 2022 14:08:07 +0000 (14:08 +0000)]
dvd-sector-copy.c, lib.[ch]: Improve and publish the number parsing functions.

2 years agoMakefile: Factor out the `CFLAGS'.
Mark Wooding [Sat, 19 Mar 2022 14:07:15 +0000 (14:07 +0000)]
Makefile: Factor out the `CFLAGS'.

Makes overriding from the command line less awful.

2 years agodvd-sector-copy.c: Show file ends in the dump.
Mark Wooding [Fri, 11 Mar 2022 11:40:40 +0000 (11:40 +0000)]
dvd-sector-copy.c: Show file ends in the dump.

2 years agodvd-sector-copy.c: Wrap long line properly.
Mark Wooding [Fri, 11 Mar 2022 11:40:16 +0000 (11:40 +0000)]
dvd-sector-copy.c: Wrap long line properly.

2 years agodvdrip-upload: Fix self-call the case where there's no daemon running.
Mark Wooding [Wed, 9 Mar 2022 11:34:04 +0000 (11:34 +0000)]
dvdrip-upload: Fix self-call the case where there's no daemon running.

2 years agodvd-sector-copy.c: Truncate the event list before processing a lost `stop'.
Mark Wooding [Mon, 7 Mar 2022 23:47:20 +0000 (23:47 +0000)]
dvd-sector-copy.c: Truncate the event list before processing a lost `stop'.

2 years agodvd-sector-copy.c: Report final statistics correctly.
Mark Wooding [Mon, 7 Mar 2022 23:46:52 +0000 (23:46 +0000)]
dvd-sector-copy.c: Report final statistics correctly.

2 years agodvd-sector-copy.c: Dump the event queue before we start processing it.
Mark Wooding [Mon, 7 Mar 2022 23:46:29 +0000 (23:46 +0000)]
dvd-sector-copy.c: Dump the event queue before we start processing it.

2 years agodvd-sector-copy.c: Eliminate unused variable.
Mark Wooding [Mon, 7 Mar 2022 23:45:57 +0000 (23:45 +0000)]
dvd-sector-copy.c: Eliminate unused variable.

2 years agodvd-sector-copy.c: Fix botched debugging code.
Mark Wooding [Mon, 7 Mar 2022 23:45:29 +0000 (23:45 +0000)]
dvd-sector-copy.c: Fix botched debugging code.

2 years agochkdvdimg.c: Name the file when reporting too many trailing zeros.
Mark Wooding [Mon, 7 Mar 2022 12:48:05 +0000 (12:48 +0000)]
chkdvdimg.c: Name the file when reporting too many trailing zeros.

2 years agodvd-sector-copy.c: Add missing handler for the `-i' option.
Mark Wooding [Mon, 7 Mar 2022 00:36:12 +0000 (00:36 +0000)]
dvd-sector-copy.c: Add missing handler for the `-i' option.

2 years agochkdvdimg.c: Retrieve device size using the new function.
Mark Wooding [Sun, 6 Mar 2022 23:57:20 +0000 (23:57 +0000)]
chkdvdimg.c: Retrieve device size using the new function.

... which works on block devices as well as ordinary files.

2 years agodvd-sector-copy.c: Export device-size machinery to the library.
Mark Wooding [Sun, 6 Mar 2022 23:54:02 +0000 (23:54 +0000)]
dvd-sector-copy.c: Export device-size machinery to the library.

2 years agodvdrip: Check for the device size apparently changing during the copy.
Mark Wooding [Sun, 6 Mar 2022 23:53:21 +0000 (23:53 +0000)]
dvdrip: Check for the device size apparently changing during the copy.

This indicates something going horribly wrong.

2 years agodvdrip: Fail if we can't read the `.IFO' hash for the disc id.
Mark Wooding [Sun, 6 Mar 2022 20:42:02 +0000 (20:42 +0000)]
dvdrip: Fail if we can't read the `.IFO' hash for the disc id.

This may help with the kernel reporting stale medium sizes.

2 years agodvd-sector-copy.c: Add option to verify source id.
Mark Wooding [Sun, 6 Mar 2022 20:34:50 +0000 (20:34 +0000)]
dvd-sector-copy.c: Add option to verify source id.

2 years agoscripts: Call utilities via environment variables.
Mark Wooding [Sun, 6 Mar 2022 20:34:17 +0000 (20:34 +0000)]
scripts: Call utilities via environment variables.

2 years agodvd-id.c, lib.[ch]: Improve DVD ID computation.
Mark Wooding [Sun, 6 Mar 2022 17:32:51 +0000 (17:32 +0000)]
dvd-id.c, lib.[ch]: Improve DVD ID computation.

Move the code to the library.  Accept flags (to the library function and
the utility) to fail if portions of the ID can't be determined.

Also, improve `dvd-id' to print IDs for multiple disc images.

2 years agochkdvdimg: Add a new program for checking DVD images.
Mark Wooding [Sun, 6 Mar 2022 16:23:18 +0000 (16:23 +0000)]
chkdvdimg: Add a new program for checking DVD images.

Primarily I'm interested in checking that the length is right, because
one of my DVD drives sometimes reports the wrong medium size
(specifically, I think, the size for the previous medium).  Also,
sometimes there are zero sectors stuck on the end, which complicates
finding the backup UDF anchor descriptor, so provide an option to trim
these.

2 years agolib.h: Publish a `MEMCMP' macro, like `STRCMP'.
Mark Wooding [Sun, 6 Mar 2022 16:22:32 +0000 (16:22 +0000)]
lib.h: Publish a `MEMCMP' macro, like `STRCMP'.

2 years agolib.c, lib.h: Introduce `vmoan_syserr' and `moan_syserr'.
Mark Wooding [Sun, 6 Mar 2022 16:21:36 +0000 (16:21 +0000)]
lib.c, lib.h: Introduce `vmoan_syserr' and `moan_syserr'.

This cleans up this little family of functions.  There's a behaviour
change: `vmoan' now prints a newline which it didn't before, and callers
have been adjusted to compensate.

2 years agolib.c: Remove redundant format attributes.
Mark Wooding [Sun, 6 Mar 2022 16:18:00 +0000 (16:18 +0000)]
lib.c: Remove redundant format attributes.

Should use `PRINTF_LIKE' nowadays anyway.

2 years agodvdrip-retry-botched-vobs: Retry using the newly determined block list.
Mark Wooding [Sun, 6 Mar 2022 03:44:54 +0000 (03:44 +0000)]
dvdrip-retry-botched-vobs: Retry using the newly determined block list.

Fortunately, I didn't actually engage this case when I did this to my
collection.

2 years agodvdrip-retry-botched-vobs: Process discs in a useful order.
Mark Wooding [Sun, 6 Mar 2022 01:31:47 +0000 (01:31 +0000)]
dvdrip-retry-botched-vobs: Process discs in a useful order.

2 years agodvdrip-retry-botched-vobs: Eject discs when we're done with them.
Mark Wooding [Sun, 6 Mar 2022 01:27:14 +0000 (01:27 +0000)]
dvdrip-retry-botched-vobs: Eject discs when we're done with them.

2 years agodvdrip-retry-botched-vobs: Delete the retry file correctly.
Mark Wooding [Sun, 6 Mar 2022 01:27:03 +0000 (01:27 +0000)]
dvdrip-retry-botched-vobs: Delete the retry file correctly.

2 years agodvdrip-retry-botched-vobs: Be more vocal about wrong discs.
Mark Wooding [Sun, 6 Mar 2022 01:26:43 +0000 (01:26 +0000)]
dvdrip-retry-botched-vobs: Be more vocal about wrong discs.

2 years agoNew programs for dealing with VOBs ripped without being decrypted.
Mark Wooding [Sun, 6 Mar 2022 01:11:00 +0000 (01:11 +0000)]
New programs for dealing with VOBs ripped without being decrypted.

When my drives were configured with the wrong region, `libdvdcss' would
have to crack the keys the hard way, and it sometimes failed.  I mostly
shrugged my shoulders, but now I've fixed this problem, I thought I'd
track down the miscopied VOBs and make some tools for fixing the
problem.

2 years agodvdrip-monitor: New program to keep track of what's going on.
Mark Wooding [Sun, 6 Mar 2022 01:10:20 +0000 (01:10 +0000)]
dvdrip-monitor: New program to keep track of what's going on.

2 years agodvdrip: Leave a note in the working directory about which device we're using.
Mark Wooding [Sun, 6 Mar 2022 01:08:27 +0000 (01:08 +0000)]
dvdrip: Leave a note in the working directory about which device we're using.

2 years agodvd-sector-copy.c, lib.[ch]: Move the file hacking functions to the library.
Mark Wooding [Sun, 6 Mar 2022 01:08:01 +0000 (01:08 +0000)]
dvd-sector-copy.c, lib.[ch]: Move the file hacking functions to the library.

2 years agoMakefile: Only `dvd-sector-copy' needs `-lm'.
Mark Wooding [Sun, 6 Mar 2022 01:07:32 +0000 (01:07 +0000)]
Makefile: Only `dvd-sector-copy' needs `-lm'.

2 years agomultiprogress.c: Leave the cursor at the start of the last line.
Mark Wooding [Sun, 6 Mar 2022 01:06:28 +0000 (01:06 +0000)]
multiprogress.c: Leave the cursor at the start of the last line.

Things still go wrong when stray characters get echoed but it's less
bad.  I think.

2 years agomultiprogress.c: Probe termcap/info for newline sequence.
Mark Wooding [Sun, 6 Mar 2022 01:05:54 +0000 (01:05 +0000)]
multiprogress.c: Probe termcap/info for newline sequence.

Just to show willing.  Provide the obvious default, because it seems to
be necessary!

2 years agomultiprogress.c: Provide the obvious default for `cr'.
Mark Wooding [Sun, 6 Mar 2022 01:04:42 +0000 (01:04 +0000)]
multiprogress.c: Provide the obvious default for `cr'.

2 years agodvd-cache-keys.c: Allow multiple devices and/or image files.
Mark Wooding [Sun, 6 Mar 2022 01:03:49 +0000 (01:03 +0000)]
dvd-cache-keys.c: Allow multiple devices and/or image files.

2 years agodvd-cache-keys.c: Move the existence check into `kick_vob'.
Mark Wooding [Sun, 6 Mar 2022 01:03:17 +0000 (01:03 +0000)]
dvd-cache-keys.c: Move the existence check into `kick_vob'.

Much neater.

2 years agodvd-cache-keys.c: Pass index and titleness as unsigned.
Mark Wooding [Sun, 6 Mar 2022 00:59:52 +0000 (00:59 +0000)]
dvd-cache-keys.c: Pass index and titleness as unsigned.

2 years agodvd-sector-copy.c: Allow averaging `alpha' to be set as a parameter.
Mark Wooding [Sun, 6 Mar 2022 00:58:58 +0000 (00:58 +0000)]
dvd-sector-copy.c: Allow averaging `alpha' to be set as a parameter.

2 years agodvd-sector-copy.c: Reinterpret the `step' as being beyond the high bound.
Mark Wooding [Sun, 6 Mar 2022 00:58:20 +0000 (00:58 +0000)]
dvd-sector-copy.c: Reinterpret the `step' as being beyond the high bound.

2 years agodvd-sector-copy.c: Just a light reformatting.
Mark Wooding [Sun, 6 Mar 2022 00:57:28 +0000 (00:57 +0000)]
dvd-sector-copy.c: Just a light reformatting.

2 years agodvd-sector-copy.c: Go back to showing just disc progress when continuing.
Mark Wooding [Sun, 6 Mar 2022 00:57:05 +0000 (00:57 +0000)]
dvd-sector-copy.c: Go back to showing just disc progress when continuing.

2 years agodvd-sector-copy.c: Remove the pointless `status' variable.
Mark Wooding [Sun, 6 Mar 2022 00:55:55 +0000 (00:55 +0000)]
dvd-sector-copy.c: Remove the pointless `status' variable.

Relic of former days when `dvdrip' used the return code to infer that
there were bad blocks.  Nowadays it checks for the `badblocks' file.

2 years agodvd-sector-copy.c: Report the number of bad sectors in the bad-blocks file.
Mark Wooding [Tue, 1 Mar 2022 18:34:45 +0000 (18:34 +0000)]
dvd-sector-copy.c: Report the number of bad sectors in the bad-blocks file.

2 years agoA big mess of changes all at once.
Mark Wooding [Tue, 1 Mar 2022 16:18:47 +0000 (16:18 +0000)]
A big mess of changes all at once.

I'm usually quite good about factoring out all of the changes I make, but
in this case it doesn't seem worth the bother.

2 years agodvdrip: Squish some code a bit.
Mark Wooding [Sat, 26 Feb 2022 11:40:42 +0000 (11:40 +0000)]
dvdrip: Squish some code a bit.

2 years agodvdrip: Abolish the affordances for using `dvdbackup'.
Mark Wooding [Sat, 26 Feb 2022 11:40:07 +0000 (11:40 +0000)]
dvdrip: Abolish the affordances for using `dvdbackup'.

2 years agodvdrip: Add `-r' option to retry the failed blocks.
Mark Wooding [Thu, 24 Feb 2022 17:02:51 +0000 (17:02 +0000)]
dvdrip: Add `-r' option to retry the failed blocks.

2 years agodvd-sector-copy.c (report_progress): Fiddle with the averaging parameter.
Mark Wooding [Thu, 24 Feb 2022 17:02:00 +0000 (17:02 +0000)]
dvd-sector-copy.c (report_progress): Fiddle with the averaging parameter.

2 years agodvd-sector-copy.c (report_progress): Show a throbber to help gauge speed.
Mark Wooding [Thu, 24 Feb 2022 17:01:26 +0000 (17:01 +0000)]
dvd-sector-copy.c (report_progress): Show a throbber to help gauge speed.

2 years agodvd-sector-copy.c (recovered): Don't print comment if outside a VOB file.
Mark Wooding [Thu, 24 Feb 2022 17:00:38 +0000 (17:00 +0000)]
dvd-sector-copy.c (recovered): Don't print comment if outside a VOB file.

2 years agodvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file.
Mark Wooding [Sat, 19 Feb 2022 21:32:13 +0000 (21:32 +0000)]
dvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file.

The exit status from the final run isn't helpful, but the bad-blocks
file is.

2 years agodvdrip: Prepare the `dest' file early, so that it can be edited.
Mark Wooding [Sat, 19 Feb 2022 19:06:25 +0000 (19:06 +0000)]
dvdrip: Prepare the `dest' file early, so that it can be edited.

2 years agodvd-sector-copy.c: Use the correct character to match comments.
Mark Wooding [Sat, 19 Feb 2022 15:23:04 +0000 (15:23 +0000)]
dvd-sector-copy.c: Use the correct character to match comments.

Oops.

2 years agosort-badblocks: Another handy testing utility.
Mark Wooding [Sat, 19 Feb 2022 11:54:20 +0000 (11:54 +0000)]
sort-badblocks: Another handy testing utility.

2 years agodvd-sector-copy.c: Limit `recovery_read' return value to length requested.
Mark Wooding [Sat, 19 Feb 2022 11:53:22 +0000 (11:53 +0000)]
dvd-sector-copy.c: Limit `recovery_read' return value to length requested.

Otherwise the caller gets properly confused.

2 years agodvd-sector-copy.c: Add more debugging about the recovery algorithm.
Mark Wooding [Sat, 19 Feb 2022 11:53:06 +0000 (11:53 +0000)]
dvd-sector-copy.c: Add more debugging about the recovery algorithm.