Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qmultimediautils_p.h File Reference

(38c85f0fb274f9dd989bd7601791209589fab94a)

#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qtvideo.h>
#include <QtMultimedia/private/qmaybe_p.h>
#include <QtCore/qsize.h>
#include <QtCore/qurl.h>
#include <QtGui/rhi/qrhi.h>
+ Include dependency graph for qmultimediautils_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Fraction
 

Functions

Q_MULTIMEDIA_EXPORT Fraction qRealToFraction (qreal value)
 
Q_MULTIMEDIA_EXPORT QSize qCalculateFrameSize (QSize resolution, Fraction pixelAspectRatio)
 
Q_MULTIMEDIA_EXPORT QSize qRotatedFrameSize (QSize size, int rotation)
 
QSize qRotatedFrameSize (QSize size, QtVideo::Rotation rotation)
 
Q_MULTIMEDIA_EXPORT QSize qRotatedFrameSize (const QVideoFrame &frame)
 
Q_MULTIMEDIA_EXPORT QUrl qMediaFromUserInput (QUrl fileName)
 
Q_MULTIMEDIA_EXPORT bool qIsAutoHdrEnabled ()
 
Q_MULTIMEDIA_EXPORT QRhiSwapChain::Format qGetRequiredSwapChainFormat (const QVideoFrameFormat &format)
 
Q_MULTIMEDIA_EXPORT bool qShouldUpdateSwapChainFormat (QRhiSwapChain *swapChain, QRhiSwapChain::Format requiredSwapChainFormat)
 

Function Documentation

◆ qCalculateFrameSize()

Q_MULTIMEDIA_EXPORT QSize qCalculateFrameSize ( QSize resolution,
Fraction pixelAspectRatio )

Definition at line 44 of file qmultimediautils.cpp.

References QSize::height(), and QSize::width().

+ Here is the call graph for this function:

◆ qGetRequiredSwapChainFormat()

Q_MULTIMEDIA_EXPORT QRhiSwapChain::Format qGetRequiredSwapChainFormat ( const QVideoFrameFormat & format)

Definition at line 81 of file qmultimediautils.cpp.

References QRhiSwapChain::HDRExtendedSrgbLinear, and QRhiSwapChain::SDR.

Referenced by QVideoWindowPrivate::render().

+ Here is the caller graph for this function:

◆ qIsAutoHdrEnabled()

Q_MULTIMEDIA_EXPORT bool qIsAutoHdrEnabled ( )

Definition at line 74 of file qmultimediautils.cpp.

References qEnvironmentVariableIntValue().

Referenced by qShouldUpdateSwapChainFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qMediaFromUserInput()

Q_MULTIMEDIA_EXPORT QUrl qMediaFromUserInput ( QUrl fileName)

Definition at line 66 of file qmultimediautils.cpp.

References QUrl::AssumeLocalFile, QDir::currentPath(), QUrl::fromUserInput(), QString::isEmpty(), QUrl::scheme(), QUrl::toString(), and url.

Referenced by QMediaPlayerPrivate::setMedia(), and QAudioDecoder::setSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qRealToFraction()

Q_MULTIMEDIA_EXPORT Fraction qRealToFraction ( qreal value)

Definition at line 12 of file qmultimediautils.cpp.

References d1, d2, and qAbs().

Referenced by QFFmpeg::adjustFrameRate(), qt_adjusted_frame_duration(), and qt_device_format_pixel_aspect_ratio().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qRotatedFrameSize() [1/3]

Q_MULTIMEDIA_EXPORT QSize qRotatedFrameSize ( const QVideoFrame & frame)

Definition at line 61 of file qmultimediautils.cpp.

References frame, qRotatedFrameSize(), and QWidget::size.

+ Here is the call graph for this function:

◆ qRotatedFrameSize() [2/3]

Q_MULTIMEDIA_EXPORT QSize qRotatedFrameSize ( QSize size,
int rotation )

Definition at line 55 of file qmultimediautils.cpp.

References Q_ASSERT.

Referenced by QVideoFrame::paint(), qImageFromVideoFrame(), qRotatedFrameSize(), qRotatedFrameSize(), and QPlatformVideoSink::setVideoFrame().

+ Here is the caller graph for this function:

◆ qRotatedFrameSize() [3/3]

QSize qRotatedFrameSize ( QSize size,
QtVideo::Rotation rotation )
inline

Definition at line 44 of file qmultimediautils_p.h.

References qRotatedFrameSize(), and qToUnderlying().

+ Here is the call graph for this function:

◆ qShouldUpdateSwapChainFormat()

Q_MULTIMEDIA_EXPORT bool qShouldUpdateSwapChainFormat ( QRhiSwapChain * swapChain,
QRhiSwapChain::Format requiredSwapChainFormat )

Definition at line 90 of file qmultimediautils.cpp.

References QRhiSwapChain::format(), QRhiSwapChain::isFormatSupported(), and qIsAutoHdrEnabled().

Referenced by QVideoWindowPrivate::render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: