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
avfcamerautility_p.h File Reference

(7aa46959da986ada426de567d4eaf013db5c32cf)

#include <QtCore/qglobal.h>
#include <QtCore/qdebug.h>
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
#include <QtCore/qsize.h>
#include "qcameradevice.h"
#include <AVFoundation/AVFoundation.h>
+ Include dependency graph for avfcamerautility_p.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  AVFConfigurationLock
 
struct  AVFObjectDeleter
 
class  AVFScopedPointer< T >
 
class  AVFScopedPointer< dispatch_queue_t >
 

Typedefs

typedef QPair< qreal, qrealAVFPSRange
 

Functions

AVFPSRange qt_connection_framerates (AVCaptureConnection *videoConnection)
 
AVCaptureDeviceFormat * qt_convert_to_capture_device_format (AVCaptureDevice *captureDevice, const QCameraFormat &format, const std::function< bool(uint32_t)> &cvFormatValidator=nullptr)
 
QList< AVCaptureDeviceFormat * > qt_unique_device_formats (AVCaptureDevice *captureDevice, FourCharCode preferredFormat)
 
QSize qt_device_format_resolution (AVCaptureDeviceFormat *format)
 
QSize qt_device_format_high_resolution (AVCaptureDeviceFormat *format)
 
QSize qt_device_format_pixel_aspect_ratio (AVCaptureDeviceFormat *format)
 
QList< AVFPSRangeqt_device_format_framerates (AVCaptureDeviceFormat *format)
 
AVCaptureDeviceFormat * qt_find_best_resolution_match (AVCaptureDevice *captureDevice, const QSize &res, FourCharCode preferredFormat, bool stillImage=true)
 
AVCaptureDeviceFormat * qt_find_best_framerate_match (AVCaptureDevice *captureDevice, FourCharCode preferredFormat, Float64 fps)
 
AVFrameRateRange * qt_find_supported_framerate_range (AVCaptureDeviceFormat *format, Float64 fps)
 
bool qt_format_supports_framerate (AVCaptureDeviceFormat *format, qreal fps)
 
bool qt_formats_are_equal (AVCaptureDeviceFormat *f1, AVCaptureDeviceFormat *f2)
 
bool qt_set_active_format (AVCaptureDevice *captureDevice, AVCaptureDeviceFormat *format, bool preserveFps)
 
AVFPSRange qt_current_framerates (AVCaptureDevice *captureDevice, AVCaptureConnection *videoConnection)
 
void qt_set_framerate_limits (AVCaptureDevice *captureDevice, AVCaptureConnection *videoConnection, qreal minFPS, qreal maxFPS)
 
QList< AudioValueRange > qt_supported_sample_rates_for_format (int codecId)
 
QList< AudioValueRange > qt_supported_bit_rates_for_format (int codecId)
 
std::optional< QList< UInt32 > > qt_supported_channel_counts_for_format (int codecId)
 
QList< UInt32 > qt_supported_channel_layout_tags_for_format (int codecId, int noChannels)
 

Typedef Documentation

◆ AVFPSRange

Definition at line 131 of file avfcamerautility_p.h.

Function Documentation

◆ qt_connection_framerates()

AVFPSRange qt_connection_framerates ( AVCaptureConnection * videoConnection)

Definition at line 23 of file avfcamerautility.mm.

References Float64, and Q_ASSERT.

◆ qt_convert_to_capture_device_format()

AVCaptureDeviceFormat * qt_convert_to_capture_device_format ( AVCaptureDevice * captureDevice,
const QCameraFormat & format,
const std::function< bool(uint32_t)> & cvFormatValidator = nullptr )

Definition at line 100 of file avfcamerautility.mm.

References CvPixelFormatInvalid, Float64, QCameraFormatPrivate::handle(), and QAVFHelpers::toCVPixelFormat().

+ Here is the call graph for this function:

◆ qt_current_framerates()

AVFPSRange qt_current_framerates ( AVCaptureDevice * captureDevice,
AVCaptureConnection * videoConnection )

Definition at line 576 of file avfcamerautility.mm.

References Float64, Q_ASSERT, and Q_UNUSED.

Referenced by avfVideoSettings(), and qt_set_active_format().

+ Here is the caller graph for this function:

◆ qt_device_format_framerates()

QList< AVFPSRange > qt_device_format_framerates ( AVCaptureDeviceFormat * format)

Definition at line 208 of file avfcamerautility.mm.

References Q_ASSERT.

◆ qt_device_format_high_resolution()

QSize qt_device_format_high_resolution ( AVCaptureDeviceFormat * format)

Definition at line 196 of file avfcamerautility.mm.

References Q_ASSERT.

Referenced by AVFImageCapture::applySettings(), AVFImageCapture::imageSettings(), and qt_find_best_resolution_match().

+ Here is the caller graph for this function:

◆ qt_device_format_pixel_aspect_ratio()

