qtmobility/src/multimedia/qvideowindowcontrol.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
    44 QT_BEGIN_NAMESPACE
    44 QT_BEGIN_NAMESPACE
    45 
    45 
    46 /*!
    46 /*!
    47     \class QVideoWindowControl
    47     \class QVideoWindowControl
    48     \preliminary
    48     \preliminary
    49     \ingroup multimedia-serv
    49     \ingroup multimedia
    50     \brief The QVideoWindowControl class provides a media control for rendering video to a window.
    50     \brief The QVideoWindowControl class provides a media control for rendering video to a window.
    51 
    51 
    52 
    52 
    53     The winId() property QVideoWindowControl allows a platform specific
    53     The winId() property QVideoWindowControl allows a platform specific window
    54     window ID to be set as the video render target of a QMediaService.  The
    54     ID to be set as the video render target of a QMediaService.  The
    55     displayRect() property is used to set the region of the window the
    55     displayRect() property is used to set the region of the window the video
    56     video should be rendered to, and the aspectRatioMode() property
    56     should be rendered to, and the aspectRatioMode() property indicates how the
    57     indicates how the video should be scaled to fit the displayRect().
    57     video should be scaled to fit the displayRect().
    58 
    58 
    59     \code
    59     \code
    60     QVideoWindowControl *windowControl = mediaService->control<QVideoWindowControl *>();
    60     QVideoWindowControl *windowControl = mediaService->requestControl<QVideoWindowControl *>();
    61     windowControl->setWinId(widget->winId());
    61     windowControl->setWinId(widget->winId());
    62     windowControl->setDisplayRect(widget->rect());
    62     windowControl->setDisplayRect(widget->rect());
    63     windowControl->setAspectRatioMode(Qt::KeepAspectRatio);
    63     windowControl->setAspectRatioMode(Qt::KeepAspectRatio);
    64     \endcode
    64     \endcode
    65 
    65 
    66     QVideoWindowControl is one of number of possible video output controls,
    66     QVideoWindowControl is one of number of possible video output controls, in
    67     in order to receive video it must be made the active video output
    67     order to receive video it must be made the active video output control by
    68     control by setting the output property of QVideoOutputControl to \l {QVideoOutputControl::WindowOutput}{WindowOutput}.
    68     setting the output property of QVideoOutputControl to \l
    69     Consequently any QMediaService that implements QVideoWindowControl must
    69     {QVideoOutputControl::WindowOutput}{WindowOutput}.  Consequently any
    70     also implement QVideoOutputControl.
    70     QMediaService that implements QVideoWindowControl must also implement
       
    71     QVideoOutputControl.
    71 
    72 
    72     \code
    73     \code
    73     QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>();
    74     QVideoOutputControl *outputControl = mediaService->control<QVideoOutputControl *>();
    74     outputControl->setOutput(QVideoOutputControl::WindowOutput);
    75     outputControl->setOutput(QVideoOutputControl::WindowOutput);
    75     \endcode
    76     \endcode
    76 
    77 
    77     The interface name of QVideoWindowControl is \c com.nokia.Qt.QVideoWindowControl/1.0 as
    78     The interface name of QVideoWindowControl is \c com.nokia.Qt.QVideoWindowControl/1.0 as
    78     defined in QVideoWindowControl_iid.
    79     defined in QVideoWindowControl_iid.
    79 
    80 
    80     \sa QMediaService::control(), QVideoOutputControl, QVideoWidget
    81     \sa QMediaService::requestControl(), QVideoOutputControl, QVideoWidget
    81 */
    82 */
    82 
    83 
    83 /*!
    84 /*!
    84     \macro QVideoWindowControl_iid
    85     \macro QVideoWindowControl_iid
    85 
    86