~ubuntu-branches/ubuntu/quantal/qtmobility/quantal

« back to all changes in this revision

Viewing changes to doc/html/qvideoframe.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-11-16 16:18:07 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20101116161807-k2dzt2nyse975r3l
Tags: 1.1.0-0ubuntu1
* New upstream release
* Syncronise with Debian, no remaining changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    </div>
48
48
    <div id="shortCut">
49
49
      <ul>
50
 
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Mobility 1.1 BETA</a></span></li>
 
50
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Mobility 1.1</a></span></li>
51
51
        <li class="shortCut-topleft-active"><a href="http://doc.qt.nokia.com">ALL VERSIONS        </a></li>
52
52
      </ul>
53
53
     </div>
228
228
<p>Enumerates video data types.</p>
229
229
<table class="valuelist"><tr class="odd"><tr><th>Constant</th><th>Value</th><th>Description</th></tr>
230
230
<tr><td  class="topAlign"><tt>QVideoFrame::Format_Invalid</tt></td><td class=" topAlign"><tt>0</tt></td><td  class="topAlign">The frame is invalid.</td></tr>
231
 
<tr><td  class="topAlign"><tt>QVideoFrame::Format_ARGB32</tt></td><td class=" topAlign"><tt>1</tt></td><td  class="topAlign">The frame is stored using a 32-bit ARGB format (0xAARRGGBB). This is equivalent to QImage::Format_ARGB32.</td></tr>
232
 
<tr><td  class="topAlign"><tt>QVideoFrame::Format_ARGB32_Premultiplied</tt></td><td class=" topAlign"><tt>2</tt></td><td  class="topAlign">The frame stored using a premultiplied 32-bit ARGB format (0xAARRGGBB). This is equivalent to QImage::Format_ARGB32_Premultiplied.</td></tr>
233
 
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB32</tt></td><td class=" topAlign"><tt>3</tt></td><td  class="topAlign">The frame stored using a 32-bit RGB format (0xffRRGGBB). This is equivalent to QImage::Format_RGB32</td></tr>
234
 
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB24</tt></td><td class=" topAlign"><tt>4</tt></td><td  class="topAlign">The frame is stored using a 24-bit RGB format (8-8-8). This is equivalent to QImage::Format_RGB888</td></tr>
235
 
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB565</tt></td><td class=" topAlign"><tt>5</tt></td><td  class="topAlign">The frame is stored using a 16-bit RGB format (5-6-5). This is equivalent to QImage::Format_RGB16.</td></tr>
236
 
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB555</tt></td><td class=" topAlign"><tt>6</tt></td><td  class="topAlign">The frame is stored using a 16-bit RGB format (5-5-5). This is equivalent to QImage::Format_RGB555.</td></tr>
 
231
<tr><td  class="topAlign"><tt>QVideoFrame::Format_ARGB32</tt></td><td class=" topAlign"><tt>1</tt></td><td  class="topAlign">The frame is stored using a 32-bit ARGB format (0xAARRGGBB). This is equivalent to <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_ARGB32</a>.</td></tr>
 
232
<tr><td  class="topAlign"><tt>QVideoFrame::Format_ARGB32_Premultiplied</tt></td><td class=" topAlign"><tt>2</tt></td><td  class="topAlign">The frame stored using a premultiplied 32-bit ARGB format (0xAARRGGBB). This is equivalent to <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_ARGB32_Premultiplied</a>.</td></tr>
 
233
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB32</tt></td><td class=" topAlign"><tt>3</tt></td><td  class="topAlign">The frame stored using a 32-bit RGB format (0xffRRGGBB). This is equivalent to <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_RGB32</a></td></tr>
 
234
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB24</tt></td><td class=" topAlign"><tt>4</tt></td><td  class="topAlign">The frame is stored using a 24-bit RGB format (8-8-8). This is equivalent to <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_RGB888</a></td></tr>
 
235
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB565</tt></td><td class=" topAlign"><tt>5</tt></td><td  class="topAlign">The frame is stored using a 16-bit RGB format (5-6-5). This is equivalent to <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_RGB16</a>.</td></tr>
 
