![]() | Home · All Classes · Modules |
The VideoWidget class provides a widget that is used to display video. More...
Inherits QWidget and AbstractVideoOutput.
The VideoWidget class provides a widget that is used to display video.
The VideoWidget class renders the video of a media stream on a QWidget. It is connected to the MediaObject, of which video stream it should render. You connect the two objects using the Phonon.createPath() function.
The widget has some possibilities to manipulate the video stream. You can change the brightness(), hue(), saturation(), and contrast().
The widget can resize the video to fit the widget, the AspectRatio is kept during resizing. It is also possible to go to fullScreen() mode.
A typical example of usage follows below:
MediaObject *media = new MediaObject(parent); VideoWidget *vwidget = new VideoWidget(parent); Phonon.createPath(media, vwidget);
Author: Matthias Kretz <kretz@kde.org>
Defines the width:height to be used for the video.
Constant | Value | Description |
---|---|---|
Phonon.VideoWidget.AspectRatioAuto | 0 | Let the decoder find the aspect ratio automatically from the media file (this is the default). |
Phonon.VideoWidget.AspectRatioWidget | 1 | Fits the video into the widget making the aspect ratio depend solely on the size of the widget. This way the aspect ratio is freely resizeable by the user. |
Phonon.VideoWidget.AspectRatio4_3 | 2 | Make width/height == 4/3, which is the old TV size and monitor size (1024/768 == 4/3). (4:3) |
Phonon.VideoWidget.AspectRatio16_9 | 3 | Make width/height == 16/9, which is the size of most current media. (16:9) |
The ScaleMode enum describes how to treat aspect ratio during resizing of video.
Constant | Value | Description |
---|---|---|
Phonon.VideoWidget.FitInView | 0 | The video will be fitted to fill the view keeping aspect ratio. |
Phonon.VideoWidget.ScaleAndCrop | 1 | The video is scaled |
The parent argument, if not None, causes self to be owned by Qt instead of PyQt.
Constructs a new video widget with a parent.
This method is also a Qt slot with the C++ signature void enterFullScreen().
Convenience slot, calling setFullScreen(true)
This method is also a Qt slot with the C++ signature void exitFullScreen().
Convenience slot, calling setFullScreen(false)
This method is also a Qt slot with the C++ signature void setAspectRatio(Phonon::VideoWidget::AspectRatio).
This method is also a Qt slot with the C++ signature void setBrightness(double).
This method is also a Qt slot with the C++ signature void setContrast(double).
This method is also a Qt slot with the C++ signature void setFullScreen(bool).
This method is also a Qt slot with the C++ signature void setHue(double).
This method is also a Qt slot with the C++ signature void setSaturation(double).
This method is also a Qt slot with the C++ signature void setScaleMode(Phonon::VideoWidget::ScaleMode).
PyQt 4.4.3 for X11 | Copyright © Riverbank Computing Ltd and Trolltech AS 2008 | Qt 4.4.1 |