Opened 16 years ago

Closed 15 years ago

#650 closed defect (fixed)

Handle simultaneous recordings of same program on same channel

Reported by: danielk Owned by: danielk
Priority: blocker Milestone: 0.19
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


Currently if one starts a 'manual record' or 'LiveTV record' of a program that is already being recorded as a scheduled recording based on guide data, the two or more recordings will be placed in the same file and the keyframe map will be completely fubarred.

The solution I will implement will generate a unique name by adding 'seconds' to the starttime. These will in fact not indicate seconds, but whether this is the 1st, 2nd, 3rd, etc, recording at the same time on the same channel. The unique starttime will be generated in ProgramInfo::StartedRecording?(), so this will have to be called before tv_rec creates a RingBuffer? instance for the recording.

Change History (3)

comment:1 Changed 16 years ago by danielk

Resolution: fixed
Status: newclosed

(In [7892]) Fixes #650.

This increments starttime seconds until we have a unique chanid+starttime.

This also calls StartedRecording?() early enough so that the RingBuffer? is created with the right filename.

This also adds debugging VERBOSE macros to LiveTVChain, and delays the setting of kFlagRingBufferReset on channel changes until after the RingBuffer? has been added to the LiveTVChain. This isn't a complete fix for LiveTV digital recordings, but was just enough to allow me to test the StartedRecording?() code.

comment:2 Changed 15 years ago by mythtv@…

Resolution: fixed
Status: closedreopened

[7892] does not increment starttime by a second (as I discovered yesterday when errors started to spew). addSecs() returns an altered qdatetime instead of altering in place.


Index: programinfo.cpp
--- programinfo.cpp     (revision 7956)
+++ programinfo.cpp     (working copy)
@@ -1368,7 +1368,7 @@
     pathname = CreateRecordBasename(ext);
     while (!insert_program(query, this, record))
-        recstartts.addSecs(1);
+        recstartts = recstartts.addSecs(1);
         pathname = CreateRecordBasename(ext);
     pathname = prefix + "/" + pathname;

comment:3 Changed 15 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [7960]) Fixes #650.

Yikes, that one line bug pretty much made the whole [7892] commit useless. I must have done some bad refactoring after testing this part of the code.

Note: See TracTickets for help on using tickets.