|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.phonon.VideoWidget
public class VideoWidget
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()
.
Resizing of the video is handled automatically, but you can affect the way the video is resized with the aspectRatio and scaleMode properties. By default, the widget will use the aspect ratio of the video stream itself.
The video widget takes the size of the video when it receives a new video stream (i.e., when a new MediaSource
is set on the MediaObject
to which it is connected). If you need to know the size of the video, you can call sizeHint()
after the video has been loaded (i.e., after the MediaObject
leaves the LoadingState
).
It is also possible to go to full screen
mode.
A typical example of usage follows below:
MediaObject *media = new MediaObject(parent); VideoWidget *vwidget = new VideoWidget(parent); Phonon::createPath(media, vwidget);
Nested Class Summary | |
---|---|
static class |
VideoWidget.AspectRatio
Defines the width.height to be used for the video. |
static class |
VideoWidget.ScaleMode
The ScaleMode enum describes how to treat aspect ratio during resizing of video. |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
VideoWidget()
Constructs a new video widget with a parent. |
|
VideoWidget(QWidget parent)
Constructs a new video widget with a parent. |
Method Summary | |
---|---|
VideoWidget.AspectRatio |
aspectRatio()
Defaults to AspectRatioAuto . |
double |
brightness()
This property holds brightness of the video. |
double |
contrast()
This property holds the contrast of the video. |
void |
enterFullScreen()
Convenience slot, calling setFullScreen(true) |
void |
exitFullScreen()
Convenience slot, calling setFullScreen(false) |
double |
hue()
This property holds the hue of the video. |
java.util.List |
inputPaths()
Returns the paths that inputs multimedia to this media node. |
boolean |
isValid()
Returns true if the backend provides an implementation of this class; otherwise returns false. |
java.util.List |
outputPaths()
Returns the paths to which this media node outputs media. |
double |
saturation()
This property holds saturation of the video. |
VideoWidget.ScaleMode |
scaleMode()
If the size of the widget and the size of the video are not equal. |
void |
setAspectRatio(VideoWidget.AspectRatio arg__1)
Defaults to AspectRatioAuto . |
void |
setBrightness(double value)
This property holds brightness of the video. |
void |
setContrast(double value)
This property holds the contrast of the video. |
void |
setFullScreen(boolean fullscreen)
This property holds whether the video is shown using the complete screen. |
void |
setHue(double value)
This property holds the hue of the video. |
void |
setSaturation(double value)
This property holds saturation of the video. |
void |
setScaleMode(VideoWidget.ScaleMode arg__1)
If the size of the widget and the size of the video are not equal. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public VideoWidget()
public VideoWidget(QWidget parent)
Method Detail |
---|
public final VideoWidget.AspectRatio aspectRatio()
AspectRatioAuto
. AspectRatio
.
public final double brightness()
Default is 0. Acceptable values are in range of -1, 1.
public final double contrast()
Default is 0. Acceptable values are in range of -1, 1.
public final void enterFullScreen()
public final void exitFullScreen()
public final double hue()
Default is 0. Acceptable values are in range of -1, 1.
public final java.util.List inputPaths()
outputPaths()
.
public final boolean isValid()
This does not guarantee that instances of the class works as expected, but that the backend has implemented the functionality for this class. For instance, Qt's GStreamer backend will return true for instances of the AudioOutput
class, even if there is a problem with GStreamer and it could not play sound.
public final java.util.List outputPaths()
inputPaths()
.
public final double saturation()
Default is 0. Acceptable values are in range of -1, 1.
public final VideoWidget.ScaleMode scaleMode()
public final void setAspectRatio(VideoWidget.AspectRatio arg__1)
AspectRatioAuto
. AspectRatio
.
public final void setBrightness(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setContrast(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setFullScreen(boolean fullscreen)
The property differs from QWidget::fullScreen
in that it is writeable.
By default the widget is not shown in fullScreen
.
Warning: When switching to full screen mode using setFullScreen()
, the widget onto which the video is rendered is shown as a top-level window. Key event forwarding is handled by VideoWidget, but if you need to handle other events, e.g., mouse events, you should handle fullscreen mode yourself.
public final void setHue(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setSaturation(double value)
Default is 0. Acceptable values are in range of -1, 1.
public final void setScaleMode(VideoWidget.ScaleMode arg__1)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |