Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QVideoSurfaceFormat Class

TheQVideoSurfaceFormat class specifies the stream format of a video presentation surface.More...

Header:#include <QVideoSurfaceFormat>
Since: Qt 4.6

Public Types

enumDirection { TopToBottom, BottomToTop }
enumYCbCrColorSpace { YCbCr_Undefined, YCbCr_BT601, YCbCr_BT709, YCbCr_xvYCC601, YCbCr_xvYCC709, YCbCr_JPEG }

Public Functions

QVideoSurfaceFormat()
QVideoSurfaceFormat(const QSize & size, QVideoFrame::PixelFormat format, QAbstractVideoBuffer::HandleType type = QAbstractVideoBuffer::NoHandle)
QVideoSurfaceFormat(const QVideoSurfaceFormat & other)
~QVideoSurfaceFormat()
intframeHeight() const
qrealframeRate() const
QSizeframeSize() const
intframeWidth() const
QAbstractVideoBuffer::HandleTypehandleType() const
boolisValid() const
QSizepixelAspectRatio() const
QVideoFrame::PixelFormatpixelFormat() const
QVariantproperty(const char * name) const
QList<QByteArray>propertyNames() const
DirectionscanLineDirection() const
voidsetFrameRate(qreal rate)
voidsetFrameSize(const QSize & size)
voidsetFrameSize(int width, int height)
voidsetPixelAspectRatio(const QSize & ratio)
voidsetPixelAspectRatio(int horizontal, int vertical)
voidsetProperty(const char * name, const QVariant & value)
voidsetScanLineDirection(Direction direction)
voidsetViewport(const QRect & viewport)
voidsetYCbCrColorSpace(YCbCrColorSpace space)
QSizesizeHint() const
QRectviewport() const
YCbCrColorSpaceyCbCrColorSpace() const
booloperator!=(const QVideoSurfaceFormat & other) const
QVideoSurfaceFormat &operator=(const QVideoSurfaceFormat & other)
booloperator==(const QVideoSurfaceFormat & other) const

Detailed Description

TheQVideoSurfaceFormat class specifies the stream format of a video presentation surface.

A video surface presents a stream of video frames. The surface's format describes the type of the frames and determines how they should be presented.

The core properties of a video stream required to setup a video surface are the pixel format given bypixelFormat(), and the frame dimensions given byframeSize().

If the surface is to present frames using a frame's handle a surface format will also include a handle type which is given by thehandleType() function.

The region of a frame that is actually displayed on a video surface is given by theviewport(). A stream may have a viewport less than the entire region of a frame to allow for videos smaller than the nearest optimal size of a video frame. For example the width of a frame may be extended so that the start of each scan line is eight byte aligned.

Other common properties are thepixelAspectRatio(),scanLineDirection(), andframeRate(). Additionally a stream may have some additional type specific properties which are listed by the dynamicPropertyNames() function and can be accessed using theproperty(), andsetProperty() functions.

Member Type Documentation

enum QVideoSurfaceFormat::Direction

Enumerates the layout direction of video scan lines.

ConstantValueDescription
QVideoSurfaceFormat::TopToBottom0Scan lines are arranged from the top of the frame to the bottom.
QVideoSurfaceFormat::BottomToTop1Scan lines are arranged from the bottom of the frame to the top.

enum QVideoSurfaceFormat::YCbCrColorSpace

Enumerates the Y'CbCr color space of video frames.

ConstantValueDescription
QVideoSurfaceFormat::YCbCr_Undefined0No color space is specified.
QVideoSurfaceFormat::YCbCr_BT6011A Y'CbCr color space defined by ITU-R recommendation BT.601 with Y value range from 16 to 235, and Cb/Cr range from 16 to 240. Used in standard definition video.
QVideoSurfaceFormat::YCbCr_BT7092A Y'CbCr color space defined by ITU-R BT.709 with the same values range as YCbCr_BT601. Used for HDTV.
QVideoSurfaceFormat::YCbCr_xvYCC6013The BT.601 color space with the value range extended to 0 to 255. It is backward compatibile with BT.601 and uses values outside BT.601 range to represent wider colors range.
QVideoSurfaceFormat::YCbCr_xvYCC7094The BT.709 color space with the value range extended to 0 to 255.
QVideoSurfaceFormat::YCbCr_JPEG5The full range Y'CbCr color space used in JPEG files.

Member Function Documentation

QVideoSurfaceFormat::QVideoSurfaceFormat()

Constructs a null video stream format.

QVideoSurfaceFormat::QVideoSurfaceFormat(constQSize & size,QVideoFrame::PixelFormat format,QAbstractVideoBuffer::HandleType type = QAbstractVideoBuffer::NoHandle)

Contructs a description of stream which receives stream oftype buffers with given framesize and pixelformat.

QVideoSurfaceFormat::QVideoSurfaceFormat(constQVideoSurfaceFormat & other)

Constructs a copy ofother.

QVideoSurfaceFormat::~QVideoSurfaceFormat()

Destroys a video stream description.

int QVideoSurfaceFormat::frameHeight() const

Returns the height of frame in a video stream.

qreal QVideoSurfaceFormat::frameRate() const

Returns the frame rate of a video stream in frames per second.

See alsosetFrameRate().

QSize QVideoSurfaceFormat::frameSize() const

Returns the size of frames in a video stream.

See alsosetFrameSize(),frameWidth(), andframeHeight().

int QVideoSurfaceFormat::frameWidth() const

Returns the width of frames in a video stream.

See alsoframeSize() andframeHeight().

QAbstractVideoBuffer::HandleType QVideoSurfaceFormat::handleType() const

Returns the type of handle the surface uses to present the frame data.

If the handle type isQAbstractVideoBuffer::NoHandle buffers with any handle type are valid provided they can bemapped with theQAbstractVideoBuffer::ReadOnly flag. If the handleType() is notQAbstractVideoBuffer::NoHandle then the handle type of the buffer be the same as that of the surface format.

bool QVideoSurfaceFormat::isValid() const

Identifies if a video surface format has a valid pixel format and frame size.

Returns true if the format is valid, and false otherwise.

QSize QVideoSurfaceFormat::pixelAspectRatio() const

Returns a video stream's pixel aspect ratio.

See alsosetPixelAspectRatio().

QVideoFrame::PixelFormat QVideoSurfaceFormat::pixelFormat() const

Returns the pixel format of frames in a video stream.

QVariant QVideoSurfaceFormat::property(constchar * name) const

Returns the value of the video format'sname property.

See alsosetProperty().

QList<QByteArray> QVideoSurfaceFormat::propertyNames() const

Returns a list of video format dynamic property names.

Direction QVideoSurfaceFormat::scanLineDirection() const

Returns the direction of scan lines.

See alsosetScanLineDirection().

void QVideoSurfaceFormat::setFrameRate(qreal rate)

Sets the framerate of a video stream in frames per second.

See alsoframeRate().

void QVideoSurfaceFormat::setFrameSize(constQSize & size)

Sets the size of frames in a video stream tosize.

This will reset theviewport() to fill the entire frame.

See alsoframeSize().

void QVideoSurfaceFormat::setFrameSize(int width,int height)

This is an overloaded function.

Sets thewidth andheight of frames in a video stream.

This will reset theviewport() to fill the entire frame.

void QVideoSurfaceFormat::setPixelAspectRatio(constQSize & ratio)

Sets a video stream's pixel aspectratio.

See alsopixelAspectRatio().

void QVideoSurfaceFormat::setPixelAspectRatio(int horizontal,int vertical)

This is an overloaded function.

Sets thehorizontal andvertical elements of a video stream's pixel aspect ratio.

void QVideoSurfaceFormat::setProperty(constchar * name, constQVariant & value)

Sets the video format'sname property tovalue.

See alsoproperty().

void QVideoSurfaceFormat::setScanLineDirection(Direction direction)

Sets thedirection of scan lines.

See alsoscanLineDirection().

void QVideoSurfaceFormat::setViewport(constQRect & viewport)

Sets the viewport of a video stream toviewport.

See alsoviewport().

void QVideoSurfaceFormat::setYCbCrColorSpace(YCbCrColorSpace space)

Sets the Y'CbCr colorspace of a video stream. It is only used with raw YUV frame types.

See alsoyCbCrColorSpace().

QSize QVideoSurfaceFormat::sizeHint() const

Returns a suggested size in pixels for the video stream.

This is the size of the viewport scaled according to the pixel aspect ratio.

QRect QVideoSurfaceFormat::viewport() const

Returns the viewport of a video stream.

The viewport is the region of a video frame that is actually displayed.

By default the viewport covers an entire frame.

See alsosetViewport().

YCbCrColorSpace QVideoSurfaceFormat::yCbCrColorSpace() const

Returns the Y'CbCr color space of a video stream.

See alsosetYCbCrColorSpace().

bool QVideoSurfaceFormat::operator!=(constQVideoSurfaceFormat & other) const

Returns true ifother is different to a video format, and false if they are the same.

QVideoSurfaceFormat & QVideoSurfaceFormat::operator=(constQVideoSurfaceFormat & other)

Assigns the values ofother to a video stream description.

bool QVideoSurfaceFormat::operator==(constQVideoSurfaceFormat & other) const

Returns true ifother is the same as a video format, and false if they are the different.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp