Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199026 - media-plugins/vdr-dvd: Add DVD drive speed limiting support
Summary: media-plugins/vdr-dvd: Add DVD drive speed limiting support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo VDR Project
URL: http://www.vdr-portal.de/board/thread...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-13 11:23 UTC by Sebastian
Modified: 2007-11-15 22:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dvd-0.3.5-b07-speedcontrol.diff (dvdspeed-cvs-11-10-2007.diff,8.32 KB, patch)
2007-11-13 11:24 UTC, Sebastian
Details | Diff
dvdspeed-gentoo-appy_after_a52dynrc_patch-for_pre20070117.diff (dvdspeed-gentoo-appy_after_a52dynrc_patch-for_pre20070117.diff,8.24 KB, patch)
2007-11-13 11:25 UTC, Sebastian
Details | Diff
dvd-a52drc-pre20071113.diff (dvd-a52drc-pre20071113.diff,3.09 KB, patch)
2007-11-13 14:33 UTC, Sebastian
Details | Diff
dvdspeed-cvs-11-13-2007.diff (dvdspeed-cvs-11-13-2007.diff,9.00 KB, patch)
2007-11-13 14:37 UTC, Sebastian
Details | Diff
dvdspeed-cvs-11-13-2007-r1.diff (dvdspeed-cvs-11-13-2007-r1.diff,9.38 KB, patch)
2007-11-13 15:04 UTC, Sebastian
Details | Diff
dvdspeed-cvs-11-13-2007-r2.diff (dvdspeed-cvs-11-13-2007-r2.diff,9.38 KB, patch)
2007-11-15 19:48 UTC, Sebastian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian 2007-11-13 11:23:31 UTC
Hi all,

I made a patch to be able to control my DVD-ROM drive speed from within VDR. It uses SET_STREAMING to do so. Every DVD-ROM drive should support this. I tested the patch with two ATA drives so far and it worked. One can test if it should work with mplayer: mplayer dvd:// -dvd-speed 2 (I used the mplayer function almost verbatim).

I sent the patch upstream already, though I didn't receive an answer yet. The only thing I still have on my plate is to put the first function call further up in the code so that it gets executed before any other read on the disc. But I can't properly do it right now because I don't have access to a VDR box until I get home in some weeks :( Feel free and help me out with this :)

There's no need to run vdr as root, all the user needs is read/write access to the drive and a kernel and linux-headers that support SG_IO and GPCMD_SET_STREAMING (Gentoo has all of that). If one is absent the function gets emptied while compiling and does nothing.

Regards
Sebastian

Reproducible: Always
Comment 1 Sebastian 2007-11-13 11:24:42 UTC
Created attachment 135874 [details, diff]
dvd-0.3.5-b07-speedcontrol.diff

Patch for current CVS version of the plugin
Comment 2 Sebastian 2007-11-13 11:25:22 UTC
Created attachment 135876 [details, diff]
dvdspeed-gentoo-appy_after_a52dynrc_patch-for_pre20070117.diff

Patch for the currently stable Gentoo version of the plugin
Comment 3 Sebastian 2007-11-13 11:28:38 UTC
To avoid confusion ("Why doesn't it work?!"): One needs to activate the feature in the OSD setup of the plugin. If DVD-ROM speed is set to "0" nothing is done (default). If it's set to 1, 2, 3 or 4 it gets to work.
Comment 4 Sebastian 2007-11-13 14:33:36 UTC
Created attachment 135888 [details, diff]
dvd-a52drc-pre20071113.diff

This is mildly changed a52drc diff. All that was done was adjust translations (Turkish is available in VDR-1.5) for A52 DRC, fix some indentations and change the default value for A52dynrng to 0 (off, which is the default value of the vanilla plugin anyway). The last change makes applying additional patches much easier.
Comment 5 Sebastian 2007-11-13 14:37:46 UTC
Created attachment 135890 [details, diff]
dvdspeed-cvs-11-13-2007.diff

Sorry up front for mistakenly uploading dvd-0.3.5-b07-speedcontrol.diff. It's not even my patch. I must've confused it with the real file (which is obsolete now anyway).

OK, this is a revised patch. I applies cleanly after the a52drc diff, also it fixes indentation by trying to follow the vanilla source indentation (although the vanilla code is slightly chaotic in this regard). Also DvdSetSpeed() is called earlier in order to kick in _before_ dvdnav does its job.

Regards
Sebastian
Comment 6 Sebastian 2007-11-13 15:04:27 UTC
Created attachment 135895 [details, diff]
dvdspeed-cvs-11-13-2007-r1.diff

Added one more restore call in case cDvdPlayer::Action returns prematurely after dvdnav_open failed. We need that now that we call DvdSetSpeed before dvdnav starts.
Comment 7 Joerg Bornkessel (RETIRED) gentoo-dev 2007-11-14 04:41:46 UTC
Added patches with cvs snapshot 13 Nov 2007,

Thanks Sebastian
Comment 8 Sebastian 2007-11-15 19:48:59 UTC
Created attachment 136059 [details, diff]
dvdspeed-cvs-11-13-2007-r2.diff

Slight change: Issue a cmd_len of 12 Bytes instead of 16 Bytes. 16 Bytes is wrong and libata (for now) won't let commands through with a wrong cmd_len value.
Comment 9 Sebastian 2007-11-15 19:49:52 UTC
Joerg,

would you be so kind and change the patch?

Thank you
Sebastian
Comment 10 Matthias Schwarzott gentoo-dev 2007-11-15 22:22:53 UTC
Related thread on kernel-ML:
http://marc.info/?l=linux-kernel&m=119497215212990&w=2

Fixed in vdr-dvd-20071113-r1.ebuild.