File indexing completed on 2025-01-05 03:53:05
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2021-07-24 0007 * Description : a MJPEG frame generator. 0008 * 0009 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_MJPEG_FRAME_THREAD_H 0016 #define DIGIKAM_MJPEG_FRAME_THREAD_H 0017 0018 // Qt includes 0019 0020 #include <QByteArray> 0021 0022 // Local includes 0023 0024 #include "actionthread.h" 0025 #include "mjpegstreamsettings.h" 0026 0027 using namespace Digikam; 0028 0029 namespace DigikamGenericMjpegStreamPlugin 0030 { 0031 0032 class MjpegFrameThread : public ActionThreadBase 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 0038 /** 0039 * Thread manager to fork MJPEg frame task to a separated core. 0040 */ 0041 explicit MjpegFrameThread(QObject* const parent); 0042 ~MjpegFrameThread() override; 0043 0044 /** 0045 * Instantiate MJPEG frame task thread with right settings. 0046 */ 0047 void createFrameJob(const MjpegStreamSettings&); 0048 0049 Q_SIGNALS: 0050 0051 /** 0052 * Re-route signal from task to MJPEG server. 0053 */ 0054 void signalFrameChanged(const QByteArray&); 0055 }; 0056 0057 } // namespace DigikamGenericMjpegStreamPlugin 0058 0059 #endif // DIGIKAM_MJPEG_FRAME_THREAD_H