QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
UVCStreamMonitor Class Reference

#include <UVCStreamMonitor.h>

Inheritance diagram for UVCStreamMonitor:
Collaboration diagram for UVCStreamMonitor:

Signals

void statsChanged ()

Public Member Functions

 UVCStreamMonitor (QObject *parent=nullptr, VideoStreamStatsMeter::Clock clock={})
 clock defaults to the steady clock.
void attach (QCamera *camera, QVideoSink *videoSink)
 Measures the frames videoSink receives from camera (optional), in place of any other sink attached.
void detach ()
 Stops measuring.
VideoStreamStats stats () const
QSize videoSize () const
double cameraFrameRate () const
 The frame rate the camera was set up for; 0 while unknown.

Friends

class UVCStreamMonitorTest
class VideoManagerTest

Detailed Description

Measures the USB camera on display, from the frames its capture session hands the video sink, about once a second while frames arrive. UVCCameraController attaches its camera and the sink of its VideoOutput, and publishes the stats as its own.

stats fills valid, fps, codec (the camera's capture format, e.g. "MJPEG" or "YUYV"), gpuPath ("CPU" for frames in memory, "GPU" for textures) and uptimeMs; the network stream fields keep their defaults.

Definition at line 27 of file UVCStreamMonitor.h.

Constructor & Destructor Documentation

◆ UVCStreamMonitor()

UVCStreamMonitor::UVCStreamMonitor ( QObject * parent = nullptr,
VideoStreamStatsMeter::Clock clock = {} )
explicit

clock defaults to the steady clock.

Definition at line 22 of file UVCStreamMonitor.cc.

Referenced by VideoManagerTest.

Member Function Documentation

◆ attach()

void UVCStreamMonitor::attach ( QCamera * camera,
QVideoSink * videoSink )

Measures the frames videoSink receives from camera (optional), in place of any other sink attached.

Definition at line 31 of file UVCStreamMonitor.cc.

◆ cameraFrameRate()

double UVCStreamMonitor::cameraFrameRate ( ) const
inline

The frame rate the camera was set up for; 0 while unknown.

Definition at line 54 of file UVCStreamMonitor.h.

◆ detach()

void UVCStreamMonitor::detach ( )

Stops measuring.

Definition at line 49 of file UVCStreamMonitor.cc.

◆ stats()

VideoStreamStats UVCStreamMonitor::stats ( ) const
inline

Definition at line 49 of file UVCStreamMonitor.h.

◆ statsChanged

void UVCStreamMonitor::statsChanged ( )
signal

◆ videoSize()

QSize UVCStreamMonitor::videoSize ( ) const
inline

Definition at line 51 of file UVCStreamMonitor.h.

◆ UVCStreamMonitorTest

friend class UVCStreamMonitorTest
friend

Definition at line 37 of file UVCStreamMonitor.h.

References UVCStreamMonitorTest.

Referenced by UVCStreamMonitorTest.

◆ VideoManagerTest

friend class VideoManagerTest
friend

Definition at line 38 of file UVCStreamMonitor.h.

References UVCStreamMonitor(), and VideoManagerTest.

Referenced by VideoManagerTest.


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