Opened 18 years ago
Closed 18 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 |
Description
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 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
[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.
Suggest:
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;
(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.