Opened 18 years ago

Closed 18 years ago

#935 closed defect (fixed)

Preview Thumbnail regenerated unnecessarily

Reported by: stutty@… Owned by: danielk
Priority: minor Milestone: 0.19
Component: mythtv Version: head
Severity: low Keywords: Preview Thumbnail Bookmark
Cc: Ticket locked: no

Description

On finishing watching a recording (after setting a bookmark, or hitting the delete recording key), the frontend hangs for over 2 seconds. This is due to the frontend requesting the regeneration of the Preview Thumbnail (on my EPIA 8000 Backend - v slow) even though the the option PreviewFromBookmark? is not selected -> the regenerated preview is exactly the same as the original.

Attachments (2)

Preview.diff (1022 bytes) - added by stutty@… 18 years ago.
Possible patch for problem, works okay for me.
935.patch (3.5 KB) - added by danielk 18 years ago.

Download all attachments as: .zip

Change History (10)

Changed 18 years ago by stutty@…

Attachment: Preview.diff added

Possible patch for problem, works okay for me.

comment:1 Changed 18 years ago by cpinkham

Can you see if you can accomplish the same thing by editting PlaybackBox::play() and moving the following line down from the middle of the method to the end right before the return line?

state = kStarting; restart playback preview

Put that line right before this line at the end:

return playCompleted;

I think that will cause the preview to not be updated until we've refreshed the recordings list which till take into account the fact that we just deleted the recording we were watching. The frontend is hanging because the preview generation is consuming the backend CPU at the same time we're trying to refill the recordings list. This will delay any preview generation or playback until after we've refilled the list. PreviewFromBookmark? isn't the only reason we might be updating the pixmap here, it could be that the recording length has changed or the cutlist was changed, etc.. so I think it might be better to use this delayed start rather than not updating the pixmap at all.

comment:2 Changed 18 years ago by stutty@…

Alas I am very unfamiliar with the workings of the code, so my solution is only a proposal. I did try your suggestion, but I still get pauses on exiting the recording.

My only comment would be that:

In general for my system the only time I would want the frontend to cause thumbnail generation is in the case where no thumbnail currently exists (Although I would probably be happy with a blank in this case!). A responsive GUI is more important than frame exact thumbnails to me.

Ideally thumbnail generation would be a background backend task such that the frontend is never stalled waiting for the pixmap to be generated, as seems to be the case at the moment.

comment:3 Changed 18 years ago by cpinkham

I missed one thing in the change I asked you to try. Can you also move down the "playingSomething = false;" line to the end along with the "state = kStarting;"? The playing something is the important one that would prevent the preview image from refreshing until the frontend had redownloaded the recordings list. state = kStarting is what lets the preview video restart, but if playingSomething is false, the preview pixmap can still be refreshed.

comment:4 Changed 18 years ago by stutty@…

Sorry this did not appear to make any difference, I'm making the changes against SVN 8482

comment:5 Changed 18 years ago by danielk

Owner: changed from Isaac Richards to danielk

Changed 18 years ago by danielk

Attachment: 935.patch added

comment:6 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [8722]) Fixes #935.

  • Avoids generating a preview while waiting for the user to confirm a delete of the recording.
  • Avoids generating a preview for programinfo's with an availableStatus of asPendingDelete.

Generating these previews is a waste of time the 90% of the time when the user condfirms the delete, and generating previews can take a long time on embedded processors such as the EPIA Via processors often used to run MythTV.

comment:7 Changed 18 years ago by phoner

Resolution: fixed
Status: closedreopened

I still have previews being displayed/played while the pending delete. Is this what's intended to be avoided? If so this doesn't seem to be working.

comment:8 Changed 18 years ago by phoner

Resolution: fixed
Status: reopenedclosed

actually what I want is the preview to not be played during the pending delete time, guess that's not the same as regenerating it.

Note: See TracTickets for help on using tickets.