QSize qt_device_format_pixel_aspect_ratio ( AVCaptureDeviceFormat * format)

Definition at line 224 of file avfcamerautility.mm.

References Q_ASSERT, Q_FUNC_INFO, qAbs(), qCDebug, and qRealToFraction().

+ Here is the call graph for this function:

◆ qt_device_format_resolution()

QSize qt_device_format_resolution ( AVCaptureDeviceFormat * format)

Definition at line 187 of file avfcamerautility.mm.

Referenced by AVFImageCapture::imageSettings(), qt_find_best_resolution_match(), and qt_unique_device_formats().

+ Here is the caller graph for this function:

◆ qt_find_best_framerate_match()

AVCaptureDeviceFormat * qt_find_best_framerate_match ( AVCaptureDevice * captureDevice,
FourCharCode preferredFormat,
Float64 fps )

Definition at line 317 of file avfcamerautility.mm.

References epsilon, Float64, i, match(), Q_ASSERT, qAbs(), and qt_unique_device_formats().

Referenced by avfVideoSettings().

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

◆ qt_find_best_resolution_match()

AVCaptureDeviceFormat * qt_find_best_resolution_match ( AVCaptureDevice * captureDevice,
const QSize & res,
FourCharCode preferredFormat,
bool stillImage = true )

Definition at line 250 of file avfcamerautility.mm.

References area(), i, next, Q_ASSERT, qAbs(), qt_device_format_high_resolution(), qt_device_format_resolution(), qt_unique_device_formats(), and request.

Referenced by AVFImageCapture::applySettings(), and avfVideoSettings().

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

◆ qt_find_supported_framerate_range()

AVFrameRateRange * qt_find_supported_framerate_range ( AVCaptureDeviceFormat * format,
Float64 fps )

Definition at line 362 of file avfcamerautility.mm.

References epsilon, Float64, i, match(), Q_ASSERT, and qAbs().

Referenced by qt_set_framerate_limits().

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

◆ qt_format_supports_framerate()

bool qt_format_supports_framerate ( AVCaptureDeviceFormat * format,
qreal fps )

Definition at line 394 of file avfcamerautility.mm.

References epsilon.

Referenced by avfVideoSettings().

+ Here is the caller graph for this function:

◆ qt_formats_are_equal()

bool qt_formats_are_equal ( AVCaptureDeviceFormat * f1,
AVCaptureDeviceFormat * f2 )

Definition at line 407 of file avfcamerautility.mm.

Referenced by qt_set_active_format().

+ Here is the caller graph for this function:

◆ qt_set_active_format()

bool qt_set_active_format ( AVCaptureDevice * captureDevice,
AVCaptureDeviceFormat * format,
bool preserveFps )

Definition at line 418 of file avfcamerautility.mm.

References lock, qt_current_framerates(), qt_formats_are_equal(), qt_set_framerate_limits(), and qWarning.

Referenced by AVFImageCapture::applySettings(), and avfVideoSettings().

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

◆ qt_set_framerate_limits()

void qt_set_framerate_limits ( AVCaptureDevice * captureDevice,
AVCaptureConnection * videoConnection,
qreal minFPS,
qreal maxFPS )

Definition at line 568 of file avfcamerautility.mm.

References Q_ASSERT, Q_UNUSED, and qt_set_framerate_limits().

+ Here is the call graph for this function:

◆ qt_supported_bit_rates_for_format()

QList< AudioValueRange > qt_supported_bit_rates_for_format ( int codecId)

Definition at line 628 of file avfcamerautility.mm.

References codecId(), and i.

Referenced by avfAudioSettings().

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

◆ qt_supported_channel_counts_for_format()

std::optional< QList< UInt32 > > qt_supported_channel_counts_for_format ( int codecId)

Definition at line 659 of file avfcamerautility.mm.

References codecId(), and i.

Referenced by avfAudioSettings().

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

◆ qt_supported_channel_layout_tags_for_format()

QList< UInt32 > qt_supported_channel_layout_tags_for_format ( int codecId,
int noChannels )

Definition at line 696 of file avfcamerautility.mm.

References codecId(), and i.

Referenced by avfAudioSettings().

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

◆ qt_supported_sample_rates_for_format()

QList< AudioValueRange > qt_supported_sample_rates_for_format ( int codecId)

Definition at line 597 of file avfcamerautility.mm.

References codecId(), and i.

Referenced by avfAudioSettings().

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

◆ qt_unique_device_formats()

QList< AVCaptureDeviceFormat * > qt_unique_device_formats ( AVCaptureDevice * captureDevice,
FourCharCode preferredFormat )

Definition at line 143 of file avfcamerautility.mm.

References codec, i, QSize::isNull(), QSize::isValid(), Q_ASSERT, and qt_device_format_resolution().

Referenced by qt_find_best_framerate_match(), and qt_find_best_resolution_match().

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