File indexing completed on 2024-06-16 04:38:30

0001 /*
0002     SPDX-FileCopyrightText: 2003 Fabrice Bellard
0003     SPDX-FileCopyrightText: 2020-2022 Mladen Milinkovic <max@smoothware.net>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef VIDEODECODER_H
0009 #define VIDEODECODER_H
0010 
0011 #include "videoplayer/backend/decoder.h"
0012 
0013 namespace SubtitleComposer {
0014 class VideoState;
0015 
0016 class VideoDecoder : public Decoder
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     VideoDecoder(VideoState *state, QObject *parent = nullptr);
0022 
0023 private:
0024     void run() override;
0025 
0026     int getVideoFrame(AVFrame *frame);
0027     int queuePicture(AVFrame *srcFrame, double pts, double duration, int64_t pos, int serial);
0028 
0029     VideoState *m_vs;
0030 
0031     double m_timeBase;
0032 
0033     int m_frameDropsEarly;
0034 };
0035 }
0036 
0037 #endif // VIDEODECODER_H