digiKam
mjpegframeosd.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2021-07-24
7  * Description : MJPEG frame on screen display.
8  *
9  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2021 by Quoc Hưng Tran <quochungtran1999 at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_MJPEG_FRAME_OSD_H
25 #define DIGIKAM_MJPEG_FRAME_OSD_H
26 
27 // Qt includes
28 
29 #include <QUrl>
30 #include <QColor>
31 #include <QPoint>
32 #include <QFont>
33 #include <QImage>
34 #include <QDateTime>
35 
36 // Local includes
37 
38 #include "mjpegstreamsettings.h"
39 
41 {
42 
44 {
45 
46 public:
47 
48  explicit MjpegFrameOsd();
50 
51 public:
52 
53  QString m_desc;
54  QPoint m_descPos;
55  QFont m_descFnt;
56  Qt::Alignment m_descAlign;
57  QColor m_descBg;
58 
59 public:
60 
64  void insertOsdToFrame(QImage& frame,
65  const QUrl& url,
66  const MjpegStreamSettings& settings);
67 
71  void PopulateOSD(QImage& frame,
72  const QUrl& url,
73  const MjpegStreamSettings& settings);
74 
78  void printComments(const QString& comments);
79 
83  void printTags(QStringList& tags);
84 
88  void insertMessageOsdToFrame(QImage &frame,
89  const QSize& JPEGsize,
90  const QString& mess);
91 };
92 
93 } // namespace DigikamGenericMjpegStreamPlugin
94 
95 #endif // DIGIKAM_MJPEG_FRAME_OSD_H
void printTags(QStringList &tags)
Definition: mjpegframeosd.cpp:295
void insertOsdToFrame(QImage &frame, const QUrl &url, const MjpegStreamSettings &settings)
Definition: mjpegframeosd.cpp:378
void printComments(const QString &comments)
Definition: mjpegframeosd.cpp:307
QString m_desc
Definition: mjpegframeosd.h:53
Qt::Alignment m_descAlign
Definition: mjpegframeosd.h:56
~MjpegFrameOsd()
Definition: mjpegframeosd.cpp:59
QFont m_descFnt
Definition: mjpegframeosd.h:55
MjpegFrameOsd()
Definition: mjpegframeosd.cpp:47
void PopulateOSD(QImage &frame, const QUrl &url, const MjpegStreamSettings &settings)
Definition: mjpegframeosd.cpp:63
QPoint m_descPos
Definition: mjpegframeosd.h:54
void insertMessageOsdToFrame(QImage &frame, const QSize &JPEGsize, const QString &mess)
Definition: mjpegframeosd.cpp:406
QColor m_descBg
Definition: mjpegframeosd.h:57
Definition: mjpegstreamsettings.h:49
Definition: mjpegframeosd.cpp:45