4#ifndef QMULTIMEDIAUTILS_P_H
5#define QMULTIMEDIAUTILS_P_H
18#include <QtMultimedia/qtmultimediaglobal.h>
19#include <QtMultimedia/private/qvideotransformation_p.h>
20#include <QtCore/qsize.h>
21#include <QtCore/qurl.h>
22#include <QtGui/rhi/qrhi.h>
28class QVideoFrameFormat;
35Q_MULTIMEDIA_EXPORT Fraction qRealToFraction(qreal value);
37Q_MULTIMEDIA_EXPORT
QSize qCalculateFrameSize(QSize resolution, Fraction pixelAspectRatio);
41Q_MULTIMEDIA_EXPORT
QSize qRotatedFrameSize(QSize size,
int rotation);
45 return qRotatedFrameSize(size, qToUnderlying(rotation));
48Q_MULTIMEDIA_EXPORT
QSize qRotatedFramePresentationSize(
const QVideoFrame &frame);
50Q_MULTIMEDIA_EXPORT
QUrl qMediaFromUserInput(QUrl fileName);
54Q_MULTIMEDIA_EXPORT QRhiSwapChain::Format
55qGetRequiredSwapChainFormat(
const QVideoFrameFormat &format);
57Q_MULTIMEDIA_EXPORT
bool
59 QRhiSwapChain::Format requiredSwapChainFormat);
61Q_MULTIMEDIA_EXPORT VideoTransformation
62qNormalizedSurfaceTransformation(
const QVideoFrameFormat &format);
64Q_MULTIMEDIA_EXPORT VideoTransformation qNormalizedFrameTransformation(
65 const QVideoFrame &frame, VideoTransformation videoOutputTransformation = {});
67Q_MULTIMEDIA_EXPORT QtVideo::Rotation
68qVideoRotationFromDegrees(
int clockwiseDegrees);
71 int videoOutputRotation)
73 return qNormalizedFrameTransformation(
74 frame, VideoTransformation{ qVideoRotationFromDegrees(videoOutputRotation) });
78
79
80
81
82
83
84
85
86
87
88
89
90
The QVideoSink class represents a generic sink for video data.