Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QVideoFrame Class Reference
[QtMediaModule]

The QVideoFrame class represents a single frame of displayable data More...

    #include <QVideoFrame>

Public Types

  • enum PixelFormat { Format_Invalid, Format_ARGB32, Format_RGB32, Format_RGB24, ..., Format_Y8 }

Public Functions

  • QVideoFrame ( const QVideoFrame & other )
  • QVideoFrame ( PixelFormat format, const QSize & size )
  • QVideoFrame ( PixelFormat format, const QSize & size, const uchar * data, BufferHelper * helper = 0 )
  • QVideoFrame ( PixelFormat format, const QSize & size, uchar * data, BufferHelper * helper = 0 )
  • QVideoFrame ( PixelFormat format, const QSize & size, const uchar * planeData, int bytesPerLine, BufferHelper * helper = 0 )
  • QVideoFrame ( PixelFormat format, const QSize & size, uchar * planeData, int bytesPerLine, BufferHelper * helper = 0 )
  • QVideoFrame ( PixelFormat format, const QSize & size, const uchar * planeData1, const uchar * planeData2, const uchar * planeData3, int bytesPerLine1, int bytesPerLine2, int bytesPerLine3, BufferHelper * helper = 0 )
  • QVideoFrame ( PixelFormat format, const QSize & size, uchar * planeData1, uchar * planeData2, uchar * planeData3, int bytesPerLine1, int bytesPerLine2, int bytesPerLine3, BufferHelper * helper = 0 )
  • QVideoFrame ( const QImage & img )
  • virtual ~QVideoFrame ()
  • double aspectRatio () const
  • int bytesPerLine ( int planeNumber ) const
  • const uchar * constPlaneData ( int planeNumber ) const
  • PixelFormat format () const
  • bool hasCustomAspectRatio () const
  • bool isNull () const
  • uchar * planeData ( int planeNumber )
  • const uchar * planeData ( int planeNumber ) const
  • QSize planeSize ( int planeNumber ) const
  • void setAspectRatio ( double customRatio )
  • QSize size () const
  • QVideoFrame & operator= ( const QVideoFrame & other )

Static Public Members

  • int colorDepth ( QVideoFrame::PixelFormat format, int planeNumber )
  • bool isPlanar ( QVideoFrame::PixelFormat format )
  • int planesCount ( QVideoFrame::PixelFormat format )

Detailed Description

The QVideoFrame class represents a single frame of displayable data


Member Type Documentation

enum QVideoFrame::PixelFormat

Pixel formats (please see http://www.fourcc.org/yuv.php for formats description)

ConstantValue
QVideoFrame::Format_Invalid0
QVideoFrame::Format_ARGB321
QVideoFrame::Format_RGB322
QVideoFrame::Format_RGB243
QVideoFrame::Format_RGB5654
QVideoFrame::Format_BGRA325
QVideoFrame::Format_BGR326
QVideoFrame::Format_BGR247
QVideoFrame::Format_BGR5658
QVideoFrame::Format_YUV4449
QVideoFrame::Format_YUV420P10
QVideoFrame::Format_YV1211
QVideoFrame::Format_UYVY12
QVideoFrame::Format_YUYV13
QVideoFrame::Format_Y814


Member Function Documentation

QVideoFrame::QVideoFrame ()

Contructs an empty QVideoFrame

QVideoFrame::QVideoFrame ( const QVideoFrame & other )

Copy contructor. Create's a video frame from other Data is implicitly shared

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size )

Contructs an empty video frame specific with pixel format format and frame size with size

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size, const uchar * data, BufferHelper * helper = 0 )

Constructs a video frame with the given width, height and format, that uses an existing memory buffer, data. The width and height must be specified in pixels and is given by size, data must be 32-bit aligned, and each plane and scanline of data in the image must also be 32-bit aligned.

The buffer must remain valid throughout the life of the QVideoFrame and all copies that have not been modified or otherwise detached from the original buffer. The QVideoFrame does not delete the buffer at destruction. The helper parameter provides thread safety.

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size, uchar * data, BufferHelper * helper = 0 )

Constructs a video frame with the given width, height and format, that uses an existing memory buffer, data. The width and height must be specified in pixels given by size, data must be 32-bit aligned, and each plane and scanline of data in the image must also be 32-bit aligned.

The buffer must remain valid throughout the life of the QVideoFrame and all copies that have not been modified or otherwise detached from the original buffer. The QVideoFrame does not delete the buffer at destruction. The helper parameter provides thread safety.

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size, const uchar * planeData, int bytesPerLine, BufferHelper * helper = 0 )

Create Video frame for interlaced formats with one plane, like Format_RGB24 or Format_YUYV.

