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.cpp File Reference

(38c85f0fb274f9dd989bd7601791209589fab94a)

#include "qmultimediautils_p.h"
#include "qvideoframe.h"
#include "qvideoframeformat.h"
#include <QtCore/qdir.h>
+ Include dependency graph for qmultimediautils.cpp:

Go to the source code of this file.

Functions

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

Function Documentation

◆ qCalculateFrameSize()

QSize qCalculateFrameSize ( QSize resolution,
Fraction par )

Definition at line 44 of file qmultimediautils.cpp.

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

+ Here is the call graph for this function:

◆ qGetRequiredSwapChainFormat()

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()

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()

QUrl qMediaFromUserInput ( QUrl url)

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()

QT_BEGIN_NAMESPACE 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/2]

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/2]

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:

◆ qShouldUpdateSwapChainFormat()

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: