Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <androidcamera_p.h>
Classes | |
struct | FpsRange |
Public Types | |
enum | CameraFacing { CameraFacingBack = 0 , CameraFacingFront = 1 } |
enum | ImageFormat { UnknownImageFormat = 0 , RGB565 = 4 , NV16 = 16 , NV21 = 17 , YUY2 = 20 , JPEG = 256 , YV12 = 842094169 } |
Signals | |
void | previewSizeChanged () |
void | previewStarted () |
void | previewFailedToStart () |
void | previewStopped () |
void | autoFocusStarted () |
void | autoFocusComplete (bool success) |
void | whiteBalanceChanged () |
void | takePictureFailed () |
void | pictureExposed () |
void | pictureCaptured (const QByteArray &frame, QVideoFrameFormat::PixelFormat format, QSize size, int bytesPerLine) |
void | lastPreviewFrameFetched (const QVideoFrame &frame) |
void | newPreviewFrame (const QVideoFrame &frame) |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
~AndroidCamera () | |
int | cameraId () const |
bool | lock () |
bool | unlock () |
bool | reconnect () |
void | release () |
CameraFacing | getFacing () |
int | getNativeOrientation () |
QSize | getPreferredPreviewSizeForVideo () |
QList< QSize > | getSupportedPreviewSizes () |
QList< FpsRange > | getSupportedPreviewFpsRange () |
FpsRange | getPreviewFpsRange () |
void | setPreviewFpsRange (FpsRange) |
ImageFormat | getPreviewFormat () |
void | setPreviewFormat (ImageFormat fmt) |
QList< ImageFormat > | getSupportedPreviewFormats () |
QSize | previewSize () const |
QSize | actualPreviewSize () |
void | setPreviewSize (const QSize &size) |
bool | setPreviewTexture (AndroidSurfaceTexture *surfaceTexture) |
bool | setPreviewDisplay (AndroidSurfaceHolder *surfaceHolder) |
void | setDisplayOrientation (int degrees) |
bool | isZoomSupported () |
int | getMaxZoom () |
QList< int > | getZoomRatios () |
int | getZoom () |
void | setZoom (int value) |
QStringList | getSupportedFlashModes () |
QString | getFlashMode () |
void | setFlashMode (const QString &value) |
QStringList | getSupportedFocusModes () |
QString | getFocusMode () |
void | setFocusMode (const QString &value) |
int | getMaxNumFocusAreas () |
QList< QRect > | getFocusAreas () |
void | setFocusAreas (const QList< QRect > &areas) |
void | autoFocus () |
void | cancelAutoFocus () |
bool | isAutoExposureLockSupported () |
bool | getAutoExposureLock () |
void | setAutoExposureLock (bool toggle) |
bool | isAutoWhiteBalanceLockSupported () |
bool | getAutoWhiteBalanceLock () |
void | setAutoWhiteBalanceLock (bool toggle) |
int | getExposureCompensation () |
void | setExposureCompensation (int value) |
float | getExposureCompensationStep () |
int | getMinExposureCompensation () |
int | getMaxExposureCompensation () |
QStringList | getSupportedSceneModes () |
QString | getSceneMode () |
void | setSceneMode (const QString &value) |
QStringList | getSupportedWhiteBalance () |
QString | getWhiteBalance () |
void | setWhiteBalance (const QString &value) |
void | setRotation (int rotation) |
int | getRotation () const |
QList< QCameraFormat > | getSupportedFormats () |
QList< QSize > | getSupportedPictureSizes () |
QList< QSize > | getSupportedVideoSizes () |
void | setPictureSize (const QSize &size) |
void | setJpegQuality (int quality) |
void | startPreview () |
void | stopPreview () |
void | stopPreviewSynchronous () |
void | takePicture () |
void | setupPreviewFrameCallback () |
void | notifyNewFrames (bool notify) |
void | fetchLastPreviewFrame () |
QJniObject | getCameraObject () |
QJniObject | getParametersObject () |
Public Member Functions inherited from QObject | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
bool | moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL) |
Changes the thread affinity for this object and its children and returns true on success. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
void | killTimer (Qt::TimerId id) |
template<typename T > | |
T | findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
T | findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Additional Inherited Members | |
Public Slots inherited from QObject | |
void | deleteLater () |
\threadsafe | |
Protected Member Functions inherited from QObject | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Protected Attributes inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Properties inherited from QObject | |
QString | objectName |
the name of this object | |
Related Symbols inherited from QObject | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 34 of file androidcamera_p.h.
Enumerator | |
---|---|
CameraFacingBack | |
CameraFacingFront |
Definition at line 38 of file androidcamera_p.h.
Enumerator | |
---|---|
UnknownImageFormat | |
RGB565 | |
NV16 | |
NV21 | |
YUY2 | |
JPEG | |
YV12 |
Definition at line 44 of file androidcamera_p.h.
AndroidCamera::~AndroidCamera | ( | ) |
Definition at line 308 of file androidcamera.cpp.
References release().
QSize AndroidCamera::actualPreviewSize | ( | ) |
Definition at line 449 of file androidcamera.cpp.
|
static |
Definition at line 832 of file androidcamera.cpp.
void AndroidCamera::autoFocus | ( | ) |
Definition at line 582 of file androidcamera.cpp.
|
signal |
|
signal |
int AndroidCamera::cameraId | ( | ) | const |
Definition at line 347 of file androidcamera.cpp.
void AndroidCamera::cancelAutoFocus | ( | ) |
Definition at line 588 of file androidcamera.cpp.
Referenced by QAndroidCamera::setFocusMode().
void AndroidCamera::fetchLastPreviewFrame | ( | ) |
Definition at line 758 of file androidcamera.cpp.
bool AndroidCamera::getAutoExposureLock | ( | ) |
Definition at line 600 of file androidcamera.cpp.
bool AndroidCamera::getAutoWhiteBalanceLock | ( | ) |
Definition at line 618 of file androidcamera.cpp.
|
static |
Definition at line 779 of file androidcamera.cpp.
QJniObject AndroidCamera::getCameraObject | ( | ) |
Definition at line 764 of file androidcamera.cpp.
int AndroidCamera::getExposureCompensation | ( | ) |
Definition at line 630 of file androidcamera.cpp.
float AndroidCamera::getExposureCompensationStep | ( | ) |
Definition at line 642 of file androidcamera.cpp.
AndroidCamera::CameraFacing AndroidCamera::getFacing | ( | ) |
Definition at line 383 of file androidcamera.cpp.
QString AndroidCamera::getFlashMode | ( | ) |
Definition at line 534 of file androidcamera.cpp.
Definition at line 570 of file androidcamera.cpp.
QString AndroidCamera::getFocusMode | ( | ) |
Definition at line 552 of file androidcamera.cpp.
int AndroidCamera::getMaxExposureCompensation | ( | ) |
Definition at line 654 of file androidcamera.cpp.
int AndroidCamera::getMaxNumFocusAreas | ( | ) |
Definition at line 564 of file androidcamera.cpp.
int AndroidCamera::getMaxZoom | ( | ) |
Definition at line 504 of file androidcamera.cpp.
int AndroidCamera::getMinExposureCompensation | ( | ) |
Definition at line 648 of file androidcamera.cpp.
int AndroidCamera::getNativeOrientation | ( | ) |
Definition at line 389 of file androidcamera.cpp.
|
static |
Definition at line 770 of file androidcamera.cpp.
References qt_androidCheckCameraPermission().
QJniObject AndroidCamera::getParametersObject | ( | ) |
Definition at line 884 of file androidcamera.cpp.
QSize AndroidCamera::getPreferredPreviewSizeForVideo | ( | ) |
Definition at line 395 of file androidcamera.cpp.
AndroidCamera::ImageFormat AndroidCamera::getPreviewFormat | ( | ) |
Definition at line 425 of file androidcamera.cpp.
AndroidCamera::FpsRange AndroidCamera::getPreviewFpsRange | ( | ) |
Definition at line 413 of file androidcamera.cpp.
int AndroidCamera::getRotation | ( | ) | const |
Definition at line 710 of file androidcamera.cpp.
QString AndroidCamera::getSceneMode | ( | ) |
Definition at line 666 of file androidcamera.cpp.
QStringList AndroidCamera::getSupportedFlashModes | ( | ) |
Definition at line 528 of file androidcamera.cpp.
QStringList AndroidCamera::getSupportedFocusModes | ( | ) |
Definition at line 546 of file androidcamera.cpp.
QList< QCameraFormat > AndroidCamera::getSupportedFormats | ( | ) |
Definition at line 848 of file androidcamera.cpp.
Definition at line 716 of file androidcamera.cpp.
QList< AndroidCamera::ImageFormat > AndroidCamera::getSupportedPreviewFormats | ( | ) |
Definition at line 437 of file androidcamera.cpp.
QList< AndroidCamera::FpsRange > AndroidCamera::getSupportedPreviewFpsRange | ( | ) |
Definition at line 407 of file androidcamera.cpp.
Definition at line 401 of file androidcamera.cpp.
QStringList AndroidCamera::getSupportedSceneModes | ( | ) |
Definition at line 660 of file androidcamera.cpp.
Definition at line 722 of file androidcamera.cpp.
QStringList AndroidCamera::getSupportedWhiteBalance | ( | ) |
Definition at line 678 of file androidcamera.cpp.
QString AndroidCamera::getWhiteBalance | ( | ) |
Definition at line 684 of file androidcamera.cpp.
int AndroidCamera::getZoom | ( | ) |
Definition at line 516 of file androidcamera.cpp.
QList< int > AndroidCamera::getZoomRatios | ( | ) |
Definition at line 510 of file androidcamera.cpp.
bool AndroidCamera::isAutoExposureLockSupported | ( | ) |
Definition at line 594 of file androidcamera.cpp.
bool AndroidCamera::isAutoWhiteBalanceLockSupported | ( | ) |
Definition at line 612 of file androidcamera.cpp.
bool AndroidCamera::isZoomSupported | ( | ) |
Definition at line 498 of file androidcamera.cpp.
|
signal |
bool AndroidCamera::lock | ( | ) |
Definition at line 353 of file androidcamera.cpp.
|
signal |
void AndroidCamera::notifyNewFrames | ( | bool | notify | ) |
Definition at line 752 of file androidcamera.cpp.
|
static |
Definition at line 321 of file androidcamera.cpp.
References qt_androidCheckCameraPermission().
|
signal |
|
signal |
|
signal |
QSize AndroidCamera::previewSize | ( | ) | const |
Definition at line 443 of file androidcamera.cpp.
|
signal |
|
signal |
|
signal |
|
static |
Definition at line 816 of file androidcamera.cpp.
bool AndroidCamera::reconnect | ( | ) |
Definition at line 369 of file androidcamera.cpp.
|
static |
Definition at line 1780 of file androidcamera.cpp.
References QtCameraListenerClassName.
void AndroidCamera::release | ( | ) |
Definition at line 377 of file androidcamera.cpp.
Referenced by ~AndroidCamera().
|
static |
void AndroidCamera::setAutoExposureLock | ( | bool | toggle | ) |
Definition at line 606 of file androidcamera.cpp.
void AndroidCamera::setAutoWhiteBalanceLock | ( | bool | toggle | ) |
Definition at line 624 of file androidcamera.cpp.
void AndroidCamera::setDisplayOrientation | ( | int | degrees | ) |
Definition at line 492 of file androidcamera.cpp.
void AndroidCamera::setExposureCompensation | ( | int | value | ) |
Definition at line 636 of file androidcamera.cpp.
Referenced by QAndroidCamera::setExposureCompensation().
Definition at line 540 of file androidcamera.cpp.
Definition at line 576 of file androidcamera.cpp.
Definition at line 558 of file androidcamera.cpp.
void AndroidCamera::setJpegQuality | ( | int | quality | ) |
Definition at line 734 of file androidcamera.cpp.
Definition at line 728 of file androidcamera.cpp.
bool AndroidCamera::setPreviewDisplay | ( | AndroidSurfaceHolder * | surfaceHolder | ) |
Definition at line 480 of file androidcamera.cpp.
void AndroidCamera::setPreviewFormat | ( | ImageFormat | fmt | ) |
Definition at line 431 of file androidcamera.cpp.
Definition at line 419 of file androidcamera.cpp.
Definition at line 455 of file androidcamera.cpp.
bool AndroidCamera::setPreviewTexture | ( | AndroidSurfaceTexture * | surfaceTexture | ) |
Definition at line 468 of file androidcamera.cpp.
void AndroidCamera::setRotation | ( | int | rotation | ) |
Definition at line 696 of file androidcamera.cpp.
Definition at line 672 of file androidcamera.cpp.
void AndroidCamera::setupPreviewFrameCallback | ( | ) |
Definition at line 746 of file androidcamera.cpp.
Definition at line 690 of file androidcamera.cpp.
void AndroidCamera::setZoom | ( | int | value | ) |
Definition at line 522 of file androidcamera.cpp.
Referenced by QAndroidCamera::zoomTo().
void AndroidCamera::startPreview | ( | ) |
Definition at line 866 of file androidcamera.cpp.
void AndroidCamera::stopPreview | ( | ) |
Definition at line 872 of file androidcamera.cpp.
void AndroidCamera::stopPreviewSynchronous | ( | ) |
Definition at line 878 of file androidcamera.cpp.
void AndroidCamera::takePicture | ( | ) |
Definition at line 740 of file androidcamera.cpp.
|
signal |
bool AndroidCamera::unlock | ( | ) |
Definition at line 361 of file androidcamera.cpp.
|
signal |