Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4830

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qabstractvideobuffer.cpp -->
  <title>Qt 4.8: QAbstractVideoBuffer Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtmultimedia.html">QtMultimedia</a></li>
<li>QAbstractVideoBuffer</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QAbstractVideoBuffer Class Reference</h1>
<!-- $$$QAbstractVideoBuffer-brief -->
<p>The QAbstractVideoBuffer class is an abstraction for video data. <a href="#details">More...</a></p>
<!-- @@@QAbstractVideoBuffer -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QAbstractVideoBuffer&gt;</span></pre><p>This class was introduced in Qt 4.6.</p>
<ul>
<li><a href="qabstractvideobuffer-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#HandleType-enum">HandleType</a></b> { NoHandle, GLTextureHandle, XvShmImageHandle, CoreImageHandle, QPixmapHandle, UserHandle }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a></b> { NotMapped, ReadOnly, WriteOnly, ReadWrite }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#QAbstractVideoBuffer">QAbstractVideoBuffer</a></b> ( HandleType <i>type</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#dtor.QAbstractVideoBuffer">~QAbstractVideoBuffer</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#handle">handle</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> HandleType </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#handleType">handleType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual uchar * </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#map">map</a></b> ( MapMode <i>mode</i>, int * <i>numBytes</i>, int * <i>bytesPerLine</i> ) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual MapMode </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#mapMode">mapMode</a></b> () const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qabstractvideobuffer.html#unmap">unmap</a></b> () = 0</td></tr>
</table>
<a name="details"></a>
<!-- $$$QAbstractVideoBuffer-description -->
<div class="descr">
<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>
</div>
<p><b>See also </b><a href="qvideoframe.html">QVideoFrame</a>.</p>
<!-- @@@QAbstractVideoBuffer -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$HandleType$$$NoHandle$$$GLTextureHandle$$$XvShmImageHandle$$$CoreImageHandle$$$QPixmapHandle$$$UserHandle -->
<h3 class="fn"><a name="HandleType-enum"></a>enum QAbstractVideoBuffer::<span class="name">HandleType</span></h3>
<p>Identifies the type of a video buffers handle.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::NoHandle</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The buffer has no handle, its data can only be accessed by mapping the buffer.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::GLTextureHandle</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The handle of the buffer is an OpenGL texture ID.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::XvShmImageHandle</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The handle contains pointer to shared memory XVideo image.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::CoreImageHandle</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The handle contains pointer to Mac OS X CIImage.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::QPixmapHandle</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The handle of the buffer is a <a href="qpixmap.html">QPixmap</a>.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::UserHandle</tt></td><td class="topAlign"><tt>1000</tt></td><td class="topAlign">Start value for user defined handle types.</td></tr>
</table>
<p><b>See also </b><a href="qabstractvideobuffer.html#handleType">handleType</a>().</p>
<!-- @@@HandleType -->
<!-- $$$MapMode$$$NotMapped$$$ReadOnly$$$WriteOnly$$$ReadWrite -->
<h3 class="fn"><a name="MapMode-enum"></a>enum QAbstractVideoBuffer::<span class="name">MapMode</span></h3>
<p>Enumerates how a video buffer's data is mapped to memory.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::NotMapped</tt></td><td class="topAlign"><tt>0x00</tt></td><td class="topAlign">The video buffer has is not mapped to memory.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::ReadOnly</tt></td><td class="topAlign"><tt>0x01</tt></td><td class="topAlign">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 class="topAlign"><tt>QAbstractVideoBuffer::WriteOnly</tt></td><td class="topAlign"><tt>0x02</tt></td><td class="topAlign">The mapped memory is uninitialized when mapped, and the content will be used to populate the video buffer when unmapped.</td></tr>
<tr><td class="topAlign"><tt>QAbstractVideoBuffer::ReadWrite</tt></td><td class="topAlign"><tt>ReadOnly | WriteOnly</tt></td><td class="topAlign">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><b>See also </b><a href="qabstractvideobuffer.html#mapMode">mapMode</a>() and <a href="qabstractvideobuffer.html#map">map</a>().</p>
<!-- @@@MapMode -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAbstractVideoBuffer[overload1]$$$QAbstractVideoBufferHandleType -->
<h3 class="fn"><a name="QAbstractVideoBuffer"></a>QAbstractVideoBuffer::<span class="name">QAbstractVideoBuffer</span> ( <span class="type"><a href="qabstractvideobuffer.html#HandleType-enum">HandleType</a></span> <i>type</i> )</h3>
<p>Constructs an abstract video buffer of the given <i>type</i>.</p>
<!-- @@@QAbstractVideoBuffer -->
<!-- $$$~QAbstractVideoBuffer[overload1]$$$~QAbstractVideoBuffer -->
<h3 class="fn"><a name="dtor.QAbstractVideoBuffer"></a>QAbstractVideoBuffer::<span class="name">~QAbstractVideoBuffer</span> ()<tt> [virtual]</tt></h3>
<p>Destroys an abstract video buffer.</p>
<!-- @@@~QAbstractVideoBuffer -->
<!-- $$$handle[overload1]$$$handle -->
<h3 class="fn"><a name="handle"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QAbstractVideoBuffer::<span class="name">handle</span> () const<tt> [virtual]</tt></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><b>See also </b><a href="qabstractvideobuffer.html#handleType">handleType</a>().</p>
<!-- @@@handle -->
<!-- $$$handleType[overload1]$$$handleType -->
<h3 class="fn"><a name="handleType"></a><span class="type"><a href="qabstractvideobuffer.html#HandleType-enum">HandleType</a></span> QAbstractVideoBuffer::<span class="name">handleType</span> () const</h3>
<p>Returns the type of a video buffer's handle.</p>
<p><b>See also </b><a href="qabstractvideobuffer.html#handle">handle</a>().</p>
<!-- @@@handleType -->
<!-- $$$map[overload1]$$$mapMapModeint*int* -->
<h3 class="fn"><a name="map"></a><span class="type"><a href="qtglobal.html#uchar-typedef">uchar</a></span> * QAbstractVideoBuffer::<span class="name">map</span> ( <span class="type"><a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a></span> <i>mode</i>, <span class="type">int</span> * <i>numBytes</i>, <span class="type">int</span> * <i>bytesPerLine</i> )<tt> [pure virtual]</tt></h3>
<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><b>See also </b><a href="qabstractvideobuffer.html#unmap">unmap</a>() and <a href="qabstractvideobuffer.html#mapMode">mapMode</a>().</p>
<!-- @@@map -->
<!-- $$$mapMode[overload1]$$$mapMode -->
<h3 class="fn"><a name="mapMode"></a><span class="type"><a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a></span> QAbstractVideoBuffer::<span class="name">mapMode</span> () const<tt> [pure virtual]</tt></h3>
<p>Returns the mode a video buffer is mapped in.</p>
<p><b>See also </b><a href="qabstractvideobuffer.html#map">map</a>().</p>
<!-- @@@mapMode -->
<!-- $$$unmap[overload1]$$$unmap -->
<h3 class="fn"><a name="unmap"></a><span class="type">void</span> QAbstractVideoBuffer::<span class="name">unmap</span> ()<tt> [pure virtual]</tt></h3>
<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><b>See also </b><a href="qabstractvideobuffer.html#map">map</a>().</p>
<!-- @@@unmap -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      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.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>