Opened 10 years ago

Closed 9 years ago

#7136 closed patch (fixed)

PreviewGenerator when no backend binary

Reported by: Nigel Owned by: danielk
Priority: minor Milestone: unknown
Component: MythTV - General Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

If an install has no backend binary, going into Watch Recordings can output lots of errors like:

2009-09-24 20:54:54.246 Preview Error: Encountered problems running '/Volumes/MythBuild/.osx-packager/src/myth-svn/mythtv/programs/Resources/bin/mythbackend --generate-preview 0x0 --chanid 1004 --starttime 20080206182700 '
sh: line 1: /Volumes/MythBuild/.osx-packager/src/myth-svn/mythtv/programs/Resources/bin/mythbackend: No such file or directory
2009-09-24 20:54:54.276 Preview Error: Encountered problems running '/Volumes/MythBuild/.osx-packager/src/myth-svn/mythtv/programs/Resources/bin/mythbackend --generate-preview 0x0 --chanid 1039 --starttime 20071029102347 '
sh: line 1: /Volumes/MythBuild/.osx-packager/src/myth-svn/mythtv/programs/Resources/bin/mythbackend: No such file or directory

(Mac frontend-only packages only have mythfrontend and mtd). This patch checks for the binary before trying to invoke it:

Index: previewgenerator.cpp
===================================================================
--- previewgenerator.cpp        (revision 22017)
+++ previewgenerator.cpp        (working copy)
@@ -223,8 +223,12 @@
     else
     {
         // This is where we fork and run mythbackend to actually make preview
-        QString command = GetInstallPrefix() +
-                                    "/bin/mythbackend --generate-preview ";
+        QString command = GetInstallPrefix() + "/bin/mythbackend";
+
+        if (!QFileInfo(command).exists())
+            return false;
+
+        command += " --generate-preview ";
         command += QString("%1x%2")
             .arg(outSize.width()).arg(outSize.height());
         if (captureTime >= 0)

Attachments (2)

mythtv-7136-remove_GeneratePreviewRemotely_setting.patch (3.1 KB) - added by sphery 10 years ago.
Removes the "Generate preview image remotely" and does all preview generation from the backend process.
mythtv-7136-remove_GeneratePreviewRemotely_setting.2.patch (3.1 KB) - added by sphery 10 years ago.
Updated patch for playbackboxhelper changes

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

Changed 10 years ago by sphery

Removes the "Generate preview image remotely" and does all preview generation from the backend process.

comment:2 Changed 10 years ago by sphery

The attached patch, mythtv-7136-remove_GeneratePreviewRemotely_setting.patch , removes the "Generate preview image remotely" setting and does all preview generation from the backend process. It does not remove the preview generator's ability to be used for local versus remote generation--it just makes the playbackbox use the remote generator.

The recent improvements to UI responsiveness before previews are created and during preview generation make the amount of time it takes to generate a preview less important. Furthermore, since the local preview generation was only used for the occasional changed recording (after setting a bookmark or cutlist or watched flag or ...) and for recordings in progress, the setting was mostly unused. And, finally, since the days of the hugely-powerful frontend system with underpowered backend systems seem to be over and many users are actually taking the opposite approach (and creating powerful backends with low-powered frontends), this configuration should work well for everyone--even users who don't install mythbackend on dedicated frontend systems (or who are working on platforms to which mythbackend has not been ported).

Even with my ca. 2002 Athlon XP 2000+ system generating previews for HDTV broadcasts (which it can not decode in real time), the preview generation seems sufficiently fast. Therefore, rather than test for a local mythbackend binary before calling it, or even changing the defaults to enable the "Generate preview image remotely" setting, it makes more sense to just remove the setting completely.

Nigel: Until the setting is removed, you can simply enable the "Generate preview image remotely" setting in Utilities/Setup?|Setup|TV Settings|Playback.

Changed 10 years ago by sphery

Updated patch for playbackboxhelper changes

comment:3 Changed 9 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [24739]) Fixes #7136. Apply a slightly modified version of patch, this simply attempts to generate a preview remotely if the preview generator command is not executable locally for whatever reason.

Note: See TracTickets for help on using tickets.