Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 1253

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QVideoSurfaceFormat Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QVideoSurfaceFormat Class Reference<br /><sup><sup>[<a href="qtmultimedia.html">QtMultimedia</a> module]</sup></sup></h1><p>The QVideoSurfaceFormat class specifies the stream format of a
video presentation surface. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qvideosurfaceformat.html#Direction-enum">Direction</a></b> { TopToBottom, BottomToTop }</li><li><div class="fn" />enum <b><a href="qvideosurfaceformat.html#YCbCrColorSpace-enum">YCbCrColorSpace</a></b> { YCbCr_Undefined, YCbCr_BT601, YCbCr_BT709, YCbCr_xvYCC601, YCbCr_xvYCC709, YCbCr_JPEG }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qvideosurfaceformat.html#QVideoSurfaceFormat">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#QVideoSurfaceFormat-2">__init__</a></b> (<i>self</i>, QSize&#160;<i>size</i>, QVideoFrame.PixelFormat&#160;<i>format</i>, QAbstractVideoBuffer.HandleType&#160;<i>type</i>&#160;=&#160;QAbstractVideoBuffer.NoHandle)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#QVideoSurfaceFormat-3">__init__</a></b> (<i>self</i>, QVideoSurfaceFormat&#160;<i>format</i>)</li><li><div class="fn" />int <b><a href="qvideosurfaceformat.html#frameHeight">frameHeight</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qvideosurfaceformat.html#frameRate">frameRate</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qvideosurfaceformat.html#frameSize">frameSize</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qvideosurfaceformat.html#frameWidth">frameWidth</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractVideoBuffer.HandleType <b><a href="qvideosurfaceformat.html#handleType">handleType</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qvideosurfaceformat.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qvideosurfaceformat.html#pixelAspectRatio">pixelAspectRatio</a></b> (<i>self</i>)</li><li><div class="fn" />QVideoFrame.PixelFormat <b><a href="qvideosurfaceformat.html#pixelFormat">pixelFormat</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qvideosurfaceformat.html#property">property</a></b> (<i>self</i>, str&#160;<i>name</i>)</li><li><div class="fn" />list-of-QByteArray <b><a href="qvideosurfaceformat.html#propertyNames">propertyNames</a></b> (<i>self</i>)</li><li><div class="fn" />Direction <b><a href="qvideosurfaceformat.html#scanLineDirection">scanLineDirection</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setFrameRate">setFrameRate</a></b> (<i>self</i>, float&#160;<i>rate</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setFrameSize">setFrameSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setFrameSize-2">setFrameSize</a></b> (<i>self</i>, int&#160;<i>width</i>, int&#160;<i>height</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setPixelAspectRatio">setPixelAspectRatio</a></b> (<i>self</i>, QSize&#160;<i>ratio</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setPixelAspectRatio-2">setPixelAspectRatio</a></b> (<i>self</i>, int&#160;<i>width</i>, int&#160;<i>height</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setProperty">setProperty</a></b> (<i>self</i>, str&#160;<i>name</i>, QVariant&#160;<i>value</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setScanLineDirection">setScanLineDirection</a></b> (<i>self</i>, Direction&#160;<i>direction</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setViewport">setViewport</a></b> (<i>self</i>, QRect&#160;<i>viewport</i>)</li><li><div class="fn" /><b><a href="qvideosurfaceformat.html#setYCbCrColorSpace">setYCbCrColorSpace</a></b> (<i>self</i>, YCbCrColorSpace&#160;<i>colorSpace</i>)</li><li><div class="fn" />QSize <b><a href="qvideosurfaceformat.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qvideosurfaceformat.html#viewport">viewport</a></b> (<i>self</i>)</li><li><div class="fn" />YCbCrColorSpace <b><a href="qvideosurfaceformat.html#yCbCrColorSpace">yCbCrColorSpace</a></b> (<i>self</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" />bool <b><a href="qvideosurfaceformat.html#__eq__">__eq__</a></b> (<i>self</i>, QVideoSurfaceFormat&#160;<i>format</i>)</li><li><div class="fn" />bool <b><a href="qvideosurfaceformat.html#__ne__">__ne__</a></b> (<i>self</i>, QVideoSurfaceFormat&#160;<i>format</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QVideoSurfaceFormat class specifies the stream format of a
video presentation surface.</p>
<p>A video surface presents a stream of video frames. The surface's
format describes the type of the frames and determines how they
should be presented.</p>
<p>The core properties of a video stream required to setup a video
surface are the pixel format given by <a href="qvideosurfaceformat.html#pixelFormat">pixelFormat</a>(), and the
frame dimensions given by <a href="qvideosurfaceformat.html#frameSize">frameSize</a>().</p>
<p>If the surface is to present frames using a frame's handle a
surface format will also include a handle type which is given by
the <a href="qvideosurfaceformat.html#handleType">handleType</a>()
function.</p>
<p>The region of a frame that is actually displayed on a video
surface is given by the <a href="qvideosurfaceformat.html#viewport">viewport</a>(). A stream may
have a viewport less than the entire region of a frame to allow for
videos smaller than the nearest optimal size of a video frame. For
example the width of a frame may be extended so that the start of
each scan line is eight byte aligned.</p>
<p>Other common properties are the <a href="qvideosurfaceformat.html#pixelAspectRatio">pixelAspectRatio</a>(),
<a href="qvideosurfaceformat.html#scanLineDirection">scanLineDirection</a>(),
and <a href="qvideosurfaceformat.html#frameRate">frameRate</a>().
Additionally a stream may have some additional type specific
properties which are listed by the dynamicPropertyNames() function
and can be accessed using the <a href="qvideosurfaceformat.html#property">property</a>(), and <a href="qvideosurfaceformat.html#setProperty">setProperty</a>()
functions.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Direction-enum" />QVideoSurfaceFormat.Direction</h3><p>Enumerates the layout direction of video scan lines.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QVideoSurfaceFormat.TopToBottom</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">Scan lines are arranged from the top of the
frame to the bottom.</td>
</tr>
<tr>
<td class="topAlign"><tt>QVideoSurfaceFormat.BottomToTop</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">Scan lines are arranged from the bottom of the
frame to the top.</td>
</tr>
</table>


