Ticket #7994: clear_bookmark_at_end.patch

File clear_bookmark_at_end.patch, 2.6 KB (added by Jim Stichnoth <stichnot@…>, 14 years ago)
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    46274652 *  \param margin minimum number of frames we want before being near end,
    46284653 *                defaults to 2 seconds of video.
    46294654 */
    4630 bool NuppelVideoPlayer::IsNearEnd(long long margin) const
     4655bool NuppelVideoPlayer::IsNearEnd(long long margin, bool allowVideo) const
    46314656{
    46324657    long long framesRead, framesLeft = 0;
    46334658
    46344659    player_ctx->LockPlayingInfo(__FILE__, __LINE__);
    4635     if (!player_ctx->playingInfo || player_ctx->playingInfo->isVideo ||
     4660    if (!player_ctx->playingInfo || (player_ctx->playingInfo->isVideo && !allowVideo) ||
    46364661        !GetDecoder())
    46374662    {
    46384663        player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
     
    46484673    framesRead = GetDecoder()->GetFramesRead();
    46494674
    46504675    if (player_ctx && !player_ctx->IsPIP() &&
    4651         player_ctx->GetState() == kState_WatchingPreRecorded)
     4676        (player_ctx->GetState() == kState_WatchingPreRecorded ||
     4677         player_ctx->GetState() == kState_WatchingVideo ||
     4678         player_ctx->GetState() == kState_WatchingDVD))
    46524679    {
    46534680        framesLeft = margin;
    46544681        if (!editmode && hasdeletetable && IsInDelete(framesRead))
  • libs/libmythtv/NuppelVideoPlayer.h

     
    205205    bool    AtNormalSpeed(void) const         { return next_normal_speed; }
    206206    bool    IsDecoderThreadAlive(void) const  { return decoder_thread_alive; }
    207207    bool    IsReallyNearEnd(void) const;
    208     bool    IsNearEnd(long long framesRemaining = -1) const;
     208    bool    IsNearEnd(long long framesRemaining = -1, bool allowVideo = false) const;
    209209    bool    PlayingSlowForPrebuffer(void) const { return m_playing_slower; }
    210210    bool    HasAudioIn(void) const            { return !no_audio_in; }
    211211    bool    HasAudioOut(void) const           { return !no_audio_out; }
  • libs/libmythtv/tv_play.cpp

     
    30953095    {
    30963096        if (bookmark_it && !(ctx->nvp->IsNearEnd()))
    30973097            ctx->nvp->SetBookmark();
     3098        if (IsBookmarkAllowed(ctx) && ctx->nvp->IsNearEnd(-1, true))
     3099            ctx->nvp->ClearBookmark();
    30983100        if (db_auto_set_watched)
    30993101            ctx->nvp->SetWatched();
    31003102    }