Phonon  4.7.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Types | Public Attributes | List of all members
Phonon::VideoFrame Struct Reference

#include <videoframe.h>

Public Types

enum  Format { Format_Invalid, Format_RGB32, Format_YV12, Format_I420 }
 

Public Attributes

unsigned int width
 The width.
 
unsigned int height
 The height.
 
Format format
 The format.
 
unsigned int planeCount
 The amont of picture planes.
 
QByteArray plane [4]
 The picture planes.
 
int pitch [4]
 
int visiblePitch [4]
 
int lines [4]
 
int visibleLines [4]
 

Detailed Description

This struct presents a simple video frame within Phonon. It has all the main characteristics of a frame. It has height, width and a chroma format. The chroma format also decides on how many picture planes one frame may have. For example a YV12 frame will have 3 planes, one for Y one for U and one for V. An RGB32 frame on the other hand only has one plane (as RGB is a packed format).

Author
Harald Sitter <sitte.nosp@m.r@kd.nosp@m.e.org

Member Enumeration Documentation

Format names are kept close to the fourcc names. For multiple pixel incarnations the pixel amount is always part of the name.

See Also
http://www.fourcc.org
http://www.fourcc.org/rgb.php
http://www.fourcc.org/yuv.php
Enumerator
Format_RGB32 

< Invalid Frame

Format_YV12 

< Packed RGB32

Format_I420 

< 3 planes 8 bit Y plane followed by 8 bit 2x2 subsampled V and U planes. < Like YV12, but U and V are swapped

Member Data Documentation

int Phonon::VideoFrame::lines[4]

Lines/scanlines in the plane (aligned).

See Also
pitch
int Phonon::VideoFrame::pitch[4]

Pitch/stride of a plane. This pitch is aligned at the backend's desire, so you must not assume any particular alignment.

Note
The pitch is always bigger than the visible pitch, for painting you want to clip the plane accordingly (e.g. treat the visible pitch as a subpicture).
for conversion into a QImage you will have to pass the appropriate pitch as bytesPerLine or you'll get unexpected results.
int Phonon::VideoFrame::visibleLines[4]

Visible lines/scanlines in the plane.

See Also
visiblePitch
int Phonon::VideoFrame::visiblePitch[4]

The visible pitch is the actually visible pitch of a plane. It depends only on the format (e.g. for YV12 0 = width, 1 = 2 = width/2).


The documentation for this struct was generated from the following file: