This file is indexed.

/usr/share/qt5/doc/qtmultimedia/qabstractvideobuffer.html is in qtmultimedia5-doc-html 5.2.1-0ubuntu5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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>QAbstractVideoBuffer Class | QtMultimedia 5.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.2</li>
<li><a href="qtmultimedia-index.html">Qt Multimedia</a></li>
<li><a href="qtmultimedia-module.html">C++ Classes</a></li>
<li>QAbstractVideoBuffer</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<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</h1>
<!-- $$$QAbstractVideoBuffer-brief -->
<p>The QAbstractVideoBuffer class is an abstraction for video data. <a href="#details">More...</a></p>
<!-- @@@QAbstractVideoBuffer -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include &lt;QAbstractVideoBuffer&gt;</span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += multimedia</tt></td></tr></table><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#release">release</a></b>()</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. Quite often video data buffers may reside in video memory rather than system memory, and this class provides an abstraction of the location.</p>
<p>In addition, creating a subclass of QAbstractVideoBuffer will allow you to construct video frames from preallocated or static buffers, in cases where the <a href="qvideoframe.html">QVideoFrame</a> constructors taking a QByteArray or a QImage do not suffice. This may be necessary when implementing a new hardware accelerated video system, for example.</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 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 its 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 QPixmap.</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 system 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 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, but the possibly modified 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 when it is unmapped.</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">QVariant</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">uchar</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>In some cases the video buffer might be stored in video memory or otherwise inaccessible memory, so it is necessary to map the buffer before accessing the pixel data. This may involve copying the contents around, so avoid mapping and unmapping unless required.</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 <tt>QAbstractVideoBuffer::ReadOnly</tt> flag the mapped memory will be populated with the content of the buffer when initially mapped. If the map mode includes the <tt>QAbstractVideoBuffer::WriteOnly</tt> flag the content of the possibly modified mapped memory will be written back to 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 and possibly update the buffer contents.</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><b>Note: </b>Writing to memory that is mapped as read-only is undefined, and may result in changes to shared data or crashes.</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 -->
<!-- $$$release[overload1]$$$release -->
<h3 class="fn"><a name="release"></a><span class="type">void</span> QAbstractVideoBuffer::<span class="name">release</span>()<tt> [virtual]</tt></h3>
<p>Releases the video buffer.</p>
<p><a href="qvideoframe.html">QVideoFrame</a> calls QAbstractVideoBuffer::release when the buffer is not used any more and can be destroyed or returned to the buffer pool.</p>
<p>The default implementation deletes the buffer instance.</p>
<!-- @@@release -->
<!-- $$$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 <tt>QAbstractVideoBuffer::WriteOnly</tt> flag this will write the current content of the mapped memory back to the video frame.</p>
<p><b>See also </b><a href="qabstractvideobuffer.html#map">map</a>().</p>
<!-- @@@unmap -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
   subsidiaries. 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>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>