![]() |
Miam-Player
0.8.0
A nice music player
|
#include <VideoRenderer.h>
Public Types | |
enum | OutAspectRatioMode { RendererAspectRatio, VideoAspectRatio, CustomAspectRation } |
enum | Quality { QualityDefault, QualityBest, QualityFastest } |
Public Member Functions | |
VideoRenderer () | |
virtual | ~VideoRenderer () |
virtual VideoRendererId | id () const =0 |
bool | receive (const VideoFrame &frame) |
bool | setPreferredPixelFormat (VideoFormat::PixelFormat pixfmt) |
setPreferredPixelFormat More... | |
virtual VideoFormat::PixelFormat | preferredPixelFormat () const |
preferredPixelFormat More... | |
void | forcePreferredPixelFormat (bool force=true) |
forcePreferredPixelFormat force to use preferredPixelFormat() even if incoming format is supported More... | |
bool | isPreferredPixelFormatForced () const |
virtual bool | isSupported (VideoFormat::PixelFormat pixfmt) const =0 |
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... | |
virtual QWindow * | qwindow () |
virtual QWidget * | widget () |
widget More... | |
virtual QGraphicsItem * | graphicsItem () |
graphicsItem 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) |
virtual OpenGLVideo * | opengl () const |
opengl Currently you can only use it to set custom shader OpenGLVideo.setUserShader() More... | |
![]() | |
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) |
Static Public Member Functions | |
template<class C > | |
static bool | Register (VideoRendererId id, const char *name) |
static VideoRenderer * | create (VideoRendererId id) |
static VideoRenderer * | create (const char *name) |
static VideoRendererId * | next (VideoRendererId *id=0) |
next More... | |
static const char * | name (VideoRendererId id) |
static VideoRendererId | id (const char *name) |
Protected Member Functions | |
VideoRenderer (VideoRendererPrivate &d) | |
virtual bool | receiveFrame (const VideoFrame &frame)=0 |
QRegion | backgroundRegion () const |
virtual void | drawBackground () |
virtual void | drawFrame ()=0 |
virtual void | handlePaintEvent () |
virtual void | updateUi () |
![]() | |
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 () |
Friends | |
class | VideoOutput |
QtAV::VideoRenderer::VideoRenderer | ( | ) |
|
virtual |
|
protected |
QColor QtAV::VideoRenderer::backgroundColor | ( | ) | const |
|
protected |
qreal QtAV::VideoRenderer::brightness | ( | ) | const |
brightness, contrast, hue, saturation values range between -1.0 and 1.0, the default is 0.
value is not changed if does not implementd and onChangingXXX() returns false. video widget/item will update after if onChangingXXX/setXXX returns true
qreal QtAV::VideoRenderer::contrast | ( | ) | const |
|
static |
|
static |
|
protectedvirtual |
Reimplemented in QtAV::VideoOutput, QtAV::OpenGLRendererBase, and QtAV::QPainterRenderer.
|
protectedpure virtual |
Implemented in QtAV::VideoOutput, QtAV::OpenGLRendererBase, and QtAV::QPainterRenderer.
void QtAV::VideoRenderer::forcePreferredPixelFormat | ( | bool | force = true | ) |
forcePreferredPixelFormat force to use preferredPixelFormat() even if incoming format is supported
force |
|
inlinevirtual |
graphicsItem
Reimplemented in QtAV::VideoOutput.
|
protectedvirtual |
Reimplemented in QtAV::VideoOutput.
qreal QtAV::VideoRenderer::hue | ( | ) | const |
|
static |
|
pure virtual |
Implemented in QtAV::VideoOutput, and QtAV::OpenGLWindowRenderer.
bool QtAV::VideoRenderer::isPreferredPixelFormatForced | ( | ) | const |
|
pure virtual |
Implemented in QtAV::VideoOutput, QtAV::OpenGLRendererBase, and QtAV::QPainterRenderer.
QPointF QtAV::VideoRenderer::mapFromFrame | ( | const QPointF & | p | ) | const |
mapFromFrame map point in VideoFrame coordinate to VideoRenderer, with current ROI
QPointF QtAV::VideoRenderer::mapToFrame | ( | const QPointF & | p | ) | const |
mapToFrame map point in VideoRenderer coordinate to VideoFrame, with current ROI
|
static |
|
static |
next
id | NULL to get the first id address |
QRectF QtAV::VideoRenderer::normalizedROI | ( | ) | const |
|
inlinevirtual |
opengl Currently you can only use it to set custom shader OpenGLVideo.setUserShader()
Reimplemented in QtAV::VideoOutput, and QtAV::OpenGLRendererBase.
int QtAV::VideoRenderer::orientation | ( | ) | const |
orientation 0, 90, 180, 270.
other values are ignored outAspectRatio() corresponds with orientation == 0. displayed aspect ratio may change if orientation is not 0
qreal QtAV::VideoRenderer::outAspectRatio | ( | ) | const |
OutAspectRatioMode QtAV::VideoRenderer::outAspectRatioMode | ( | ) | const |
|
virtual |
preferredPixelFormat
Reimplemented in QtAV::VideoOutput.
Quality QtAV::VideoRenderer::quality | ( | ) | const |
|
inlinevirtual |
Reimplemented in QtAV::VideoOutput, and QtAV::OpenGLWindowRenderer.
QRect QtAV::VideoRenderer::realROI | ( | ) | const |
bool QtAV::VideoRenderer::receive | ( | const VideoFrame & | frame | ) |
|
protectedpure virtual |
Implemented in QtAV::VideoOutput, and QtAV::OpenGLRendererBase.
QRectF QtAV::VideoRenderer::regionOfInterest | ( | ) | const |
|
inlinestatic |
int QtAV::VideoRenderer::rendererHeight | ( | ) | const |
QSize QtAV::VideoRenderer::rendererSize | ( | ) | const |
int QtAV::VideoRenderer::rendererWidth | ( | ) | const |
void QtAV::VideoRenderer::resizeRenderer | ( | const QSize & | size | ) |
void QtAV::VideoRenderer::resizeRenderer | ( | int | width, |
int | height | ||
) |
qreal QtAV::VideoRenderer::saturation | ( | ) | const |
void QtAV::VideoRenderer::setBackgroundColor | ( | const QColor & | c | ) |
bool QtAV::VideoRenderer::setBrightness | ( | qreal | brightness | ) |
bool QtAV::VideoRenderer::setContrast | ( | qreal | contrast | ) |
bool QtAV::VideoRenderer::setHue | ( | qreal | hue | ) |
void QtAV::VideoRenderer::setOrientation | ( | int | value | ) |
void QtAV::VideoRenderer::setOutAspectRatio | ( | qreal | ratio | ) |
void QtAV::VideoRenderer::setOutAspectRatioMode | ( | OutAspectRatioMode | mode | ) |
bool QtAV::VideoRenderer::setPreferredPixelFormat | ( | VideoFormat::PixelFormat | pixfmt | ) |
setPreferredPixelFormat
pixfmt | pixfmt will be used if decoded format is not supported by this renderer. otherwise, use decoded format. return false if pixfmt is not supported and not changed. |
void QtAV::VideoRenderer::setQuality | ( | Quality | q | ) |
void QtAV::VideoRenderer::setRegionOfInterest | ( | qreal | x, |
qreal | y, | ||
qreal | width, | ||
qreal | height | ||
) |
void QtAV::VideoRenderer::setRegionOfInterest | ( | const QRectF & | roi | ) |
bool QtAV::VideoRenderer::setSaturation | ( | qreal | saturation | ) |
qreal QtAV::VideoRenderer::sourceAspectRatio | ( | ) | const |
sourceAspectRatio The display aspect ratio of received video frame.
0 for an invalid frame. sourceAspectRatioChanged() (a signal for QObject renderers) will be called if the new frame has a different DAR.
|
protectedvirtual |
QSize QtAV::VideoRenderer::videoFrameSize | ( | ) | const |
QRect QtAV::VideoRenderer::videoRect | ( | ) | const |
|
inlinevirtual |
|
friend |