[mythtv] Re: [PATCH] Soft padding proof of concept
David Shirley
tephra at gmail.com
Mon Oct 17 07:42:19 UTC 2005
Hi David,
I understand fully :)
i have created a patch - its probably totally wrong but it works for me :)
Basically it helps FindNextConflict pick a "the most recently un-used
used" card.
I have only done limited testing on it, and it seems to do what I
want, which is let me overrecord be used for as much as possible -
however i don't know what else it breaks - probably lots :)
Also the 600 seconds should probably be my overrecord amount but i
didn't know the variable this is stored in :)
Its like a hard buffer, but if the card is going to record the next
show on the same channel then it gets ignored :)
Also it will give you a conflict if you want to record on another
channel and don't have any other tuners - this is a bit weird but at
least the user (me) can see this conflict and decide on whether i want
to miss the end or start of a program.
Cheers
Dave
===================================================================
--- programs/mythbackend/scheduler.cpp (revision 7501)
+++ programs/mythbackend/scheduler.cpp (working copy)
@@ -585,6 +585,23 @@
continue;
if (p->cardid != 0 && p->cardid != q->cardid)
continue;
+
+
+ if (Recording(q)) {
+ // Make sure this card isn't recording something else
during our timeslot
+ if (!((p->recendts <= q->recstartts) || (p->recstartts >=
q->recendts))) {
+ return(true);
+ }
+
+ // Make sure we don't use a card that is just about to
finish recording
+ if ((q->recendts.secsTo(p->recstartts) >= 0) &&
(q->recendts.secsTo(p->recstartts) <= 600)) {
+ if (p->chanid != q->chanid) {
+ return(true);
+ }
+ }
+ }
+
+
if (p->recendts <= q->recstartts || p->recstartts >= q->recendts)
continue;
if (p->inputid == q->inputid && p->shareable)
More information about the mythtv-dev
mailing list