1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<?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>QAbstractVideoBuffer 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">  </td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractVideoBuffer Class Reference<br /><sup><sup>[<a href="qtmultimedia.html">QtMultimedia</a> module]</sup></sup></h1><p>The QAbstractVideoBuffer class is an abstraction for video data. <a href="#details">More...</a></p>
<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qabstractvideobuffer.html#HandleType-enum">HandleType</a></b> { NoHandle, GLTextureHandle, UserHandle }</li><li><div class="fn" />enum <b><a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a></b> { NotMapped, ReadOnly, WriteOnly, ReadWrite }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractvideobuffer.html#QAbstractVideoBuffer">__init__</a></b> (<i>self</i>, HandleType)</li><li><div class="fn" />QVariant <b><a href="qabstractvideobuffer.html#handle">handle</a></b> (<i>self</i>)</li><li><div class="fn" />HandleType <b><a href="qabstractvideobuffer.html#handleType">handleType</a></b> (<i>self</i>)</li><li><div class="fn" />(sip.voidptr, int, int) <b><a href="qabstractvideobuffer.html#map">map</a></b> (<i>self</i>, MapMode)</li><li><div class="fn" />MapMode <b><a href="qabstractvideobuffer.html#mapMode">mapMode</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qabstractvideobuffer.html#unmap">unmap</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractVideoBuffer class is an abstraction for video data.</p>
<p>The <a href="qvideoframe.html">QVideoFrame</a> class makes use of a QAbstractVideoBuffer internally to reference a buffer of video data. Creating a subclass of QAbstractVideoBuffer will allow you to construct video frames from preallocated or static buffers.</p>
<p>The contents of a buffer can be accessed by mapping the buffer to memory using the <a href="qabstractvideobuffer.html#map">map</a>() function which returns a pointer to memory containing the contents of the the video buffer. The memory returned by <a href="qabstractvideobuffer.html#map">map</a>() is released by calling the <a href="qabstractvideobuffer.html#unmap">unmap</a>() function.</p>
<p>The <a href="qabstractvideobuffer.html#handle">handle</a>() of a buffer may also be used to manipulate it's contents using type specific APIs. The type of a buffer's handle is given by the <a href="qabstractvideobuffer.html#handleType">handleType</a>() function.</p>
<p>See also <a href="qvideoframe.html">QVideoFrame</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="HandleType-enum" />QAbstractVideoBuffer.HandleType</h3><p>Identifies the type of a video buffers handle.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.NoHandle</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The buffer has no handle, its data can only be accessed by mapping the buffer.</td></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.GLTextureHandle</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The handle of the buffer is an OpenGL texture ID.</td></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.UserHandle</tt></td><td align="center" valign="top"><tt>1000</tt></td><td valign="top">Start value for user defined handle types.</td></tr>
</table></p>
<p>See also <a href="qabstractvideobuffer.html#handleType">handleType</a>().</p>
<a name="//apple_ref/cpp/tag/QAbstractVideoBuffer/MapMode" />
<a name="//apple_ref/cpp/econst/QAbstractVideoBuffer/NotMapped" />
<a name="//apple_ref/cpp/econst/QAbstractVideoBuffer/ReadOnly" />
<a name="//apple_ref/cpp/econst/QAbstractVideoBuffer/WriteOnly" />
<a name="//apple_ref/cpp/econst/QAbstractVideoBuffer/ReadWrite" />
<h3 class="fn"><a name="MapMode-enum" />QAbstractVideoBuffer.MapMode</h3><p>Enumerates how a video buffer's data is mapped to memory.</p>
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.NotMapped</tt></td><td align="center" valign="top"><tt>0x00</tt></td><td valign="top">The video buffer has is not mapped to memory.</td></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.ReadOnly</tt></td><td align="center" valign="top"><tt>0x01</tt></td><td valign="top">The mapped memory is populated with data from the video buffer when mapped, but the content of the mapped memory may be discarded when unmapped.</td></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.WriteOnly</tt></td><td align="center" valign="top"><tt>0x02</tt></td><td valign="top">The mapped memory in unitialized when mapped, and the content will be used to populate the video buffer when unmapped.</td></tr>
<tr><td valign="top"><tt>QAbstractVideoBuffer.ReadWrite</tt></td><td align="center" valign="top"><tt>ReadOnly | WriteOnly</tt></td><td valign="top">The mapped memory is populated with data from the video buffer, and the video buffer is repopulated with the content of the mapped memory.</td></tr>
</table></p>
<p>See also <a href="qabstractvideobuffer.html#mapMode">mapMode</a>() and <a href="qabstractvideobuffer.html#map">map</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractVideoBuffer" />QAbstractVideoBuffer.__init__ (<i>self</i>, <a href="qabstractvideobuffer.html#HandleType-enum">HandleType</a>)</h3><p>Constructs an abstract video buffer of the given <i>type</i>.</p>
<a name="//apple_ref/cpp/instm/QAbstractVideoBuffer/~QAbstractVideoBuffer" />
<h3 class="fn"><a name="handle" />QVariant QAbstractVideoBuffer.handle (<i>self</i>)</h3><p>Returns a type specific handle to the data buffer.</p>
<p>The type of the handle is given by <a href="qabstractvideobuffer.html#handleType">handleType</a>() function.</p>
<p>See also <a href="qabstractvideobuffer.html#handleType">handleType</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractVideoBuffer/handleType" />
<h3 class="fn"><a name="handleType" /><a href="qabstractvideobuffer.html#HandleType-enum">HandleType</a> QAbstractVideoBuffer.handleType (<i>self</i>)</h3><p>Returns the type of a video buffer's handle.</p>
<p>See also <a href="qabstractvideobuffer.html#handle">handle</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractVideoBuffer/map" />
<h3 class="fn"><a name="map" />(sip.voidptr, int, int) QAbstractVideoBuffer.map (<i>self</i>, <a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Maps the contents of a video buffer to memory.</p>
<p>The map <i>mode</i> indicates whether the contents of the mapped memory should be read from and/or written to the buffer. If the map mode includes the <a href="qabstractvideobuffer.html#MapMode-enum">QAbstractVideoBuffer.ReadOnly</a> flag the mapped memory will be populated with the content of the video buffer when mapped. If the map mode includes the <a href="qabstractvideobuffer.html#MapMode-enum">QAbstractVideoBuffer.WriteOnly</a> flag the content of the mapped memory will be persisted in the buffer when unmapped.</p>
<p>When access to the data is no longer needed be sure to call the <a href="qabstractvideobuffer.html#unmap">unmap</a>() function to release the mapped memory.</p>
<p>Returns a pointer to the mapped memory region, or a null pointer if the mapping failed. The size in bytes of the mapped memory region is returned in <i>numBytes</i>, and the line stride in <i>bytesPerLine</i>.</p>
<p>When access to the data is no longer needed be sure to <a href="qabstractvideobuffer.html#unmap">unmap</a>() the buffer.</p>
<p><b>Note:</b> Writing to memory that is mapped as read-only is undefined, and may result in changes to shared data.</p>
<p>See also <a href="qabstractvideobuffer.html#unmap">unmap</a>() and <a href="qabstractvideobuffer.html#mapMode">mapMode</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractVideoBuffer/mapMode" />
<h3 class="fn"><a name="mapMode" /><a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a> QAbstractVideoBuffer.mapMode (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the mode a video buffer is mapped in.</p>
<p>See also <a href="qabstractvideobuffer.html#map">map</a>().</p>
<a name="//apple_ref/cpp/instm/QAbstractVideoBuffer/unmap" />
<h3 class="fn"><a name="unmap" />QAbstractVideoBuffer.unmap (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Releases the memory mapped by the <a href="qabstractvideobuffer.html#map">map</a>() function</p>
<p>If the <a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a> included the <a href="qabstractvideobuffer.html#MapMode-enum">QAbstractVideoBuffer.WriteOnly</a> flag this will persist the current content of the mapped memory to the video frame.</p>
<p>See also <a href="qabstractvideobuffer.html#map">map</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.7.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt 4.6.2</td></tr></table></div></address></body></html>
|