Opened 15 years ago

Closed 15 years ago

#866 closed defect (fixed)

Record in LiveTV doesn't work if you leave LiveTV.

Reported by: adrian.wilkins@… Owned by: danielk
Priority: major Milestone: 0.19
Component: mythtv Version: head
Severity: medium Keywords: record LiveTV exit
Cc: Ticket locked: no


Hitting record in LiveTV displays "Record (this program)" on the OSD, and correctly marks the recording group as default instead of LiveTV.

However, if the client stops watching LiveTV and returns to the menu, the recording stops ; the database still thinks it's running (as far as MythWeb is concerned), but the file stops growing.

The correct behaviour would be for the frontend to simply disconnect and the backend to continue recording the program as required.

Attachments (2)

866-v1.patch (36.6 KB) - added by danielk 15 years ago.
Fixes several LiveTV+Recording bugs
866-v2.patch (39.1 KB) - added by danielk 15 years ago.
Update with scheduler additions

Download all attachments as: .zip

Change History (9)

comment:1 Changed 15 years ago by johnathon-dev@…

I agree, this happens in my enviroment as well - this happens if the recording is sourced from a tuner on the MBE or a SBE. I am not sure which build this starting occuring on as I only noticed it last week but it happens on all most recent svn builds (currently svn 8506).

If more info or something that needs to be tested/tried let me know.



1 x MBE with 3xDTT/DVB PCI Tuners

1 x SBE with 1xPCI&2xUSB DTT/DVB Tuners

1 x FE with mythplugins

All running Gentoo 2.6.14-gentoo-r6

comment:2 Changed 15 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

Changed 15 years ago by danielk

Attachment: 866-v1.patch added

Fixes several LiveTV+Recording bugs

comment:3 Changed 15 years ago by danielk

Commit readers, please test the attached patch attached to this ticket.

AFAIC This should be the last big changeset before 0.19...

What this does is introduce the concept of a 'pseudoLiveTVRecording' which allows us to insert what will be a regular recording into a LiveTV chain. This in turn lets the LiveTV experience be more seemless, with scheduled recordings and marked recordings within the chain feeling to the user like a slightly restricted form of LiveTV. Restrictions that can be lifted by toggling the 'R'ecord bit off.

When one of these regular recordings is in progress certain LiveTV functions such as channel changing are disabled, once this recording ends or you end it's special status it by toggling "R"ecord then LiveTV functionality resumes. You can also exit at any point during the 'regular' recording whether it was instanciated by pressing 'R' in LiveTV or was a scheduled recording you chose to watch as it started, and it will continue recording until it finishes or you cancel it via the normal means.

When a scheduled recording occurs while you are watching a recording that you flagged for keeping as a 'regular' recording you are informed of your options like you normally would be. But instead of 'Record and continue watching' being the default, 'Cancel scheduled recording' is the the default. The rationale is that you would probably not want that movie you just flagged for keeps to be cancelled so that one of your many recording rules could be obeyed.

This does change the MythTV protocol, it adds a parameter to ASK_RECORDING and to CANCEL_NEXT_RECORDING, and adds a new tv_rec to tv_play message "LIVETV_WATCH". The first two are to support making 'Cancel scheduled recording' the default after you mark a LiveTV recording as a 'regular' recording. "LIVETV_WATCH" is mostly to tell the frontend whether to enable or disable things like channel changing, but it is also used to change the channel in LiveTV to get ready for a scheduled recording, when the user is in when it begins LiveTV and hasn't canceled the recording.

I tested the following with both NuppelVideoRecorder? and DVBRecorder:

  * exits correctly at end of program      ? Yes
  * exits correcting if you leave livetv   ? Yes
Scheduled Record while in LiveTV
  * starts correctly if you were
    watching different channel             ? Yes
  * starts correctly if you were
    watching same channel                  ? Yes
    NOTE: This does a channel change, which isn't really needed...
  * exits correctly at end of program      ? Yes
  * exits correcting if you leave livetv   ? Yes

"R"ecorded program can cancel conflicting Scheduled Recordings?
  * during LiveTV                          ? Yes
     + starts recording                    ? Yes
     + reschedule doesn't cause scheduled
       unwanted recording restart          ? Yes
  * after LiveTV exit (before notify)      ? Yes
  * after LiveTV exit (after notify)       ? Yes

"R"ecorded program can allow conflicting Scheduled Recording to proceed
  * in LiveTV                              ? Yes
  * by exiting and abandoning recording    ? Yes

Plus, some other things I tested less systematically along the way...

What hasn't been well tested is just everyday use; for instance, practically all my conflicting scheduled recordings were created by inserting manual recordings.

comment:4 Changed 15 years ago by adrian.wilkins@…

The only very minor enhancement to this behaviour I would suggest is that the channel change is only disabled when there are no other free tuners available. True, it is the work of but a few moments to exit LiveTV and re-enter, upon which the next free tuner would be allocated, but it would be seamless in terms of operation to simply detach from the "recording" tuner, and switch to a free tuner for the new LiveTV channel.

Something along the lines of (upon attempting a channel change) either

  • Just do it if there is a free tuner to switch to
  • Inform the user if there is not

comment:5 Changed 15 years ago by danielk

(In [8526]) References #866.

Allows an item other than the first item to be initially selected in an OSD dialog. Was part of the #866 patch.

Changed 15 years ago by danielk

Attachment: 866-v2.patch added

Update with scheduler additions

comment:6 Changed 15 years ago by danielk

I've updated the patch with a new function TVRec::NotifySchedulerOfRecording?() which does basically what Bruce described on the mailing list to add the recording to the scheduler.

I haven't exhaustively tested this yet, but in a few informal tests it appears to work as intended.

comment:7 Changed 15 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [8553]) Closes #866.

This applies the patch with two modifications.

1/ Update recordid in recorded table to match the recordid in the

scheduled recording in NotifySchedulerOfRecording?().

2/ If a LiveTV recording flagged to be made a regular recording ends

while the user is still viewing the recording as a LiveTV recording then we now add a scheduled item for the recording so that any transcode, commflag, or user jobs can be run.

This does not implement Adrian's suggestion of allowing channel changes to other tuners because it is non-trivial to implement.

This also does not implement Bruce's suggestion that the scheduled recording item be added and deleted immediately when the user toggles the 'R'ecorded flag. To do this properly we would need to implement Steve Adeff's suggestion of a conflict OSD when you toggle the flag. This would be very nice, but requires a bit of coding to create the OSD for it and resolve all the corner cases such as if a scheduled recording wants to start while you are examining the conflicts. I think this should be implemented as an additional feature, and probably pushed to 0.20.

Note: See TracTickets for help on using tickets.