Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 9ee5ef51dbf4a00567f58cff4d0e160c > files > 288

qtmultimedia5-doc-5.9.4-1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativevideooutput.cpp -->
  <title>VideoOutput QML Type | Qt Multimedia 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtmultimedia-index.html">Qt Multimedia</a></td><td ><a href="qtmultimedia-qmlmodule.html">QML Types</a></td><td >VideoOutput QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">VideoOutput QML Type</h1>
<span class="subtitle"></span>
<!-- $$$VideoOutput-brief -->
<p>Render video or camera viewfinder. <a href="#details">More...</a></p>
<!-- @@@VideoOutput -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtMultimedia 5.8</td></tr></table></div><ul>
<li><a href="qml-qtmultimedia-videooutput-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#autoOrientation-prop">autoOrientation</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#contentRect-prop">contentRect</a></b></b> : rectangle</li>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#fillMode-prop">fillMode</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#filters-prop">filters</a></b></b> : list&lt;object&gt;</li>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#orientation-prop">orientation</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#source-prop">source</a></b></b> : variant</li>
<li class="fn"><b><b><a href="qml-qtmultimedia-videooutput.html#sourceRect-prop">sourceRect</a></b></b> : rectangle</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">QPointF <b><b><a href="qml-qtmultimedia-videooutput.html#mapNormalizedPointToItem-method">mapNormalizedPointToItem</a></b></b>(const QPointF &amp;<i>point</i>)</li>
<li class="fn">QRectF <b><b><a href="qml-qtmultimedia-videooutput.html#mapNormalizedRectToItem-method">mapNormalizedRectToItem</a></b></b>(const QRectF &amp;<i>rectangle</i>)</li>
<li class="fn">QPointF <b><b><a href="qml-qtmultimedia-videooutput.html#mapPointToItem-method">mapPointToItem</a></b></b>(const QPointF &amp;<i>point</i>)</li>
<li class="fn">QPointF <b><b><a href="qml-qtmultimedia-videooutput.html#mapPointToSource-method">mapPointToSource</a></b></b>(const QPointF &amp;<i>point</i>)</li>
<li class="fn">QPointF <b><b><a href="qml-qtmultimedia-videooutput.html#mapPointToSourceNormalized-method">mapPointToSourceNormalized</a></b></b>(const QPointF &amp;<i>point</i>)</li>
<li class="fn">QRectF <b><b><a href="qml-qtmultimedia-videooutput.html#mapRectToItem-method">mapRectToItem</a></b></b>(const QRectF &amp;<i>rectangle</i>)</li>
<li class="fn">QRectF <b><b><a href="qml-qtmultimedia-videooutput.html#mapRectToSource-method">mapRectToSource</a></b></b>(const QRectF &amp;<i>rectangle</i>)</li>
<li class="fn">QRectF <b><b><a href="qml-qtmultimedia-videooutput.html#mapRectToSourceNormalized-method">mapRectToSourceNormalized</a></b></b>(const QRectF &amp;<i>rectangle</i>)</li>
</ul>
<!-- $$$VideoOutput-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<pre class="qml">

  <span class="type">Rectangle</span> {
      <span class="name">width</span>: <span class="number">800</span>
      <span class="name">height</span>: <span class="number">600</span>
      <span class="name">color</span>: <span class="string">&quot;black&quot;</span>

      <span class="type"><a href="qml-qtmultimedia-mediaplayer.html">MediaPlayer</a></span> {
          <span class="name">id</span>: <span class="name">player</span>
          <span class="name">source</span>: <span class="string">&quot;file://video.webm&quot;</span>
          <span class="name">autoPlay</span>: <span class="number">true</span>
      }

      <span class="type"><a href="qml-qtmultimedia-videooutput.html">VideoOutput</a></span> {
          <span class="name">id</span>: <span class="name">videoOutput</span>
          <span class="name">source</span>: <span class="name">player</span>
          <span class="name">anchors</span>.fill: <span class="name">parent</span>
      }
  }