<h3 class="fn"><a name="YCbCrColorSpace-enum" />QVideoSurfaceFormat.YCbCrColorSpace</h3><p>Enumerates the Y'CbCr color space of video frames.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign">
<tt>QVideoSurfaceFormat.YCbCr_Undefined</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">No color space is specified.</td>
</tr>
<tr>
<td class="topAlign"><tt>QVideoSurfaceFormat.YCbCr_BT601</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">A Y'CbCr color space defined by ITU-R
recommendation BT.601 with Y value range from 16 to 235, and Cb/Cr
range from 16 to 240. Used in standard definition video.</td>
</tr>
<tr>
<td class="topAlign"><tt>QVideoSurfaceFormat.YCbCr_BT709</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">A Y'CbCr color space defined by ITU-R BT.709
with the same values range as YCbCr_BT601. Used for HDTV.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QVideoSurfaceFormat.YCbCr_xvYCC601</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The BT.601 color space with the value range
extended to 0 to 255. It is backward compatibile with BT.601 and
uses values outside BT.601 range to represent wider colors
range.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QVideoSurfaceFormat.YCbCr_xvYCC709</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The BT.709 color space with the value range
extended to 0 to 255.</td>
</tr>
<tr>
<td class="topAlign"><tt>QVideoSurfaceFormat.YCbCr_JPEG</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The full range Y'CbCr color space used in JPEG
files.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QVideoSurfaceFormat" />QVideoSurfaceFormat.__init__ (<i>self</i>)</h3><p>Constructs a null video stream format.</p>


