decoder/renderer: use memory cache and single decoder to optimize frames for
cycles
This commit is contained in:
@@ -95,8 +95,8 @@ private:
|
||||
|
||||
virtual QString GetIndexFilename() override;
|
||||
|
||||
void UnconditionalAudioIndex(AVPacket* pkt, AVFrame* frame, const QAtomicInt* cancelled);
|
||||
void UnconditionalVideoIndex(AVPacket* pkt, AVFrame* frame, const QAtomicInt* cancelled);
|
||||
void UnconditionalAudioIndex(const QAtomicInt* cancelled);
|
||||
void UnconditionalVideoIndex(const QAtomicInt* cancelled);
|
||||
|
||||
void ValidateVideoIndex(const QAtomicInt* cancelled);
|
||||
|
||||
@@ -104,6 +104,8 @@ private:
|
||||
|
||||
void CacheFrameToDisk(AVFrame* f);
|
||||
|
||||
void ClearFrameCache();
|
||||
|
||||
AVFormatContext* fmt_ctx_;
|
||||
AVCodecContext* codec_ctx_;
|
||||
AVStream* avstream_;
|
||||
@@ -113,10 +115,9 @@ private:
|
||||
|
||||
SwsContext* scale_ctx_;
|
||||
|
||||
AVPacket* pkt_;
|
||||
QList<AVFrame*> cached_frames_;
|
||||
|
||||
AVFrame* frames_[2];
|
||||
AVFrame* last_retrieved_frame_;
|
||||
int64_t second_ts_;
|
||||
|
||||
AVDictionary* opts_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user