YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
ImagePort.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: LGPL-2.1-or-later
5
*/
6
7
#ifndef IMGPORT
8
#define IMGPORT
9
10
#include <
yarp/sig/Image.h
>
11
#include <
yarp/os/BufferedPort.h
>
12
#include <
yarp/os/Time.h
>
13
#include <
yarp/conf/numeric.h
>
14
15
#include <string>
16
17
#include <QObject>
18
#include <QVideoFrame>
19
#include "
signalhandler.h
"
20
25
#ifdef YARP_LITTLE_ENDIAN
26
class
InputCallback
:
public
QObject,
public
yarp::os::TypedReaderCallback
<yarp::sig::ImageOf<yarp::sig::PixelBgra> >
27
#else
28
class
InputCallback
:
public
QObject,
public
yarp::os::TypedReaderCallback
<yarp::sig::ImageOf<yarp::sig::PixelRgb> >
29
#endif
30
{
31
32
public
:
33
InputCallback
();
34
~InputCallback
();
35
void
setSignalHandler
(
SignalHandler
*);
36
37
#ifdef YARP_LITTLE_ENDIAN
38
using
yarp::os::TypedReaderCallback
<
yarp::sig::ImageOf<yarp::sig::PixelBgra>
>
::onRead
;
39
void
onRead
(
yarp::sig::ImageOf<yarp::sig::PixelBgra>
&img)
override
;
40
#else
41
using
yarp::os::TypedReaderCallback
<
yarp::sig::ImageOf<yarp::sig::PixelRgb>
>
::onRead
;
42
void
onRead
(
yarp::sig::ImageOf<yarp::sig::PixelRgba>
&img)
override
;
43
#endif
44
45
private
:
46
int
counter;
47
SignalHandler
*sigHandler;
48
};
49
50
#endif
BufferedPort.h
Image.h
Time.h
InputCallback
This class is a callback class that receives the video frame from the YARP backend.
Definition
ImagePort.h:30
InputCallback::onRead
void onRead(yarp::sig::ImageOf< yarp::sig::PixelBgra > &img) override
the function callback
Definition
ImagePort.cpp:30
InputCallback::InputCallback
InputCallback()
Definition
ImagePort.cpp:18
InputCallback::~InputCallback
~InputCallback()
Definition
InputCallback.cpp:44
InputCallback::setSignalHandler
void setSignalHandler(SignalHandler *)
sets the signalhandler to the class
Definition
ImagePort.cpp:84
SignalHandler
The class that handles some signals.
Definition
signalhandler.h:23
yarp::os::BufferedPort< ImageType >::BufferedPort
BufferedPort()
Constructor.
Definition
BufferedPort-inl.h:14
yarp::os::TypedReaderCallback
A callback for typed data from a port.
Definition
TypedReaderCallback.h:26
yarp::sig::ImageOf
Typed image class.
Definition
Image.h:603
numeric.h
signalhandler.h
YARP
4.0.2+169-20261113.4+git2cc772dc6
src
guis
yarpview
plugin
ImagePort.h
Generated on Sun Nov 15 2026 02:12:01 for YARP by
1.9.8