<h3 class="fn"><a name="QVideoSurfaceFormat-2" />QVideoSurfaceFormat.__init__ (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>, <a href="qvideoframe.html#PixelFormat-enum">QVideoFrame.PixelFormat</a>&#160;<i>format</i>, <a href="qabstractvideobuffer.html#HandleType-enum">QAbstractVideoBuffer.HandleType</a>&#160;<i>type</i>&#160;=&#160;QAbstractVideoBuffer.NoHandle)</h3><p>Contructs a description of stream which receives stream of
<i>type</i> buffers with given frame <i>size</i> and pixel
<i>format</i>.</p>


<h3 class="fn"><a name="QVideoSurfaceFormat-3" />QVideoSurfaceFormat.__init__ (<i>self</i>, <a href="qvideosurfaceformat.html">QVideoSurfaceFormat</a>&#160;<i>format</i>)</h3><p>Constructs a copy of <i>other</i>.</p>


<h3 class="fn"><a name="frameHeight" />int QVideoSurfaceFormat.frameHeight (<i>self</i>)</h3><p>Returns the height of frame in a video stream.</p>


<h3 class="fn"><a name="frameRate" />float QVideoSurfaceFormat.frameRate (<i>self</i>)</h3><p>Returns the frame rate of a video stream in frames per
second.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setFrameRate">setFrameRate</a>().</p>


<h3 class="fn"><a name="frameSize" /><a href="qsize.html">QSize</a> QVideoSurfaceFormat.frameSize (<i>self</i>)</h3><p>Returns the size of frames in a video stream.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setFrameSize">setFrameSize</a>(),
<a href="qvideosurfaceformat.html#frameWidth">frameWidth</a>(), and
<a href="qvideosurfaceformat.html#frameHeight">frameHeight</a>().</p>


<h3 class="fn"><a name="frameWidth" />int QVideoSurfaceFormat.frameWidth (<i>self</i>)</h3><p>Returns the width of frames in a video stream.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#frameSize">frameSize</a>() and <a href="qvideosurfaceformat.html#frameHeight">frameHeight</a>().</p>


<h3 class="fn"><a name="handleType" /><a href="qabstractvideobuffer.html#HandleType-enum">QAbstractVideoBuffer.HandleType</a> QVideoSurfaceFormat.handleType (<i>self</i>)</h3><p>Returns the type of handle the surface uses to present the frame
data.</p>
<p>If the handle type is <a href="qabstractvideobuffer.html#HandleType-enum">QAbstractVideoBuffer.NoHandle</a>
buffers with any handle type are valid provided they can be
<a href="qabstractvideobuffer.html#map">mapped</a> with the
<a href="qabstractvideobuffer.html#MapMode-enum">QAbstractVideoBuffer.ReadOnly</a>
flag. If the handleType() is not <a href="qabstractvideobuffer.html#HandleType-enum">QAbstractVideoBuffer.NoHandle</a>
then the handle type of the buffer be the same as that of the
surface format.</p>


<h3 class="fn"><a name="isValid" />bool QVideoSurfaceFormat.isValid (<i>self</i>)</h3><p>Identifies if a video surface format has a valid pixel format
and frame size.</p>
<p>Returns true if the format is valid, and false otherwise.</p>


<h3 class="fn"><a name="pixelAspectRatio" /><a href="qsize.html">QSize</a> QVideoSurfaceFormat.pixelAspectRatio (<i>self</i>)</h3><p>Returns a video stream's pixel aspect ratio.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setPixelAspectRatio">setPixelAspectRatio</a>().</p>


<h3 class="fn"><a name="pixelFormat" /><a href="qvideoframe.html#PixelFormat-enum">QVideoFrame.PixelFormat</a> QVideoSurfaceFormat.pixelFormat (<i>self</i>)</h3><p>Returns the pixel format of frames in a video stream.</p>


<h3 class="fn"><a name="property" />QVariant QVideoSurfaceFormat.property (<i>self</i>, str&#160;<i>name</i>)</h3><p>Returns the value of the video format's <i>name</i>
property.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setProperty">setProperty</a>().</p>


<h3 class="fn"><a name="propertyNames" />list-of-QByteArray QVideoSurfaceFormat.propertyNames (<i>self</i>)</h3><p>Returns a list of video format dynamic property names.</p>


<h3 class="fn"><a name="scanLineDirection" /><a href="qvideosurfaceformat.html#Direction-enum">Direction</a> QVideoSurfaceFormat.scanLineDirection (<i>self</i>)</h3><p>Returns the direction of scan lines.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setScanLineDirection">setScanLineDirection</a>().</p>


<h3 class="fn"><a name="setFrameRate" />QVideoSurfaceFormat.setFrameRate (<i>self</i>, float&#160;<i>rate</i>)</h3><p>Sets the frame <i>rate</i> of a video stream in frames per
second.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#frameRate">frameRate</a>().</p>


<h3 class="fn"><a name="setFrameSize" />QVideoSurfaceFormat.setFrameSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><p>Sets the size of frames in a video stream to <i>size</i>.</p>
<p>This will reset the <a href="qvideosurfaceformat.html#viewport">viewport</a>() to fill the
entire frame.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#frameSize">frameSize</a>().</p>


<h3 class="fn"><a name="setFrameSize-2" />QVideoSurfaceFormat.setFrameSize (<i>self</i>, int&#160;<i>width</i>, int&#160;<i>height</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the <i>width</i> and <i>height</i> of frames in a video
stream.</p>
<p>This will reset the <a href="qvideosurfaceformat.html#viewport">viewport</a>() to fill the
entire frame.</p>


<h3 class="fn"><a name="setPixelAspectRatio" />QVideoSurfaceFormat.setPixelAspectRatio (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>ratio</i>)</h3><p>Sets a video stream's pixel aspect <i>ratio</i>.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#pixelAspectRatio">pixelAspectRatio</a>().</p>


<h3 class="fn"><a name="setPixelAspectRatio-2" />QVideoSurfaceFormat.setPixelAspectRatio (<i>self</i>, int&#160;<i>width</i>, int&#160;<i>height</i>)</h3><p>This is an overloaded function.</p>
<p>Sets the <i>horizontal</i> and <i>vertical</i> elements of a
video stream's pixel aspect ratio.</p>


<h3 class="fn"><a name="setProperty" />QVideoSurfaceFormat.setProperty (<i>self</i>, str&#160;<i>name</i>, QVariant&#160;<i>value</i>)</h3><p>Sets the video format's <i>name</i> property to
<i>value</i>.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#property">property</a>().</p>


<h3 class="fn"><a name="setScanLineDirection" />QVideoSurfaceFormat.setScanLineDirection (<i>self</i>, <a href="qvideosurfaceformat.html#Direction-enum">Direction</a>&#160;<i>direction</i>)</h3><p>Sets the <i>direction</i> of scan lines.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#scanLineDirection">scanLineDirection</a>().</p>


<h3 class="fn"><a name="setViewport" />QVideoSurfaceFormat.setViewport (<i>self</i>, <a href="qrect.html">QRect</a>&#160;<i>viewport</i>)</h3><p>Sets the viewport of a video stream to <i>viewport</i>.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#viewport">viewport</a>().</p>


<h3 class="fn"><a name="setYCbCrColorSpace" />QVideoSurfaceFormat.setYCbCrColorSpace (<i>self</i>, <a href="qvideosurfaceformat.html#YCbCrColorSpace-enum">YCbCrColorSpace</a>&#160;<i>colorSpace</i>)</h3><p>Sets the Y'CbCr color <i>space</i> of a video stream. It is only
used with raw YUV frame types.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#yCbCrColorSpace">yCbCrColorSpace</a>().</p>


<h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QVideoSurfaceFormat.sizeHint (<i>self</i>)</h3><p>Returns a suggested size in pixels for the video stream.</p>
<p>This is the size of the viewport scaled according to the pixel
aspect ratio.</p>


<h3 class="fn"><a name="viewport" /><a href="qrect.html">QRect</a> QVideoSurfaceFormat.viewport (<i>self</i>)</h3><p>Returns the viewport of a video stream.</p>
<p>The viewport is the region of a video frame that is actually
displayed.</p>
<p>By default the viewport covers an entire frame.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setViewport">setViewport</a>().</p>


<h3 class="fn"><a name="yCbCrColorSpace" /><a href="qvideosurfaceformat.html#YCbCrColorSpace-enum">YCbCrColorSpace</a> QVideoSurfaceFormat.yCbCrColorSpace (<i>self</i>)</h3><p>Returns the Y'CbCr color space of a video stream.</p>
<p><b>See also</b> <a href="qvideosurfaceformat.html#setYCbCrColorSpace">setYCbCrColorSpace</a>().</p>


<h3 class="fn"><a name="__eq__" />bool QVideoSurfaceFormat.__eq__ (<i>self</i>, <a href="qvideosurfaceformat.html">QVideoSurfaceFormat</a>&#160;<i>format</i>)</h3><h3 class="fn"><a name="__ne__" />bool QVideoSurfaceFormat.__ne__ (<i>self</i>, <a href="qvideosurfaceformat.html">QVideoSurfaceFormat</a>&#160;<i>format</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>