File indexing completed on 2025-01-19 03:57:04

0001 /*********************************************************
0002  * Copyright (C) 2020, Val Doroshchuk <valbok@gmail.com> *
0003  *                                                       *
0004  * This file is part of QtAVPlayer.                      *
0005  * Free Qt Media Player based on FFmpeg.                 *
0006  *********************************************************/
0007 
0008 #ifndef QAVHWDEVICE_MEDIACODEC_P_H
0009 #define QAVHWDEVICE_MEDIACODEC_P_H
0010 
0011 //
0012 //  W A R N I N G
0013 //  -------------
0014 //
0015 // This file is not part of the Qt API. It exists purely as an
0016 // implementation detail. This header file may change from version to
0017 // version without notice, or even be removed.
0018 //
0019 // We mean it.
0020 //
0021 
0022 #include "qavhwdevice_p.h"
0023 #include <memory>
0024 
0025 QT_BEGIN_NAMESPACE
0026 
0027 class QAVHWDevice_MediaCodecPrivate;
0028 class QAVHWDevice_MediaCodec : public QAVHWDevice
0029 {
0030 public:
0031     QAVHWDevice_MediaCodec();
0032     ~QAVHWDevice_MediaCodec();
0033 
0034     void init(AVCodecContext *avctx) override;
0035     AVPixelFormat format() const override;
0036     AVHWDeviceType type() const override;
0037     QAVVideoBuffer *videoBuffer(const QAVVideoFrame &frame) const override;
0038 
0039 private:
0040     std::unique_ptr<QAVHWDevice_MediaCodecPrivate> d_ptr;
0041     Q_DISABLE_COPY(QAVHWDevice_MediaCodec)
0042     Q_DECLARE_PRIVATE(QAVHWDevice_MediaCodec)
0043 };
0044 
0045 QT_END_NAMESPACE
0046 
0047 #endif