236
<tr><td  class="topAlign"><tt>QVideoFrame::Format_RGB555</tt></td><td class=" topAlign"><tt>6</tt></td><td  class="topAlign">The frame is stored using a 16-bit RGB format (5-5-5). This is equivalent to <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_RGB555</a>.</td></tr>
237
237
<tr><td  class="topAlign"><tt>QVideoFrame::Format_ARGB8565_Premultiplied</tt></td><td class=" topAlign"><tt>7</tt></td><td  class="topAlign">The frame is stored using a 24-bit premultiplied ARGB format (8-6-6-5).</td></tr>
238
238
<tr><td  class="topAlign"><tt>QVideoFrame::Format_BGRA32</tt></td><td class=" topAlign"><tt>8</tt></td><td  class="topAlign">The frame is stored using a 32-bit ARGB format (0xBBGGRRAA).</td></tr>
239
239
<tr><td  class="topAlign"><tt>QVideoFrame::Format_BGRA32_Premultiplied</tt></td><td class=" topAlign"><tt>9</tt></td><td  class="topAlign">The frame is stored using a premultiplied 32bit BGRA format.</td></tr>
265
265
<h2>Member Function Documentation</h2>
266
266
<h3 class="fn"><a name="QVideoFrame"></a>QVideoFrame::QVideoFrame ()</h3>
267
267
<p>Constructs a null video frame.</p>
268
 
<h3 class="fn"><a name="QVideoFrame-2"></a>QVideoFrame::QVideoFrame ( <a href="qabstractvideobuffer.html">QAbstractVideoBuffer</a> * <i>buffer</i>, const QSize &amp; <i>size</i>, <a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> <i>format</i> )</h3>
 
268
<h3 class="fn"><a name="QVideoFrame-2"></a>QVideoFrame::QVideoFrame ( <a href="qabstractvideobuffer.html">QAbstractVideoBuffer</a> * <i>buffer</i>, const <a href="http://qt.nokia.com/doc/4.6/qsize.html">QSize</a> &amp; <i>size</i>, <a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> <i>format</i> )</h3>
269
269
<p>Constructs a video frame from a <i>buffer</i> of the given pixel <i>format</i> and <i>size</i> in pixels.</p>
270
270
<p><b>Note:</b> This doesn't increment the reference count of the video buffer.</p>
271
 
<h3 class="fn"><a name="QVideoFrame-3"></a>QVideoFrame::QVideoFrame ( int <i>bytes</i>, const QSize &amp; <i>size</i>, int <i>bytesPerLine</i>, <a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> <i>format</i> )</h3>
 
271
<h3 class="fn"><a name="QVideoFrame-3"></a>QVideoFrame::QVideoFrame ( int <i>bytes</i>, const <a href="http://qt.nokia.com/doc/4.6/qsize.html">QSize</a> &amp; <i>size</i>, int <i>bytesPerLine</i>, <a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> <i>format</i> )</h3>
272
272
<p>Constructs a video frame of the given pixel <i>format</i> and <i>size</i> in pixels.</p>
273
273
<p>The <i>bytesPerLine</i> (stride) is the length of each scan line in bytes, and <i>bytes</i> is the total number of bytes that must be allocated for the frame.</p>
274
 
<h3 class="fn"><a name="QVideoFrame-4"></a>QVideoFrame::QVideoFrame ( const QImage &amp; <i>image</i> )</h3>
 
274
<h3 class="fn"><a name="QVideoFrame-4"></a>QVideoFrame::QVideoFrame ( const <a href="http://qt.nokia.com/doc/4.6/qimage.html">QImage</a> &amp; <i>image</i> )</h3>
275
275
<p>Constructs a video frame from an <i>image</i>.</p>
276
276
<p><b>Note:</b> This will construct an invalid video frame if there is no frame type equivalent to the image format.</p>
277
277
<p>See also <a href="qvideoframe.html#pixelFormatFromImageFormat">pixelFormatFromImageFormat</a>().</p>
279
279
<p>Constructs a copy of <i>other</i>.</p>
280
280
<h3 class="fn"><a name="dtor.QVideoFrame"></a>QVideoFrame::~QVideoFrame ()</h3>
281
281
<p>Destroys a video frame.</p>
282
 
<h3 class="fn"><a name="bits"></a>uchar * QVideoFrame::bits ()</h3>
 
