Miam-Player  0.8.0
A nice music player
QtAV::VideoOutput Class Reference

The VideoOutput class A VideoRenderer wrapper with QObject features. More...

#include <VideoOutput.h>

Inheritance diagram for QtAV::VideoOutput:
QtAV::VideoRenderer QtAV::AVOutput

Signals

void sourceAspectRatioChanged (qreal value) Q_DECL_OVERRIDE Q_DECL_FINAL
 
void regionOfInterestChanged () Q_DECL_OVERRIDE
 
void outAspectRatioChanged () Q_DECL_OVERRIDE
 
void outAspectRatioModeChanged () Q_DECL_OVERRIDE
 
void brightnessChanged (qreal value) Q_DECL_OVERRIDE
 
void contrastChanged (qreal) Q_DECL_OVERRIDE
 
void hueChanged (qreal) Q_DECL_OVERRIDE
 
void saturationChanged (qreal) Q_DECL_OVERRIDE
 
void backgroundColorChanged () Q_DECL_OVERRIDE
 
void orientationChanged () Q_DECL_OVERRIDE
 
void videoRectChanged () Q_DECL_OVERRIDE
 
void videoFrameSizeChanged () Q_DECL_OVERRIDE
 

Public Member Functions

 VideoOutput (QObject *parent=0)
 VideoOutput Create a QWidget based renderer. More...
 
 VideoOutput (VideoRendererId rendererId, QObject *parent=0)
 VideoOutput Create a renderer with given rendererId. More...
 
 ~VideoOutput ()
 
VideoRendererId id () const Q_DECL_OVERRIDE
 
VideoFormat::PixelFormat preferredPixelFormat () const Q_DECL_OVERRIDE
 preferredPixelFormat More...
 
bool isSupported (VideoFormat::PixelFormat pixfmt) const Q_DECL_OVERRIDE
 
QWindow * qwindow () Q_DECL_OVERRIDE Q_DECL_FINAL
 
QWidget * widget () Q_DECL_OVERRIDE Q_DECL_FINAL
 widget More...
 
QGraphicsItem * graphicsItem () Q_DECL_OVERRIDE Q_DECL_FINAL
 graphicsItem More...
 
OpenGLVideoopengl () const Q_DECL_OVERRIDE
 opengl Currently you can only use it to set custom shader OpenGLVideo.setUserShader() More...
 
- Public Member Functions inherited from QtAV::VideoRenderer
 VideoRenderer ()
 
virtual ~VideoRenderer ()
 
bool receive (const VideoFrame &frame)
 
bool setPreferredPixelFormat (VideoFormat::PixelFormat pixfmt)
 setPreferredPixelFormat More...
 
void forcePreferredPixelFormat (bool force=true)
 forcePreferredPixelFormat force to use preferredPixelFormat() even if incoming format is supported More...
 
bool isPreferredPixelFormatForced () const
 
qreal sourceAspectRatio () const
 sourceAspectRatio The display aspect ratio of received video frame. More...
 
void setOutAspectRatioMode (OutAspectRatioMode mode)
 
OutAspectRatioMode outAspectRatioMode () const
 
void setOutAspectRatio (qreal ratio)
 
qreal outAspectRatio () const
 
void setQuality (Quality q)
 
Quality quality () const
 
void resizeRenderer (const QSize &size)
 
void resizeRenderer (int width, int height)
 
QSize rendererSize () const
 
int rendererWidth () const
 
int rendererHeight () const
 
QSize videoFrameSize () const
 
int orientation () const
 orientation 0, 90, 180, 270. More...
 
void setOrientation (int value)
 
QRect videoRect () const
 
QRectF regionOfInterest () const
 
void setRegionOfInterest (qreal x, qreal y, qreal width, qreal height)
 
void setRegionOfInterest (const QRectF &roi)
 
QRect realROI () const
 
QRectF normalizedROI () const
 
QPointF mapToFrame (const QPointF &p) const
 mapToFrame map point in VideoRenderer coordinate to VideoFrame, with current ROI More...
 
QPointF mapFromFrame (const QPointF &p) const
 mapFromFrame map point in VideoFrame coordinate to VideoRenderer, with current ROI More...
 
qreal brightness () const
 brightness, contrast, hue, saturation values range between -1.0 and 1.0, the default is 0. More...
 
bool setBrightness (qreal brightness)
 
qreal contrast () const
 
bool setContrast (qreal contrast)
 
qreal hue () const
 
bool setHue (qreal hue)
 
qreal saturation () const
 
bool setSaturation (qreal saturation)
 
QColor backgroundColor () const
 
void setBackgroundColor (const QColor &c)
 
- Public Member Functions inherited from QtAV::AVOutput
 AVOutput ()
 
virtual ~AVOutput ()
 
bool isAvailable () const
 
void pause (bool p)
 
bool isPaused () const
 
QList< Filter * > & filters ()
 
bool installFilter (Filter *filter, int index=0x7fffffff)
 installFilter Insert a filter at position 'index' of current filter list. More...
 
bool uninstallFilter (Filter *filter)
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) Q_DECL_OVERRIDE
 
bool receiveFrame (const VideoFrame &frame) Q_DECL_OVERRIDE
 
void drawBackground () Q_DECL_OVERRIDE
 
void drawFrame () Q_DECL_OVERRIDE
 
void handlePaintEvent () Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from QtAV::VideoRenderer
 VideoRenderer (VideoRendererPrivate &d)
 
QRegion backgroundRegion () const
 
virtual void updateUi ()
 
- Protected Member Functions inherited from QtAV::AVOutput
 AVOutput (AVOutputPrivate &d)
 
Q_DECL_DEPRECATED bool tryPause ()
 
