Ticket #7381: t7381_bufferedframecount.diff

File t7381_bufferedframecount.diff, 1.8 KB (added by Janne Grunau, 16 years ago)
  • mythtv/libs/libmythtv/NuppelVideoPlayer.cpp

    diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
    index a550532..d0e88d4 100644
    a b bool NuppelVideoPlayer::IsNearEnd(long long margin) const  
    47394739    player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);
    47404740
    47414741    margin = (margin >= 0) ? margin: (long long) (video_frame_rate*2);
     4742    margin += GetDecoder()->GetBufferedFrameCount();
    47424743    margin = (long long) (margin * audio_stretchfactor);
    47434744    bool watchingTV = watchingrecording && player_ctx->recorder &&
    47444745        player_ctx->recorder->IsValidRecorder();
  • mythtv/libs/libmythtv/avformatdecoder.h

    diff --git a/mythtv/libs/libmythtv/avformatdecoder.h b/mythtv/libs/libmythtv/avformatdecoder.h
    index 0fe60aa..5374e6b 100644
    a b class AvFormatDecoder : public DecoderBase  
    123123    MythCodecID  GetVideoCodecID(void) const { return video_codec_id; }
    124124    void        *GetVideoCodecPrivate(void);
    125125
     126    uint         GetBufferedFrameCount(void) const { return storedPackets.count(); }
     127
    126128    virtual void SetDisablePassThrough(bool disable);
    127129    void AddTextData(unsigned char *buf, int len, long long timecode, char type);
    128130
  • mythtv/libs/libmythtv/decoderbase.h

    diff --git a/mythtv/libs/libmythtv/decoderbase.h b/mythtv/libs/libmythtv/decoderbase.h
    index 5969a2b..8a23386 100644
    a b class DecoderBase  
    103103    virtual MythCodecID GetVideoCodecID(void) const = 0;
    104104    virtual void *GetVideoCodecPrivate(void) { return NULL; }
    105105
     106    virtual uint GetBufferedFrameCount(void) const { return 0; }
     107
    106108    virtual bool SyncPositionMap(void);
    107109    virtual bool PosMapFromDb(void);
    108110    virtual bool PosMapFromEnc(void);