Ticket #3720: 3720-preview-problem-v1.patch

File 3720-preview-problem-v1.patch, 2.4 KB (added by danielk, 13 years ago)

preview_doesnt_do_remotecheckfile.patch fixed in a more foolproof way (But I still haven't verified this fix).

  • libs/libmythtv/previewgenerator.cpp

     
    2727#define LOC_ERR QString("Preview Error: ")
    2828#define LOC_WARN QString("Preview Warning: ")
    2929
     30const char *PreviewGenerator::kInUseID = "preview_generator";
     31
    3032/** \class PreviewGenerator
    3133 *  \brief This class creates a preview image of a recording.
    3234 *
     
    277279
    278280void PreviewGenerator::LocalPreviewRun(void)
    279281{
    280     programInfo.MarkAsInUse(true, "preview_generator");
     282    programInfo.MarkAsInUse(true, kInUseID);
    281283
    282284    float aspect = 0;
    283285    int   secsin = (gContext->GetNumSetting("PreviewPixmapOffset", 64) +
     
    356358        return false;
    357359    }
    358360
    359     NuppelVideoPlayer *nvp = new NuppelVideoPlayer("Preview", pginfo);
     361    NuppelVideoPlayer *nvp = new NuppelVideoPlayer(kInUseID, pginfo);
    360362    nvp->SetRingBuffer(rbuf);
    361363
    362364    retbuf = nvp->GetScreenGrabAtFrame(frameNumber, true, bufferLen,
     
    478480        return NULL;
    479481    }
    480482
    481     NuppelVideoPlayer *nvp = new NuppelVideoPlayer("Preview", pginfo);
     483    NuppelVideoPlayer *nvp = new NuppelVideoPlayer(kInUseID, pginfo);
    482484    nvp->SetRingBuffer(rbuf);
    483485
    484486    retbuf = nvp->GetScreenGrab(secondsin, bufferlen,
  • libs/libmythtv/programinfo.cpp

     
    2121#include "jobqueue.h"
    2222#include "mythdbcon.h"
    2323#include "storagegroup.h"
     24#include "previewgenerator.h"
    2425
    2526#define LOC QString("ProgramInfo: ")
    2627#define LOC_ERR QString("ProgramInfo, Error: ")
     
    40854086            }
    40864087        }
    40874088    }
    4088     else if (inUseForWhat == "preview_generator")
     4089    else if (inUseForWhat == PreviewGenerator::kInUseID)
    40894090    {
    40904091        recDir = "";
    40914092    }
  • libs/libmythtv/previewgenerator.h

     
    3939    void AttachSignals(QObject*);
    4040    void disconnectSafe(void);
    4141
     42    static const char *kInUseID;
    4243  signals:
    4344    void previewThreadDone(const QString&, bool&);
    4445    void previewReady(const ProgramInfo*);