282
<h3 class="fn"><a name="bits"></a><a href="http://qt.nokia.com/doc/4.6/qtglobal.html#uchar-typedef">uchar</a> * QVideoFrame::bits ()</h3>
283
283
<p>Returns a pointer to the start of the frame data buffer.</p>
284
284
<p>This value is only valid while the frame data is <a href="qvideoframe.html#map">mapped</a>.</p>
285
285
<p>See also <a href="qvideoframe.html#map">map</a>(), <a href="qvideoframe.html#mappedBytes">mappedBytes</a>(), and <a href="qvideoframe.html#bytesPerLine">bytesPerLine</a>().</p>
286
 
<h3 class="fn"><a name="bits-2"></a>const uchar * QVideoFrame::bits () const</h3>
 
286
<h3 class="fn"><a name="bits-2"></a>const <a href="http://qt.nokia.com/doc/4.6/qtglobal.html#uchar-typedef">uchar</a> * QVideoFrame::bits () const</h3>
287
287
<p>Returns a pointer to the start of the frame data buffer.</p>
288
288
<p>This value is only valid while the frame data is <a href="qvideoframe.html#map">mapped</a>.</p>
289
289
<p>See also <a href="qvideoframe.html#map">map</a>(), <a href="qvideoframe.html#mappedBytes">mappedBytes</a>(), and <a href="qvideoframe.html#bytesPerLine">bytesPerLine</a>().</p>
292
292
<p><b>Note:</b> This is the bytes per line of the first plane only. The bytes per line of subsequent planes should be calculated as per the frame type.</p>
293
293
<p>This value is only valid while the frame data is <a href="qvideoframe.html#map">mapped</a>.</p>
294
294
<p>See also <a href="qvideoframe.html#bits">bits</a>(), <a href="qvideoframe.html#map">map</a>(), and <a href="qvideoframe.html#mappedBytes">mappedBytes</a>().</p>
295
 
<h3 class="fn"><a name="endTime"></a>qint64 QVideoFrame::endTime () const</h3>
 
295
<h3 class="fn"><a name="endTime"></a><a href="http://qt.nokia.com/doc/4.6/qtglobal.html#qint64-typedef">qint64</a> QVideoFrame::endTime () const</h3>
296
296
<p>Returns the presentation time when a frame should stop being displayed.</p>
297
297
<p>See also <a href="qvideoframe.html#setEndTime">setEndTime</a>().</p>
298
298
<h3 class="fn"><a name="fieldType"></a><a href="qvideoframe.html#FieldType-enum">FieldType</a> QVideoFrame::fieldType () const</h3>
299
299
<p>Returns the field an interlaced video frame belongs to.</p>
300
300
<p>If the video is not interlaced this will return WholeFrame.</p>
301
301
<p>See also <a href="qvideoframe.html#setFieldType">setFieldType</a>().</p>
302
 
<h3 class="fn"><a name="handle"></a>QVariant QVideoFrame::handle () const</h3>
 
302
<h3 class="fn"><a name="handle"></a><a href="http://qt.nokia.com/doc/4.6/qvariant.html">QVariant</a> QVideoFrame::handle () const</h3>
303
303
<p>Returns a type specific handle to a video frame's buffer.</p>
304
304
<p>For an OpenGL texture this would be the texture ID.</p>
305
305
<p>See also <a href="qabstractvideobuffer.html#handle">QAbstractVideoBuffer::handle</a>().</p>
307
307
<p>Returns the type of a video frame's handle.</p>
308
308
<h3 class="fn"><a name="height"></a>int QVideoFrame::height () const</h3>
309
309
<p>Returns the height of a video frame.</p>
310
 
<h3 class="fn"><a name="imageFormatFromPixelFormat"></a>QImage::Format QVideoFrame::imageFormatFromPixelFormat ( <a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> <i>format</i> )<tt> [static]</tt></h3>
311
 
<p>Returns an image format equivalent to a video frame pixel <i>format</i>. If there is no equivalent format QImage::Format_Invalid is returned instead.</p>
 
310
<h3 class="fn"><a name="imageFormatFromPixelFormat"></a><a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format</a> QVideoFrame::imageFormatFromPixelFormat ( <a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> <i>format</i> )<tt> [static]</tt></h3>
 
