Ticket #13234: 20180425_1504_bkmark_and_pause.patch

File 20180425_1504_bkmark_and_pause.patch, 3.0 KB (added by Peter Bennett, 3 years ago)

Bookmark and pause enhancement

  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index 5ef24e7..1fc7ad1 100644
    a b void TV::SetBookmark(PlayerContext *ctx, bool clear) 
    50565056            ctx->player->SetBookmark(true);
    50575057            SetOSDMessage(ctx, tr("Bookmark Cleared"));
    50585058        }
    5059         else if (IsBookmarkAllowed(ctx))
     5059        else // if (IsBookmarkAllowed(ctx))
    50605060        {
    50615061            ctx->player->SetBookmark();
    50625062            osdInfo info;
    bool TV::ActivePostQHandleAction(PlayerContext *ctx, const QStringList &actions) 
    50805080
    50815081    if (has_action(ACTION_SETBOOKMARK, actions))
    50825082    {
    5083         if (!islivetv || !CommitQueuedInput(ctx))
     5083        if (!CommitQueuedInput(ctx))
    50845084        {
    50855085            ctx->LockDeletePlayer(__FILE__, __LINE__);
    50865086            SetBookmark(ctx, false);
    bool TV::ActivePostQHandleAction(PlayerContext *ctx, const QStringList &actions) 
    50895089    }
    50905090    if (has_action(ACTION_TOGGLEBOOKMARK, actions))
    50915091    {
    5092         if (!islivetv || !CommitQueuedInput(ctx))
     5092        if (!CommitQueuedInput(ctx))
    50935093        {
    50945094            ctx->LockDeletePlayer(__FILE__, __LINE__);
    50955095            SetBookmark(ctx, ctx->player->GetBookmark());
    void TV::UpdateNavDialog(PlayerContext *ctx) 
    66116611    if (osd && osd->DialogVisible(OSD_DLG_NAVIGATE))
    66126612    {
    66136613        osdInfo info;
    6614         bool paused = ContextIsPaused(ctx, __FILE__, __LINE__);
     6614        ctx->LockDeletePlayer(__FILE__, __LINE__);
     6615        bool paused = (ctx->player
     6616            && (ctx->ff_rew_state || ctx->ff_rew_speed != 0
     6617                || ctx->player->IsPaused()));
     6618        ctx->UnlockDeletePlayer(__FILE__, __LINE__);
    66156619        info.text["paused"] = (paused ? "Y" : "N");
    66166620        bool muted = ctx->player->IsMuted();
    66176621        info.text["muted"] = (muted ? "Y" : "N");
    bool TV::SeekHandleAction(PlayerContext *actx, const QStringList &actions, 
    67736777                   /*timeIsOffset*/true,
    67746778                   /*honorCutlist*/!(flags & kIgnoreCutlist));
    67756779    }
     6780    UpdateNavDialog(actx);
    67766781    return true;
    67776782}
    67786783
    void TV::OSDDialogEvent(int result, QString text, QString action) 
    1115411159            DoQueueTranscode(actx, "Medium Quality");
    1115511160        else if (action == "QUEUETRANSCODE_LOW")
    1115611161            DoQueueTranscode(actx, "Low Quality");
    11157         else if (action == ACTION_TOGGLEBOOKMARK
    11158                 || action == ACTION_SETBOOKMARK)
    11159             ActivePostQHandleAction(actx, QStringList(action));
    1116011162        else
    1116111163            handled = false;
    1116211164    }
    void TV::OSDDialogEvent(int result, QString text, QString action) 
    1116711169        handled = ActiveHandleAction(actx, QStringList(action), isDVD, isMenuOrStill);
    1116811170    }
    1116911171    if (!handled)
     11172            handled = ActivePostQHandleAction(actx, QStringList(action));
     11173
     11174    if (!handled)
    1117011175    {
    1117111176        LOG(VB_GENERAL, LOG_ERR, LOC +
    1117211177            "Unknown menu action selected: " + action);