Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMediaVideoControl Class Reference
[QtMediaModule]

The QMediaVideoControl class is an interface to videos playing through the Qt Extended Media System. More...

    #include <QMediaVideoControl>

Inherits QObject.

Public Functions

Public Slots

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The QMediaVideoControl class is an interface to videos playing through the Qt Extended Media System.

If a prepared media resource has associated video content, when that content is available to be played, this inteface can be used to contruct a QWidget which will contain the rendering of the video content.

Use the QMediaControlNotifier class to listen for when video content is available.

    QMediaControlNotifier *notifier = new QMediaControlNotifier( QMediaVideoControl::name() );
    connect( notifier, SIGNAL(valid()), this, SLOT(showVideo()) );

    QMediaContent *content = new QMediaContent( "video.3gp" );
    notifier->setMediaContent( content );

If video content is available createVideoWidget() can be used to construct a new video widget for the media content.

    QMediaVideoControl control( content );

    QWidget *video = control.createVideoWidget();
    videolayout->addWidget( video );

Simply delete video widgets when they are no longer needed or when the video control becomes invalid.

See also QMediaContent and QMediaControlNotifier.


Member Function Documentation

QMediaVideoControl::QMediaVideoControl ( QMediaContent * mediaContent )

Create a QMediaVideoControl with the handle to a prepared media resource

The QMediaControl needs to be constructed with mediaContent that represents the video to be played.

QMediaVideoControl::~QMediaVideoControl ()

Destroy a QMediaVideoControl

QWidget * QMediaVideoControl::createVideoWidget ( QWidget * parent = 0 ) const

Create a QWidget that displays the rendered video content.

This function is used to create a QWidget that will display the video content, it is parented to the widget passed in with the parent parameter. This widget can be deleted when the application is finished with it.

void QMediaVideoControl::invalid ()   [signal]

Signal that is emitted when the control is invalid and no longer available for use.

QString QMediaVideoControl::name ()   [static]

Return the name of this control.

void QMediaVideoControl::setVideoRotation ( QtopiaVideo::VideoRotation rotation )   [slot]

Set video image rotation mode.

See also QtopiaVideo::VideoRotation.

void QMediaVideoControl::setVideoScaleMode ( QtopiaVideo::VideoScaleMode scaleMode )   [slot]

Set the video using scaleMode to be scaled to fit the window size ( QtopiaVideo::FitWindow ) or stay unchanged ( QtopiaMedia::NoScale ).

See also QtopiaVideo::VideoScaleMode.

void QMediaVideoControl::valid ()   [signal]

Signal that is emitted when the control is valid and available for use.

void QMediaVideoControl::videoTargetAvailable ()   [signal]

This signal is emitted when there is a video available to be viewed. The client can call createVideoWidget() at this time.

See also createVideoWidget().

void QMediaVideoControl::videoTargetRemoved ()   [signal]

This signal is emitted when there is no longer video available to be viewed. The client should delete any QWidget obtained from createVideoWidget()

See also createVideoWidget().


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3