void addOutputSet (OutputSet *set)
 
void removeOutputSet (OutputSet *set)
 
void attach (OutputSet *set)
 
void detach (OutputSet *set=0)
 
void hanlePendingTasks ()
 

Properties

qreal brightness
 
qreal contrast
 
qreal hue
 
qreal saturation
 
QColor backgroundColor
 
QRectF regionOfInterest
 
qreal sourceAspectRatio
 
qreal outAspectRatio
 
OutAspectRatioMode outAspectRatioMode
 
int orientation
 
QRect videoRect
 
QSize videoFrameSize
 

Additional Inherited Members

- Public Types inherited from QtAV::VideoRenderer
enum  OutAspectRatioMode { RendererAspectRatio, VideoAspectRatio, CustomAspectRation }
 
enum  Quality { QualityDefault, QualityBest, QualityFastest }
 
- Static Public Member Functions inherited from QtAV::VideoRenderer
template<class C >
static bool Register (VideoRendererId id, const char *name)
 
static VideoRenderercreate (VideoRendererId id)
 
static VideoRenderercreate (const char *name)
 
static VideoRendererIdnext (VideoRendererId *id=0)
 next More...
 
static const char * name (VideoRendererId id)
 
static VideoRendererId id (const char *name)
 

Detailed Description

The VideoOutput class A VideoRenderer wrapper with QObject features.

If create VideoOutput without a given renderer id, QtAV will try to create a widget based renderer, and dynamically load QtAVWidgets module if it's not loaded.

Constructor & Destructor Documentation

QtAV::VideoOutput::VideoOutput ( QObject *  parent = 0)

VideoOutput Create a QWidget based renderer.

Result can be a QOpenGLWidget or QGLWidget based renderer if possible. Otherwise fallback to a software renderer

QtAV::VideoOutput::VideoOutput ( VideoRendererId  rendererId,
QObject *  parent = 0 
)

VideoOutput Create a renderer with given rendererId.

MUST check VideoOutput::isAvailable() later!

QtAV::VideoOutput::~VideoOutput ( )

Member Function Documentation

void QtAV::VideoOutput::backgroundColorChanged ( )
signal
void QtAV::VideoOutput::brightnessChanged ( qreal  value)
signal
void QtAV::VideoOutput::contrastChanged ( qreal  )
signal
void QtAV::VideoOutput::drawBackground ( )
protectedvirtual

Reimplemented from QtAV::VideoRenderer.

void QtAV::VideoOutput::drawFrame ( )
protectedvirtual

Implements QtAV::VideoRenderer.

bool QtAV::VideoOutput::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected
QGraphicsItem* QtAV::VideoOutput::graphicsItem ( )
virtual

graphicsItem

Returns
default is 0. A QGraphicsItem subclass can return this

Reimplemented from QtAV::VideoRenderer.

void QtAV::VideoOutput::handlePaintEvent ( )
protectedvirtual

Reimplemented from QtAV::VideoRenderer.

void QtAV::VideoOutput::hueChanged ( qreal  )
signal
VideoRendererId QtAV::VideoOutput::id ( ) const
virtual

Implements QtAV::VideoRenderer.

bool QtAV::VideoOutput::isSupported ( VideoFormat::PixelFormat  pixfmt) const
virtual

Implements QtAV::VideoRenderer.

OpenGLVideo* QtAV::VideoOutput::opengl ( ) const
virtual

opengl Currently you can only use it to set custom shader OpenGLVideo.setUserShader()

Reimplemented from QtAV::VideoRenderer.

void QtAV::VideoOutput::orientationChanged ( )
signal
void QtAV::VideoOutput::outAspectRatioChanged ( )
signal
void QtAV::VideoOutput::outAspectRatioModeChanged ( )
signal
VideoFormat::PixelFormat QtAV::VideoOutput::preferredPixelFormat ( ) const
virtual

preferredPixelFormat

Returns
preferred pixel format. e.g. WidgetRenderer is rgb formats.

Reimplemented from QtAV::VideoRenderer.

QWindow* QtAV::VideoOutput::qwindow ( )
virtual

Reimplemented from QtAV::VideoRenderer.

bool QtAV::VideoOutput::receiveFrame ( const VideoFrame frame)
protectedvirtual

Implements QtAV::VideoRenderer.

void QtAV::VideoOutput::regionOfInterestChanged ( )
signal
void QtAV::VideoOutput::saturationChanged ( qreal  )
signal
void QtAV::VideoOutput::sourceAspectRatioChanged ( qreal  value)
signal
void QtAV::VideoOutput::videoFrameSizeChanged ( )
signal
void QtAV::VideoOutput::videoRectChanged ( )
signal
QWidget* QtAV::VideoOutput::widget ( )
virtual

widget

Returns
default is 0. A QWidget subclass can return this

Reimplemented from QtAV::VideoRenderer.

Property Documentation

QColor QtAV::VideoOutput::backgroundColor
readwrite
qreal QtAV::VideoOutput::brightness
readwrite
qreal QtAV::VideoOutput::contrast
readwrite
qreal QtAV::VideoOutput::hue
readwrite
int QtAV::VideoOutput::orientation
readwrite
qreal QtAV::VideoOutput::outAspectRatio
readwrite
OutAspectRatioMode QtAV::VideoOutput::outAspectRatioMode
readwrite
QRectF QtAV::VideoOutput::regionOfInterest
readwrite
qreal QtAV::VideoOutput::saturation
readwrite
qreal QtAV::VideoOutput::sourceAspectRatio
read
QSize QtAV::VideoOutput::videoFrameSize
read
QRect QtAV::VideoOutput::videoRect
read

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