</pre>
<p>The <a href="qml-qtmultimedia-videooutput.html">VideoOutput</a> item supports untransformed, stretched, and uniformly scaled video presentation. For a description of stretched uniformly scaled presentation, see the <a href="qml-qtmultimedia-videooutput.html#fillMode-prop">fillMode</a> property description.</p>
<p>The <a href="qml-qtmultimedia-videooutput.html">VideoOutput</a> item works with backends that support either <a href="qvideorenderercontrol.html">QVideoRendererControl</a> or <a href="qvideowindowcontrol.html">QVideoWindowControl</a>. If the backend only supports <a href="qvideowindowcontrol.html">QVideoWindowControl</a>, the video is rendered onto an overlay window that is layered on top of the QtQuick window. Due to the nature of the video overlays, certain features are not available for these kind of backends:</p>
<ul>
<li>Some transformations like rotations</li>
<li>Having other QtQuick items on top of the <a href="qml-qtmultimedia-videooutput.html">VideoOutput</a> item</li>
</ul>
<p>Most backends however do support <a href="qvideorenderercontrol.html">QVideoRendererControl</a> and therefore don't have the limitations listed above.</p>
<p><b>See also </b><a href="qml-qtmultimedia-mediaplayer.html">MediaPlayer</a> and <a href="qml-multimedia.html#camera">Camera</a>.</p>
<!-- @@@VideoOutput -->
<h2>Property Documentation</h2>
<!-- $$$autoOrientation -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="autoOrientation-prop">
<td class="tblQmlPropNode"><p>
<a name="autoOrientation-prop"></a><span class="name">autoOrientation</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property allows you to enable and disable auto orientation of the video stream, so that its orientation always matches the orientation of the screen. If <code>autoOrientation</code> is enabled, the <code>orientation</code> property is overwritten.</p>
<p>By default <code>autoOrientation</code> is disabled.</p>
<p>This QML property was introduced in  QtMultimedia 5.2.</p>
<p><b>See also </b><a href="qml-qtmultimedia-videooutput.html#orientation-prop">orientation</a>.</p>
</div></div><!-- @@@autoOrientation -->
<br/>
<!-- $$$contentRect -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="contentRect-prop">
<td class="tblQmlPropNode"><p>
<a name="contentRect-prop"></a><span class="name">contentRect</span> : <span class="type">rectangle</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the item coordinates of the area that would contain video to render. With certain fill modes, this rectangle will be larger than the visible area of the <code>VideoOutput</code>.</p>
<p>This property is useful when other coordinates are specified in terms of the source dimensions - this applied for relative (normalized) frame coordinates in the range of 0 to 1.0&#x2e;</p>
<p>Areas outside this will be transparent.</p>
<p><b>See also </b><a href="qml-qtmultimedia-videooutput.html#mapRectToItem-method">mapRectToItem()</a> and <a href="qml-qtmultimedia-videooutput.html#mapPointToItem-method">mapPointToItem()</a>.</p>
</div></div><!-- @@@contentRect -->
<br/>
<!-- $$$fillMode -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="fillMode-prop">
<td class="tblQmlPropNode"><p>
<a name="fillMode-prop"></a><span class="name">fillMode</span> : <span class="type">enumeration</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Set this property to define how the video is scaled to fit the target area.</p>
<ul>
<li>Stretch - the video is scaled to fit.</li>
<li>PreserveAspectFit - the video is scaled uniformly to fit without cropping</li>
<li>PreserveAspectCrop - the video is scaled uniformly to fill, cropping if necessary</li>
</ul>
<p>The default fill mode is PreserveAspectFit.</p>
</div></div><!-- @@@fillMode -->
<br/>
<!-- $$$filters -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="filters-prop">
<td class="tblQmlPropNode"><p>
<a name="filters-prop"></a><span class="name">filters</span> : <span class="type">list</span>&lt;<span class="type">object</span>&gt;</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the list of video filters that are run on the video frames. The order of the filters in the list matches the order in which they will be invoked on the video frames. The objects in the list must be instances of a subclass of <a href="qabstractvideofilter.html">QAbstractVideoFilter</a>.</p>
<p><b>See also </b><a href="qabstractvideofilter.html">QAbstractVideoFilter</a>.</p>
</div></div><!-- @@@filters -->
<br/>
<!-- $$$orientation -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="orientation-prop">
<td class="tblQmlPropNode"><p>
<a name="orientation-prop"></a><span class="name">orientation</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>In some cases the source video stream requires a certain orientation to be correct. This includes sources like a camera viewfinder, where the displayed viewfinder should match reality, no matter what rotation the rest of the user interface has.</p>
<p>This property allows you to apply a rotation (in steps of 90 degrees) to compensate for any user interface rotation, with positive values in the anti-clockwise direction.</p>
<p>The orientation change will also affect the mapping of coordinates from source to viewport.</p>
<p><b>See also </b><a href="qml-qtmultimedia-videooutput.html#autoOrientation-prop">autoOrientation</a>.</p>
</div></div><!-- @@@orientation -->
<br/>
<!-- $$$source -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="source-prop">
<td class="tblQmlPropNode"><p>
<a name="source-prop"></a><span class="name">source</span> : <span class="type">variant</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the source item providing the video frames like <a href="qml-qtmultimedia-mediaplayer.html">MediaPlayer</a> or Camera.</p>
<p>If you are extending your own C++ classes to interoperate with <a href="qml-qtmultimedia-videooutput.html">VideoOutput</a>, you can either provide a QObject based class with a <code>mediaObject</code> property that exposes a <a href="qmediaobject.html">QMediaObject</a> derived class that has a <a href="qvideorenderercontrol.html">QVideoRendererControl</a> available, or you can provide a QObject based class with a writable <code>videoSurface</code> property that can accept a <a href="qabstractvideosurface.html">QAbstractVideoSurface</a> based class and can follow the correct protocol to deliver QVideoFrames to it.</p>
</div></div><!-- @@@source -->
<br/>
<!-- $$$sourceRect -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="sourceRect-prop">
<td class="tblQmlPropNode"><p>
<a name="sourceRect-prop"></a><span class="name">sourceRect</span> : <span class="type">rectangle</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the area of the source video content that is considered for rendering. The values are in source pixel coordinates, adjusted for the source's pixel aspect ratio.</p>
<p>Note that typically the top left corner of this rectangle will be <code>0,0</code> while the width and height will be the width and height of the input content. Only when the video source has a viewport set, these values will differ.</p>
<p>The orientation setting does not affect this rectangle.</p>
<p><b>See also </b><a href="qvideosurfaceformat.html#pixelAspectRatio">QVideoSurfaceFormat::pixelAspectRatio()</a> and <a href="qvideosurfaceformat.html#viewport">QVideoSurfaceFormat::viewport()</a>.</p>
</div></div><!-- @@@sourceRect -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$mapNormalizedPointToItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapNormalizedPointToItem-method">
<td class="tblQmlFuncNode"><p>
<a name="mapNormalizedPointToItem-method"></a><span class="type">QPointF</span> <span class="name">mapNormalizedPointToItem</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given normalized coordinates <i>point</i> (that is, each component in the range of 0 to 1.0), return the mapped point that it corresponds to (in item coordinates). This mapping is affected by the orientation.</p>
<p>Depending on the fill mode, this point may lie outside the rendered rectangle.</p>
</div></div><!-- @@@mapNormalizedPointToItem -->
<br/>
<!-- $$$mapNormalizedRectToItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapNormalizedRectToItem-method">
<td class="tblQmlFuncNode"><p>
<a name="mapNormalizedRectToItem-method"></a><span class="type">QRectF</span> <span class="name">mapNormalizedRectToItem</span>(const <span class="type">QRectF</span> &amp;<i>rectangle</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a rectangle <i>rectangle</i> in normalized coordinates (that is, each component in the range of 0 to 1.0), return the mapped rectangle that it corresponds to (in item coordinates). This mapping is affected by the orientation.</p>
<p>Depending on the fill mode, this rectangle may extend outside the rendered rectangle.</p>
</div></div><!-- @@@mapNormalizedRectToItem -->
<br/>
<!-- $$$mapPointToItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapPointToItem-method">
<td class="tblQmlFuncNode"><p>
<a name="mapPointToItem-method"></a><span class="type">QPointF</span> <span class="name">mapPointToItem</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a point <i>point</i> in source coordinates, return the corresponding point in item coordinates. This mapping is affected by the orientation.</p>
<p>Depending on the fill mode, this point may lie outside the rendered rectangle.</p>
</div></div><!-- @@@mapPointToItem -->
<br/>
<!-- $$$mapPointToSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapPointToSource-method">
<td class="tblQmlFuncNode"><p>
<a name="mapPointToSource-method"></a><span class="type">QPointF</span> <span class="name">mapPointToSource</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a point <i>point</i> in item coordinates, return the corresponding point in source coordinates. This mapping is affected by the orientation.</p>
<p>If the supplied point lies outside the rendered area, the returned point will be outside the source rectangle.</p>
</div></div><!-- @@@mapPointToSource -->
<br/>
<!-- $$$mapPointToSourceNormalized -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapPointToSourceNormalized-method">
<td class="tblQmlFuncNode"><p>
<a name="mapPointToSourceNormalized-method"></a><span class="type">QPointF</span> <span class="name">mapPointToSourceNormalized</span>(const <span class="type">QPointF</span> &amp;<i>point</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a point <i>point</i> in item coordinates, return the corresponding point in normalized source coordinates. This mapping is affected by the orientation.</p>
<p>If the supplied point lies outside the rendered area, the returned point will be outside the source rectangle. No clamping is performed.</p>
</div></div><!-- @@@mapPointToSourceNormalized -->
<br/>
<!-- $$$mapRectToItem -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapRectToItem-method">
<td class="tblQmlFuncNode"><p>
<a name="mapRectToItem-method"></a><span class="type">QRectF</span> <span class="name">mapRectToItem</span>(const <span class="type">QRectF</span> &amp;<i>rectangle</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a rectangle <i>rectangle</i> in source coordinates, return the corresponding rectangle in item coordinates. This mapping is affected by the orientation.</p>
<p>Depending on the fill mode, this rectangle may extend outside the rendered rectangle.</p>
</div></div><!-- @@@mapRectToItem -->
<br/>
<!-- $$$mapRectToSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapRectToSource-method">
<td class="tblQmlFuncNode"><p>
<a name="mapRectToSource-method"></a><span class="type">QRectF</span> <span class="name">mapRectToSource</span>(const <span class="type">QRectF</span> &amp;<i>rectangle</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a rectangle <i>rectangle</i> in item coordinates, return the corresponding rectangle in source coordinates. This mapping is affected by the orientation.</p>
<p>This mapping is affected by the orientation.</p>
<p>If the supplied point lies outside the rendered area, the returned point will be outside the source rectangle.</p>
</div></div><!-- @@@mapRectToSource -->
<br/>
<!-- $$$mapRectToSourceNormalized -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="mapRectToSourceNormalized-method">
<td class="tblQmlFuncNode"><p>
<a name="mapRectToSourceNormalized-method"></a><span class="type">QRectF</span> <span class="name">mapRectToSourceNormalized</span>(const <span class="type">QRectF</span> &amp;<i>rectangle</i>) const</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Given a rectangle <i>rectangle</i> in item coordinates, return the corresponding rectangle in normalized source coordinates. This mapping is affected by the orientation.</p>
<p>This mapping is affected by the orientation.</p>
<p>If the supplied point lies outside the rendered area, the returned point will be outside the source rectangle. No clamping is performed.</p>
</div></div><!-- @@@mapRectToSourceNormalized -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>