The pixel format is specified with format, the frame has image size size, planeData contains the raw image data, and the image stride is given by bytesPerLine. The buffer must remain valid throughout the life of the QVideoFrame and all copies that have not been modified or otherwise detached from the original buffer. The QVideoFrame does not delete the buffer at destruction. The helper parameter provides thread safety.

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size, uchar * planeData, int bytesPerLine, BufferHelper * helper = 0 )

Create Video frame for interlaced formats with one plane, like Format_RGB24 or Format_YUYV.

The pixel format is specified with format, the frame has image size size, planeData contains the raw image data, and the image stride is given by bytesPerLine.

The buffer must remain valid throughout the life of the QVideoFrame and all copies that have not been modified or otherwise detached from the original buffer. The QVideoFrame does not delete the buffer at destruction. The helper parameter provides thread safety.

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size, const uchar * planeData1, const uchar * planeData2, const uchar * planeData3, int bytesPerLine1, int bytesPerLine2, int bytesPerLine3, BufferHelper * helper = 0 )

Create Video frame for planar formats (with planes separated), like Format_YUV420P or Format_YUV422P.

The pixel format is specified with format, the frame has image size size, planeData1, planeData2, planeData3 contain the raw image data, and the their respective strides are given by bytesPerLine1, bytesPerLine2, bytesPerLine3.

The buffers must remain valid throughout the life of the QVideoFrame and all copies that have not been modified or otherwise detached from the original buffer. The QVideoFrame does not delete the buffers at destruction. The helper parameter provides thread safety.

QVideoFrame::QVideoFrame ( PixelFormat format, const QSize & size, uchar * planeData1, uchar * planeData2, uchar * planeData3, int bytesPerLine1, int bytesPerLine2, int bytesPerLine3, BufferHelper * helper = 0 )

Create Video frame for planar formats (with planes separated), like Format_YUV420P or Format_YUV422P.

The pixel format is specified with format, the frame has image size size, planeData1, planeData2, planeData3 contain the raw image data, and the their respective image strides are given by bytesPerLine1, bytesPerLine2, bytesPerLine3.

The buffers must remain valid throughout the life of the QVideoFrame and all copies that have not been modified or otherwise detached from the original buffer. The QVideoFrame does not delete the buffers at destruction. The helper parameter provides thread safety.

QVideoFrame::QVideoFrame ( const QImage & img )

Create Video frame from QImage img,

QVideoFrame::~QVideoFrame ()   [virtual]

Does nothing

double QVideoFrame::aspectRatio () const

Returns the frame aspect ratio, which is equal to width/height or previously assigned with setAspectRatio() custom value.

See also setAspectRatio() and hasCustomAspectRatio().

int QVideoFrame::bytesPerLine ( int planeNumber ) const

Returns the number of bytes per scanline of plane planeNumber.

int QVideoFrame::colorDepth ( QVideoFrame::PixelFormat format, int planeNumber )   [static]

Returns the color depth of a data plane in planeNumber in the particualr pixel format format

const uchar * QVideoFrame::constPlaneData ( int planeNumber ) const

Returns a constant pointer to the pixel data given by plane number planeNumber

PixelFormat QVideoFrame::format () const

Returns the current format of the video frame

bool QVideoFrame::hasCustomAspectRatio () const

Returns true if custom aspect ratio was set with setAspectRatio().

See also aspectRatio() and setAspectRatio().

bool QVideoFrame::isNull () const

Returns true if the frame is valid, false otherwise

bool QVideoFrame::isPlanar ( QVideoFrame::PixelFormat format )   [static]

Returns true if the pixel format format is planar, false otherwise

uchar * QVideoFrame::planeData ( int planeNumber )

Returns a pointer to the first pixel index by planeNumber. This function performs a deep copy of the shared pixel data, thus ensuring that this QVideoFrame is the only one using the current return value.

const uchar * QVideoFrame::planeData ( int planeNumber ) const

This is an overloaded member function, provided for convenience.

Returns a pointer to the pixel data given by plane number planeNumber

QSize QVideoFrame::planeSize ( int planeNumber ) const

Returns the plane number planeNumber plane size in pixels. In most cases it equals to the image size, except of U and V planes of planar YUV formats.

int QVideoFrame::planesCount ( QVideoFrame::PixelFormat format )   [static]

Returns the number fo planes for the pixel format format

void QVideoFrame::setAspectRatio ( double customRatio )

Set the frame aspect ratio to customRatio, if the actual frame proportion differs from width/height.

See also aspectRatio() and hasCustomAspectRatio().

QSize QVideoFrame::size () const

Returns the current size of the video frame

QVideoFrame & QVideoFrame::operator= ( const QVideoFrame & other )

Do a copy of the frame other, data is implicitly shared

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web