Phonon
#include <videoframe2.h>
Public Types | |
enum | Format { Format_Invalid = QImage::Format_Invalid , Format_RGB888 = QImage::Format_RGB888 , Format_RGB32 = QImage::Format_RGB32 , Format_YCbCr420 = 0x10000 , Format_YV12 = Format_YCbCr420 , Format_YCbCr422 = 0x10001 , Format_YUY2 = Format_YCbCr422 } |
Public Member Functions | |
int | aspectCorrectedHeight () const |
int | aspectCorrectedWidth () const |
QImage | qImage () const |
Public Attributes | |
double | aspectRatio |
QByteArray | data0 |
QByteArray | data1 |
QByteArray | data2 |
Format | format |
int | height |
int | width |
Detailed Description
A single video frame.
This simple class contains the data of a frame and metadata describing how to interpret the data.
Definition at line 42 of file videoframe2.h.
Member Enumeration Documentation
◆ Format
Video frames come in a variety of formats.
Depending on the format you have to process it differently to convert it for displaying or encoding.
Definition at line 49 of file videoframe2.h.
Member Function Documentation
◆ aspectCorrectedHeight()
|
inline |
Convenience function to calculate the aspect corrected height from the aspectRatio and width values.
It is recommended to display video frames with aspectCorrectedWidth x height
Definition at line 106 of file videoframe2.h.
◆ aspectCorrectedWidth()
|
inline |
Convenience function to calculate the aspect corrected width from the aspectRatio and height values.
It is recommended to display video frames with aspectCorrectedWidth x height
Definition at line 98 of file videoframe2.h.
◆ qImage()
|
inline |
Definition at line 145 of file videoframe2.h.
Member Data Documentation
◆ aspectRatio
double Phonon::Experimental::VideoFrame2::aspectRatio |
The aspect ratio the frame should be displayed with.
Common values are 4/3, 16/9.
Definition at line 90 of file videoframe2.h.
◆ data0
QByteArray Phonon::Experimental::VideoFrame2::data0 |
RGB8, YUY2 or Y-plane.
If format is Format_RGB888 then the data contains each pixel as three consecutive bytes for red, green and blue.
If format is Format_YUY2 the data contains every two pixels as four consecutive bytes for Y0, Cb, Y1, Cr
If format is Format_YV12 the data contains one byte per pixel with the Y value.
Definition at line 127 of file videoframe2.h.
◆ data1
QByteArray Phonon::Experimental::VideoFrame2::data1 |
YV12 U-plane.
If format is Format_YV12 the data contains one byte per four adjacent pixels with the Cb value.
Definition at line 135 of file videoframe2.h.
◆ data2
QByteArray Phonon::Experimental::VideoFrame2::data2 |
YV12 V-plane.
If format is Format_YV12 the data contains one byte per four adjacent pixels with the Cr value.
Definition at line 143 of file videoframe2.h.
◆ format
Format Phonon::Experimental::VideoFrame2::format |
◆ height
int Phonon::Experimental::VideoFrame2::height |
The height of the video frame in number of pixels.
Definition at line 83 of file videoframe2.h.
◆ width
int Phonon::Experimental::VideoFrame2::width |
The width of the video frame in number of pixels.
Definition at line 78 of file videoframe2.h.
The documentation for this struct was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.