ADTF Qt5
Loading...
Searching...
No Matches
video_widget.h
Go to the documentation of this file.
1
7
8/*
9 * This file depends on Qt which is licensed under LGPLv3.
10 * See ADTF_DIR/3rdparty/qt5 and doc/license for detailed information.
11 */
12
13#pragma once
14#include <adtfucom3/adtf_ucom3.h>
15#include <adtfstreaming3/streamimageformat.h>
16#include <adtfstreaming3/sample_intf.h>
17
18#include <QWidget>
19
20namespace adtf
21{
22namespace ui
23{
24namespace widget
25{
26namespace osborn
27{
31class cVideoWidget : public QWidget
32{
33public:
37 cVideoWidget(QWidget* pParent);
41 virtual ~cVideoWidget();
47 void UpdateSample(adtf::streaming::tStreamImageFormat& sFormat,
48 const adtf::ucom::iobject_ptr<const adtf::streaming::ISample>& pSample);
52 void Clear();
56 void SetFitToScreen(bool bEnabled);
60 void SetKeepRatio(bool bEnabled);
61
62protected:
66 void paintEvent(QPaintEvent* pPaintEvent);
67
68private:
69 adtf::streaming::tStreamImageFormat m_sCurrentFormat;
70 bool m_bFitToScreen;
71 bool m_bKeepRatio;
72 QString m_strError;
73 QImage m_oCurrentImage;
74};
75
83tResult get_qimage_format(const adtf::streaming::tStreamImageFormat& sFormat,
84 QImage::Format& eImageFormat,
85 bool& bNeedRgbSwap);
93tResult sample_to_qimage(const adtf::streaming::tStreamImageFormat& sFormat,
94 const adtf::streaming::ISample& pSample,
95 QImage& oImage);
96} // namespace osborn
97
98namespace v0
99{
103
104} // namespace v0
105
106using v0::cVideoWidget;
107using v0::get_qimage_format;
108using v0::sample_to_qimage;
109
110} // namespace widget
111} // namespace ui
112} // namespace adtf
cVideoWidget(QWidget *pParent)
Definition video_widget.h:32
void UpdateSample(adtf::streaming::tStreamImageFormat &sFormat, const adtf::ucom::iobject_ptr< const adtf::streaming::ISample > &pSample)
void paintEvent(QPaintEvent *pPaintEvent)
Namespace for all provided widget functionality helper.
Definition filter_model_treeview.h:25
Namespace for the ADTF UI SDK.
Definition adtfui_pkg.h:13
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtfui_pkg.h:13
tResult get_qimage_format(const adtf::streaming::tStreamImageFormat &sFormat, QImage::Format &eImageFormat, bool &bNeedRgbSwap)
tResult sample_to_qimage(const adtf::streaming::tStreamImageFormat &sFormat, const adtf::streaming::ISample &pSample, QImage &oImage)