311
<p>Returns an image format equivalent to a video frame pixel <i>format</i>. If there is no equivalent format <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format_Invalid</a> is returned instead.</p>
312
312
<h3 class="fn"><a name="isMapped"></a>bool QVideoFrame::isMapped () const</h3>
313
313
<p>Identifies if a video frame's contents are currently mapped to system memory.</p>
314
314
<p>This is a convenience function which checks that the <a href="qabstractvideobuffer.html#MapMode-enum">MapMode</a> of the frame is not equal to <a href="qabstractvideobuffer.html#MapMode-enum">QAbstractVideoBuffer::NotMapped</a>.</p>
345
345
<p>See also <a href="qvideoframe.html#map">map</a>().</p>
346
346
<h3 class="fn"><a name="pixelFormat"></a><a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> QVideoFrame::pixelFormat () const</h3>
347
347
<p>Returns the color format of a video frame.</p>
348
 
<h3 class="fn"><a name="pixelFormatFromImageFormat"></a><a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> QVideoFrame::pixelFormatFromImageFormat ( QImage::Format <i>format</i> )<tt> [static]</tt></h3>
 
348
<h3 class="fn"><a name="pixelFormatFromImageFormat"></a><a href="qvideoframe.html#PixelFormat-enum">PixelFormat</a> QVideoFrame::pixelFormatFromImageFormat ( <a href="http://qt.nokia.com/doc/4.6/qimage.html#Format-enum">QImage::Format</a> <i>format</i> )<tt> [static]</tt></h3>
349
349
<p>Returns an video pixel format equivalent to an image <i>format</i>. If there is no equivalent format QVideoFrame::InvalidType is returned instead.</p>
350
 
<h3 class="fn"><a name="setEndTime"></a>void QVideoFrame::setEndTime ( qint64 <i>time</i> )</h3>
 
350
<h3 class="fn"><a name="setEndTime"></a>void QVideoFrame::setEndTime ( <a href="http://qt.nokia.com/doc/4.6/qtglobal.html#qint64-typedef">qint64</a> <i>time</i> )</h3>
351
351
<p>Sets the presentation <i>time</i> when a frame should stop being displayed.</p>
352
352
<p>See also <a href="qvideoframe.html#endTime">endTime</a>().</p>
353
353
<h3 class="fn"><a name="setFieldType"></a>void QVideoFrame::setFieldType ( <a href="qvideoframe.html#FieldType-enum">FieldType</a> <i>field</i> )</h3>
354
354
<p>Sets the <i>field</i> an interlaced video frame belongs to.</p>
355
355
<p>See also <a href="qvideoframe.html#fieldType">fieldType</a>().</p>
356
 
<h3 class="fn"><a name="setStartTime"></a>void QVideoFrame::setStartTime ( qint64 <i>time</i> )</h3>
 
356
<h3 class="fn"><a name="setStartTime"></a>void QVideoFrame::setStartTime ( <a href="http://qt.nokia.com/doc/4.6/qtglobal.html#qint64-typedef">qint64</a> <i>time</i> )</h3>
357
357
<p>Sets the presentation <i>time</i> when the frame should be displayed.</p>
358
358
<p>See also <a href="qvideoframe.html#startTime">startTime</a>().</p>
359
 
<h3 class="fn"><a name="size"></a>QSize QVideoFrame::size () const</h3>
 
359
<h3 class="fn"><a name="size"></a><a href="http://qt.nokia.com/doc/4.6/qsize.html">QSize</a> QVideoFrame::size () const</h3>
360
360
<p>Returns the size of a video frame.</p>
361
 
<h3 class="fn"><a name="startTime"></a>qint64 QVideoFrame::startTime () const</h3>
 
361
<h3 class="fn"><a name="startTime"></a><a href="http://qt.nokia.com/doc/4.6/qtglobal.html#qint64-typedef">qint64</a> QVideoFrame::startTime () const</h3>
362
362
<p>Returns the presentation time when the frame should be displayed.</p>
363
363
<p>See also <a href="qvideoframe.html#setStartTime">setStartTime</a>().</p>
364
364
<h3 class="fn"><a name="unmap"></a>void QVideoFrame::unmap ()</h3>