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

(af2321f6bf8e404f8bbd8eb1391e16a9da2b0a9a)

#include "androidcamera_p.h"
#include "androidsurfacetexture_p.h"
#include "androidsurfaceview_p.h"
#include "qandroidmultimediautils_p.h"
#include "qandroidglobal_p.h"
#include <qhash.h>
#include <qstringlist.h>
#include <qdebug.h>
#include <QtCore/qthread.h>
#include <QtCore/qreadwritelock.h>
#include <QtCore/qmutex.h>
#include <QtMultimedia/private/qmemoryvideobuffer_p.h>
#include <QtCore/qcoreapplication.h>
#include <mutex>
#include "androidcamera.moc"
#include "moc_androidcamera_p.cpp"
+ Include dependency graph for androidcamera.cpp:

Go to the source code of this file.

Classes

class  AndroidCameraPrivate
 

Typedefs

typedef QHash< int, AndroidCamera * > CameraMap
 

Functions

static QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY (lcAndroidCamera, "qt.multimedia.android.camera") static const char QtCameraListenerClassName[]
 
static QRect areaToRect (jobject areaObj)
 
static QJniObject rectToArea (const QRect &rect)
 
static void notifyAutoFocusComplete (JNIEnv *, jobject, int id, jboolean success)
 
static void notifyPictureExposed (JNIEnv *, jobject, int id)
 
static void notifyPictureCaptured (JNIEnv *env, jobject, int id, jbyteArray data)
 
static void notifyNewPreviewFrame (JNIEnv *env, jobject, int id, jbyteArray data, int width, int height, int format, int bpl)
 
static void notifyFrameAvailable (JNIEnv *, jobject, int id)
 

Variables

static qint32 s_activeCameras = 0
 

Typedef Documentation

◆ CameraMap

typedef QHash<int, AndroidCamera *> CameraMap

Definition at line 28 of file androidcamera.cpp.

Function Documentation

◆ areaToRect()

static QRect areaToRect ( jobject areaObj)
static

Definition at line 32 of file androidcamera.cpp.

References area(), and rect.

Referenced by AndroidCameraPrivate::getFocusAreas().

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

◆ notifyAutoFocusComplete()

static void notifyAutoFocusComplete ( JNIEnv * ,
jobject ,
int id,
jboolean success )
static

Definition at line 57 of file androidcamera.cpp.

References QSet< T >::cend(), QSet< T >::constFind(), it, Q_EMIT, and Q_UNLIKELY.

Referenced by AndroidCamera::registerNativeMethods().

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

◆ notifyFrameAvailable()

static void notifyFrameAvailable ( JNIEnv * ,
jobject ,
int id )
static

Definition at line 155 of file androidcamera.cpp.

References QSet< T >::cend(), QSet< T >::constFind(), it, and Q_UNLIKELY.

Referenced by AndroidCamera::registerNativeMethods(), and AndroidSurfaceTexture::registerNativeMethods().

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

◆ notifyNewPreviewFrame()

static void notifyNewPreviewFrame ( JNIEnv * env,
jobject ,
int id,
jbyteArray data,
int width,
int height,
int format,
int bpl )
static

Definition at line 133 of file androidcamera.cpp.

References arrayLength(), QSet< T >::cend(), QSet< T >::constFind(), QByteArray::data(), frame, it, Q_EMIT, Q_UNLIKELY, qt_pixelFormatFromAndroidImageFormat(), and Qt::Uninitialized.

Referenced by AndroidCamera::registerNativeMethods().

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

◆ notifyPictureCaptured()

static void notifyPictureCaptured ( JNIEnv * env,
jobject ,
int id,
jbyteArray data )
static

Definition at line 77 of file androidcamera.cpp.

References arrayLength(), camera, QSet< T >::cend(), QSet< T >::constFind(), QByteArray::data(), emit, it, AndroidCamera::NV21, Q_UNLIKELY, qCWarning, qt_pixelFormatFromAndroidImageFormat(), AndroidCamera::RGB565, Qt::Uninitialized, AndroidCamera::UnknownImageFormat, AndroidCamera::YUY2, and AndroidCamera::YV12.

Referenced by AndroidCamera::registerNativeMethods().

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

◆ notifyPictureExposed()

static void notifyPictureExposed ( JNIEnv * ,
jobject ,
int id )
static

Definition at line 67 of file androidcamera.cpp.

References QSet< T >::cend(), QSet< T >::constFind(), it, Q_EMIT, and Q_UNLIKELY.

Referenced by AndroidCamera::registerNativeMethods().

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

◆ Q_LOGGING_CATEGORY()

static QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY ( lcAndroidCamera ,
"qt.multimedia.android.camera"  ) const
static

◆ rectToArea()

static QJniObject rectToArea ( const QRect & rect)
static

Definition at line 43 of file androidcamera.cpp.

References area(), and rect.

Referenced by AndroidCameraPrivate::setFocusAreas().

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

Variable Documentation

◆ s_activeCameras

qint32 s_activeCameras = 0
static

Definition at line 894 of file androidcamera.cpp.

Referenced by AndroidCameraPrivate::init(), and AndroidCameraPrivate::release().