YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
VideoProducer Class Reference

The videoproducer class. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/src/guis/yarpview/plugin/videoproducer.h>

+ Inheritance diagram for VideoProducer:

Public Slots

void onNewVideoContentReceived (QVideoFrame *frame)
 This gets the frame and presents it to the abstract surface.
 

Signals

void resizeWindowRequest ()
 

Public Member Functions

 VideoProducer (QObject *parent=0)
 
 ~VideoProducer ()
 
QString getPixelAsStr (int x, int y)
 Pics the rgb value of the pixel specified by x and y and return it as a string.
 
QAbstractVideoSurface * videoSurface () const
 returns the abstract surface
 
void setVideoSurface (QAbstractVideoSurface *surface)
 sets the abstract surface
 
int getWidth ()
 returns the width of the surface
 
int getHeight ()
 returns the height of the surface
 

Properties

QAbstractVideoSurface * videoSurface
 
int frameWidth
 
int frameHeight
 

Detailed Description

The videoproducer class.

This class has a QAbstractVideoSurface where the video frame is rendered and used by the QML VideoOutput

Definition at line 19 of file videoproducer.h.

Constructor & Destructor Documentation

◆ VideoProducer()

VideoProducer::VideoProducer ( QObject *  parent = 0)

Definition at line 9 of file videoproducer.cpp.

◆ ~VideoProducer()

VideoProducer::~VideoProducer ( )

Definition at line 17 of file videoproducer.cpp.

Member Function Documentation

◆ getHeight()

int VideoProducer::getHeight ( )

returns the height of the surface

Returns
the height

Definition at line 64 of file videoproducer.cpp.

◆ getPixelAsStr()

QString VideoProducer::getPixelAsStr ( int  x,
int  y 
)

Pics the rgb value of the pixel specified by x and y and return it as a string.

Parameters
xInteger: The x coordinate of the pixel
yInteger: The y coordinate of the pixel
Returns
rgbHex QString: The hexadecimal string containing the pixel color value

Definition at line 129 of file videoproducer.cpp.

◆ getWidth()

int VideoProducer::getWidth ( )

returns the width of the surface

Returns
the width

Definition at line 52 of file videoproducer.cpp.

◆ onNewVideoContentReceived

void VideoProducer::onNewVideoContentReceived ( QVideoFrame *  frame)
slot

This gets the frame and presents it to the abstract surface.

Parameters
framethe video frame

Definition at line 76 of file videoproducer.cpp.

◆ resizeWindowRequest

void VideoProducer::resizeWindowRequest ( )
signal

◆ setVideoSurface()

void VideoProducer::setVideoSurface ( QAbstractVideoSurface *  surface)

sets the abstract surface

this property is called by the qml videooutput and set the abstract surface to its surface

Definition at line 40 of file videoproducer.cpp.

◆ videoSurface()

QAbstractVideoSurface * VideoProducer::videoSurface ( ) const

returns the abstract surface

this property is called by the qml videooutput to get the render surface

Definition at line 31 of file videoproducer.cpp.

Property Documentation

◆ frameHeight

int VideoProducer::frameHeight
read

Definition at line 24 of file videoproducer.h.

◆ frameWidth

int VideoProducer::frameWidth
read

Definition at line 23 of file videoproducer.h.

◆ videoSurface

QAbstractVideoSurface * VideoProducer::videoSurface
readwrite

Definition at line 22 of file videoproducer.h.


The documentation for this class was generated from the following files: