Obsolete Members for QVideoFrame

The following members of class QVideoFrame are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Types

(deprecated in 6.8) enum MapMode { NotMapped, ReadOnly, WriteOnly, ReadWrite }
(deprecated in 6.7) enum RotationAngle { Rotation0, Rotation90, Rotation180, Rotation270 }

Public Functions

(deprecated in 6.8) bool map(QVideoFrame::MapMode mode)
(deprecated in 6.7) QVideoFrame::RotationAngle rotationAngle() const
(deprecated in 6.7) void setRotationAngle(QVideoFrame::RotationAngle angle)

Member Type Documentation

[deprecated in 6.8] enum QVideoFrame::MapMode

This enum is deprecated since 6.8. We strongly advise against using it in new code.

Use QtVideo::MapMode instead. The values of this enum are consistent with values of QtVideo::MapMode.

Enumerates how a video buffer's data is mapped to system memory.

ConstantValueDescription
QVideoFrame::NotMappedstatic_cast<int>(QtVideo::MapMode::NotMapped)The video buffer is not mapped to memory.
QVideoFrame::ReadOnlystatic_cast<int>(QtVideo::MapMode::ReadOnly)The mapped memory is populated with data from the video buffer when mapped, but the content of the mapped memory may be discarded when unmapped.
QVideoFrame::WriteOnlystatic_cast<int>(QtVideo::MapMode::WriteOnly)The mapped memory is uninitialized when mapped, but the possibly modified content will be used to populate the video buffer when unmapped.
QVideoFrame::ReadWritestatic_cast<int>(QtVideo::MapMode::ReadWrite)The mapped memory is populated with data from the video buffer, and the video buffer is repopulated with the content of the mapped memory when it is unmapped.

See also mapMode() and map().

[deprecated in 6.7] enum QVideoFrame::RotationAngle

This enum is deprecated since 6.7. We strongly advise against using it in new code.

Use QtVideo::Rotation instead.

The angle of the clockwise rotation that should be applied to a video frame before displaying.

ConstantValueDescription
QVideoFrame::Rotation00No rotation required, the frame has correct orientation
QVideoFrame::Rotation9090The frame should be rotated by 90 degrees
QVideoFrame::Rotation180180The frame should be rotated by 180 degrees
QVideoFrame::Rotation270270The frame should be rotated by 270 degrees

Member Function Documentation

[deprecated in 6.8] bool QVideoFrame::map(QVideoFrame::MapMode mode)

This function is deprecated since 6.8. We strongly advise against using it in new code.

Use QVideoFrame::map(Qt::Video::MapMode) instead. Maps the contents of a video frame to system (CPU addressable) memory.

In some cases the video frame data might be stored in video memory or otherwise inaccessible memory, so it is necessary to map a frame before accessing the pixel data. This may involve copying the contents around, so avoid mapping and unmapping unless required.

The map mode indicates whether the contents of the mapped memory should be read from and/or written to the frame. If the map mode includes the QVideoFrame::ReadOnly flag the mapped memory will be populated with the content of the video frame when initially mapped. If the map mode includes the QVideoFrame::WriteOnly flag the content of the possibly modified mapped memory will be written back to the frame when unmapped.

While mapped the contents of a video frame can be accessed directly through the pointer returned by the bits() function.

When access to the data is no longer needed, be sure to call the unmap() function to release the mapped memory and possibly update the video frame contents.

If the video frame has been mapped in read only mode, it is permissible to map it multiple times in read only mode (and unmap it a corresponding number of times). In all other cases it is necessary to unmap the frame first before mapping a second time.

Note: Writing to memory that is mapped as read-only is undefined, and may result in changes to shared data or crashes.

Returns true if the frame was mapped to memory in the given mode and false otherwise.

See also unmap(), mapMode(), and bits().

[deprecated in 6.7] QVideoFrame::RotationAngle QVideoFrame::rotationAngle() const

This function is deprecated since 6.7. We strongly advise against using it in new code.

Use QVideoFrame::rotation instead.

Returns the angle the frame should be rotated clockwise before displaying.

See also setRotationAngle().

[deprecated in 6.7] void QVideoFrame::setRotationAngle(QVideoFrame::RotationAngle angle)

This function is deprecated since 6.7. We strongly advise against using it in new code.

Use QVideoFrame::setRotation instead.

Sets the angle the frame should be rotated clockwise before displaying.

See also rotationAngle().