CopperSpice API  1.9.1
QVideoWindowControl Class Referenceabstract

The QVideoWindowControl class provides a media control for rendering video to a window. More...

Inheritance diagram for QVideoWindowControl:
QMediaControl QObject

Public Signals

void brightnessChanged (int brightness)
 
void contrastChanged (int contrast)
 
void fullScreenChanged (bool fullScreen)
 
void hueChanged (int hue)
 
void nativeSizeChanged ()
 
void saturationChanged (int saturation)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

 ~QVideoWindowControl ()
 
virtual Qt::AspectRatioMode aspectRatioMode () const = 0
 
virtual int brightness () const = 0
 
virtual int contrast () const = 0
 
virtual QRect displayRect () const = 0
 
virtual int hue () const = 0
 
virtual bool isFullScreen () const = 0
 
virtual QSize nativeSize () const = 0
 
virtual void repaint () = 0
 
virtual int saturation () const = 0
 
virtual void setAspectRatioMode (Qt::AspectRatioMode mode) = 0
 
virtual void setBrightness (int brightness) = 0
 
virtual void setContrast (int contrast) = 0
 
virtual void setDisplayRect (const QRect &rect) = 0
 
virtual void setFullScreen (bool fullScreen) = 0
 
virtual void setHue (int hue) = 0
 
virtual void setSaturation (int saturation) = 0
 
virtual void setWinId (WId id) = 0
 
virtual WId winId () const = 0
 
- Public Methods inherited from QMediaControl
 ~QMediaControl ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Protected Methods

 QVideoWindowControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QMediaControl
 QMediaControl (QObject *parent=nullptr)
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The winId() property QVideoWindowControl allows a platform specific window ID to be set as the video render target of a QMediaService. The displayRect() property is used to set the region of the window the video should be rendered to, and the aspectRatioMode() property indicates how the video should be scaled to fit the displayRect().

QVideoWindowControl is one of a number of possible video output controls.

QVideoWindowControl *windowControl = mediaService->requestControl<QVideoWindowControl *>();
windowControl->setWinId(widget->winId());
windowControl->setDisplayRect(widget->rect());
windowControl->setAspectRatioMode(Qt::KeepAspectRatio);

The interface name of QVideoWindowControl is "com.copperspice.CS.videoWindowControl/1.0" as defined in QVideoWindowControl_iid.

See also
QMediaService::requestControl(), QVideoWidget

Constructor & Destructor Documentation

QVideoWindowControl::~QVideoWindowControl ( )

Destroys a video window control.

QVideoWindowControl::QVideoWindowControl ( QObject parent = nullptr)
explicitprotected

Constructs a new video window control with the given parent.

Method Documentation

Qt::AspectRatioMode QVideoWindowControl::aspectRatioMode ( ) const
pure virtual

Returns how video is scaled to fit the display region with respect to its aspect ratio.

int QVideoWindowControl::brightness ( ) const
pure virtual

Returns the brightness adjustment applied to a video overlay. Valid brightness values range between -100 and 100, the default is 0.

void QVideoWindowControl::brightnessChanged ( int  brightness)
signal

Signals that a video overlay's brightness adjustment has changed.

int QVideoWindowControl::contrast ( ) const
pure virtual

Returns the contrast adjustment applied to a video overlay. Valid contrast values range between -100 and 100, the default is 0.

void QVideoWindowControl::contrastChanged ( int  contrast)
signal

Signals that a video overlay's contrast adjustment has changed.

QRect QVideoWindowControl::displayRect ( ) const
pure virtual

Returns the sub-rect of a window where video is displayed.

void QVideoWindowControl::fullScreenChanged ( bool  fullScreen)
signal

Signals that the fullScreen state of a video overlay has changed.

int QVideoWindowControl::hue ( ) const
pure virtual

Returns the hue adjustment applied to a video overlay. Value hue values range between -100 and 100, the default is 0.

void QVideoWindowControl::hueChanged ( int  hue)
signal

Signals that a video overlay's hue adjustment has changed.

bool QVideoWindowControl::isFullScreen ( ) const
pure virtual

Identifies if a video overlay is a fullScreen overlay. Returns true if the video overlay is fullScreen, and false otherwise.

QSize QVideoWindowControl::nativeSize ( ) const
pure virtual

Returns a suggested size for the video display based on the resolution and aspect ratio of the video.

void QVideoWindowControl::nativeSizeChanged ( )
signal

Signals that the native dimensions of the video have changed.

void QVideoWindowControl::repaint ( )
pure virtual

Repaints the last frame.

int QVideoWindowControl::saturation ( ) const
pure virtual

Returns the saturation adjustment applied to a video overlay. Value saturation values range between -100 and 100, the default is 0.

void QVideoWindowControl::saturationChanged ( int  saturation)
signal

Signals that a video overlay's saturation adjustment has changed.

void QVideoWindowControl::setAspectRatioMode ( Qt::AspectRatioMode  mode)
pure virtual

Sets the aspect ratio mode which determines how video is scaled to the fit the display region with respect to its aspect ratio.

void QVideoWindowControl::setBrightness ( int  brightness)
pure virtual

Sets a brightness adjustment for a video overlay. Valid brightness values range between -100 and 100, the default is 0.

void QVideoWindowControl::setContrast ( int  contrast)
pure virtual

Sets the contrast adjustment for a video overlay. Valid contrast values range between -100 and 100, the default is 0.

void QVideoWindowControl::setDisplayRect ( const QRect rect)
pure virtual

Sets the sub-rect of a window where video is displayed.

void QVideoWindowControl::setFullScreen ( bool  fullScreen)
pure virtual

Sets whether a video overlay is a fullScreen overlay.

void QVideoWindowControl::setHue ( int  hue)
pure virtual

Sets a hue adjustment for a video overlay. Valid hue values range between -100 and 100, the default is 0.

void QVideoWindowControl::setSaturation ( int  saturation)
pure virtual

Sets a saturation adjustment for a video overlay. Valid saturation values range between -100 and 100, the default is 0.

void QVideoWindowControl::setWinId ( WId  id)
pure virtual

Sets the id of the window a video overlay end point renders to.

WId QVideoWindowControl::winId ( ) const
pure virtual

Returns the ID of the window a video overlay end point renders to.